-- cgit -- cgit -- cgit -- cgit From bd02cbf4ac5ed3db172bf1b28c78b7ab4e1c65cf Mon Sep 17 00:00:00 2001 From: Eric Bachard Date: Sun, 14 Dec 2008 14:33:31 +0000 Subject: #i96978# add the possibility to switch the way to send the PLAY event in debug mode (will be removed once i97195 will be fixed) --- vcl/aqua/source/app/salinst.cxx | 117 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index 2d6648063088..bd809af285d1 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -59,6 +59,7 @@ #include #include #import "apple_remote/RemoteMainController.h" +#include "apple_remote/RemoteControl.h" #include "postmac.h" @@ -563,6 +564,10 @@ bool AquaSalInstance::isNSAppThread() const void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ) { + + // export REPLACE_F5=TRUE allows to test the fix for issue #i97195# + static const char *pExperimentalEvent = getenv ("REPLACE_F5"); + switch( [pEvent subtype] ) { case AppStartTimerEvent: @@ -585,9 +590,121 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ) } } break; + case AppleRemoteEvent: + { + sal_Int16 nCommand = 0; + SalData* pSalData = GetSalData(); + bool bIsFullScreenMode = false; + std::list::iterator it = pSalData->maFrames.begin(); + while( (*it) && ( (it != pSalData->maFrames.end() ) || ( (*it)->mbFullScreen == false ) ) ) + { + if ( ((*it)->mbFullScreen == true) ) + bIsFullScreenMode = true; + it++; + } + + if ( bIsFullScreenMode == true ) + { +#ifdef DEBUG + fprintf( stderr, "Received the following event from the Apple Remote : %d \n", [pEvent data1] ); +#endif + switch ([pEvent data1]) + { + // FIXME : Cocoa controls everything. How to control then ? + // case kRemoteButtonMenu: nCommand = MEDIA_COMMAND_MENU; break; + + case kRemoteButtonPlay: nCommand = MEDIA_COMMAND_PLAY_PAUSE; break; + + // FIXME : does not work as expected. Maybe Apple black magic + //case kRemoteButtonPlus: nCommand = MEDIA_COMMAND_VOLUME_UP; break; + //case kRemoteButtonMinus: nCommand = MEDIA_COMMAND_VOLUME_DOWN; break; + + case kRemoteButtonPlus: + case kRemoteButtonRight: nCommand = MEDIA_COMMAND_NEXTTRACK; break; + + case kRemoteButtonMinus: + case kRemoteButtonLeft: nCommand = MEDIA_COMMAND_PREVIOUSTRACK; break; + + case kRemoteButtonLeft_Hold: nCommand = MEDIA_COMMAND_REWIND; break; + + case kRemoteButtonRight_Hold: nCommand = MEDIA_COMMAND_NEXTTRACK_HOLD; break; + + // not detected (why?) + case kRemoteButtonPlus_Hold: + case kRemoteButtonMinus_Hold: + break; + + case kRemoteButtonPlay_Hold: nCommand = MEDIA_COMMAND_PLAY_HOLD; break; + + case kRemoteButtonMenu_Hold: nCommand = MEDIA_COMMAND_STOP; break; + + default: + break; + } + } + else // normal mode + { + switch ([pEvent data1]) + { + // FIXME : experimental, will be removed. Currently, the way to startShow() is not implemented. + // and the most simple is to keep the KeyCode (efault) until we have a better solution + + case kRemoteButtonPlay: + { + if ( (pExperimentalEvent && !strcasecmp(pExperimentalEvent, "TRUE")) ) + { + fprintf( stdout, "<<<___ MEDIA_COMMAND_PLAY is used ___>>> (REPLACE_F5 is set to TRUE) \n"); + nCommand = MEDIA_COMMAND_PLAY; + } + else + { + unichar playFunction=NSF5FunctionKey; + NSString *characters=[NSString stringWithCharacters: &playFunction length: 1]; + [NSApp postEvent: + [NSEvent keyEventWithType:NSKeyDown + location: NSZeroPoint + modifierFlags : 0 + timestamp: 0 + windowNumber: [[NSApp keyWindow] windowNumber] + context: nil + characters: characters + charactersIgnoringModifiers: characters + isARepeat: NO + keyCode: NSF5FunctionKey] + atStart: NO]; + } + } + break; + + case kRemoteButtonMenu_Hold: nCommand = MEDIA_COMMAND_MENU_HOLD; break; + + default: +#ifdef DEBUG + NSLog(@"Unmapped event for button %d", [pEvent data1] ); +#endif + break; + } + } + AquaSalFrame* pFrame = pSalData->maFrames.front(); + Window * pWindow = pFrame->GetWindow() ? pSalData->maFrames.front()->GetWindow() : NULL; + + if( pWindow ) + { + const Point aPoint; + CommandEvent aCEvt( aPoint, COMMAND_MEDIA, FALSE, &nCommand ); + NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, &aCEvt ); + + if ( !ImplCallPreNotify( aNCmdEvt ) ) + pWindow->Command( aCEvt ); + } + + } + break; + case YieldWakeupEvent: // do nothing, fall out of Yield break; + default: DBG_ERROR( "unhandled NSApplicationDefined event" ); break; -- cgit From 0e9c6b78527f5969e177015ba49d923364ac65cc Mon Sep 17 00:00:00 2001 From: Eric Bachard Date: Sun, 14 Dec 2008 16:27:49 +0000 Subject: #i10000# reverting bad commit --- vcl/aqua/source/app/salinst.cxx | 117 ---------------------------------------- 1 file changed, 117 deletions(-) diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index bd809af285d1..2d6648063088 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -59,7 +59,6 @@ #include #include #import "apple_remote/RemoteMainController.h" -#include "apple_remote/RemoteControl.h" #include "postmac.h" @@ -564,10 +563,6 @@ bool AquaSalInstance::isNSAppThread() const void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ) { - - // export REPLACE_F5=TRUE allows to test the fix for issue #i97195# - static const char *pExperimentalEvent = getenv ("REPLACE_F5"); - switch( [pEvent subtype] ) { case AppStartTimerEvent: @@ -590,121 +585,9 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ) } } break; - case AppleRemoteEvent: - { - sal_Int16 nCommand = 0; - SalData* pSalData = GetSalData(); - bool bIsFullScreenMode = false; - std::list::iterator it = pSalData->maFrames.begin(); - while( (*it) && ( (it != pSalData->maFrames.end() ) || ( (*it)->mbFullScreen == false ) ) ) - { - if ( ((*it)->mbFullScreen == true) ) - bIsFullScreenMode = true; - it++; - } - - if ( bIsFullScreenMode == true ) - { -#ifdef DEBUG - fprintf( stderr, "Received the following event from the Apple Remote : %d \n", [pEvent data1] ); -#endif - switch ([pEvent data1]) - { - // FIXME : Cocoa controls everything. How to control then ? - // case kRemoteButtonMenu: nCommand = MEDIA_COMMAND_MENU; break; - - case kRemoteButtonPlay: nCommand = MEDIA_COMMAND_PLAY_PAUSE; break; - - // FIXME : does not work as expected. Maybe Apple black magic - //case kRemoteButtonPlus: nCommand = MEDIA_COMMAND_VOLUME_UP; break; - //case kRemoteButtonMinus: nCommand = MEDIA_COMMAND_VOLUME_DOWN; break; - - case kRemoteButtonPlus: - case kRemoteButtonRight: nCommand = MEDIA_COMMAND_NEXTTRACK; break; - - case kRemoteButtonMinus: - case kRemoteButtonLeft: nCommand = MEDIA_COMMAND_PREVIOUSTRACK; break; - - case kRemoteButtonLeft_Hold: nCommand = MEDIA_COMMAND_REWIND; break; - - case kRemoteButtonRight_Hold: nCommand = MEDIA_COMMAND_NEXTTRACK_HOLD; break; - - // not detected (why?) - case kRemoteButtonPlus_Hold: - case kRemoteButtonMinus_Hold: - break; - - case kRemoteButtonPlay_Hold: nCommand = MEDIA_COMMAND_PLAY_HOLD; break; - - case kRemoteButtonMenu_Hold: nCommand = MEDIA_COMMAND_STOP; break; - - default: - break; - } - } - else // normal mode - { - switch ([pEvent data1]) - { - // FIXME : experimental, will be removed. Currently, the way to startShow() is not implemented. - // and the most simple is to keep the KeyCode (efault) until we have a better solution - - case kRemoteButtonPlay: - { - if ( (pExperimentalEvent && !strcasecmp(pExperimentalEvent, "TRUE")) ) - { - fprintf( stdout, "<<<___ MEDIA_COMMAND_PLAY is used ___>>> (REPLACE_F5 is set to TRUE) \n"); - nCommand = MEDIA_COMMAND_PLAY; - } - else - { - unichar playFunction=NSF5FunctionKey; - NSString *characters=[NSString stringWithCharacters: &playFunction length: 1]; - [NSApp postEvent: - [NSEvent keyEventWithType:NSKeyDown - location: NSZeroPoint - modifierFlags : 0 - timestamp: 0 - windowNumber: [[NSApp keyWindow] windowNumber] - context: nil - characters: characters - charactersIgnoringModifiers: characters - isARepeat: NO - keyCode: NSF5FunctionKey] - atStart: NO]; - } - } - break; - - case kRemoteButtonMenu_Hold: nCommand = MEDIA_COMMAND_MENU_HOLD; break; - - default: -#ifdef DEBUG - NSLog(@"Unmapped event for button %d", [pEvent data1] ); -#endif - break; - } - } - AquaSalFrame* pFrame = pSalData->maFrames.front(); - Window * pWindow = pFrame->GetWindow() ? pSalData->maFrames.front()->GetWindow() : NULL; - - if( pWindow ) - { - const Point aPoint; - CommandEvent aCEvt( aPoint, COMMAND_MEDIA, FALSE, &nCommand ); - NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, &aCEvt ); - - if ( !ImplCallPreNotify( aNCmdEvt ) ) - pWindow->Command( aCEvt ); - } - - } - break; - case YieldWakeupEvent: // do nothing, fall out of Yield break; - default: DBG_ERROR( "unhandled NSApplicationDefined event" ); break; -- cgit From 8357393805955523d089aa81adf8a44022937917 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 4 Mar 2009 16:19:59 +0000 Subject: #91226#: mongolian text layout --- sw/source/core/crsr/crsrsh.cxx | 6 + sw/source/core/doc/docdraw.cxx | 34 +++- sw/source/core/draw/dflyobj.cxx | 42 ++++- sw/source/core/draw/dview.cxx | 17 +- sw/source/core/inc/frame.hxx | 47 +++++- sw/source/core/layout/calcmove.cxx | 28 +++- sw/source/core/layout/colfrm.cxx | 5 +- sw/source/core/layout/findfrm.cxx | 4 + sw/source/core/layout/fly.cxx | 13 ++ sw/source/core/layout/flycnt.cxx | 182 ++++++++++++++++++--- sw/source/core/layout/ftnfrm.cxx | 10 +- sw/source/core/layout/layact.cxx | 26 ++- sw/source/core/layout/newfrm.cxx | 58 +++++++ sw/source/core/layout/pagechg.cxx | 19 ++- sw/source/core/layout/paintfrm.cxx | 27 ++- sw/source/core/layout/ssfrm.cxx | 21 ++- sw/source/core/layout/tabfrm.cxx | 10 +- sw/source/core/layout/trvlfrm.cxx | 6 +- sw/source/core/layout/wsfrm.cxx | 82 ++++++++-- .../objectpositioning/anchoredobjectposition.cxx | 15 +- .../tocntntanchoredobjectposition.cxx | 10 +- .../tolayoutanchoredobjectposition.cxx | 14 +- sw/source/core/text/frmcrsr.cxx | 28 +++- sw/source/core/text/frmform.cxx | 21 ++- sw/source/core/text/frmpaint.cxx | 4 + sw/source/core/text/inftxt.cxx | 8 +- sw/source/core/text/itrtxt.cxx | 8 +- sw/source/core/text/txtfrm.cxx | 105 ++++++++++-- sw/source/core/text/txttab.cxx | 9 +- sw/source/core/text/widorp.cxx | 12 +- 30 files changed, 753 insertions(+), 118 deletions(-) diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index bb6a870bc252..94c99ca742f5 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -462,6 +462,12 @@ void SwCrsrShell::UpdateMarkedListLevel() BOOL SwCrsrShell::UpDown( BOOL bUp, USHORT nCnt ) { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + SwCntntFrm *pFrm = pCurCrsr->GetCntntNode()->GetFrm( + &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint() ); + if(pFrm->IsVertical() && pFrm->IsVertLR()) + bUp=!bUp; + //End of SCMS SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 61d35ece9df6..cbcf67e7f1e8 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -150,11 +150,12 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt, { case FRMDIR_VERT_TOP_LEFT: { - // vertical from left-to-right - not supported yet + // vertical from left-to-right - Badaa: supported now! bVert = true; bR2L = true; - ASSERT( false, - " - vertical from left-to-right not supported." ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //ASSERT( false, " - vertical from left-to-right not supported." ); + //End } break; case FRMDIR_VERT_TOP_RIGHT: @@ -183,7 +184,8 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt, } // use geometry of drawing object const SwRect aObjRect = _rSdrObj.GetSnapRect(); - if ( bVert ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + /*if ( bVert ) { nHoriRelPos = aObjRect.Top() - aAnchorPos.Y(); nVertRelPos = aAnchorPos.X() - aObjRect.Right(); @@ -194,10 +196,34 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt, nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); } else + { + nHoriRelPos = aObjRect.Left() - aAnchorPos.X(); + nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); + }*/ + + if ( bVert ) + { + if ( bR2L ) { + //FRMDIR_VERT_TOP_LEFT + nHoriRelPos = aObjRect.Left() - aAnchorPos.X(); + nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); + } else { + //FRMDIR_VERT_TOP_RIGHT + nHoriRelPos = aObjRect.Top() - aAnchorPos.Y(); + nVertRelPos = aAnchorPos.X() - aObjRect.Right(); + } + } + else if ( bR2L ) + { + nHoriRelPos = aAnchorPos.X() - aObjRect.Right(); + nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); + } + else { nHoriRelPos = aObjRect.Left() - aAnchorPos.X(); nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); } + //End of SCMS } _pFrmFmt->SetFmtAttr( SwFmtHoriOrient( nHoriRelPos, text::HoriOrientation::NONE, text::RelOrientation::FRAME ) ); diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index a9be7f621d93..5c6349a80a85 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -653,8 +653,20 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz) long lYDiff = aNewPos.Y() - aOldPos.Y(); if( GetFlyFrm()->GetAnchorFrm()->IsVertical() ) { - lXDiff -= rVert.GetPos(); - lYDiff += rHori.GetPos(); + //lXDiff -= rVert.GetPos(); + //lYDiff += rHori.GetPos(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + if ( GetFlyFrm()->GetAnchorFrm()->IsVertLR() ) + { + lXDiff += rVert.GetPos(); + lXDiff = -lXDiff; + } + else + { + lXDiff -= rVert.GetPos(); + lYDiff += rHori.GetPos(); + } + //End of SCMS } else { @@ -765,11 +777,18 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, const sal_Bool bRTL = pTmpFrm->IsRightToLeft(); - const Point aNewPos( bVertX || bRTL ? + //const Point aNewPos( bVertX || bRTL ? + // aOutRect.Right() + 1 : + // aOutRect.Left(), + // aOutRect.Top() ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + const bool bVertL2RX = pTmpFrm->IsVertLR(); + const Point aNewPos( ( bVertX && !bVertL2RX ) || bRTL ? aOutRect.Right() + 1 : aOutRect.Left(), aOutRect.Top() ); + //End of SCMS Size aSz( aOutRect.Right() - aOutRect.Left() + 1, aOutRect.Bottom()- aOutRect.Top() + 1 ); if( aSz != GetFlyFrm()->Frm().SSize() ) @@ -830,10 +849,14 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, } //Position kann auch veraendert sein! - const Point aOldPos( bVertX || bRTL ? + //const Point aOldPos( bVertX || bRTL ? + // GetFlyFrm()->Frm().TopRight() : + // GetFlyFrm()->Frm().Pos() ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + const Point aOldPos( ( bVertX && !bVertL2RX ) || bRTL ? GetFlyFrm()->Frm().TopRight() : GetFlyFrm()->Frm().Pos() ); - + //End of SCMS if ( aNewPos != aOldPos ) { //Kann sich durch das ChgSize veraendert haben! @@ -841,7 +864,14 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, { if( aOutRect.TopRight() != aNewPos ) { - SwTwips nDeltaX = aNewPos.X() - aOutRect.Right(); + //SwTwips nDeltaX = aNewPos.X() - aOutRect.Right(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + SwTwips nDeltaX; + if ( bVertL2RX ) + nDeltaX = aNewPos.X() - aOutRect.Left(); + else + nDeltaX = aNewPos.X() - aOutRect.Right(); + //End of SCMS SwTwips nDeltaY = aNewPos.Y() - aOutRect.Top(); MoveRect( aOutRect, Size( nDeltaX, nDeltaY ) ); } diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index bd5e08a7af4a..edd1cd9be301 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -198,8 +198,13 @@ void SwDrawView::AddCustomHdl() } // add anchor handle: - aHdl.AddHdl( new SwSdrHdl( aPos, pAnch->IsVertical() || + //aHdl.AddHdl( new SwSdrHdl( aPos, pAnch->IsVertical() || + // pAnch->IsRightToLeft() ) ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + aHdl.AddHdl( new SwSdrHdl( aPos, ( pAnch->IsVertical() && !pAnch->IsVertLR() ) || pAnch->IsRightToLeft() ) ); + //End of SCMS + } /************************************************************************* @@ -748,9 +753,13 @@ const SwFrm* SwDrawView::CalcAnchor() aMyRect = pObj->GetSnapRect(); } - const sal_Bool bTopRight = pAnch && ( pAnch->IsVertical() || - pAnch->IsRightToLeft() ); - + //const sal_Bool bTopRight = pAnch && ( pAnch->IsVertical() || + // pAnch->IsRightToLeft() ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + const sal_Bool bTopRight = pAnch && ( ( pAnch->IsVertical() && + !pAnch->IsVertLR() ) || + pAnch->IsRightToLeft() ); + //End of SCMS const Point aMyPt = bTopRight ? aMyRect.TopRight() : aMyRect.TopLeft(); Point aPt; diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 02c8040b83c3..4c738eac8984 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -199,8 +199,8 @@ struct SwRectFnCollection }; typedef SwRectFnCollection* SwRectFn; +/* extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R; - #define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \ sal_Bool bRev = pFrm->IsReverse(); \ SwRectFn fnRect = bVert ? \ @@ -222,6 +222,36 @@ extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R; sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \ SwRectFn fnRect = bVert == bNeighb ? \ fnRectHori : fnRectVert; +*/ + +//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin +extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R, fnRectVertL2R; +#define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \ + sal_Bool bRev = pFrm->IsReverse(); \ + sal_Bool bVertL2R = pFrm->IsVertLR(); \ + SwRectFn fnRect = bVert ? \ + ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \ + ( bRev ? fnRectB2T : fnRectHori ); +#define SWRECTFNX( pFrm ) sal_Bool bVertX = pFrm->IsVertical(); \ + sal_Bool bRevX = pFrm->IsReverse(); \ + sal_Bool bVertL2RX = pFrm->IsVertLR(); \ + SwRectFn fnRectX = bVertX ? \ + ( bRevX ? fnRectVL2R : ( bVertL2RX ? fnRectVertL2R : fnRectVert ) ): \ + ( bRevX ? fnRectB2T : fnRectHori ); +#define SWREFRESHFN( pFrm ) { if( bVert != pFrm->IsVertical() || \ + bRev != pFrm->IsReverse() ) \ + bVert = pFrm->IsVertical(); \ + bRev = pFrm->IsReverse(); \ + bVertL2R = pFrm->IsVertLR(); \ + fnRect = bVert ? \ + ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \ + ( bRev ? fnRectB2T : fnRectHori ); } +#define SWRECTFN2( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \ + sal_Bool bVertL2R = pFrm->IsVertLR(); \ + sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \ + SwRectFn fnRect = bVert == bNeighb ? \ + fnRectHori : ( bVertL2R ? fnRectVertL2R : fnRectVert ); +//End of SCMS #define POS_DIFF( aFrm1, aFrm2 ) \ ( (aFrm1.*fnRect->fnGetTop)() != (aFrm2.*fnRect->fnGetTop)() || \ (aFrm1.*fnRect->fnGetLeft)() != (aFrm2.*fnRect->fnGetLeft)() ) @@ -376,6 +406,9 @@ protected: USHORT bInvalidVert: 1; USHORT bDerivedVert: 1; USHORT bVertical: 1; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + USHORT bVertLR: 1; + //End of SCMS USHORT nType: 4; //Who am I? BOOL bValidPos: 1; @@ -567,8 +600,14 @@ public: inline BOOL IsReverse() const { return bReverse; } inline void SetReverse( BOOL bNew ){ bReverse = bNew ? 1 : 0; } inline BOOL IsVertical() const; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + inline BOOL IsVertLR() const; + //End of SCMS inline BOOL GetVerticalFlag() const; inline void SetVertical( BOOL bNew ){ bVertical = bNew ? 1 : 0; } + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + inline void SetbVertLR( BOOL bNew ) { bVertLR = bNew ? 1 : 0; } + //End of SCMS inline void SetDerivedVert( BOOL bNew ){ bDerivedVert = bNew ? 1 : 0; } inline void SetInvalidVert( BOOL bNew) { bInvalidVert = bNew ? 1 : 0; } inline BOOL IsRightToLeft() const; @@ -954,6 +993,12 @@ BOOL SwFrm::IsVertical() const ((SwFrm*)this)->SetDirFlags( TRUE ); return bVertical != 0; } +//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin +inline BOOL SwFrm::IsVertLR() const +{ + return bVertLR != 0; +} +//End of SCMS BOOL SwFrm::GetVerticalFlag() const { return bVertical != 0; diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index b24ee7fd78b1..ab48252ffb66 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -582,7 +582,15 @@ void SwFrm::MakePos() if( bReverse ) aFrm.Pos().X() += pPrv->Frm().Width(); else - aFrm.Pos().X() -= aFrm.Width(); + //aFrm.Pos().X() -= aFrm.Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { + if ( bVertL2R ) + aFrm.Pos().X() += pPrv->Frm().Width(); + else + aFrm.Pos().X() -= aFrm.Width(); + } + //End of SCMS } else aFrm.Pos().Y() += pPrv->Frm().Height(); @@ -650,14 +658,23 @@ void SwFrm::MakePos() aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); } - else if( bVert && FRM_NOTE_VERT & nMyType && !bReverse ) + //else if( bVert && FRM_NOTE_VERT & nMyType && !bReverse ) + // aFrm.Pos().X() -= aFrm.Width() - GetUpper()->Prt().Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + else if( bVert && !bVertL2R && FRM_NOTE_VERT & nMyType && !bReverse ) aFrm.Pos().X() -= aFrm.Width() - GetUpper()->Prt().Width(); + //End of SCMS } } else aFrm.Pos().X() = aFrm.Pos().Y() = 0; - if( IsBodyFrm() && bVert && !bReverse && GetUpper() ) + + //if( IsBodyFrm() && bVert && !bReverse && GetUpper() ) + // aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + if( IsBodyFrm() && bVert && !bVertL2R && !bReverse && GetUpper() ) aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); + //End of SCMS bValidPos = TRUE; } } @@ -878,7 +895,10 @@ void SwLayoutFrm::MakeAll() //uebernimmt im DTor die Benachrichtigung const SwLayNotify aNotify( this ); BOOL bVert = IsVertical(); - SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : fnRectVert; + //SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : fnRectVert; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert ); + //End of SCMS SwBorderAttrAccess *pAccess = 0; const SwBorderAttrs*pAttrs = 0; diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index 291affe8e9f8..d6e1b261f384 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -330,7 +330,10 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes ) } const BOOL bVert = IsVertical(); - SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS //Ist ein Pointer da, oder sollen wir die Attribute einstellen, //so stellen wir auf jeden Fall die Spaltenbreiten ein. Andernfalls diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 49d084691234..d80dec27f00c 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -1461,8 +1461,12 @@ void SwFrm::SetDirFlags( BOOL bVert ) { bVertical = pAsk->IsVertical() ? 1 : 0; bReverse = pAsk->IsReverse() ? 1 : 0; + + bVertLR = pAsk->IsVertLR() ? 1 : 0; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if ( !pAsk->bInvalidVert ) bInvalidVert = FALSE; + //End of SCMS } } else diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 808a5e4257e4..a053c669bb3f 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -156,9 +156,22 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : bDerivedR2L = 0; if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir || pFmt->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 0; + bVertLR = 0; + } + //End of SCMS else + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 1; + if ( FRMDIR_VERT_TOP_LEFT == nDir ) + bVertLR = 1; + else + bVertLR = 0; + } + //End of SCMS bVert = bVertical; bInvalidR2L = 0; if( FRMDIR_HORI_RIGHT_TOP == nDir ) diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 3d30aee66efb..909d7a8e01a4 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -662,12 +662,23 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, while( pUp->IsSctFrm() ) pUp = pUp->GetUpper(); const bool bVert = pUp->IsVertical(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + const bool bVertL2R = pUp->IsVertLR(); + //End of SCMS //Dem Textflus folgen. if ( pUp->Frm().IsInside( rPt ) ) { // OD 26.09.2003 - point is inside environment of given content frame if( bVert ) - rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() -rPt.X(); + //rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() -rPt.X(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { + if ( bVertL2R ) + rRet.nMain = rPt.X() - pCnt->Frm().Left(); + else + rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() -rPt.X(); + } + //End of SCMS else rRet.nMain = rPt.Y() - pCnt->Frm().Top(); return pCnt; @@ -690,8 +701,17 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, { // OD 26.09.2003 - point is in left border of environment if( bVert ) - rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() - - rPt.X(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() + // - rPt.X(); + { + if ( bVertL2R ) + rRet.nMain = rPt.X() - pCnt->Frm().Left(); + else + rRet.nMain = pCnt->Frm().Left() + pCnt->Frm().Width() + - rPt.X(); + } + //End of SCMS else rRet.nMain = rPt.Y() - pCnt->Frm().Top(); return pCnt; @@ -701,10 +721,14 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, } else { - rRet.nMain = bVert ? pCnt->Frm().Left() + pCnt->Frm().Width() - - (pUp->Frm().Left() + pUp->Prt().Left()) - : (pUp->Frm().Top() + pUp->Prt().Bottom()) - pCnt->Frm().Top(); - + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //rRet.nMain = bVert ? pCnt->Frm().Left() + pCnt->Frm().Width() - + // (pUp->Frm().Left() + pUp->Prt().Left()) + // : (pUp->Frm().Top() + pUp->Prt().Bottom()) - pCnt->Frm().Top(); + rRet.nMain = bVert ? ( bVertL2R ? (pUp->Frm().Left() + pUp->Prt().Right()) - pCnt->Frm().Left() + : pCnt->Frm().Left() + pCnt->Frm().Width() - (pUp->Frm().Left() + pUp->Prt().Left()) ) + : (pUp->Frm().Top() + pUp->Prt().Bottom()) - pCnt->Frm().Top(); + //End of SCMS const SwFrm *pPre = pCnt; const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt ); SwTwips nFrmTop = 0; @@ -724,7 +748,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, { if( pLay->IsVertical() ) { - nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + if ( pLay->IsVertLR() ) + nFrmTop = pLay->Frm().Left(); + else + nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //End of SCMS nPrtHeight = pLay->Prt().Width(); } else @@ -739,9 +769,24 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, pLay = pSect->GetUpper(); if( pLay->IsVertical() ) { - nFrmTop = pSect->Frm().Left(); - nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nFrmTop = pSect->Frm().Left(); + //nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() + // - pLay->Prt().Left(); + if ( pLay->IsVertLR() ) + { + nFrmTop = pSect->Frm().Right(); + nPrtHeight = pLay->Frm().Left() + pLay->Prt().Left() + + pLay->Prt().Width() - pSect->Frm().Left() + - pSect->Frm().Width(); + } + else + { + nFrmTop = pSect->Frm().Left(); + nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() - pLay->Prt().Left(); + } + //End of SCMS } else { @@ -757,8 +802,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, { if( pLay->IsVertical() ) { - nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - nPrtHeight = pLay->Prt().Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //nPrtHeight = pLay->Prt().Width(); + if ( pLay->IsVertLR() ) + { + nFrmTop = pLay->Frm().Left(); + nPrtHeight = pLay->Prt().Width(); + } + else + { + nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nPrtHeight = pLay->Prt().Width(); + } + //End of SCMS } else { @@ -802,8 +859,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, pSect = pNxtSect; if( pLay->IsVertical() ) { - nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - nPrtHeight = pLay->Prt().Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //nPrtHeight = pLay->Prt().Width(); + if ( pLay->IsVertLR() ) + { + nFrmTop = pLay->Frm().Left(); + nPrtHeight = pLay->Prt().Width(); + } + else + { + nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nPrtHeight = pLay->Prt().Width(); + } + //End of SCMS } else { @@ -816,9 +885,24 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, pLay = pSect->GetUpper(); if( pLay->IsVertical() ) { - nFrmTop = pSect->Frm().Left(); - nPrtHeight = pSect->Frm().Left() - - pLay->Frm().Left() - pLay->Prt().Left(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nFrmTop = pSect->Frm().Left(); + //nPrtHeight = pSect->Frm().Left() - + // pLay->Frm().Left() - pLay->Prt().Left(); + if ( pLay->IsVertLR() ) + { + nFrmTop = pSect->Frm().Right(); + nPrtHeight = pLay->Frm().Left()+pLay->Prt().Left() + + pLay->Prt().Width() - pSect->Frm().Left() + - pSect->Frm().Width(); + } + else + { + nFrmTop = pSect->Frm().Left(); + nPrtHeight = pSect->Frm().Left() - + pLay->Frm().Left() - pLay->Prt().Left(); + } + //End of SCMS } else { @@ -834,8 +918,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, { if( pLay->IsVertical() ) { - nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - nPrtHeight = pLay->Prt().Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + //nPrtHeight = pLay->Prt().Width(); + if ( pLay->IsVertLR() ) + { + nFrmTop = pLay->Frm().Left(); + nPrtHeight = pLay->Prt().Width(); + } + else + { + nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); + nPrtHeight = pLay->Prt().Width(); + } + //End of SCMS } else { @@ -850,8 +946,12 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, { if ( pLay->Frm().IsInside( rPt ) ) { - SwTwips nDiff = pLay->IsVertical() ? ( nFrmTop - rPt.X() ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwTwips nDiff = pLay->IsVertical() ? ( nFrmTop - rPt.X() ) + // : ( rPt.Y() - nFrmTop ); + SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) ) : ( rPt.Y() - nFrmTop ); + //End of SCMS if( bSct || pSect ) rRet.nSub += nDiff; else @@ -1206,9 +1306,10 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) SwPageFrm *pOldPage = FindPageFrm(); const SwRect aOld( GetObjRectWithSpaces() ); Point aNew( rNew ); - - if( GetAnchorFrm()->IsVertical() || GetAnchorFrm()->IsRightToLeft() ) - + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( GetAnchorFrm()->IsVertical() || GetAnchorFrm()->IsRightToLeft() ) + if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() ) + //End of SCMS aNew.X() += Frm().Width(); SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew ); if( pCnt->IsProtected() ) @@ -1216,6 +1317,9 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) SwPageFrm *pTmpPage = 0; const bool bVert = pCnt->IsVertical(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + const bool bVertL2R = pCnt->IsVertLR(); + //End of SCMS const sal_Bool bRTL = pCnt->IsRightToLeft(); if( ( !bVert != !GetAnchorFrm()->IsVertical() ) || @@ -1246,7 +1350,15 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) if ( pCnt->Frm().IsInside( aNew ) ) { if( bVert ) - nY = pCnt->Frm().Left()+pCnt->Frm().Width()-rNew.X()-Frm().Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nY = pCnt->Frm().Left()+pCnt->Frm().Width()-rNew.X()-Frm().Width(); + { + if ( bVertL2R ) + nY = rNew.X() - pCnt->Frm().Left(); + else + nY = pCnt->Frm().Left()+pCnt->Frm().Width()-rNew.X()-Frm().Width(); + } + //End of SCMS else nY = rNew.Y() - pCnt->Frm().Top(); } @@ -1276,8 +1388,17 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) do { const SwFrm *pUp = pFollow->GetUpper(); if( pUp->IsVertical() ) - nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() + // - pUp->Frm().Left() - pUp->Prt().Left(); + { + if ( pUp->IsVertLR() ) + nDiff += pUp->Prt().Width() - pFollow->GetRelPos().X(); + else + nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() - pUp->Frm().Left() - pUp->Prt().Left(); + } + //End of SCMS else nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y(); pFollow = pFollow->GetFollow(); @@ -1292,7 +1413,15 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) if ( nY == LONG_MAX ) { if( bVert ) - nY = pCnt->Frm().Left() + pCnt->Frm().Width() - rNew.X(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nY = pCnt->Frm().Left() + pCnt->Frm().Width() - rNew.X(); + { + if ( bVertL2R ) + nY = rNew.X() - pCnt->Frm().Left(); + else + nY = pCnt->Frm().Left() + pCnt->Frm().Width() - rNew.X(); + } + //End of SCMS else nY = rNew.Y() - pCnt->Frm().Top(); } @@ -1382,6 +1511,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) GetPageFrm()->MoveFly( this, pTmpPage ); const Point aRelPos = bVert ? Point( -nY, nX ) : Point( nX, nY ); + ChgRelPos( aRelPos ); GetFmt()->GetDoc()->EndUndo( UNDO_END, NULL ); diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index b9663b1418d6..0184385133f2 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -424,7 +424,10 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL ) if ( !bTst ) { (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nDist ); - if( IsVertical() && !IsReverse() ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( IsVertical() && !IsReverse() ) + if( IsVertical() && !IsVertLR() && !IsReverse() ) + //End of SCMS Frm().Pos().X() -= nDist; } long nGrow = nDist - nAvail, @@ -466,8 +469,11 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL ) nDist -= nReal; //Den masslosen Wunsch koennen wir leider nur in Grenzen erfuellen. Frm().SSize().Height() -= nDist; - if( IsVertical() && !IsReverse() ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( IsVertical() && !IsReverse() ) + if( IsVertical() && !IsVertLR() && !IsReverse() ) Frm().Pos().X() += nDist; + //End of SCMS } //Nachfolger braucht nicht invalidiert werden, denn wir wachsen diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 9cbf7ace6ea7..72b0c6cc2d70 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1809,14 +1809,17 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) pFly->Calc(); bChanged = aOldRect != pFly->Frm(); - if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && - pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + // if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && + // pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) + if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) pImp->GetShell()->AddPaintRect( pFly->Frm() ); - if ( bChanged ) + //if ( bChanged ) pFly->Invalidate(); - else - pFly->Validate(); + //else + // pFly->Validate(); + //End of SCMS bAddRect = false; pFly->ResetCompletePaint(); } @@ -2036,7 +2039,11 @@ void MA_FASTCALL lcl_AddScrollRectTab( SwTabFrm *pTab, SwLayoutFrm *pRow, //Frm nicht selbst steht, so ist nichts mit Scrollen. SwRect aRect( rRect ); // OD 04.11.2002 #104100# - not needed. - if( pTab->IsVertical() ) + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( pTab->IsVertical() ) + if( pTab->IsVertical() && !pTab->IsVertLR() ) + //End of SCMS aRect.Pos().X() -= nOfst; else aRect.Pos().Y() += nOfst; @@ -2506,9 +2513,14 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, aNewRect.SSize() == aOldRect.SSize() ) { - _AddScrollRect( pCntnt, pPage, (*fnRect->fnYDiff)( + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + if ( !bVertL2R ) + _AddScrollRect( pCntnt, pPage, (*fnRect->fnYDiff)( (pCntnt->Frm().*fnRect->fnGetTop)(), (aOldRect.*fnRect->fnGetTop)() ), nOldBottom ); + else + PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); + //End of SCMS } else PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index b6188caf8dd2..843e56ea606f 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -293,9 +293,67 @@ static SwRectFnCollection aVerticalRightToLeft = { &SwRect::SetBottomAndHeight, &SwRect::SetLeftAndWidth }; +//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin +static SwRectFnCollection aVerticalLeftToRight = { + /* fnRectGet */ + &SwRect::_Left, + &SwRect::_Right, + &SwRect::_Top, + &SwRect::_Bottom, + &SwRect::_Height, + &SwRect::_Width, + &SwRect::TopLeft, + &SwRect::SwappedSize, + /* fnRectSet */ + &SwRect::_Left, + &SwRect::_Right, + &SwRect::_Top, + &SwRect::_Bottom, + &SwRect::_Height, + &SwRect::_Width, + + &SwRect::SubLeft, + &SwRect::AddRight, + &SwRect::SubTop, + &SwRect::AddBottom, + &SwRect::AddHeight, + &SwRect::AddWidth, + + &SwRect::SetPosY, + &SwRect::SetPosX, + &SwFrm::GetLeftMargin, + &SwFrm::GetRightMargin, + &SwFrm::GetTopMargin, + &SwFrm::GetBottomMargin, + &SwFrm::SetTopBottomMargins, + &SwFrm::SetLeftRightMargins, + &SwFrm::GetPrtLeft, + &SwFrm::GetPrtRight, + &SwFrm::GetPrtTop, + &SwFrm::GetPrtBottom, + &SwRect::GetLeftDistance, + &SwRect::GetRightDistance, + &SwRect::GetTopDistance, + &SwRect::GetBottomDistance, + &SwFrm::SetMaxRight, + &SwRect::OverStepRight, + + &SwRect::SetUpperLeftCorner, + &SwFrm::MakeRightPos, + &FirstMinusSecond, + &FirstMinusSecond, + &SwIncrement, + &SwIncrement, + &SwRect::SetTopAndHeight, + &SwRect::SetLeftAndWidth +}; +//End of SCMS SwRectFn fnRectHori = &aHorizontal; SwRectFn fnRectVert = &aVertical; +//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin +SwRectFn fnRectVertL2R = &aVerticalLeftToRight; +//End of SCMS SwRectFn fnRectB2T = &aBottomToTop; SwRectFn fnRectVL2R = &aVerticalRightToLeft; diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 79d267c1f934..c596019946f0 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -136,7 +136,10 @@ void SwBodyFrm::Format( const SwBorderAttrs * ) if ( nHeight < 0 ) nHeight = 0; Frm().Height( nHeight ); - if( IsVertical() && !IsReverse() && nWidth != Frm().Width() ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( IsVertical() && !IsReverse() && nWidth != Frm().Width() ) + if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() ) + //End of SCMS Frm().Pos().X() += Frm().Width() - nWidth; Frm().Width( nWidth ); } @@ -347,9 +350,21 @@ void SwPageFrm::CheckDirection( BOOL bVert ) { if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir || GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 0; - else + bVertLR = 0; + } + else { bVertical = 1; + if(FRMDIR_VERT_TOP_RIGHT == nDir) + bVertLR = 0; + + else if(FRMDIR_VERT_TOP_LEFT==nDir) + bVertLR = 1; + } + //End of SCMS + /* if( pDesc && pDesc->GetName().GetChar(0)=='x') bReverse = 1; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 7f681df6127e..213f3db05f9f 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1227,7 +1227,10 @@ void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm, if ( rAttrs.IsLine() || rAttrs.IsBorderDist() || (bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE) ) { - SwRectFn fnRect = pFrm->IsVertical() ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwRectFn fnRect = pFrm->IsVertical() ? fnRectVert : fnRectHori; + SwRectFn fnRect = pFrm->IsVertical() ? ( pFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS const SvxBoxItem &rBox = rAttrs.GetBox(); const BOOL bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)(); if ( bTop ) @@ -3182,8 +3185,20 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect ) } else { - fnCheck = &SwRect::GetRightDistance; - nLimit = rRect.Left(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //fnCheck = &SwRect::GetRightDistance; + //nLimit = rRect.Left(); + if ( rFrm.IsVertLR() ) + { + fnCheck = &SwRect::GetLeftDistance; + nLimit = rRect.Right(); + } + else + { + fnCheck = &SwRect::GetRightDistance; + nLimit = rRect.Left(); + } + //End of SCMS } } @@ -4880,8 +4895,10 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol, const SwFrm *pCol = Lower(); if ( !pCol || !pCol->IsColumnFrm() ) return; - - SwRectFn fnRect = pCol->IsVertical() ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwRectFn fnRect = pCol->IsVertical() ? fnRectVert : fnRectHori; + SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS SwRect aLineRect = Prt(); aLineRect += Frm().Pos(); diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 520a5945b9d9..8a9717adad50 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -233,7 +233,11 @@ void SwFrm::CheckDirChange() SetInvalidVert( TRUE ); SetInvalidR2L( TRUE ); BOOL bChg = bOldR2L != IsRightToLeft(); - if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + BOOL bOldVertL2R = IsVertLR(); + //if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev ) + if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() ) + //End of SCMS { InvalidateAll(); if( IsLayoutFrm() ) @@ -326,8 +330,11 @@ void SwFrm::CheckDirChange() Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const { Point aAnchor = Frm().Pos(); - if ( IsVertical() || IsRightToLeft() ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if ( IsVertical() || IsRightToLeft() ) + if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() ) aAnchor.X() += Frm().Width(); + //End of SCMS if ( IsTxtFrm() ) { @@ -601,7 +608,10 @@ const SwRect SwFrm::PaintArea() const // Cell frames may not leave their upper: SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm(); const BOOL bVert = IsVertical(); - SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS long nRight = (aRect.*fnRect->fnGetRight)(); long nLeft = (aRect.*fnRect->fnGetLeft)(); const SwFrm* pTmp = this; @@ -700,7 +710,10 @@ const SwRect SwFrm::PaintArea() const const SwRect SwFrm::UnionFrm( BOOL bBorder ) const { BOOL bVert = IsVertical(); - SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS long nLeft = (Frm().*fnRect->fnGetLeft)(); long nWidth = (Frm().*fnRect->fnGetWidth)(); long nPrtLeft = (Prt().*fnRect->fnGetLeft)(); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index be31859c036d..5f0483ad06f0 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4906,7 +4906,10 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nHeight - nReal ); - if( IsVertical() && !bRev ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( IsVertical() && !bRev ) + if( IsVertical() && !IsVertLR() && !bRev ) + //End of SCMS Frm().Pos().X() += nReal; } @@ -4920,7 +4923,10 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) nReal -= nTmp; SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nHeight + nReal ); - if( IsVertical() && !bRev ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( IsVertical() && !bRev ) + if( IsVertical() && !IsVertLR() && !bRev ) + //End of SCMS Frm().Pos().X() -= nReal; } nReal = nTmp; diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 145ffa111be0..85a6eea5b82d 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2547,8 +2547,12 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode ) //At least the endframe... bVert = pEndFrm->IsVertical(); bRev = pEndFrm->IsReverse(); - fnRect = bVert ? ( bRev ? fnRectVL2R : fnRectVert ) : + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //fnRect = bVert ? ( bRev ? fnRectVL2R : fnRectVert ) : + // ( bRev ? fnRectB2T : fnRectHori ); + fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) : ( bRev ? fnRectB2T : fnRectHori ); + //End of SCMS nTmpTwips = (aEndRect.*fnRect->fnGetTop)(); if( (aEndFrm.*fnRect->fnGetTop)() != nTmpTwips ) { diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 5377a5eec18b..2061378eb0b7 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -108,7 +108,10 @@ SwFrm::SwFrm( SwModify *pMod ) : ASSERT( pMod, "Kein Frameformat uebergeben." ); bInvalidR2L = bInvalidVert = 1; - bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = 0; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = 0; + bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = bVertLR = 0; + //End of SCMS bValidPos = bValidPrtArea = bValidSize = bValidLineNum = bRetouche = bFixSize = bColLocked = FALSE; bCompletePaint = bInfInvalid = TRUE; @@ -138,9 +141,21 @@ void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse ) bInvalidVert = 0; if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir || bBrowse ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 0; + bVertLR = 0; + } else + { bVertical = 1; + if(FRMDIR_VERT_TOP_RIGHT == nDir) + bVertLR = 0; + + else if(FRMDIR_VERT_TOP_LEFT==nDir) + bVertLR = 1; + } + //End of SCMS } else { @@ -1156,9 +1171,15 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) if ( IsHeaderFrm() || IsFooterFrm() ) fnRect = fnRectHori; else if ( IsCellFrm() || IsColumnFrm() ) - fnRect = GetUpper()->IsVertical() ? fnRectHori : fnRectVert; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //fnRect = GetUpper()->IsVertical() ? fnRectHori : fnRectVert; + fnRect = GetUpper()->IsVertical() ? fnRectHori : ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ); + //End of SCMS else - fnRect = GetUpper()->IsVertical() ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //fnRect = GetUpper()->IsVertical() ? fnRectVert : fnRectHori; + fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)()) _InvalidateSize(); @@ -1643,7 +1664,10 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst ) if ( !bTst ) { (pFrm->GetNext()->Frm().*fnRect->fnSetHeight)(nAddMax-nAdd); - if( bVert && !bRev ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( bVert && !bRev ) + if( bVert && !bVertL2R && !bRev ) + //End of SCMS pFrm->GetNext()->Frm().Pos().X() += nAdd; pFrm->GetNext()->InvalidatePrt(); if ( pFrm->GetNext()->GetNext() ) @@ -1657,7 +1681,10 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst ) { SwTwips nTmp = (pFrm->Frm().*fnRect->fnGetHeight)(); (pFrm->Frm().*fnRect->fnSetHeight)( nTmp - nReal ); - if( bVert && !bRev ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( bVert && !bRev ) + if( bVert && !bVertL2R && !bRev ) + //End of SCMS pFrm->Frm().Pos().X() += nReal; pFrm->InvalidatePrt(); if ( pFrm->GetNext() ) @@ -1918,7 +1945,10 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) if ( !bTst ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); - if( IsVertical() && !IsReverse() ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( IsVertical() && !IsReverse() ) + if( IsVertical() && !IsVertLR() && !IsReverse() ) + //End of SCMS Frm().Pos().X() -= nDist; if ( GetNext() ) { @@ -1950,7 +1980,10 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) //Cntnts werden immer auf den gewuenschten Wert gebracht. long nOld = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nOld + nDist ); - if( IsVertical() && !IsReverse() ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( IsVertical() && !IsReverse() ) + if( IsVertical()&& !IsVertLR() && !IsReverse() ) + //End of SCMS Frm().Pos().X() -= nDist; if ( nOld && IsInTab() ) { @@ -2046,7 +2079,10 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) else nRstHeight = nDist; (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() - nDist ); - if( IsVertical() ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( IsVertical() ) + if( IsVertical() && !IsVertLR() ) + //End of SCMS Frm().Pos().X() += nDist; nDist = nRstHeight; if ( IsInTab() ) @@ -2464,7 +2500,10 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) if ( !bTst ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); - if( bChgPos ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( bChgPos ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() -= nDist; bMoveAccFrm = sal_True; } @@ -2545,7 +2584,10 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) ( !IsCellFrm() || static_cast(this)->GetLayoutRowSpan() > 1 ) ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nReal ); - if( bChgPos ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( bChgPos ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() = nFrmPos - nReal; bMoveAccFrm = sal_True; } @@ -2636,7 +2678,10 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) if ( !bTst ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight - nReal ); - if( bChgPos ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( bChgPos ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() += nReal; bMoveAccFrm = sal_True; } @@ -2657,7 +2702,10 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nRealDist - nReal ); - if( bChgPos ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( bChgPos ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() += nRealDist - nReal; ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); } @@ -2670,7 +2718,10 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nReal - nTmp ); - if( bChgPos ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if( bChgPos ) + if( bChgPos && !IsVertLR() ) + //End of SCMS Frm().Pos().X() += nTmp - nReal; ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); nReal = nTmp; @@ -3190,7 +3241,10 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs ) const USHORT nRight = (USHORT)((SwBorderAttrs*)pAttrs)->CalcRight( this ); const USHORT nLower = pAttrs->CalcBottom(); BOOL bVert = IsVertical() && !IsPageFrm(); - SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; + SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; + //End of SCMS if ( !bValidPrtArea ) { bValidPrtArea = TRUE; diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index daae99bc4925..660491281410 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -378,7 +378,11 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( break; case text::VertOrientation::TOP: { - nRelPosY += bVert ? _rLRSpacing.GetRight() : _rULSpacing.GetUpper(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nRelPosY += bVert ? _rLRSpacing.GetRight() : _rULSpacing.GetUpper(); + nRelPosY += bVert ? ( bVertL2R ? + _rLRSpacing.GetLeft() : _rLRSpacing.GetRight() ) : _rULSpacing.GetUpper(); + //End of SCMS } break; case text::VertOrientation::CENTER: @@ -388,8 +392,13 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( break; case text::VertOrientation::BOTTOM: { - nRelPosY += nAlignAreaHeight - - ( nObjHeight + ( bVert ? _rLRSpacing.GetLeft() : _rULSpacing.GetLower() ) ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nRelPosY += nAlignAreaHeight - + // ( nObjHeight + ( bVert ? _rLRSpacing.GetLeft() : _rULSpacing.GetLower() ) ); + nRelPosY += nAlignAreaHeight - + (nObjHeight + ( bVert ? ( bVertL2R ? + _rLRSpacing.GetRight() : _rLRSpacing.GetLeft() ) : _rULSpacing.GetLower())); + //End of SCMS } break; default: diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 800235bf95e5..0dd9254e35a0 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -274,7 +274,10 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // determine relative vertical position SwTwips nRelPosY = nAlignAreaOffset; SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); - SwTwips nUpperSpace = bVert ? rLR.GetRight() : rUL.GetUpper(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwTwips nUpperSpace = bVert ? rLR.GetRight() : rUL.GetUpper(); + SwTwips nUpperSpace = bVert ? ( bVertL2R ? rLR.GetLeft() : rLR.GetRight() ) : rUL.GetUpper(); + //End of SCMS SwTwips nLowerSpace = bVert ? rLR.GetLeft() : rUL.GetLower(); switch ( aVert.GetVertOrient() ) { @@ -284,7 +287,10 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() { // bottom (to character anchored) nRelPosY += nAlignAreaHeight + nUpperSpace; - if ( bVert ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if ( bVert ) + if ( bVert && !bVertL2R) + //End of SCMS nRelPosY += nObjHeight; break; } diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 55749f144377..0091e44ab0c7 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -123,7 +123,13 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() if( bVert ) { ASSERT( !bRev, " - reverse layout set." ); - aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); + if ( bVertL2R ) + aRelPos.X() = nRelPosY; + else + aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); + //End of SCMS maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos; } else @@ -207,8 +213,12 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() // determine absolute 'horizontal' position, depending on layout-direction // --> OD 2004-06-17 #i26791# - determine offset to 'horizontal' frame // anchor position, depending on layout-direction - if ( bVert ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if ( bVert ) + if( bVert && !bVertL2R ) + //End of SCMS { + aRelPos.Y() = nRelPosX; maOffsetToFrmAnchorPos.Y() = nOffset; } diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index e4844762f39d..760b1c4e1a69 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -227,10 +227,14 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, const SwTwips nFrmMaxY = (pFrm->*fnRect->fnGetPrtBottom)(); // nMaxY is an absolute value + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwTwips nMaxY = bVert ? + // Max( nFrmMaxY, nUpperMaxY ) : + // Min( nFrmMaxY, nUpperMaxY ); SwTwips nMaxY = bVert ? - Max( nFrmMaxY, nUpperMaxY ) : + ( bVertL2R ? Min( nFrmMaxY, nUpperMaxY ) : Max( nFrmMaxY, nUpperMaxY ) ) : Min( nFrmMaxY, nUpperMaxY ); - + //End of SCMS sal_Bool bRet = sal_False; if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) @@ -245,9 +249,12 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, { if( nFirstOffset > 0 ) aPnt1.Y() += nFirstOffset; - - if ( aPnt1.X() < nMaxY ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if ( aPnt1.X() < nMaxY ) + // aPnt1.X() = nMaxY; + if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; + //End of SCMS aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) @@ -399,18 +406,25 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const SwTwips nUpperMaxY = (pTmpFrm->*fnRect->fnGetPrtBottom)(); // nMaxY is in absolute value + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwTwips nMaxY = bVert ? + // Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : + // Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); SwTwips nMaxY = bVert ? - Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : + ( bVertL2R ? Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) ) : Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); - + //End of SCMS if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) { Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos(); Point aPnt2; if ( bVert ) { - if ( aPnt1.X() < nMaxY ) + //if ( aPnt1.X() < nMaxY ) + // aPnt1.X() = nMaxY; + if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; + //End of SCMS aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 8a39847705e2..3a30e86b2e11 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -485,9 +485,20 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit ) if ( IsVertical() ) { ASSERT( ! IsSwapped(),"Swapped frame while calculating nRstHeight" ); + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nRstHeight = Frm().Left() + Frm().Width() - + // ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); + if ( IsVertLR() ) + nRstHeight = GetUpper()->Frm().Left() + + GetUpper()->Prt().Left() + + GetUpper()->Prt().Width() + - Frm().Left(); + else nRstHeight = Frm().Left() + Frm().Width() - - ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); - } + ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); + //End of SCMS + } else nRstHeight = GetUpper()->Frm().Top() + GetUpper()->Prt().Top() @@ -1140,7 +1151,11 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine, // If the frame grows (or shirks) the repaint rectangle cannot simply // be rotated back after formatting, because we use the upper left point // of the frame for rotation. This point changes when growing/shrinking. - if ( IsVertical() && nChg ) + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if ( IsVertical() && nChg ) + if ( IsVertical() && !IsVertLR() && nChg ) + //End of SCMS { SwRect &rRepaint = *(pPara->GetRepaint()); rRepaint.Left( rRepaint.Left() - nChg ); diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index 5a88599c6e35..830c3d4a6484 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -456,6 +456,10 @@ SwRect SwTxtFrm::Paint() // d.h. als linken Rand den berechneten PaintOfst! SwRepaint *pRepaint = GetPara()->GetRepaint(); long l; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + if ( IsVertical() ) + pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); + //End of SCMS if( pRepaint->GetOfst() ) pRepaint->Left( pRepaint->GetOfst() ); diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 2e10a40a1b66..54922dad66a6 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -815,7 +815,13 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor, else { aPoint.A() = X(); - aPoint.B() = Y() - rPor.GetAscent(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //aPoint.B() = Y() - rPor.GetAscent(); + if ( GetTxtFrm()->IsVertLR() ) + aPoint.B() = Y() - rPor.Height() + rPor.GetAscent(); + else + aPoint.B() = Y() - rPor.GetAscent(); + //End of SCMS } // Adjust x coordinate if we are inside a bidi portion diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx index 9b14d52256e7..65433ba661a3 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -370,7 +370,13 @@ USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine, case SvxParaVertAlignItem::AUTOMATIC : if ( bAutoToCentered || GetInfo().GetTxtFrm()->IsVertical() ) { - nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; + if( GetInfo().GetTxtFrm()->IsVertLR() ) + nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent; + else + nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; + //End of SCMS break; } case SvxParaVertAlignItem::BASELINE : diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 6308aba3587e..a8abfb43eb14 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -108,13 +108,24 @@ void SwTxtFrm::SwapWidthAndHeight() { const long nPrtOfstX = Prt().Pos().X(); Prt().Pos().X() = Prt().Pos().Y(); - Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + if( IsVertLR() ) + Prt().Pos().Y() = nPrtOfstX; + else + //End of SCMS + Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() ); + } else { const long nPrtOfstY = Prt().Pos().Y(); Prt().Pos().Y() = Prt().Pos().X(); - Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + if( IsVertLR() ) + Prt().Pos().X() = nPrtOfstY; + else + //End of SCMS + Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() ); } const long nFrmWidth = Frm().Width(); @@ -132,16 +143,43 @@ void SwTxtFrm::SwapWidthAndHeight() void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const { // calc offset inside frame - const long nOfstX = rRect.Left() - Frm().Left(); - const long nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + + //const long nOfstX = rRect.Left() - Frm().Left(); + //const long nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); + long nOfstX, nOfstY; + if ( IsVertLR() ) + { + nOfstX = rRect.Left() - Frm().Left(); + nOfstY = rRect.Top() - Frm().Top(); + } + else + { + nOfstX = rRect.Left() - Frm().Left(); + nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); + } + //End of SCMS + const long nWidth = rRect.Width(); const long nHeight = rRect.Height(); - if ( bIsSwapped ) - rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); - else + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //if ( bIsSwapped ) + // rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); + //else // frame is rotated - rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); + // rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); + if ( IsVertLR() ) + rRect.Left(Frm().Left() + nOfstY); + else + { + if ( bIsSwapped ) + rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); + else + rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); + } + // End of SCMS rRect.Top( Frm().Top() + nOfstX ); rRect.Width( nHeight ); @@ -155,12 +193,23 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const // calc offset inside frame const long nOfstX = rPoint.X() - Frm().Left(); const long nOfstY = rPoint.Y() - Frm().Top(); - - if ( bIsSwapped ) + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + /* if ( bIsSwapped ) rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; else // calc rotated coords rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; + */ + if ( IsVertLR() ) + rPoint.X() = Frm().Left() + nOfstY; + else + { + if ( bIsSwapped ) + rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; + else + rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; + } + //End of SCMS rPoint.Y() = Frm().Top() + nOfstX; } @@ -181,11 +230,23 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const long nOfstX; // calc offset inside frame - if ( bIsSwapped ) + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + /*if ( bIsSwapped ) nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() ); else nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); - + */ + if ( IsVertLR() ) + nOfstX = rRect.Left() - Frm().Left(); + else + { + if ( bIsSwapped ) + nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() ); + else + nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); + } + //End of SCMS const long nOfstY = rRect.Top() - Frm().Top(); const long nWidth = rRect.Height(); const long nHeight = rRect.Width(); @@ -204,11 +265,23 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const long nOfstX; // calc offset inside frame - if ( bIsSwapped ) + + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + /*if ( bIsSwapped ) nOfstX = Frm().Left() + Frm().Height() - rPoint.X(); else nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); - + */ + if ( IsVertLR() ) + nOfstX = rPoint.X() - Frm().Left(); + else + { + if ( bIsSwapped ) + nOfstX = Frm().Left() + Frm().Height() - rPoint.X(); + else + nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); + } + //End of SCMS const long nOfstY = rPoint.Y() - Frm().Top(); // calc rotated coords @@ -2533,6 +2606,10 @@ void SwTxtFrm::ChgThisLines() else //Paragraphs which are not counted should not manipulate the AllLines. nThisLines = nNew; } + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //Ugly. How can we hack if better? + InvalidatePage(); + //End of SCMS } diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index f43b2777486f..3a31a5cb0242 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -143,7 +143,14 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) nLinePos - nTabPos : nLinePos + nTabPos; - SwTwips nMyRight = Right(); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //SwTwips nMyRight = Right(); + SwTwips nMyRight; + if ( pFrm->IsVertLR() ) + nMyRight = Left(); + else + nMyRight = Right(); + //End of SCMS if ( pFrm->IsVertical() ) { diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index 3b09e80e5d29..3fc333afd6c9 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -225,9 +225,19 @@ void SwTxtFrmBreak::SetRstHeight( const SwTxtMargin &rLine ) { // OD, FME 2004-02-27 #106629# - consider bottom margin SWRECTFN( pFrm ) + nRstHeight = (pFrm->*fnRect->fnGetBottomMargin)(); + if ( bVert ) - nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + //nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); + { + if ( pFrm->IsVertLR() ) + nRstHeight = (*fnRect->fnYDiff)( pFrm->SwitchHorizontalToVertical( rLine.Y() ) , nOrigin ); + else + nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); + } + //End of SCMS else nRstHeight += rLine.Y() - nOrigin; } -- cgit -- cgit -- cgit -- cgit -- cgit From 69ce11cb10411709fd215f994186dbf90fd3db0a Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 17 Jun 2009 14:19:43 +0000 Subject: remove code that was commented out in the patch --- sw/source/core/doc/docdraw.cxx | 16 --- sw/source/core/draw/dflyobj.cxx | 13 --- sw/source/core/draw/dview.cxx | 7 -- sw/source/core/layout/calcmove.cxx | 19 +--- sw/source/core/layout/colfrm.cxx | 2 - sw/source/core/layout/findfrm.cxx | 2 +- sw/source/core/layout/fly.cxx | 9 +- sw/source/core/layout/flycnt.cxx | 109 +++++++-------------- sw/source/core/layout/ftnfrm.cxx | 4 - sw/source/core/layout/layact.cxx | 7 +- sw/source/core/layout/pagechg.cxx | 18 ++-- sw/source/core/layout/paintfrm.cxx | 17 ++-- sw/source/core/layout/ssfrm.cxx | 10 +- sw/source/core/layout/tabfrm.cxx | 4 - sw/source/core/layout/trvlfrm.cxx | 3 - sw/source/core/layout/wsfrm.cxx | 42 ++------ .../objectpositioning/anchoredobjectposition.cxx | 5 - .../tocntntanchoredobjectposition.cxx | 4 - .../tolayoutanchoredobjectposition.cxx | 10 +- sw/source/core/text/frmcrsr.cxx | 17 +--- sw/source/core/text/frmform.cxx | 9 +- sw/source/core/text/frmpaint.cxx | 4 +- sw/source/core/text/inftxt.cxx | 2 - sw/source/core/text/itrtxt.cxx | 2 - sw/source/core/text/txtfrm.cxx | 37 +------ sw/source/core/text/txttab.cxx | 2 - sw/source/core/text/widorp.cxx | 16 ++- 27 files changed, 87 insertions(+), 303 deletions(-) diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 0d832d9286d4..9db434bdf39a 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -184,22 +184,6 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt, } // use geometry of drawing object const SwRect aObjRect = _rSdrObj.GetSnapRect(); - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - /*if ( bVert ) - { - nHoriRelPos = aObjRect.Top() - aAnchorPos.Y(); - nVertRelPos = aAnchorPos.X() - aObjRect.Right(); - } - else if ( bR2L ) - { - nHoriRelPos = aAnchorPos.X() - aObjRect.Right(); - nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); - } - else - { - nHoriRelPos = aObjRect.Left() - aAnchorPos.X(); - nVertRelPos = aObjRect.Top() - aAnchorPos.Y(); - }*/ if ( bVert ) { diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 4b85d23f3386..9528114790e0 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -667,7 +667,6 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz) lXDiff -= rVert.GetPos(); lYDiff += rHori.GetPos(); } - //End of SCMS } else { @@ -778,10 +777,6 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, const sal_Bool bRTL = pTmpFrm->IsRightToLeft(); - //const Point aNewPos( bVertX || bRTL ? - // aOutRect.Right() + 1 : - // aOutRect.Left(), - // aOutRect.Top() ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const bool bVertL2RX = pTmpFrm->IsVertLR(); const Point aNewPos( ( bVertX && !bVertL2RX ) || bRTL ? @@ -789,7 +784,6 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, aOutRect.Left(), aOutRect.Top() ); - //End of SCMS Size aSz( aOutRect.Right() - aOutRect.Left() + 1, aOutRect.Bottom()- aOutRect.Top() + 1 ); if( aSz != GetFlyFrm()->Frm().SSize() ) @@ -850,14 +844,9 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, } //Position kann auch veraendert sein! - //const Point aOldPos( bVertX || bRTL ? - // GetFlyFrm()->Frm().TopRight() : - // GetFlyFrm()->Frm().Pos() ); - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const Point aOldPos( ( bVertX && !bVertL2RX ) || bRTL ? GetFlyFrm()->Frm().TopRight() : GetFlyFrm()->Frm().Pos() ); - //End of SCMS if ( aNewPos != aOldPos ) { //Kann sich durch das ChgSize veraendert haben! @@ -865,14 +854,12 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef, { if( aOutRect.TopRight() != aNewPos ) { - //SwTwips nDeltaX = aNewPos.X() - aOutRect.Right(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin SwTwips nDeltaX; if ( bVertL2RX ) nDeltaX = aNewPos.X() - aOutRect.Left(); else nDeltaX = aNewPos.X() - aOutRect.Right(); - //End of SCMS SwTwips nDeltaY = aNewPos.Y() - aOutRect.Top(); MoveRect( aOutRect, Size( nDeltaX, nDeltaY ) ); } diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 94629cb542b5..419cb2d9a94c 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -205,13 +205,9 @@ void SwDrawView::AddCustomHdl() } // add anchor handle: - //aHdl.AddHdl( new SwSdrHdl( aPos, pAnch->IsVertical() || - // pAnch->IsRightToLeft() ) ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin aHdl.AddHdl( new SwSdrHdl( aPos, ( pAnch->IsVertical() && !pAnch->IsVertLR() ) || pAnch->IsRightToLeft() ) ); - //End of SCMS - } /************************************************************************* @@ -760,13 +756,10 @@ const SwFrm* SwDrawView::CalcAnchor() aMyRect = pObj->GetSnapRect(); } - //const sal_Bool bTopRight = pAnch && ( pAnch->IsVertical() || - // pAnch->IsRightToLeft() ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const sal_Bool bTopRight = pAnch && ( ( pAnch->IsVertical() && !pAnch->IsVertLR() ) || pAnch->IsRightToLeft() ); - //End of SCMS const Point aMyPt = bTopRight ? aMyRect.TopRight() : aMyRect.TopLeft(); Point aPt; diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index ab48252ffb66..6867ff155c67 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -582,15 +582,13 @@ void SwFrm::MakePos() if( bReverse ) aFrm.Pos().X() += pPrv->Frm().Width(); else - //aFrm.Pos().X() -= aFrm.Width(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - { + { if ( bVertL2R ) - aFrm.Pos().X() += pPrv->Frm().Width(); + aFrm.Pos().X() += pPrv->Frm().Width(); else - aFrm.Pos().X() -= aFrm.Width(); - } - //End of SCMS + aFrm.Pos().X() -= aFrm.Width(); + } } else aFrm.Pos().Y() += pPrv->Frm().Height(); @@ -658,23 +656,16 @@ void SwFrm::MakePos() aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); } - //else if( bVert && FRM_NOTE_VERT & nMyType && !bReverse ) - // aFrm.Pos().X() -= aFrm.Width() - GetUpper()->Prt().Width(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin else if( bVert && !bVertL2R && FRM_NOTE_VERT & nMyType && !bReverse ) aFrm.Pos().X() -= aFrm.Width() - GetUpper()->Prt().Width(); - //End of SCMS } } else aFrm.Pos().X() = aFrm.Pos().Y() = 0; - - //if( IsBodyFrm() && bVert && !bReverse && GetUpper() ) - // aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if( IsBodyFrm() && bVert && !bVertL2R && !bReverse && GetUpper() ) aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); - //End of SCMS bValidPos = TRUE; } } @@ -895,10 +886,8 @@ void SwLayoutFrm::MakeAll() //uebernimmt im DTor die Benachrichtigung const SwLayNotify aNotify( this ); BOOL bVert = IsVertical(); - //SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : fnRectVert; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert ); - //End of SCMS SwBorderAttrAccess *pAccess = 0; const SwBorderAttrs*pAttrs = 0; diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index d6e1b261f384..19d6ea92d5bc 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -330,10 +330,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes ) } const BOOL bVert = IsVertical(); - //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS //Ist ein Pointer da, oder sollen wir die Attribute einstellen, //so stellen wir auf jeden Fall die Spaltenbreiten ein. Andernfalls diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index d80dec27f00c..0383ce677a70 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -1466,7 +1466,7 @@ void SwFrm::SetDirFlags( BOOL bVert ) //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if ( !pAsk->bInvalidVert ) bInvalidVert = FALSE; - //End of SCMS + } } else diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index a053c669bb3f..0bef6d1032b8 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -156,12 +156,11 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : bDerivedR2L = 0; if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir || pFmt->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 0; bVertLR = 0; - } - //End of SCMS + } else //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin { @@ -171,7 +170,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) : else bVertLR = 0; } - //End of SCMS + bVert = bVertical; bInvalidR2L = 0; if( FRMDIR_HORI_RIGHT_TOP == nDir ) diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index e0b85c13c2ab..c552ca61f40d 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -664,7 +664,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, const bool bVert = pUp->IsVertical(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const bool bVertL2R = pUp->IsVertLR(); - //End of SCMS + //Dem Textflus folgen. // --> OD 2009-01-12 #i70582# // --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script @@ -684,15 +684,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, // OD 26.09.2003 - point is inside environment of given content frame // --> OD 2009-01-12 #i70582# if( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //rRet.nMain = nTopForObjPos - rPt.X(); - { - if ( bVertL2R ) - rRet.nMain = rPt.X() - nTopForObjPos; - else - rRet.nMain = nTopForObjPos - rPt.X(); - } - //End of SCMS + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { + if ( bVertL2R ) + rRet.nMain = rPt.X() - nTopForObjPos; + else + rRet.nMain = nTopForObjPos - rPt.X(); + } else rRet.nMain = rPt.Y() - nTopForObjPos; // <-- @@ -717,15 +715,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, // OD 26.09.2003 - point is in left border of environment // --> OD 2009-01-12 #i70582# if( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //rRet.nMain = nTopForObjPos - rPt.X(); - { - if ( bVertL2R ) - rRet.nMain = rPt.X() - nTopForObjPos; - else - rRet.nMain = nTopForObjPos - rPt.X(); - } - //End of SCMS + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { + if ( bVertL2R ) + rRet.nMain = rPt.X() - nTopForObjPos; + else + rRet.nMain = nTopForObjPos - rPt.X(); + } else rRet.nMain = rPt.Y() - nTopForObjPos; // <-- @@ -738,16 +734,11 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin // --> OD 2009-01-12 #i70582# - //rRet.nMain = bVert - // ? nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left()) - // : (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos; - // <-- rRet.nMain = bVert ? ( bVertL2R ? ( (pUp->Frm().Left() + pUp->Prt().Right()) - nTopForObjPos ) : ( nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left() ) ) ) : ( (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos ); - //End of SCMS const SwFrm *pPre = pCnt; const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt ); @@ -769,12 +760,10 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); if ( pLay->IsVertLR() ) nFrmTop = pLay->Frm().Left(); else nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - //End of SCMS nPrtHeight = pLay->Prt().Width(); } else @@ -790,9 +779,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pSect->Frm().Left(); - //nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() - // - pLay->Prt().Left(); if ( pLay->IsVertLR() ) { nFrmTop = pSect->Frm().Right(); @@ -806,7 +792,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() - pLay->Prt().Left(); } - //End of SCMS } else { @@ -823,8 +808,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - //nPrtHeight = pLay->Prt().Width(); if ( pLay->IsVertLR() ) { nFrmTop = pLay->Frm().Left(); @@ -835,7 +818,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); nPrtHeight = pLay->Prt().Width(); } - //End of SCMS } else { @@ -880,19 +862,16 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - //nPrtHeight = pLay->Prt().Width(); if ( pLay->IsVertLR() ) { nFrmTop = pLay->Frm().Left(); nPrtHeight = pLay->Prt().Width(); - } - else - { + } + else + { nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); nPrtHeight = pLay->Prt().Width(); - } - //End of SCMS + } } else { @@ -906,23 +885,19 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pSect->Frm().Left(); - //nPrtHeight = pSect->Frm().Left() - - // pLay->Frm().Left() - pLay->Prt().Left(); if ( pLay->IsVertLR() ) { nFrmTop = pSect->Frm().Right(); nPrtHeight = pLay->Frm().Left()+pLay->Prt().Left() + pLay->Prt().Width() - pSect->Frm().Left() - pSect->Frm().Width(); - } - else - { + } + else + { nFrmTop = pSect->Frm().Left(); nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left() - pLay->Prt().Left(); - } - //End of SCMS + } } else { @@ -939,8 +914,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if( pLay->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); - //nPrtHeight = pLay->Prt().Width(); if ( pLay->IsVertLR() ) { nFrmTop = pLay->Frm().Left(); @@ -951,7 +924,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, nFrmTop = pLay->Frm().Left() + pLay->Frm().Width(); nPrtHeight = pLay->Prt().Width(); } - //End of SCMS } else { @@ -967,11 +939,8 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet, if ( pLay->Frm().IsInside( rPt ) ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nDiff = pLay->IsVertical() ? ( nFrmTop - rPt.X() ) - // : ( rPt.Y() - nFrmTop ); SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) ) : ( rPt.Y() - nFrmTop ); - //End of SCMS if( bSct || pSect ) rRet.nSub += nDiff; else @@ -1327,9 +1296,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) const SwRect aOld( GetObjRectWithSpaces() ); Point aNew( rNew ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( GetAnchorFrm()->IsVertical() || GetAnchorFrm()->IsRightToLeft() ) if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() ) - //End of SCMS aNew.X() += Frm().Width(); SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew ); if( pCnt->IsProtected() ) @@ -1339,7 +1306,6 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) const bool bVert = pCnt->IsVertical(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin const bool bVertL2R = pCnt->IsVertLR(); - //End of SCMS const sal_Bool bRTL = pCnt->IsRightToLeft(); if( ( !bVert != !GetAnchorFrm()->IsVertical() ) || @@ -1381,15 +1347,13 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) : ( pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ); if( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nY = nTopForObjPos - rNew.X() - Frm().Width(); - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { if ( bVertL2R ) nY = rNew.X() - nTopForObjPos; else nY = nTopForObjPos - rNew.X() - Frm().Width(); - } - //End of SCMS + } else { nY = rNew.Y() - nTopForObjPos; @@ -1422,17 +1386,14 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) do { const SwFrm *pUp = pFollow->GetUpper(); if( pUp->IsVertical() ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() - // - pUp->Frm().Left() - pUp->Prt().Left(); - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { if ( pUp->IsVertLR() ) nDiff += pUp->Prt().Width() - pFollow->GetRelPos().X(); else - nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() - - pUp->Frm().Left() - pUp->Prt().Left(); - } - //End of SCMS + nDiff += pFollow->Frm().Left() + pFollow->Frm().Width() + - pUp->Frm().Left() - pUp->Prt().Left(); + } else nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y(); pFollow = pFollow->GetFollow(); @@ -1458,15 +1419,13 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) : ( pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ); if( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nY = nTopForObjPos - rNew.X(); - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { if ( bVertL2R ) nY = rNew.X() - nTopForObjPos; else nY = nTopForObjPos - rNew.X(); - } - //End of SCMS + } else { nY = rNew.Y() - nTopForObjPos; diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 0184385133f2..8c52fead76a6 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -425,9 +425,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL ) { (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() ) if( IsVertical() && !IsVertLR() && !IsReverse() ) - //End of SCMS Frm().Pos().X() -= nDist; } long nGrow = nDist - nAvail, @@ -470,10 +468,8 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL ) //Den masslosen Wunsch koennen wir leider nur in Grenzen erfuellen. Frm().SSize().Height() -= nDist; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() ) if( IsVertical() && !IsVertLR() && !IsReverse() ) Frm().Pos().X() += nDist; - //End of SCMS } //Nachfolger braucht nicht invalidiert werden, denn wir wachsen diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 72b0c6cc2d70..dc32cc7bc40c 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1810,8 +1810,6 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) bChanged = aOldRect != pFly->Frm(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - // if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && - // pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) pImp->GetShell()->AddPaintRect( pFly->Frm() ); @@ -1819,7 +1817,7 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) pFly->Invalidate(); //else // pFly->Validate(); - //End of SCMS + bAddRect = false; pFly->ResetCompletePaint(); } @@ -2041,9 +2039,7 @@ void MA_FASTCALL lcl_AddScrollRectTab( SwTabFrm *pTab, SwLayoutFrm *pRow, // OD 04.11.2002 #104100# - not needed. //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( pTab->IsVertical() ) if( pTab->IsVertical() && !pTab->IsVertLR() ) - //End of SCMS aRect.Pos().X() -= nOfst; else aRect.Pos().Y() += nOfst; @@ -2520,7 +2516,6 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, (aOldRect.*fnRect->fnGetTop)() ), nOldBottom ); else PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); - //End of SCMS } else PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index c596019946f0..79b5dda1d810 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -137,9 +137,7 @@ void SwBodyFrm::Format( const SwBorderAttrs * ) nHeight = 0; Frm().Height( nHeight ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() && nWidth != Frm().Width() ) if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() ) - //End of SCMS Frm().Pos().X() += Frm().Width() - nWidth; Frm().Width( nWidth ); } @@ -350,21 +348,19 @@ void SwPageFrm::CheckDirection( BOOL bVert ) { if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir || GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 0; bVertLR = 0; - } - else { + } + else + { bVertical = 1; if(FRMDIR_VERT_TOP_RIGHT == nDir) bVertLR = 0; - - else if(FRMDIR_VERT_TOP_LEFT==nDir) - bVertLR = 1; + else if(FRMDIR_VERT_TOP_LEFT==nDir) + bVertLR = 1; } - //End of SCMS - /* if( pDesc && pDesc->GetName().GetChar(0)=='x') bReverse = 1; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 8d46e12c9c51..83c8c0491b38 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1228,9 +1228,8 @@ void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm, (bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE) ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = pFrm->IsVertical() ? fnRectVert : fnRectHori; SwRectFn fnRect = pFrm->IsVertical() ? ( pFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + const SvxBoxItem &rBox = rAttrs.GetBox(); const BOOL bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)(); if ( bTop ) @@ -3186,19 +3185,16 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect ) else { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //fnCheck = &SwRect::GetRightDistance; - //nLimit = rRect.Left(); if ( rFrm.IsVertLR() ) { fnCheck = &SwRect::GetLeftDistance; nLimit = rRect.Right(); - } - else - { + } + else + { fnCheck = &SwRect::GetRightDistance; nLimit = rRect.Left(); - } - //End of SCMS + } } } @@ -4896,9 +4892,8 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol, if ( !pCol || !pCol->IsColumnFrm() ) return; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = pCol->IsVertical() ? fnRectVert : fnRectHori; SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + SwRect aLineRect = Prt(); aLineRect += Frm().Pos(); diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index eb4c1fb4959e..5ef786405d85 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -235,9 +235,7 @@ void SwFrm::CheckDirChange() BOOL bChg = bOldR2L != IsRightToLeft(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin BOOL bOldVertL2R = IsVertLR(); - //if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev ) if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() ) - //End of SCMS { InvalidateAll(); if( IsLayoutFrm() ) @@ -332,10 +330,8 @@ Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const { Point aAnchor = Frm().Pos(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( IsVertical() || IsRightToLeft() ) if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() ) aAnchor.X() += Frm().Width(); - //End of SCMS if ( IsTxtFrm() ) { @@ -610,9 +606,8 @@ const SwRect SwFrm::PaintArea() const SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm(); const BOOL bVert = IsVertical(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + long nRight = (aRect.*fnRect->fnGetRight)(); long nLeft = (aRect.*fnRect->fnGetLeft)(); const SwFrm* pTmp = this; @@ -712,9 +707,8 @@ const SwRect SwFrm::UnionFrm( BOOL bBorder ) const { BOOL bVert = IsVertical(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + long nLeft = (Frm().*fnRect->fnGetLeft)(); long nWidth = (Frm().*fnRect->fnGetWidth)(); long nPrtLeft = (Prt().*fnRect->fnGetLeft)(); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 5f0483ad06f0..60b84ad97960 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4907,9 +4907,7 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nHeight - nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !bRev ) if( IsVertical() && !IsVertLR() && !bRev ) - //End of SCMS Frm().Pos().X() += nReal; } @@ -4924,9 +4922,7 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) SwTwips nHeight = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nHeight + nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !bRev ) if( IsVertical() && !IsVertLR() && !bRev ) - //End of SCMS Frm().Pos().X() -= nReal; } nReal = nTmp; diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 6862b4cd6b03..ae35cd47c278 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2569,11 +2569,8 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode ) bVert = pEndFrm->IsVertical(); bRev = pEndFrm->IsReverse(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //fnRect = bVert ? ( bRev ? fnRectVL2R : fnRectVert ) : - // ( bRev ? fnRectB2T : fnRectHori ); fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) : ( bRev ? fnRectB2T : fnRectHori ); - //End of SCMS nTmpTwips = (aEndRect.*fnRect->fnGetTop)(); if( (aEndFrm.*fnRect->fnGetTop)() != nTmpTwips ) { diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 9e1bfc171e81..cf7cd2309f8d 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -109,9 +109,8 @@ SwFrm::SwFrm( SwModify *pMod ) : ASSERT( pMod, "Kein Frameformat uebergeben." ); bInvalidR2L = bInvalidVert = 1; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = 0; bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = bVertLR = 0; - //End of SCMS + bValidPos = bValidPrtArea = bValidSize = bValidLineNum = bRetouche = bFixSize = bColLocked = FALSE; bCompletePaint = bInfInvalid = TRUE; @@ -141,21 +140,19 @@ void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse ) bInvalidVert = 0; if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir || bBrowse ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - { + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { bVertical = 0; bVertLR = 0; - } + } else - { + { bVertical = 1; if(FRMDIR_VERT_TOP_RIGHT == nDir) bVertLR = 0; - - else if(FRMDIR_VERT_TOP_LEFT==nDir) + else if(FRMDIR_VERT_TOP_LEFT==nDir) bVertLR = 1; } - //End of SCMS } else { @@ -1172,14 +1169,11 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) fnRect = fnRectHori; else if ( IsCellFrm() || IsColumnFrm() ) //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //fnRect = GetUpper()->IsVertical() ? fnRectHori : fnRectVert; fnRect = GetUpper()->IsVertical() ? fnRectHori : ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ); - //End of SCMS else //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //fnRect = GetUpper()->IsVertical() ? fnRectVert : fnRectHori; fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS + if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)()) _InvalidateSize(); @@ -1665,9 +1659,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst ) { (pFrm->GetNext()->Frm().*fnRect->fnSetHeight)(nAddMax-nAdd); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bVert && !bRev ) if( bVert && !bVertL2R && !bRev ) - //End of SCMS pFrm->GetNext()->Frm().Pos().X() += nAdd; pFrm->GetNext()->InvalidatePrt(); if ( pFrm->GetNext()->GetNext() ) @@ -1682,9 +1674,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst ) SwTwips nTmp = (pFrm->Frm().*fnRect->fnGetHeight)(); (pFrm->Frm().*fnRect->fnSetHeight)( nTmp - nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bVert && !bRev ) if( bVert && !bVertL2R && !bRev ) - //End of SCMS pFrm->Frm().Pos().X() += nReal; pFrm->InvalidatePrt(); if ( pFrm->GetNext() ) @@ -1946,9 +1936,7 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() ) if( IsVertical() && !IsVertLR() && !IsReverse() ) - //End of SCMS Frm().Pos().X() -= nDist; if ( GetNext() ) { @@ -1981,9 +1969,7 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) long nOld = (Frm().*fnRect->fnGetHeight)(); (Frm().*fnRect->fnSetHeight)( nOld + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() && !IsReverse() ) if( IsVertical()&& !IsVertLR() && !IsReverse() ) - //End of SCMS Frm().Pos().X() -= nDist; if ( nOld && IsInTab() ) { @@ -2080,9 +2066,7 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) nRstHeight = nDist; (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() - nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( IsVertical() ) if( IsVertical() && !IsVertLR() ) - //End of SCMS Frm().Pos().X() += nDist; nDist = nRstHeight; if ( IsInTab() ) @@ -2502,9 +2486,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() -= nDist; bMoveAccFrm = sal_True; } @@ -2586,9 +2568,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() = nFrmPos - nReal; bMoveAccFrm = sal_True; } @@ -2680,9 +2660,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight - nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() += nReal; bMoveAccFrm = sal_True; } @@ -2704,9 +2682,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nRealDist - nReal ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() += nRealDist - nReal; ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); } @@ -2720,9 +2696,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo ) (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nReal - nTmp ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if( bChgPos ) if( bChgPos && !IsVertLR() ) - //End of SCMS Frm().Pos().X() += nTmp - nReal; ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); nReal = nTmp; @@ -3243,9 +3217,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs ) const USHORT nLower = pAttrs->CalcBottom(); BOOL bVert = IsVertical() && !IsPageFrm(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwRectFn fnRect = bVert ? fnRectVert : fnRectHori; SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; - //End of SCMS if ( !bValidPrtArea ) { bValidPrtArea = TRUE; diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 660491281410..cc86f036c57d 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -379,10 +379,8 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( case text::VertOrientation::TOP: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nRelPosY += bVert ? _rLRSpacing.GetRight() : _rULSpacing.GetUpper(); nRelPosY += bVert ? ( bVertL2R ? _rLRSpacing.GetLeft() : _rLRSpacing.GetRight() ) : _rULSpacing.GetUpper(); - //End of SCMS } break; case text::VertOrientation::CENTER: @@ -393,12 +391,9 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( case text::VertOrientation::BOTTOM: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nRelPosY += nAlignAreaHeight - - // ( nObjHeight + ( bVert ? _rLRSpacing.GetLeft() : _rULSpacing.GetLower() ) ); nRelPosY += nAlignAreaHeight - (nObjHeight + ( bVert ? ( bVertL2R ? _rLRSpacing.GetRight() : _rLRSpacing.GetLeft() ) : _rULSpacing.GetLower())); - //End of SCMS } break; default: diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 0dd9254e35a0..7a43781b1dc7 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -275,9 +275,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() SwTwips nRelPosY = nAlignAreaOffset; SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nUpperSpace = bVert ? rLR.GetRight() : rUL.GetUpper(); SwTwips nUpperSpace = bVert ? ( bVertL2R ? rLR.GetLeft() : rLR.GetRight() ) : rUL.GetUpper(); - //End of SCMS SwTwips nLowerSpace = bVert ? rLR.GetLeft() : rUL.GetLower(); switch ( aVert.GetVertOrient() ) { @@ -288,9 +286,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // bottom (to character anchored) nRelPosY += nAlignAreaHeight + nUpperSpace; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( bVert ) if ( bVert && !bVertL2R) - //End of SCMS nRelPosY += nObjHeight; break; } diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index 0091e44ab0c7..dc84e4bd6780 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -124,12 +124,10 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() { ASSERT( !bRev, " - reverse layout set." ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); if ( bVertL2R ) - aRelPos.X() = nRelPosY; - else - aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); - //End of SCMS + aRelPos.X() = nRelPosY; + else + aRelPos.X() = -nRelPosY - aObjBoundRect.Width(); maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos; } else @@ -214,9 +212,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() // --> OD 2004-06-17 #i26791# - determine offset to 'horizontal' frame // anchor position, depending on layout-direction //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( bVert ) if( bVert && !bVertL2R ) - //End of SCMS { aRelPos.Y() = nRelPosX; diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index f84c4ed55bf0..6529b146cca9 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -228,13 +228,10 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, // nMaxY is an absolute value //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nMaxY = bVert ? - // Max( nFrmMaxY, nUpperMaxY ) : - // Min( nFrmMaxY, nUpperMaxY ); SwTwips nMaxY = bVert ? ( bVertL2R ? Min( nFrmMaxY, nUpperMaxY ) : Max( nFrmMaxY, nUpperMaxY ) ) : Min( nFrmMaxY, nUpperMaxY ); - //End of SCMS + sal_Bool bRet = sal_False; if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) @@ -250,11 +247,8 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, if( nFirstOffset > 0 ) aPnt1.Y() += nFirstOffset; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( aPnt1.X() < nMaxY ) - // aPnt1.X() = nMaxY; if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; - //End of SCMS aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) @@ -407,24 +401,19 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const // nMaxY is in absolute value //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nMaxY = bVert ? - // Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : - // Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); SwTwips nMaxY = bVert ? ( bVertL2R ? Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) ) : Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ); - //End of SCMS + if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() ) { Point aPnt1 = pFrm->Frm().Pos() + pFrm->Prt().Pos(); Point aPnt2; if ( bVert ) { - //if ( aPnt1.X() < nMaxY ) - // aPnt1.X() = nMaxY; if ( aPnt1.X() < nMaxY && !bVertL2R ) aPnt1.X() = nMaxY; - //End of SCMS + aPnt2.X() = aPnt1.X() + pFrm->Prt().Width(); aPnt2.Y() = aPnt1.Y(); if( aPnt2.X() < nMaxY ) diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 3a30e86b2e11..baee5fc4465f 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -487,17 +487,14 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit ) ASSERT( ! IsSwapped(),"Swapped frame while calculating nRstHeight" ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nRstHeight = Frm().Left() + Frm().Width() - - // ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); if ( IsVertLR() ) nRstHeight = GetUpper()->Frm().Left() + GetUpper()->Prt().Left() + GetUpper()->Prt().Width() - Frm().Left(); - else - nRstHeight = Frm().Left() + Frm().Width() - + else + nRstHeight = Frm().Left() + Frm().Width() - ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() ); - //End of SCMS } else nRstHeight = GetUpper()->Frm().Top() @@ -1153,9 +1150,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine, // of the frame for rotation. This point changes when growing/shrinking. //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( IsVertical() && nChg ) if ( IsVertical() && !IsVertLR() && nChg ) - //End of SCMS { SwRect &rRepaint = *(pPara->GetRepaint()); rRepaint.Left( rRepaint.Left() - nChg ); diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index 830c3d4a6484..7cd258523903 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -458,8 +458,8 @@ SwRect SwTxtFrm::Paint() long l; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if ( IsVertical() ) - pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); - //End of SCMS + pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); + if( pRepaint->GetOfst() ) pRepaint->Left( pRepaint->GetOfst() ); diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 9e584f5a6542..665f09b20556 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -816,12 +816,10 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor, { aPoint.A() = X(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //aPoint.B() = Y() - rPor.GetAscent(); if ( GetTxtFrm()->IsVertLR() ) aPoint.B() = Y() - rPor.Height() + rPor.GetAscent(); else aPoint.B() = Y() - rPor.GetAscent(); - //End of SCMS } // Adjust x coordinate if we are inside a bidi portion diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx index 65433ba661a3..a17d79356d77 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -371,12 +371,10 @@ USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine, if ( bAutoToCentered || GetInfo().GetTxtFrm()->IsVertical() ) { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; if( GetInfo().GetTxtFrm()->IsVertLR() ) nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent; else nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; - //End of SCMS break; } case SvxParaVertAlignItem::BASELINE : diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 8a02cb7061e2..606d4daadcf9 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -114,7 +114,6 @@ void SwTxtFrm::SwapWidthAndHeight() if( IsVertLR() ) Prt().Pos().Y() = nPrtOfstX; else - //End of SCMS Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() ); } @@ -126,7 +125,6 @@ void SwTxtFrm::SwapWidthAndHeight() if( IsVertLR() ) Prt().Pos().X() = nPrtOfstY; else - //End of SCMS Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() ); } @@ -145,11 +143,7 @@ void SwTxtFrm::SwapWidthAndHeight() void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const { // calc offset inside frame - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - - //const long nOfstX = rRect.Left() - Frm().Left(); - //const long nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); long nOfstX, nOfstY; if ( IsVertLR() ) { @@ -161,17 +155,11 @@ void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const nOfstX = rRect.Left() - Frm().Left(); nOfstY = rRect.Top() + rRect.Height() - Frm().Top(); } - //End of SCMS const long nWidth = rRect.Width(); const long nHeight = rRect.Height(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //if ( bIsSwapped ) - // rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); - //else - // frame is rotated - // rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); if ( IsVertLR() ) rRect.Left(Frm().Left() + nOfstY); else @@ -179,9 +167,9 @@ void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const if ( bIsSwapped ) rRect.Left( Frm().Left() + Frm().Height() - nOfstY ); else + // frame is rotated rRect.Left( Frm().Left() + Frm().Width() - nOfstY ); } - // End of SCMS rRect.Top( Frm().Top() + nOfstX ); rRect.Width( nHeight ); @@ -196,12 +184,6 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const const long nOfstX = rPoint.X() - Frm().Left(); const long nOfstY = rPoint.Y() - Frm().Top(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - /* if ( bIsSwapped ) - rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; - else - // calc rotated coords - rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; - */ if ( IsVertLR() ) rPoint.X() = Frm().Left() + nOfstY; else @@ -209,9 +191,9 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const if ( bIsSwapped ) rPoint.X() = Frm().Left() + Frm().Height() - nOfstY; else + // calc rotated coords rPoint.X() = Frm().Left() + Frm().Width() - nOfstY; } - //End of SCMS rPoint.Y() = Frm().Top() + nOfstX; } @@ -234,11 +216,6 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const // calc offset inside frame //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - /*if ( bIsSwapped ) - nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() ); - else - nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); - */ if ( IsVertLR() ) nOfstX = rRect.Left() - Frm().Left(); else @@ -248,7 +225,7 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const else nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() ); } - //End of SCMS + const long nOfstY = rRect.Top() - Frm().Top(); const long nWidth = rRect.Height(); const long nHeight = rRect.Width(); @@ -269,11 +246,6 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const // calc offset inside frame //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - /*if ( bIsSwapped ) - nOfstX = Frm().Left() + Frm().Height() - rPoint.X(); - else - nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); - */ if ( IsVertLR() ) nOfstX = rPoint.X() - Frm().Left(); else @@ -283,7 +255,7 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const else nOfstX = Frm().Left() + Frm().Width() - rPoint.X(); } - //End of SCMS + const long nOfstY = rPoint.Y() - Frm().Top(); // calc rotated coords @@ -2637,7 +2609,6 @@ void SwTxtFrm::ChgThisLines() //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin //Ugly. How can we hack if better? InvalidatePage(); - //End of SCMS } diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index 6718a353e569..024844f8e00d 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -144,13 +144,11 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) nLinePos + nTabPos; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //SwTwips nMyRight = Right(); SwTwips nMyRight; if ( pFrm->IsVertLR() ) nMyRight = Left(); else nMyRight = Right(); - //End of SCMS if ( pFrm->IsVertical() ) { diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index 3fc333afd6c9..6ef96017091e 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -229,15 +229,13 @@ void SwTxtFrmBreak::SetRstHeight( const SwTxtMargin &rLine ) nRstHeight = (pFrm->*fnRect->fnGetBottomMargin)(); if ( bVert ) - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - //nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); - { - if ( pFrm->IsVertLR() ) - nRstHeight = (*fnRect->fnYDiff)( pFrm->SwitchHorizontalToVertical( rLine.Y() ) , nOrigin ); - else - nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); - } - //End of SCMS + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + { + if ( pFrm->IsVertLR() ) + nRstHeight = (*fnRect->fnYDiff)( pFrm->SwitchHorizontalToVertical( rLine.Y() ) , nOrigin ); + else + nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() ); + } else nRstHeight += rLine.Y() - nOrigin; } -- cgit From 051e3d9ee56b61ae3e5e56e2de998510b7ed95fc Mon Sep 17 00:00:00 2001 From: Helge Delfs Date: Tue, 28 Jul 2009 06:21:59 +0000 Subject: #103774# changed text direction entries from 3 to 4 --- .../writer/optional/includes/formatpage/w_formatpage1.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc index 6b7285000c09..c2aaa041e272 100755 --- a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc +++ b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc @@ -558,8 +558,8 @@ testcase tFormatPage_10 RecheckCTLSupport = gCTLSup RecheckAsianSupport = gAsianSup - PrintLog "- when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox" - '/// when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox + PrintLog "- when Asian support and CTL are all enabled , 4 entries should be in Text Direction listbox" + '/// when Asian support and CTL are all enabled , 4 entries should be in Text Direction listbox Call hNewDocument @@ -567,10 +567,10 @@ testcase tFormatPage_10 Call ActiveDeactivateAsianSupport(TRUE) Call ActiveDeactivateCTLSupport(TRUE) - '/// Check if there are 3 entires in Text Direction listbox + '/// Check if there are 4 entires in Text Direction listbox fFormatPageWriter("TabSeite") - if Textfluss.GetItemCount <> 3 then - Warnlog "There should be 3 entries in Text direction listbox , but get " & Textfluss.GetItemCount + if Textfluss.GetItemCount <> 4 then + Warnlog "There should be 4 entries in Text direction listbox , but get " & Textfluss.GetItemCount end if TabSeite.Cancel -- cgit From 006871cd6c1785242a1eef0ff5cdfb914fcd99c5 Mon Sep 17 00:00:00 2001 From: Oliver Düsterhoff Date: Fri, 4 Sep 2009 12:37:31 +0000 Subject: #i91226# adjustment of object positioning for Mongolian layout --- sw/source/core/inc/anchoredobjectposition.hxx | 60 +++++++----- .../objectpositioning/anchoredobjectposition.cxx | 104 +++++++++++--------- .../tocntntanchoredobjectposition.cxx | 107 ++++++++++++++++----- .../tolayoutanchoredobjectposition.cxx | 4 +- 4 files changed, 183 insertions(+), 92 deletions(-) diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx index 87adedcf6c0d..fb4e1ce8d592 100644 --- a/sw/source/core/inc/anchoredobjectposition.hxx +++ b/sw/source/core/inc/anchoredobjectposition.hxx @@ -86,12 +86,14 @@ namespace objectpositioning void _GetInfoAboutObj(); // --> OD 2006-03-15 #i62875# - SwTwips _ImplAdjustVertRelPos( const SwTwips _nTopOfAnch, - const bool _bVert, - const SwFrm& _rPageAlignLayFrm, - const SwTwips _nProposedRelPosY, - const bool _bFollowTextFlow, - const bool _bCheckBottom = true ) const; + // --> OD 2009-09-01 #mongolianlayout# - add parameter + SwTwips _ImplAdjustVertRelPos( const SwTwips nTopOfAnch, + const bool bVert, + const bool bVertL2R, + const SwFrm& rPageAlignLayFrm, + const SwTwips nProposedRelPosY, + const bool bFollowTextFlow, + const bool bCheckBottom = true ) const; SwTwips _ImplAdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm, const SwTwips _nProposedRelPosX ) const; // <-- @@ -173,53 +175,59 @@ namespace objectpositioning /** adjust calculated vertical in order to keep object inside 'page' alignment layout frame. - OD 2004-07-22 #i31805# - add parameter <_bCheckBottom> - OD 2004-10-08 #i26945# - add parameter <_bFollowTextFlow> + OD 2004-07-22 #i31805# - add parameter + OD 2004-10-08 #i26945# - add parameter OD 2006-03-15 #i62875# - made inline, intrinsic actions moved to private method <_ImplAdjustVertRelPos>, which is only called, if not set. + OD 2009-09-01 #mongolianlayout# - add parameter - @param _nTopOfAnch + @param nTopOfAnch input parameter - 'vertical' position, at which the relative position of the object is calculated from. - @param _bVert + @param bVert input parameter - boolean, indicating, if object is in vertical layout. - @param _rPageAlignLayFrm + @param bVertL2R + input parameter - boolean, indicating, if object is in mongolian + layout (vertical left-to-right layout). + + @param rPageAlignLayFrm input parameter - layout frame, which determines the 'page area' the object has to be vertical positioned in. - @param _nProposedRelPosY + @param nProposedRelPosY input parameter - proposed relative vertical position, which will be adjusted. - @param _bFollowTextFlow + @param bFollowTextFlow input parameter - value of attribute 'Follow text flow' of the anchored object. - @param _bCheckBottom + @param bCheckBottom input parameter - boolean indicating, if bottom of anchored object has to be checked and thus, (if needed) the proposed relative position has to be adjusted. default value @author OD */ - inline SwTwips _AdjustVertRelPos( const SwTwips _nTopOfAnch, - const bool _bVert, - const SwFrm& _rPageAlignLayFrm, - const SwTwips _nProposedRelPosY, - const bool _bFollowTextFlow, - const bool _bCheckBottom = true ) const + inline SwTwips _AdjustVertRelPos( const SwTwips nTopOfAnch, + const bool bVert, + const bool bVertL2R, + const SwFrm& rPageAlignLayFrm, + const SwTwips nProposedRelPosY, + const bool bFollowTextFlow, + const bool bCheckBottom = true ) const { return !mbDoNotCaptureAnchoredObj - ? _ImplAdjustVertRelPos( _nTopOfAnch, _bVert, - _rPageAlignLayFrm, - _nProposedRelPosY, - _bFollowTextFlow, - _bCheckBottom ) - : _nProposedRelPosY; + ? _ImplAdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, + rPageAlignLayFrm, + nProposedRelPosY, + bFollowTextFlow, + bCheckBottom ) + : nProposedRelPosY; } // ********************************************************************* diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index cc86f036c57d..149a4a478156 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -379,8 +379,11 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( case text::VertOrientation::TOP: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - nRelPosY += bVert ? ( bVertL2R ? - _rLRSpacing.GetLeft() : _rLRSpacing.GetRight() ) : _rULSpacing.GetUpper(); + nRelPosY += bVert + ? ( bVertL2R + ? _rLRSpacing.GetLeft() + : _rLRSpacing.GetRight() ) + : _rULSpacing.GetUpper(); } break; case text::VertOrientation::CENTER: @@ -391,9 +394,12 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( case text::VertOrientation::BOTTOM: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - nRelPosY += nAlignAreaHeight - - (nObjHeight + ( bVert ? ( bVertL2R ? - _rLRSpacing.GetRight() : _rLRSpacing.GetLeft() ) : _rULSpacing.GetLower())); + nRelPosY += nAlignAreaHeight - + ( nObjHeight + ( bVert + ? ( bVertL2R + ? _rLRSpacing.GetRight() + : _rLRSpacing.GetLeft() ) + : _rULSpacing.GetLower() ) ); } break; default: @@ -412,21 +418,23 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos( /** adjust calculated vertical in order to keep object inside 'page' alignment layout frame. - OD 2004-07-01 #i28701# - parameter <_nTopOfAnch> and <_bVert> added - OD 2004-07-22 #i31805# - add parameter <_bCheckBottom> - OD 2004-10-08 #i26945# - add parameter <_bFollowTextFlow> + OD 2004-07-01 #i28701# - parameter and added + OD 2004-07-22 #i31805# - add parameter + OD 2004-10-08 #i26945# - add parameter OD 2006-03-15 #i62875# - method now private and renamed. + OD 2009-09-01 #mongolianlayout# - add parameter @author OD */ -SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips _nTopOfAnch, - const bool _bVert, - const SwFrm& _rPageAlignLayFrm, - const SwTwips _nProposedRelPosY, - const bool _bFollowTextFlow, - const bool _bCheckBottom ) const +SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnch, + const bool bVert, + const bool bVertL2R, + const SwFrm& rPageAlignLayFrm, + const SwTwips nProposedRelPosY, + const bool bFollowTextFlow, + const bool bCheckBottom ) const { - SwTwips nAdjustedRelPosY = _nProposedRelPosY; + SwTwips nAdjustedRelPosY = nProposedRelPosY; const Size aObjSize( GetAnchoredObj().GetObjRect().SSize() ); @@ -443,57 +451,67 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips _nTopOfAn // --> OD 2004-10-08 #i26945# - no extension of restricted area, if // object's attribute follow text flow is set and its inside a table if ( GetFrmFmt().getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) && - ( !_bFollowTextFlow || + ( !bFollowTextFlow || !GetAnchoredObj().GetAnchorFrm()->IsInTab() ) ) { - aPgAlignArea = _rPageAlignLayFrm.FindPageFrm()->Frm(); + aPgAlignArea = rPageAlignLayFrm.FindPageFrm()->Frm(); } else { - aPgAlignArea = _rPageAlignLayFrm.Frm(); + aPgAlignArea = rPageAlignLayFrm.Frm(); } } - if ( _bVert ) + if ( bVert ) { - // OD 2004-07-22 #i31805# - consider value of <_bCheckBottom> - if ( _bCheckBottom && - _nTopOfAnch - nAdjustedRelPosY - aObjSize.Width() < - aPgAlignArea.Left() ) + // --> OD 2009-09-01 #mongolianlayout# + if ( !bVertL2R ) + // <-- { - nAdjustedRelPosY = aPgAlignArea.Left() + - _nTopOfAnch - - aObjSize.Width(); + if ( bCheckBottom && + nTopOfAnch - nAdjustedRelPosY - aObjSize.Width() < + aPgAlignArea.Left() ) + { + nAdjustedRelPosY = aPgAlignArea.Left() + + nTopOfAnch - + aObjSize.Width(); + } + if ( nTopOfAnch - nAdjustedRelPosY > aPgAlignArea.Right() ) + { + nAdjustedRelPosY = nTopOfAnch - aPgAlignArea.Right(); + } } - // --> OD 2004-08-13 #i32964# - correction - if ( _nTopOfAnch - nAdjustedRelPosY > aPgAlignArea.Right() ) + // --> OD 2009-09-01 #mongolianlayout# + else { - nAdjustedRelPosY = _nTopOfAnch - aPgAlignArea.Right(); + if ( bCheckBottom && + nTopOfAnch + nAdjustedRelPosY + aObjSize.Width() > + aPgAlignArea.Right() ) + { + nAdjustedRelPosY = aPgAlignArea.Right() - + nTopOfAnch - + aObjSize.Width(); + } + if ( nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Left() ) + { + nAdjustedRelPosY = aPgAlignArea.Left() - nTopOfAnch; + } } // <-- } else { - // OD 2004-07-22 #i31805# - consider value of <_bCheckBottom> - if ( _bCheckBottom && - _nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() > - // --> OD 2006-01-13 #129959# - // Do not mix usage of and -// aPgAlignArea.Bottom() ) + if ( bCheckBottom && + nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() > aPgAlignArea.Top() + aPgAlignArea.Height() ) - // <-- { - // --> OD 2006-01-13 #129959# - // Do not mix usage of and -// nAdjustedRelPosY = aPgAlignArea.Bottom() - nAdjustedRelPosY = aPgAlignArea.Top() + aPgAlignArea.Height() - - // <-- - _nTopOfAnch - + nTopOfAnch - aObjSize.Height(); } - if ( _nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Top() ) + if ( nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Top() ) { - nAdjustedRelPosY = aPgAlignArea.Top() - _nTopOfAnch; + nAdjustedRelPosY = aPgAlignArea.Top() - nTopOfAnch; } } diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 7a43781b1dc7..91daf0e202fc 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -273,10 +273,20 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // determine relative vertical position SwTwips nRelPosY = nAlignAreaOffset; - SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); + const SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - SwTwips nUpperSpace = bVert ? ( bVertL2R ? rLR.GetLeft() : rLR.GetRight() ) : rUL.GetUpper(); - SwTwips nLowerSpace = bVert ? rLR.GetLeft() : rUL.GetLower(); + const SwTwips nUpperSpace = bVert + ? ( bVertL2R + ? rLR.GetLeft() + : rLR.GetRight() ) + : rUL.GetUpper(); + // --> OD 2009-08-31 #monglianlayout# + const SwTwips nLowerSpace = bVert + ? ( bVertL2R + ? rLR.GetLeft() + : rLR.GetRight() ) + : rUL.GetLower(); + // <-- switch ( aVert.GetVertOrient() ) { case text::VertOrientation::CHAR_BOTTOM: @@ -286,8 +296,10 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // bottom (to character anchored) nRelPosY += nAlignAreaHeight + nUpperSpace; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if ( bVert && !bVertL2R) + if ( bVert && !bVertL2R ) + { nRelPosY += nObjHeight; + } break; } } @@ -409,7 +421,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() aEnvOfObj.GetVertEnvironmentLayoutFrm( *(pOrientFrm->GetUpper()) ); const bool bCheckBottom = !DoesObjFollowsTextFlow(); - nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, + nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, rVertEnvironLayFrm, nRelPosY, DoesObjFollowsTextFlow(), bCheckBottom ); @@ -591,7 +603,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // anchored object would fit into environment layout frame, if // anchored object has to follow the text flow. const bool bCheckBottom = !DoesObjFollowsTextFlow(); - nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, + nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, rVertEnvironLayFrm, nRelPosY, DoesObjFollowsTextFlow(), bCheckBottom ); @@ -632,7 +644,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // anchored object would fit into environment layout // frame, if anchored object has to follow the text flow. const bool bCheckBottom = !DoesObjFollowsTextFlow(); - nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, + nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, rVertEnvironLayFrm, nTmpRelPosY, DoesObjFollowsTextFlow(), @@ -721,7 +733,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // align at 'page areas', but stay inside given environment const SwFrm& rVertEnvironLayFrm = aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm ); - nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, + nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, rVertEnvironLayFrm, nRelPosY, DoesObjFollowsTextFlow() ); @@ -742,9 +754,19 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert ); if( bVert ) { - GetAnchoredObj().SetObjLeft( nTopOfAnch - - ( aRelPos.X() - nRelDiff ) - - aObjBoundRect.Width() ); + // --> OD 2009-08-31 #monglianlayout# + if ( !bVertL2R ) + { + GetAnchoredObj().SetObjLeft( nTopOfAnch - + ( aRelPos.X() - nRelDiff ) - + aObjBoundRect.Width() ); + } + else + { + GetAnchoredObj().SetObjLeft( nTopOfAnch + + ( aRelPos.X() - nRelDiff ) ); + } + // <-- } else { @@ -835,7 +857,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() nTmpRelPosY = aRelPos.Y() + nDist; const SwLayoutFrm& rVertEnvironLayFrm = aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm ); - nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, + nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R, rVertEnvironLayFrm, nTmpRelPosY, DoesObjFollowsTextFlow(), @@ -843,9 +865,18 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() if ( bVert ) { aRelPos.X() = nTmpRelPosY; - GetAnchoredObj().SetObjLeft( nTopOfAnch - - aRelPos.X() - - aObjBoundRect.Width() ); + // --> OD 2009-08-31 #mongolianlayout# + if ( !bVertL2R ) + { + GetAnchoredObj().SetObjLeft( nTopOfAnch - + aRelPos.X() - + aObjBoundRect.Width() ); + } + else + { + GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() ); + } + // <-- } else { @@ -925,9 +956,21 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() SWREFRESHFN( pUpperOfOrientFrm ) bMoveable = rAnchorTxtFrm.IsMoveable( (SwLayoutFrm*)pUpperOfOrientFrm ); if( bVertX ) - GetAnchoredObj().SetObjLeft( nTopOfAnch - - aRelPos.X() - - aObjBoundRect.Width() ); + { + // --> OD 2009-08-31 #mongolianlayout# + if ( !bVertL2R ) + { + GetAnchoredObj().SetObjLeft( nTopOfAnch - + aRelPos.X() - + aObjBoundRect.Width() ); + } + else + { + GetAnchoredObj().SetObjLeft( nTopOfAnch + + aRelPos.X() ); + } + // <-- + } else GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() ); @@ -979,8 +1022,19 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() // frame, the horizontal position is oriented at. const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert ); if( bVert ) - GetAnchoredObj().SetObjLeft( nTopOfAnch - - aRelPos.X() - aObjBoundRect.Width() ); + { + // --> OD 2009-08-31 #mongolianlayout# + if ( !bVertL2R ) + { + GetAnchoredObj().SetObjLeft( nTopOfAnch - + aRelPos.X() - aObjBoundRect.Width() ); + } + else + { + GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() ); + } + // <-- + } else GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() ); @@ -1030,8 +1084,17 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert ); if( bVert ) { - GetAnchoredObj().SetObjLeft( nTopOfAnch - - aRelPos.X() - aObjBoundRect.Width() ); + // --> OD 2009-08-31 #mongolianlayout# + if ( !bVertL2R ) + { + GetAnchoredObj().SetObjLeft( nTopOfAnch - + aRelPos.X() - aObjBoundRect.Width() ); + } + else + { + GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() ); + } + // <-- GetAnchoredObj().SetObjTop( rAnchorTxtFrm.Frm().Top() + aRelPos.Y() ); } diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx index dc84e4bd6780..48776aeebfda 100644 --- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx @@ -212,7 +212,9 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition() // --> OD 2004-06-17 #i26791# - determine offset to 'horizontal' frame // anchor position, depending on layout-direction //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if( bVert && !bVertL2R ) + // --> OD 2009-09-04 #mongolianlayout# + if( bVert || bVertL2R ) + // <-- { aRelPos.Y() = nRelPosX; -- cgit From 43867f5e04f671d6f3276724a47454ec5799ff80 Mon Sep 17 00:00:00 2001 From: Oliver Düsterhoff Date: Fri, 4 Sep 2009 13:08:11 +0000 Subject: #i91226# adjustment of the object positioning dialog for Mongolian layout --- sw/inc/fesh.hxx | 8 +- sw/source/core/frmedt/fews.cxx | 172 ++++++++++++++++++++++++++++++--------- sw/source/ui/docvw/edtwin.cxx | 4 +- sw/source/ui/frmdlg/frmmgr.cxx | 18 ++-- sw/source/ui/frmdlg/frmpage.cxx | 98 ++++++++++++++++++---- sw/source/ui/inc/frmmgr.hxx | 3 + sw/source/ui/inc/frmpage.hxx | 3 + sw/source/ui/shells/drwbassh.cxx | 11 ++- sw/source/ui/uiview/viewtab.cxx | 33 ++++++-- 9 files changed, 278 insertions(+), 72 deletions(-) diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 8697ee2833d1..50ce7f95a197 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -364,7 +364,13 @@ public: void SetFlyPos( const Point &rAbsPos); Point FindAnchorPos( const Point &rAbsPos, BOOL bMoveIt = FALSE ); // determines whether a frame or its environment is vertically formatted and right-to-left - BOOL IsFrmVertical(BOOL bEnvironment, BOOL& bRightToLeft) const; + // --> OD 2009-08-31 #mongolianlayout# + // also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right) + // - add output parameter + BOOL IsFrmVertical( const BOOL bEnvironment, + BOOL& bRightToLeft, + BOOL& bVertL2R ) const; + // <-- SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0 void SetFrmFmt( SwFrmFmt *pFmt, BOOL bKeepOrient = FALSE, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 13e6a5e732b3..f5a704d15050 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -775,8 +775,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, _bMirror = _bMirror && !pPage->OnRightPage(); Point aPos; - BOOL bVertic = FALSE; + bool bVertic = false; BOOL bRTL = FALSE; + // --> OD 2009-09-01 #mongolianlayout# + bool bVerticalL2R = false; + // <-- if( FLY_PAGE == _nAnchorId || FLY_AT_FLY == _nAnchorId ) // LAYER_IMPL { @@ -801,9 +804,14 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, else aPos = (pFrm->Frm().*fnRect->fnGetPos)(); - if( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if( bVert || bVertL2R ) + // <-- { - bVertic = TRUE; + // --> OD 2009-09-01 #mongolianlayout# + bVertic = bVert ? true : false; + bVerticalL2R = bVertL2R ? true : false; + // <-- _bMirror = false; // no mirroring in vertical environment switch ( _eHoriRelOrient ) { @@ -852,8 +860,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, default:break; } } - // --> OD 2006-12-12 #i67221# - proposed patch - if( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if ( bVert && !bVertL2R ) + // <-- { switch ( _eVertRelOrient ) { @@ -865,6 +874,20 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, break; } } + // --> OD 2009-09-01 #mongolianlayout# + else if ( bVertL2R ) + { + switch ( _eVertRelOrient ) + { + case text::RelOrientation::PRINT_AREA: + case text::RelOrientation::PAGE_PRINT_AREA: + { + aPos.X() += pFrm->GetLeftMargin(); + } + break; + } + } + // <-- else { switch ( _eVertRelOrient ) @@ -929,10 +952,17 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // to page areas. if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - if ( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if ( bVert && !bVertL2R ) + // <-- { aPos.X() = aVertEnvironRect.Right(); } + // --> OD 2009-09-01 #mongolianlayout# + else if ( bVertL2R ) + { + aPos.X() = aVertEnvironRect.Left(); + } else { aPos.Y() = aVertEnvironRect.Top(); @@ -949,7 +979,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // to page areas. if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - if ( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if ( bVert && !bVertL2R ) + // <-- { aPos.X() = aVertEnvironRect.Right(); if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) @@ -957,6 +989,16 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos.X() -= rVertEnvironLayFrm.GetRightMargin(); } } + // --> OD 2009-09-01 #mongolianlayout# + else if ( bVertL2R ) + { + aPos.X() = aVertEnvironRect.Left(); + if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) + { + aPos.X() += rVertEnvironLayFrm.GetLeftMargin(); + } + } + // <-- else { aPos.Y() = aVertEnvironRect.Top(); @@ -1016,10 +1058,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, pTxtFrm->GetTopOfLine( nTop, aDefaultCntntPos ); } } - if ( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if ( bVert || bVertL2R ) { aPos.X() = nTop; } + // <-- else { aPos.Y() = nTop; @@ -1046,10 +1090,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, pTxtFrm->GetAutoPos( aChRect, aDefaultCntntPos ); } nLeft = (aChRect.*fnRect->fnGetLeft)(); - if ( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if ( bVert || bVertL2R ) { aPos.Y() = nLeft; } + // <-- else { aPos.X() = nLeft; @@ -1057,7 +1103,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } // <-- - if ( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if ( bVert || bVertL2R ) + // <-- { _orRect = SwRect( aVertEnvironRect.Left(), aHoriEnvironRect.Top(), @@ -1091,7 +1139,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } // bei zeichengebundenen lieber nur 90% der Hoehe ausnutzen { - if( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if( bVert || bVertL2R ) + // <-- _orRect.Width( (_orRect.Width()*9)/10 ); else _orRect.Height( (_orRect.Height()*9)/10 ); @@ -1101,26 +1151,51 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, const SwTwips nBaseOfstForFly = ( pFrm->IsTxtFrm() && pFly ) ? ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( !bWrapThrough ) : 0; - if( bVert ) + // --> OD 2009-09-01 #mongolianlayout# + if( bVert || bVertL2R ) + // <-- { - bVertic = TRUE; + // --> OD 2009-09-01 #mongolianlayout# + bVertic = bVert ? true : false; + bVerticalL2R = bVertL2R ? true : false; + // <-- _bMirror = false; switch ( _eHoriRelOrient ) { - case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrm->Prt().Height(); - aPos += (pFrm->Prt().*fnRect->fnGetPos)(); - break; - case text::RelOrientation::PRINT_AREA: aPos += (pFrm->Prt().*fnRect->fnGetPos)(); - aPos.Y() += nBaseOfstForFly; - break; - case text::RelOrientation::PAGE_RIGHT: aPos.Y() = pPage->Frm().Top() - + pPage->Prt().Bottom(); break; - case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() = pPage->Frm().Top() - + pPage->Prt().Top(); break; + case text::RelOrientation::FRAME_RIGHT: + { + aPos.Y() += pFrm->Prt().Height(); + aPos += (pFrm->Prt().*fnRect->fnGetPos)(); + break; + } + case text::RelOrientation::PRINT_AREA: + { + aPos += (pFrm->Prt().*fnRect->fnGetPos)(); + aPos.Y() += nBaseOfstForFly; + break; + } + case text::RelOrientation::PAGE_RIGHT: + { + aPos.Y() = pPage->Frm().Top() + pPage->Prt().Bottom(); + break; + } + case text::RelOrientation::PAGE_PRINT_AREA: + { + aPos.Y() = pPage->Frm().Top() + pPage->Prt().Top(); + break; + } case text::RelOrientation::PAGE_LEFT: - case text::RelOrientation::PAGE_FRAME: aPos.Y() = pPage->Frm().Top(); break; - case text::RelOrientation::FRAME: aPos.Y() += nBaseOfstForFly; break; + case text::RelOrientation::PAGE_FRAME: + { + aPos.Y() = pPage->Frm().Top(); + break; + } + case text::RelOrientation::FRAME: + { + aPos.Y() += nBaseOfstForFly; + break; + } default: break; } } @@ -1178,19 +1253,27 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { switch ( _eHoriRelOrient ) { - case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Width(); - aPos += pFrm->Prt().Pos(); - break; - case text::RelOrientation::PRINT_AREA: aPos += pFrm->Prt().Pos(); - aPos.X() += nBaseOfstForFly; - break; - case text::RelOrientation::PAGE_RIGHT: aPos.X() = pPage->Frm().Left() - + pPage->Prt().Right(); break; - case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() = pPage->Frm().Left() - + pPage->Prt().Left(); break; + case text::RelOrientation::FRAME_RIGHT: + aPos.X() += pFrm->Prt().Width(); + aPos += pFrm->Prt().Pos(); + break; + case text::RelOrientation::PRINT_AREA: + aPos += pFrm->Prt().Pos(); + aPos.X() += nBaseOfstForFly; + break; + case text::RelOrientation::PAGE_RIGHT: + aPos.X() = pPage->Frm().Left() + pPage->Prt().Right(); + break; + case text::RelOrientation::PAGE_PRINT_AREA: + aPos.X() = pPage->Frm().Left() + pPage->Prt().Left(); + break; case text::RelOrientation::PAGE_LEFT: - case text::RelOrientation::PAGE_FRAME: aPos.X() = pPage->Frm().Left(); break; - case text::RelOrientation::FRAME: aPos.X() += nBaseOfstForFly; break; + case text::RelOrientation::PAGE_FRAME: + aPos.X() = pPage->Frm().Left(); + break; + case text::RelOrientation::FRAME: + aPos.X() += nBaseOfstForFly; + break; default: break; } } @@ -1198,8 +1281,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } if( !_opRef ) { - if( bVertic ) + if( bVertic && !bVerticalL2R ) _orRect.Pos( aPos.X() - _orRect.Width() - _orRect.Left(), _orRect.Top() - aPos.Y() ); + // --> OD 2009-09-01 #mongolianlayout# + else if( bVerticalL2R ) + _orRect.Pos( _orRect.Left() - aPos.X(), _orRect.Top() - aPos.Y() ); + // <-- else if ( bRTL ) _orRect.Pos( - ( _orRect.Right() - aPos.X() ), _orRect.Top() - aPos.Y() ); else @@ -1242,10 +1329,15 @@ Size SwFEShell::GetGraphicDefaultSize() const /* -----------------------------12.08.2002 12:51------------------------------ ---------------------------------------------------------------------------*/ -BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, BOOL& bRTL) const +// --> OD 2009-08-31 #mongolianlayou# +// add output parameter +BOOL SwFEShell::IsFrmVertical( const BOOL bEnvironment, + BOOL& bRTL, + BOOL& bVertL2R ) const { BOOL bVert = FALSE; bRTL = FALSE; + bVertL2R = FALSE; if ( Imp()->HasDrawView() ) { @@ -1287,10 +1379,12 @@ BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, BOOL& bRTL) const bVert = pRef->IsVertical(); bRTL = pRef->IsRightToLeft(); + bVertL2R = pRef->IsVertLR(); } return bVert; } +// <-- void SwFEShell::MoveObjectIfActive( svt::EmbeddedObjectRef&, const Point& ) { diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 8236791701ef..b707286ef49e 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1182,8 +1182,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) { // --> FME 2005-04-26 #i47138# // Check if object is anchored as character and move direction - BOOL bDummy; - const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy ); + BOOL bDummy1, bDummy2; + const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy1, bDummy2 ); const bool bHoriMove = !bVertAnchor == !( nDir % 2 ); const bool bMoveAllowed = !bHoriMove || rSh.GetAnchorId() != FLY_IN_CNTNT; if ( bMoveAllowed ) diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx index bd1e98b37b9e..a84d1b39ecef 100644 --- a/sw/source/ui/frmdlg/frmmgr.cxx +++ b/sw/source/ui/frmdlg/frmmgr.cxx @@ -77,7 +77,8 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) : pOwnSh( pSh ), bAbsPos( FALSE ), bNewFrm( bNew ), - bIsInVertical( FALSE ) + bIsInVertical( FALSE ), + bIsInVerticalL2R( FALSE ) { if ( bNewFrm ) { @@ -98,7 +99,7 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) : { pOwnSh->GetFlyFrmAttr( aSet ); BOOL bRightToLeft; - bIsInVertical = pOwnSh->IsFrmVertical(TRUE, bRightToLeft); + bIsInVertical = pOwnSh->IsFrmVertical( TRUE, bRightToLeft, bIsInVerticalL2R ); } ::PrepareBoxInfo( aSet, *pOwnSh ); } @@ -108,12 +109,13 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, const SfxItemSet & pOwnSh( pSh ), bAbsPos( FALSE ), bNewFrm( bNew ), - bIsInVertical(FALSE) + bIsInVertical(FALSE), + bIsInVerticalL2R( FALSE ) { if(!bNew) { BOOL bRightToLeft; - bIsInVertical = pSh->IsFrmVertical(TRUE, bRightToLeft); + bIsInVertical = pSh->IsFrmVertical( TRUE, bRightToLeft, bIsInVerticalL2R ); } } @@ -303,7 +305,9 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, if (bOnlyPercentRefValue) return; - if(bIsInVertical) + // --> OD 2009-09-01 #mongolianlayout# + if ( bIsInVertical || bIsInVerticalL2R ) + // <-- { Point aPos(aBoundRect.Pos()); long nTmp = aPos.X(); @@ -500,7 +504,9 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, rVal.nMaxVPos = -aBoundRect.Height(); } } - if(bIsInVertical) + // --> OD 2009-09-01 #mongolianlayout# + if ( bIsInVertical || bIsInVerticalL2R ) + // <-- { //restore width/height exchange long nTmp = rVal.nWidth; diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 3225e120248a..eb5d61fa5f1e 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -513,17 +513,36 @@ void lcl_InsertVectors(ListBox& rBox, /* -----------------------------20.08.2002 16:12------------------------------ ---------------------------------------------------------------------------*/ -SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL) +// --> OD 2009-08-31 #mongolianlayout# +// add input parameter +SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( + SvxSwFramePosString::StringId eStringId, + const BOOL bVertical, + const BOOL bVerticalL2R, + const BOOL bRTL) { //special handling of STR_FROMLEFT - if(SwFPos::FROMLEFT == eStringId) + if ( SwFPos::FROMLEFT == eStringId ) + { + eStringId = bVertical + ? ( bRTL + ? SwFPos::FROMBOTTOM + : SwFPos::FROMTOP ) + : ( bRTL + ? SwFPos::FROMRIGHT + : SwFPos::FROMLEFT ); + return eStringId; + } + // --> OD 2009-08-31 #mongolianlayout# + // special handling of STR_FROMTOP in case of mongolianlayout (vertical left-to-right) + if ( SwFPos::FROMTOP == eStringId && + bVertical && bVerticalL2R ) { - eStringId = bVertical ? - bRTL ? SwFPos::FROMBOTTOM : SwFPos::FROMTOP : - bRTL ? SwFPos::FROMRIGHT : SwFPos::FROMLEFT; + eStringId = SwFPos::FROMLEFT; return eStringId; } - if(bVertical) + // <-- + if ( bVertical ) { //exchange horizontal strings with vertical strings and vice versa static const StringIdPair_Impl aHoriIds[] = @@ -548,6 +567,19 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT }, {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT } }; + // --> OD 2009-08-31 #monglianlayout# + static const StringIdPair_Impl aVertL2RIds[] = + { + {SwFPos::TOP, SwFPos::LEFT }, + {SwFPos::BOTTOM, SwFPos::RIGHT }, + {SwFPos::CENTER_VERT, SwFPos::CENTER_HORI }, + {SwFPos::FROMTOP, SwFPos::FROMLEFT }, + {SwFPos::REL_PG_TOP, SwFPos::REL_PG_LEFT }, + {SwFPos::REL_PG_BOTTOM, SwFPos::REL_PG_RIGHT } , + {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT }, + {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT } + }; + // <-- USHORT nIndex; for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex) { @@ -560,11 +592,24 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString nIndex = 0; for(nIndex = 0; nIndex < sizeof(aVertIds) / sizeof(StringIdPair_Impl); ++nIndex) { - if(aVertIds[nIndex].eHori == eStringId) + // --> OD 2009-08-31 #mongolianlayout# + if ( !bVerticalL2R ) { - eStringId = aVertIds[nIndex].eVert; - break; + if(aVertIds[nIndex].eHori == eStringId) + { + eStringId = aVertIds[nIndex].eVert; + break; + } + } + else + { + if(aVertL2RIds[nIndex].eHori == eStringId) + { + eStringId = aVertL2RIds[nIndex].eVert; + break; + } } + // <-- } } return eStringId; @@ -673,8 +718,13 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : bFormat(FALSE), bNew(TRUE), bNoModifyHdl(TRUE), - bVerticalChanged(FALSE), + // --> OD 2009-08-31 #mongolianlayout# - no used +// bVerticalChanged(FALSE), + // <-- bIsVerticalFrame(FALSE), + // --> OD 2009-08-31 #mongolianlayou# + bIsVerticalL2R( FALSE ), + // <-- bIsInRightToLeft(FALSE), bHtmlMode(FALSE), nHtmlMode(0), @@ -813,7 +863,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) { if (rAnchor.GetAnchorId() != FLY_AT_FLY && !pSh->IsFlyInFly()) aAnchorAtFrameRB.Hide(); - if(!bVerticalChanged && pSh->IsFrmVertical(TRUE, bIsInRightToLeft)) + // --> OD 2009-08-31 #mongolianlayout# +// if ( !bVerticalChanged && pSh->IsFrmVertical(TRUE, bIsInRightToLeft) ) + if ( pSh->IsFrmVertical( TRUE, bIsInRightToLeft, bIsVerticalL2R ) ) + // <-- { String sHLabel = aHorizontalFT.GetText(); aHorizontalFT.SetText(aVerticalFT.GetText()); @@ -1324,7 +1377,12 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap, // if (!bFormat || (pMap[i].eStrId != SwFPos::FROMLEFT && pMap[i].eStrId != SwFPos::FROMTOP)) { SvxSwFramePosString::StringId eStrId = aMirrorPagesCB.IsChecked() ? _pMap[i].eMirrorStrId : _pMap[i].eStrId; - eStrId = lcl_ChangeResIdToVerticalOrRTL(eStrId, bIsVerticalFrame, bIsInRightToLeft); + // --> OD 2009-08-31 #mongolianlayout# + eStrId = lcl_ChangeResIdToVerticalOrRTL( eStrId, + bIsVerticalFrame, + bIsVerticalL2R, + bIsInRightToLeft); + // <-- String sEntry(aFramePosString.GetString(eStrId)); if (_rLB.GetEntryPos(sEntry) == LISTBOX_ENTRY_NOTFOUND) { @@ -1388,7 +1446,13 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, { SvxSwFramePosString::StringId sStrId1 = aAsCharRelationMap[nRelPos].eStrId; - sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, bIsVerticalFrame, bIsInRightToLeft); + // --> OD 2009-08-31 #mongolianlayout# + sStrId1 = + lcl_ChangeResIdToVerticalOrRTL( sStrId1, + bIsVerticalFrame, + bIsVerticalL2R, + bIsInRightToLeft); + // <-- String sEntry = aFramePosString.GetString(sStrId1); USHORT nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); @@ -1448,7 +1512,13 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, { SvxSwFramePosString::StringId eStrId1 = aMirrorPagesCB.IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; - eStrId1 = lcl_ChangeResIdToVerticalOrRTL(eStrId1, bIsVerticalFrame, bIsInRightToLeft); + // --> OD 2009-08-31 #mongolianlayout# + eStrId1 = + lcl_ChangeResIdToVerticalOrRTL( eStrId1, + bIsVerticalFrame, + bIsVerticalL2R, + bIsInRightToLeft); + // <-- String sEntry = aFramePosString.GetString(eStrId1); USHORT nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx index 4223960dfca5..ea09a89a827b 100644 --- a/sw/source/ui/inc/frmmgr.hxx +++ b/sw/source/ui/inc/frmmgr.hxx @@ -68,6 +68,9 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr BOOL bAbsPos, bNewFrm; BOOL bIsInVertical; + // --> OD 2009-09-01 #mongolianlayout# + BOOL bIsInVerticalL2R; + // <-- // interne Verrechnung fuer Umrandung SW_DLLPRIVATE SwTwips CalcTopSpace(); diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index c30b1bcf8488..fdf3f75511a1 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -122,6 +122,9 @@ class SwFrmPage: public SfxTabPage BOOL bNoModifyHdl; BOOL bVerticalChanged; //check done whether frame is in vertical environment BOOL bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged + // --> OD 2009-08-31 #mongolianlayou# + BOOL bIsVerticalL2R; + // <-- BOOL bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged BOOL bHtmlMode; USHORT nHtmlMode; diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx index 339c332c9135..f367aac330fb 100644 --- a/sw/source/ui/shells/drwbassh.cxx +++ b/sw/source/ui/shells/drwbassh.cxx @@ -271,7 +271,8 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); BOOL bRTL; - aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL))); + BOOL bVertL2R; + aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL, bVertL2R))); aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL)); SwFrmFmt* pFrmFmt = FindFrmFmt( pObj ); @@ -837,8 +838,12 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation pValidation->bFollowTextFlow, pValidation->bMirror, NULL, &pValidation->aPercentSize); - BOOL bRTL; - BOOL bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL); + BOOL bIsInVertical( FALSE ); + { + BOOL bRTL; + BOOL bVertL2R; + bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL, bVertL2R); + } if(bIsInVertical) { Point aPos(aBoundRect.Pos()); diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 6223d1d0234a..1b9b18dd0888 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -316,8 +316,14 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SwFrmFmt* pFmt = ((SwFrmFmt*)rSh.GetFlyFrmFmt()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); - BOOL bRTL; - BOOL bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting); + BOOL bVerticalFrame( FALSE ); + { + BOOL bRTL; + BOOL bVertL2R; + bVerticalFrame = ( bFrmSelection && + rSh.IsFrmVertical(TRUE, bRTL, bVertL2R) ) || + ( !bFrmSelection && bVerticalWriting); + } long nDeltaX = bVerticalFrame ? rRect.Right() - rPageRect.Right() + aLongLR.GetRight() : rPageRect.Left() + aLongLR.GetLeft() - rRect.Left(); @@ -454,7 +460,10 @@ void SwView::ExecTabWin( SfxRequest& rReq ) RES_VERT_ORIENT, RES_HORI_ORIENT, 0 ); //which of the orientation attributes is to be put depends on the frame's environment BOOL bRTL; - if((bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting)) + BOOL bVertL2R; + if ( ( bFrmSelection && + rSh.IsFrmVertical(TRUE, bRTL, bVertL2R ) ) || + ( !bFrmSelection && bVerticalWriting ) ) { SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient()); aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE); @@ -1276,8 +1285,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_BORDERS_VERTICAL: case SID_RULER_BORDERS: { - BOOL bFrameRTL; - BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; + BOOL bFrameHasVerticalColumns(FALSE); + { + BOOL bFrameRTL; + BOOL bFrameVertL2R; + bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL, bFrameVertL2R) && + bFrmSelection; + } BOOL bHasTable = ( IsTabColFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && !(nFrmType & FRMTYPE_COLSECT ) ) ); @@ -1500,8 +1514,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_ROWS : case SID_RULER_ROWS_VERTICAL: { - BOOL bFrameRTL; - BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; + BOOL bFrameHasVerticalColumns(FALSE); + { + BOOL bFrameRTL; + BOOL bFrameVertL2R; + bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL, bFrameVertL2R) && + bFrmSelection; + } if((SID_RULER_ROWS == nWhich) && ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) || -- cgit From f7016dabf14874375414471571d40b1ed48700a9 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 9 Sep 2009 15:36:32 +0000 Subject: #i91226#: reimplemented cursor travelling; problematic code only for VertLR --- sw/source/core/crsr/crsrsh.cxx | 6 ------ sw/source/core/layout/layact.cxx | 17 ++++++++++++----- sw/source/core/text/frmpaint.cxx | 2 +- sw/source/core/text/txtfrm.cxx | 5 ++++- sw/source/ui/docvw/edtwin.cxx | 19 +++++++++++++++---- 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index b6f27c0917ab..6652cd86dab4 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -459,12 +459,6 @@ void SwCrsrShell::UpdateMarkedListLevel() BOOL SwCrsrShell::UpDown( BOOL bUp, USHORT nCnt ) { - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - SwCntntFrm *pFrm = pCurCrsr->GetCntntNode()->GetFrm( - &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint() ); - if(pFrm->IsVertical() && pFrm->IsVertLR()) - bUp=!bUp; - //End of SCMS SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index dc32cc7bc40c..5223da909000 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1809,15 +1809,22 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) pFly->Calc(); bChanged = aOldRect != pFly->Frm(); - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) + if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) && + pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) pImp->GetShell()->AddPaintRect( pFly->Frm() ); - //if ( bChanged ) + if ( bChanged ) pFly->Invalidate(); - //else - // pFly->Validate(); + else + pFly->Validate(); +/* + //mba: it's unclear why we should invalidate always, so I remove it + //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin + if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 ) + pImp->GetShell()->AddPaintRect( pFly->Frm() ); + pFly->Invalidate(); +*/ bAddRect = false; pFly->ResetCompletePaint(); } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index 7cd258523903..f6ce848f229e 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -457,7 +457,7 @@ SwRect SwTxtFrm::Paint() SwRepaint *pRepaint = GetPara()->GetRepaint(); long l; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if ( IsVertical() ) + if ( IsVertLR() ) // mba: the following line was added, but we don't need it for the existing directions; kept for IsVertLR(), but should be checked pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() ); if( pRepaint->GetOfst() ) diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 2ae723bbe3e1..38ab871c5107 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -2606,9 +2606,12 @@ void SwTxtFrm::ChgThisLines() else //Paragraphs which are not counted should not manipulate the AllLines. nThisLines = nNew; } + + //mba: invalidating is not necessary; if mongolian script has a problem, it should be fixed at the ritgh place + //with invalidating we probably get too much flickering //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin //Ugly. How can we hack if better? - InvalidatePage(); + //InvalidatePage(); } diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index b707286ef49e..098f25cff898 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1338,11 +1338,22 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if( ( bVertText && ( !bTblCrsr || bVertTable ) ) || ( bTblCrsr && bVertTable ) ) { - if( KEY_UP == nKey ) nKey = KEY_LEFT; - else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT; - else if( KEY_LEFT == nKey ) nKey = KEY_DOWN; - else if( KEY_RIGHT == nKey ) nKey = KEY_UP; + if( KEY_UP == nKey ) + nKey = KEY_LEFT; + else if( KEY_DOWN == nKey ) + nKey = KEY_RIGHT; + else if ( !rSh.IsInRightToLeftText() ) + { + if( KEY_LEFT == nKey ) nKey = KEY_UP; + else if( KEY_RIGHT == nKey ) nKey = KEY_DOWN; + } + else + { + if( KEY_LEFT == nKey ) nKey = KEY_DOWN; + else if( KEY_RIGHT == nKey ) nKey = KEY_UP; + } } + if ( rSh.IsInRightToLeftText() ) { if( KEY_LEFT == nKey ) nKey = KEY_RIGHT; -- cgit From 9aab0238e78d474b0b36d70bf65bb95d49bf6a78 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 24 Jun 2010 18:41:43 +0200 Subject: CWS mongolianlayout: resolve conflict in layact.cxx --- sw/source/core/layout/layact.cxx | 259 --------------------------------------- 1 file changed, 259 deletions(-) diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 9572e2d0d4b7..eb01f443a269 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1677,242 +1677,6 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) return bChanged || bTabChanged; } -<<<<<<< local -BOOL MA_FASTCALL lcl_AreLowersScrollable( const SwLayoutFrm *pLay ) -{ - const SwFrm *pLow = pLay->Lower(); - while ( pLow ) - { - if ( pLow->IsCompletePaint() || !pLow->IsValid() || pLow->IsCoveredCell() ) - return FALSE; - if ( pLow->IsLayoutFrm() && !::lcl_AreLowersScrollable( (SwLayoutFrm*)pLow )) - return FALSE; - pLow = pLow->GetNext(); - } - return TRUE; -} - -SwLayoutFrm * MA_FASTCALL lcl_IsTabScrollable( SwTabFrm *pTab ) -{ - //returnt die erste unveraenderte Zeile, oder 0 wenn nicht - //gescrollt werden darf. - if ( !pTab->IsCompletePaint() ) - { - SwLayoutFrm *pUnchgdRow = 0; - SwLayoutFrm *pRow = (SwLayoutFrm*)pTab->Lower(); - while ( pRow ) - { - if ( ::lcl_AreLowersScrollable( pRow ) ) - { - if ( !pUnchgdRow ) - pUnchgdRow = pRow; - } - else - { - pUnchgdRow = 0; - } - - pRow = (SwLayoutFrm*)pRow->GetNext(); - } - return pUnchgdRow; - } - return 0; -} - -// OD 2004-05-11 #i28701# -void lcl_ValidateLowerObjs( SwFrm* pFrm, - const SwTwips nOfst, - SwPageFrm *pPage, - bool bResetOnly ); - -// OD 2004-05-11 #i28701# - correction: floating screen objects, which are -// anchored at-fly, have also been to be considered. -void MA_FASTCALL lcl_ValidateLowers( SwLayoutFrm *pLay, const SwTwips nOfst, - SwLayoutFrm *pRow, SwPageFrm *pPage, - BOOL bResetOnly ) -{ - pLay->ResetCompletePaint(); - - // OD 2004-05-11 #i28701# - consider floating screen objects, which are - // anchored at-fly. - if ( pLay->IsFlyFrm() ) - { - ::lcl_ValidateLowerObjs( pLay, nOfst, pPage, bResetOnly ); - } - - SwFrm *pLow = pRow ? pRow : pLay->Lower(); - SwRootFrm *pRootFrm = 0; - - while ( pLow ) - { - if ( !bResetOnly ) - { - SwRect aOldFrm( pLow->Frm() ); - pLow->Frm().Pos().Y() += nOfst; - if( pLow->IsAccessibleFrm() ) - { - if( !pRootFrm ) - pRootFrm = pPage->FindRootFrm(); - if( pRootFrm && pRootFrm->IsAnyShellAccessible() && - pRootFrm->GetCurrShell() ) - { - pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( pLow, aOldFrm ); - } - } - } - if ( pLow->IsLayoutFrm() ) - { - ::lcl_ValidateLowers( (SwLayoutFrm*)pLow, nOfst, 0, pPage, bResetOnly); - } - else - { - pLow->ResetCompletePaint(); - // OD 2004-05-11 #i28701# - use new local helper method - // - ::lcl_ValidateLowerObjs( pLow, nOfst, pPage, bResetOnly); - } - if ( !bResetOnly ) - pLow->Calc(); //#55435# Stabil halten. - pLow = pLow->GetNext(); - } -} - -// OD 2004-05-11 #i28701# - helper method for to -// 'ValidateLowers' for floating screen objects -void lcl_ValidateLowerObjs( SwFrm* pFrm, - const SwTwips nOfst, - SwPageFrm *pPage, - bool bResetOnly ) -{ - if ( pFrm->GetDrawObjs() ) - { - // --> OD 2004-10-15 #i26945# - consider layout direction - SWRECTFN( pFrm ) - // <-- - for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i ) - { - SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; - // --> OD 2004-10-08 #i26945# - check, if the anchor frame, which - // contains the anchor position, is the given frame - if ( pAnchoredObj->GetAnchorFrmContainingAnchPos() != pFrm ) - { - continue; - } - if ( pAnchoredObj->ISA(SwFlyFrm) ) - { - SwFlyFrm *pFly = static_cast(pAnchoredObj); - if ( !bResetOnly ) - { - // --> OD 2004-10-15 #i26945# - // - consider layout direction - // - consider condition for direct move - const bool bNoDirectMove = - WEIT_WECH == pFly->Frm().Top() || - pFly->ConsiderObjWrapInfluenceOnObjPos(); - if ( !bNoDirectMove ) - { - (pFly->Frm().*fnRect->fnSubTop)( -nOfst ); - (pFly->Frm().*fnRect->fnAddBottom)( nOfst ); - } - // <-- - pFly->GetVirtDrawObj()->SetRectsDirty(); - // --> OD 2004-08-17 - also notify view of - // instance, which represents the Writer fly frame in the - // drawing layer - pFly->GetVirtDrawObj()->SetChanged(); - // <-- - if ( pFly->IsFlyInCntFrm() ) - ((SwFlyInCntFrm*)pFly)->AddRefOfst( nOfst ); - // --> OD 2004-10-15 #i26945# - consider at-character - // anchored Writer fly frames - else if( pFly->IsAutoPos() ) - { - pFly->AddLastCharY( nOfst ); - // OD 2004-05-18 #i28701# - follow-up of #i22341# - // has also been adjusted. - pFly->AddLastTopOfLineY( nOfst ); - } - // <-- - } - ::lcl_ValidateLowers( pFly, nOfst, 0, pPage, bResetOnly); - } - // --> OD 2004-10-15 #i26945# - consider drawing objects - else - { - if ( !bResetOnly ) - { - pAnchoredObj->AddLastCharY( nOfst ); - pAnchoredObj->AddLastTopOfLineY( nOfst ); - } - } - // <-- - pAnchoredObj->InvalidateObjPos(); - } - } -} - -void MA_FASTCALL lcl_AddScrollRectTab( SwTabFrm *pTab, SwLayoutFrm *pRow, - const SwRect &rRect, - const SwTwips nOfst) -{ - // --> OD 2007-11-27 #notes2# - // if sidebar for notes is present, no scrolling is allowed - const SwPageFrm* pPage = pTab->FindPageFrm(); - ASSERT( pPage, " - no page frame found at table frame -> crash" ); - ViewShell* pSh = pPage->GetShell(); - if ( pSh ) - { - const SwPostItMgr* pPostItMgr = pSh->GetPostItMgr(); - if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) - { - return; - } - } - // <-- - //Wenn altes oder neues Rechteck mit einem Fly ueberlappen, in dem der - //Frm nicht selbst steht, so ist nichts mit Scrollen. - SwRect aRect( rRect ); - // OD 04.11.2002 #104100# - not needed. - - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if( pTab->IsVertical() && !pTab->IsVertLR() ) - aRect.Pos().X() -= nOfst; - else - aRect.Pos().Y() += nOfst; - if ( pPage->GetSortedObjs() ) - { - if ( ::lcl_IsOverObj( pTab, pPage, rRect, aRect, pTab ) ) - return; - } - if ( pPage->GetFmt()->GetBackground().GetGraphicPos() != GPOS_NONE ) - return; - - if ( pSh ) - pSh->AddScrollRect( pTab, aRect, nOfst ); - ::lcl_ValidateLowers( pTab, nOfst, pRow, pTab->FindPageFrm(), - pTab->IsLowersFormatted() ); -} - -// OD 31.10.2002 #104100# -// NOTE: no adjustments for vertical layout support necessary -BOOL CheckPos( SwFrm *pFrm ) -{ - if ( !pFrm->GetValidPosFlag() ) - { - Point aOld( pFrm->Frm().Pos() ); - pFrm->MakePos(); - if ( aOld != pFrm->Frm().Pos() ) - { - pFrm->Frm().Pos( aOld ); - pFrm->_InvalidatePos(); - return FALSE; - } - } - return TRUE; -} - -======= ->>>>>>> other // OD 31.10.2002 #104100# // Implement vertical layout support BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect ) @@ -2282,31 +2046,8 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, (aOldRect.*fnRect->fnGetBottom)() ) < 0 ) { pCntnt->SetRetouche(); -<<<<<<< local - const SwRect aNewRect( pCntnt->UnionFrm() ); - if ( bPosOnly && - (aNewRect.*fnRect->fnGetTop)() != (aOldRect.*fnRect->fnGetTop)() && - !pCntnt->IsInTab() && !pCntnt->IsInSct() && - ( !pCntnt->GetPrev() || !pCntnt->GetPrev()->IsTabFrm() ) && - pOldUp == pCntnt->GetUpper() && - (aNewRect.*fnRect->fnGetLeft)() == (aOldRect.*fnRect->fnGetLeft)() && - aNewRect.SSize() == aOldRect.SSize() - ) - { - //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin - if ( !bVertL2R ) - _AddScrollRect( pCntnt, pPage, (*fnRect->fnYDiff)( - (pCntnt->Frm().*fnRect->fnGetTop)(), - (aOldRect.*fnRect->fnGetTop)() ), nOldBottom ); - else - PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); - } - else - PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); -======= } PaintCntnt( pCntnt, pCntnt->FindPageFrm(), aOldRect, nOldBottom); ->>>>>>> other } else { -- cgit From faf68cc7565cb2662d4ed5b5902ec52975d99865 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 25 Jun 2010 11:10:43 +0200 Subject: CWS mongolianlayout: disable new direction until problems are fixed --- cui/source/tabpages/page.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 775d1f7d0bed..00e65cfffd58 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -331,7 +331,7 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : if( bCJK ) { aTextFlowBox.InsertEntryValue( CUI_RESSTR( RID_SVXSTR_PAGEDIR_RTL_VERT ), FRMDIR_VERT_TOP_RIGHT ); - aTextFlowBox.InsertEntryValue( CUI_RESSTR( RID_SVXSTR_PAGEDIR_LTR_VERT ), FRMDIR_VERT_TOP_LEFT ); +// aTextFlowBox.InsertEntryValue( CUI_RESSTR( RID_SVXSTR_PAGEDIR_LTR_VERT ), FRMDIR_VERT_TOP_LEFT ); } } -- cgit From bb2e719893dbfdee7c2fb36ffca5cef8ffefdf8f Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 4 Nov 2010 14:01:00 +0100 Subject: mongolianlayout: #i115359# - method - restore previous mapping of cursor keys to direction keys as the attempt to consider cursor travelling for mongolian layout does not work. --- sw/source/ui/docvw/edtwin.cxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index ad865b1732f2..a0349575804e 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1365,20 +1365,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if( ( bVertText && ( !bTblCrsr || bVertTable ) ) || ( bTblCrsr && bVertTable ) ) { - if( KEY_UP == nKey ) - nKey = KEY_LEFT; - else if( KEY_DOWN == nKey ) - nKey = KEY_RIGHT; - else if ( !rSh.IsInRightToLeftText() ) - { - if( KEY_LEFT == nKey ) nKey = KEY_UP; - else if( KEY_RIGHT == nKey ) nKey = KEY_DOWN; - } - else - { - if( KEY_LEFT == nKey ) nKey = KEY_DOWN; - else if( KEY_RIGHT == nKey ) nKey = KEY_UP; - } + // Attempt to integrate cursor travelling for mongolian layout does not work. + // Thus, back to previous mapping of cursor keys to direction keys. + if( KEY_UP == nKey ) nKey = KEY_LEFT; + else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT; + else if( KEY_LEFT == nKey ) nKey = KEY_DOWN; + else if( KEY_RIGHT == nKey ) nKey = KEY_UP; } if ( rSh.IsInRightToLeftText() ) -- cgit From df5e24fa7d085508a0929c9213a515af344485e2 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 16 Nov 2010 15:03:23 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 1 - patch from hackfest2010 --- .../controller/main/ChartController_Position.cxx | 15 +++++- .../controller/main/ChartController_Window.cxx | 14 +++-- .../controller/main/PositionAndSizeHelper.cxx | 60 +++++++--------------- chart2/source/controller/main/SelectionHelper.cxx | 1 + chart2/source/model/main/Legend.cxx | 13 ++++- chart2/source/view/main/VLegend.cxx | 27 +++++++++- 6 files changed, 79 insertions(+), 51 deletions(-) diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 619d308ffad2..18f042fe98df 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -37,6 +37,7 @@ #include "UndoGuard.hxx" #include "Strings.hrc" #include "ObjectNameProvider.hxx" +#include "DiagramHelper.hxx" #include "chartview/ExplicitValueProvider.hxx" #include "CommonConverters.hxx" #include @@ -135,10 +136,12 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() if( pProvider ) aSelectedSize = ToSize( ( pProvider->getRectangleOfObject( aCID ) ) ); + ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID ); + UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::POS_SIZE, - ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aCID ))), + ObjectNameProvider::getName( eObjectType)), m_xUndoManager, getModel() ); SfxAbstractTabDialog * pDlg = NULL; @@ -169,10 +172,18 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height ); - bool bChanged = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID() + + bool bChanged = false; + if ( eObjectType == OBJECTTYPE_LEGEND && (aSelectedSize.Width != aObjectRect.getWidth() + || aSelectedSize.Height != aObjectRect.getHeight())) + bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( getModel(), false , true ); + + + bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID() , getModel() , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight()) , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) ); + bChanged = bMoved || bChanged; if( bChanged ) aUndoGuard.commitAction(); } diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 56908ac4ef79..cb32f0a7fb4d 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -868,15 +868,21 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) if( !bIsMoveOnly && m_aSelection.isResizeableObjectSelected() ) eActionType = ActionDescriptionProvider::RESIZE; + ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() ); + UndoGuard aUndoGuard( - ActionDescriptionProvider::createDescription( - eActionType, - ObjectNameProvider::getName( ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() ))), + ActionDescriptionProvider::createDescription( eActionType, ObjectNameProvider::getName( eObjectType)), m_xUndoManager, getModel() ); - bool bChanged = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID() + + bool bChanged = false; + if ( eObjectType == OBJECTTYPE_LEGEND && eActionType == ActionDescriptionProvider::RESIZE ) + bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( getModel(), false , true ); + + bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID() , getModel() , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight()) , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) ); + bChanged = bMoved || bChanged; if( bChanged ) { bDraggingDone = true; diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index f0ce3eaaa04e..30dfe898866e 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -33,6 +33,7 @@ #include "ChartModelHelper.hxx" #include "ControllerLockGuard.hxx" #include +#include #include #include #include "chartview/ExplicitValueProvider.hxx" @@ -83,51 +84,13 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType } else if(OBJECTTYPE_LEGEND==eObjectType) { - LegendPosition ePos = LegendPosition_LINE_END; - xObjectProp->getPropertyValue( C2U( "AnchorPosition" )) >>= ePos; + xObjectProp->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny(LegendPosition(LegendPosition_CUSTOM))); + xObjectProp->setPropertyValue( C2U( "Expansion" ), uno::makeAny(LegendExpansion(LegendExpansion_CUSTOM))); chart2::RelativePosition aRelativePosition; + chart2::RelativeSize aRelativeSize; Point aAnchor = aObjectRect.TopLeft(); - switch( ePos ) - { - case LegendPosition_LINE_START: - { - //@todo language dependent positions ... - aRelativePosition.Anchor = drawing::Alignment_LEFT; - aAnchor = aObjectRect.LeftCenter(); - } - break; - case LegendPosition_LINE_END: - { - //@todo language dependent positions ... - aRelativePosition.Anchor = drawing::Alignment_RIGHT; - aAnchor = aObjectRect.RightCenter(); - } - break; - case LegendPosition_PAGE_START: - { - //@todo language dependent positions ... - aRelativePosition.Anchor = drawing::Alignment_TOP; - aAnchor = aObjectRect.TopCenter(); - } - break; - case LegendPosition_PAGE_END: - //@todo language dependent positions ... - { - aRelativePosition.Anchor = drawing::Alignment_BOTTOM; - aAnchor = aObjectRect.BottomCenter(); - } - break; - case LegendPosition_CUSTOM: - { - //@todo language dependent positions ... - aRelativePosition.Anchor = drawing::Alignment_TOP_LEFT; - } - break; - case LegendPosition_MAKE_FIXED_SIZE: - OSL_ASSERT( false ); - break; - } + aRelativePosition.Primary = static_cast< double >( aAnchor.X()) / static_cast< double >( aPageRect.getWidth() ); @@ -136,6 +99,19 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType static_cast< double >( aPageRect.getHeight()); xObjectProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); + + aRelativeSize.Primary = + static_cast< double >( aObjectRect.getWidth()) / + static_cast< double >( aPageRect.getWidth() ); + if (aRelativeSize.Primary > 1.0) + aRelativeSize.Primary = 1.0; + aRelativeSize.Secondary = + static_cast< double >( aObjectRect.getHeight()) / + static_cast< double >( aPageRect.getHeight()); + if (aRelativeSize.Secondary > 1.0) + aRelativeSize.Secondary = 1.0; + + xObjectProp->setPropertyValue( C2U( "RelativeSize" ), uno::makeAny(aRelativeSize) ); } else if(OBJECTTYPE_DIAGRAM==eObjectType || OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType) { diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 567a36473a5b..ac0a871c6d2b 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -309,6 +309,7 @@ bool Selection::isResizeableObjectSelected() case OBJECTTYPE_DIAGRAM: case OBJECTTYPE_DIAGRAM_WALL: case OBJECTTYPE_SHAPE: + case OBJECTTYPE_LEGEND: return true; default: return false; diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index c1143ecdf77a..9949f768a642 100644 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include @@ -66,7 +67,8 @@ enum PROP_LEGEND_PREFERRED_EXPANSION, PROP_LEGEND_SHOW, PROP_LEGEND_REF_PAGE_SIZE, - PROP_LEGEND_REL_POS + PROP_LEGEND_REL_POS, + PROP_LEGEND_REL_SIZE }; void lcl_AddPropertiesToVector( @@ -105,6 +107,15 @@ void lcl_AddPropertiesToVector( ::getCppuType( reinterpret_cast< const chart2::RelativePosition * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); + + + rOutProperties.push_back( + Property( C2U( "RelativeSize" ), + PROP_LEGEND_REL_SIZE, + ::getCppuType( reinterpret_cast< const chart2::RelativeSize * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID )); + } void lcl_AddDefaultsToMap( diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 7101a984ee24..3538bb06f50b 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -707,15 +707,31 @@ void VLegend::createShapes( tPropertyValues aLineFillProperties; tPropertyValues aTextProperties; + bool bIsCustomSized = false; + // limit the width of texts to 30% of the total available width // #i109336# Improve auto positioning in chart sal_Int32 nMaxLabelWidth = rAvailableSpace.Width * 3 / 10; Reference< beans::XPropertySet > xLegendProp( m_xLegend, uno::UNO_QUERY ); LegendExpansion eExpansion = LegendExpansion_HIGH; + awt::Size aCustomSize; + if( xLegendProp.is()) { // get Expansion property xLegendProp->getPropertyValue( C2U( "Expansion" )) >>= eExpansion; + bIsCustomSized = (eExpansion == LegendExpansion_CUSTOM); + RelativeSize aRelativeSize; + if ((xLegendProp->getPropertyValue( C2U( "RelativeSize" )) >>= aRelativeSize)) + { + aCustomSize.Width = aRelativeSize.Primary * rPageSize.Width; + aCustomSize.Height = aRelativeSize.Secondary * rPageSize.Height; + } + else + { + bIsCustomSized =false; + eExpansion = LegendExpansion_HIGH; + } if( eExpansion == LegendExpansion_WIDE ) { //#i80377# @@ -765,8 +781,15 @@ void VLegend::createShapes( , xLegendContainer, m_xShapeFactory, m_xContext , rAvailableSpace, rPageSize, aLegendSize ); - if( xBorder.is()) - xBorder->setSize( aLegendSize ); + if( xBorder.is() ) + { + if( bIsCustomSized ) + { + xBorder->setSize( aCustomSize ); + } + else + xBorder->setSize( aLegendSize ); + } } } catch( uno::Exception & ex ) -- cgit From e26194b675380ad6b6a1287f97bce93006be176c Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 16 Nov 2010 15:03:23 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 1 - patch from hackfest2010 --- xmloff/inc/xmloff/xmltoken.hxx | 5 +++++ xmloff/source/chart/SchXMLExport.cxx | 36 ++++++++++++++++++++++++++++-------- xmloff/source/core/xmltoken.cxx | 5 +++++ 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 291c99c7be21..241201ea5ed7 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3113,6 +3113,11 @@ namespace xmloff { namespace token { XML_OUTSIDE_MINIMUM,//#i114142# XML_OUTSIDE_MAXIMUM,//#i114142# + XML_LEGEND_EXPANSION, //#i28760# + XML_BALANCED, //#i28760# + XML_HIGH, //#i28760# + XML_WIDE, //#i28760# + XML_MIN_VALUE, XML_MAX_VALUE, diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index e6f6fc6d9340..9450eb383d1c 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -66,6 +66,7 @@ #include #include +#include #include #include #include @@ -234,8 +235,8 @@ public: void addPosition( const ::com::sun::star::awt::Point & rPosition ); void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); /// add svg size as attribute for current element - void addSize( const ::com::sun::star::awt::Size & rSize ); - void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); + void addSize( const ::com::sun::star::awt::Size & rSize, bool bIsOOoNamespace = false ); + void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape, bool bIsOOoNamespace = false ); /// fills the member msString with the appropriate String (i.e. "A3") void getCellAddress( sal_Int32 nCol, sal_Int32 nRow ); /// exports a string as a paragraph element @@ -1460,6 +1461,24 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& Reference< drawing::XShape > xShape( xProp, uno::UNO_QUERY ); if( xShape.is()) addPosition( xShape ); + + // export size + chart2::LegendExpansion aLegendExpansion = chart2::LegendExpansion_HIGH; + try + { + Any aAny( xProp->getPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM( "Expansion" )))); + bool bHasExpansion = (aAny >>= aLegendExpansion); + //todo + //if (bHasExpansion) + // mrExport.AddAttribute( XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION, ); + } + catch( beans::UnknownPropertyException & ) + { + DBG_WARNING( "Property Expansion not found in ChartLegend" ); + } + + } // write style name @@ -3591,21 +3610,22 @@ void SchXMLExportHelper_Impl::addPosition( Reference< drawing::XShape > xShape ) addPosition( xShape->getPosition()); } -void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize ) +void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize, bool bIsOOoNamespace) { mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Width ); msString = msStringBuffer.makeStringAndClear(); - mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH, msString ); + mrExport.AddAttribute( bIsOOoNamespace ? XML_NAMESPACE_CHART_EXT : XML_NAMESPACE_SVG , XML_WIDTH, msString ); + - mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Height ); + mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Height); msString = msStringBuffer.makeStringAndClear(); - mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, msString ); + mrExport.AddAttribute( bIsOOoNamespace ? XML_NAMESPACE_CHART_EXT : XML_NAMESPACE_SVG, XML_HEIGHT, msString ); } -void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape ) +void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape, bool bIsOOoNamespace ) { if( xShape.is()) - addSize( xShape->getSize() ); + addSize( xShape->getSize(), bIsOOoNamespace ); } awt::Size SchXMLExportHelper_Impl::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 6cfacbd93905..6c077ff1e4d8 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3113,6 +3113,11 @@ namespace xmloff { namespace token { TOKEN( "outside-minimum", XML_OUTSIDE_MINIMUM ), TOKEN( "outside-maximum", XML_OUTSIDE_MAXIMUM ), + TOKEN( "legend-expansion", XML_LEGEND_EXPANSION), + TOKEN( "balanced", XML_BALANCED), + TOKEN( "high", XML_HIGH), + TOKEN( "wide", XML_WIDE), + TOKEN( "min-value", XML_MIN_VALUE ), TOKEN( "max-value", XML_MAX_VALUE ), -- cgit From a5bc657159f3449c31a0eb056646ddaa460f8219 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 16 Nov 2010 15:03:23 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 1 - patch from hackfest2010 --- offapi/com/sun/star/chart2/LegendExpansion.idl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/offapi/com/sun/star/chart2/LegendExpansion.idl b/offapi/com/sun/star/chart2/LegendExpansion.idl index 8a51a47bb3a1..6cf333824ac4 100644 --- a/offapi/com/sun/star/chart2/LegendExpansion.idl +++ b/offapi/com/sun/star/chart2/LegendExpansion.idl @@ -40,25 +40,21 @@ module chart2 */ enum LegendExpansion { - /** The legend is laid out such that it is wider that high. The - aspect ratio is greater than 1. + /** The legend entries are arranged in a single row if possible. If not enough space is available further rows are added.

This is usually used for legends that are displayed at the top or bottom of the page.

*/ WIDE, - /** The legend is laid out such that it is higher that wide. The - aspect ratio is less than 1. + /** The legend entries are stacked in a single column if possible. If not enough space is available further columns are added.

This is usually used for legends that are displayed on the left or right hand side of the page.

*/ HIGH, - /** The legend is laid out such that height and width are not - differing too much. It is not guaranteed to have an aspect - ratio of 1. + /** The legend entries are arranged in a way that the aspect ratio of the resulting legend is as near to 1 as possible. */ BALANCED, -- cgit From 1339ae3d816305b53eedab1036cf8619ad6ea092 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Thu, 25 Nov 2010 09:17:59 +0100 Subject: cws spc01: #163967# --- testautomation/global/system/includes/iniinfo.inc | 36 ++++++++++++++++------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/testautomation/global/system/includes/iniinfo.inc b/testautomation/global/system/includes/iniinfo.inc index 0b83af421eeb..3423584253fd 100755 --- a/testautomation/global/system/includes/iniinfo.inc +++ b/testautomation/global/system/includes/iniinfo.inc @@ -115,17 +115,33 @@ sub GetIniInformation end if '-------- - call GetTheInstallationType ' gNetzInst and gNetzOfficePath will be set if StarOffice is a Network-Installation - gOfficeBasisPath = getOfficeBasisPath() - gOOoStartupTimeOut = fgetOOoStartupTimeOut() - gOOoShutdownTimeOut = fgetOOoShutdownTimeOut() - call sCheckValgrindStatus() - ' set a global path for custom scripts, like basepath, but outside of current environment - gPrivateEnvironmentLocation = getIniValue(gTesttoolIni, "PrivateEnvironment", "Current") + call GetTheInstallationType ' gNetzInst and gNetzOfficePath will be set if StarOffice is a Network-Installation + gOfficeBasisPath = getOfficeBasisPath() + gOOoStartupTimeOut = fgetOOoStartupTimeOut() + gOOoShutdownTimeOut = fgetOOoShutdownTimeOut() + call sCheckValgrindStatus() + ' set a global path for custom scripts outside of current environment + gPrivateEnvironmentLocation = getIniValue(gTesttoolIni, "PrivateEnvironment", "Current") if (gPrivateEnvironmentLocation <> "" AND gPrivateEnvironmentLocation <> ".") then - if NOT fileExists(gPrivateEnvironmentLocation) then - qaErrorLog "[PrivateEnvironment] defined in: '"+gTesttoolIni+"', but the path '"+gPrivateEnvironmentLocation+"'does not exist!" - gPrivateEnvironmentLocation = "" + ' check if the gPrivateEnvironmentLocation path exists + if fileExists(gPrivateEnvironmentLocation) then + ' check if the path ends with a path sign and add the path sign if not + if (Right(gPrivateEnvironmentLocation,1) <> gPathSigne) then + gPrivateEnvironmentLocation = gPrivateEnvironmentLocation & gPathSigne + endif + else + ' check if the gTesttoolPath plus the gPrivateEnvironmentLocation path exists + ' f.e. this is for a relative path + if fileExists(gTesttoolPath & gPrivateEnvironmentLocation) then + gPrivateEnvironmentLocation = gTesttoolPath & gPrivateEnvironmentLocation + ' check if the path ends with a path sign and add the path sign if not + if (Right(gPrivateEnvironmentLocation,1) <> gPathSigne) then + gPrivateEnvironmentLocation = gPrivateEnvironmentLocation & gPathSigne + endif + else + qaErrorLog "[PrivateEnvironment] defined in: '" & gTesttoolIni & "', but the path '" & gPrivateEnvironmentLocation & "'does not exist!" + gPrivateEnvironmentLocation = "" + endif end if else gPrivateEnvironmentLocation = "" -- cgit From 0360a0ad1602f795bedea54dbae554c5769b7e61 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 26 Nov 2010 17:12:39 +0100 Subject: vcl118: #i111868# clean up MapModeVDev, reuse MapModeVDev --- vcl/inc/vcl/outdev.hxx | 4 ++++ vcl/source/gdi/outdev.cxx | 14 ++++++++++++++ vcl/source/gdi/print2.cxx | 35 ++++++++++++++++------------------- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index 12c4202af144..8edc8c3d6c47 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -1108,6 +1108,10 @@ public: void Push( USHORT nFlags = PUSH_ALL ); void Pop(); + // returns the curren stack depth; that is the number of Push() calls minus the number of Pop() calls + // this should not normally be used since Push and Pop must always be used symmetrically + // however this may be e.g. a help when debugging code in which this somehow is not the case + sal_uInt32 GetGCStackDepth() const; /** Query availability of alpha channel diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 847a8d7a299a..26a831c7600c 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -3159,6 +3159,20 @@ void OutputDevice::DrawPolyLine( // ----------------------------------------------------------------------- +sal_uInt32 OutputDevice::GetGCStackDepth() const +{ + const ImplObjStack* pData = mpObjStack; + sal_uInt32 nDepth = 0; + while( pData ) + { + nDepth++; + pData = pData->mpPrev; + } + return nDepth; +} + +// ----------------------------------------------------------------------- + void OutputDevice::Push( USHORT nFlags ) { DBG_TRACE( "OutputDevice::Push()" ); diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 25ba80003fd7..c95322538e43 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -854,13 +854,12 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, ++nActionNum; } - ConnectedComponentsList aCCList; // list containing distinct sets of connected components as elements. + // clean up aMapModeVDev + sal_uInt32 nCount = aMapModeVDev.GetGCStackDepth(); + while( nCount-- ) + aMapModeVDev.Pop(); - // create an OutputDevice to record mapmode changes and the like - VirtualDevice aMapModeVDev2; - aMapModeVDev2.mnDPIX = mnDPIX; - aMapModeVDev2.mnDPIY = mnDPIY; - aMapModeVDev2.EnableOutput(FALSE); + ConnectedComponentsList aCCList; // list containing distinct sets of connected components as elements. // fast-forward until one after the last background action // (need to reconstruct map mode vdev state) @@ -875,7 +874,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, pCurrAct, nActionNum) ); // execute action to get correct MapModes etc. - pCurrAct->Execute( &aMapModeVDev2 ); + pCurrAct->Execute( &aMapModeVDev ); pCurrAct=const_cast(rInMtf).NextAction(); ++nActionNum; } @@ -892,10 +891,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, pCurrAct=const_cast(rInMtf).NextAction(), ++nActionNum ) { // execute action to get correct MapModes etc. - pCurrAct->Execute( &aMapModeVDev2 ); + pCurrAct->Execute( &aMapModeVDev ); // cache bounds of current action - const Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, aMapModeVDev2) ); + const Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, aMapModeVDev) ); // accumulate collected bounds here, initialize with current action Rectangle aTotalBounds( aBBCurrAct ); // thus, @@ -924,7 +923,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, // not be considered for connected components, // too. Just put each of them into a separate // component. - aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, aMapModeVDev2); + aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, aMapModeVDev); if( !aBBCurrAct.IsEmpty() && !aTotalComponents.bIsFullyTransparent ) @@ -1310,18 +1309,16 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, } } + // clean up aMapModeVDev + nCount = aMapModeVDev.GetGCStackDepth(); + while( nCount-- ) + aMapModeVDev.Pop(); + // // STAGE 4: Copy actions to output metafile // ======================================== // - // create an OutputDevice to record color settings, mapmode - // changes and the like - VirtualDevice aMapModeVDev3; - aMapModeVDev3.mnDPIX = mnDPIX; - aMapModeVDev3.mnDPIY = mnDPIY; - aMapModeVDev3.EnableOutput(FALSE); - // iterate over all actions and duplicate the ones not in a // special aCCList member into rOutMtf for( pCurrAct=const_cast(rInMtf).FirstAction(), nActionNum=0; @@ -1349,7 +1346,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, // given background color ImplConvertTransparentAction(rOutMtf, *pCurrAct, - aMapModeVDev3, + aMapModeVDev, aBackgroundComponent.aBgColor); } else @@ -1358,7 +1355,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, rOutMtf.AddAction( ( pCurrAct->Duplicate(), pCurrAct ) ); } - pCurrAct->Execute(&aMapModeVDev3); + pCurrAct->Execute(&aMapModeVDev); } } -- cgit From 05bc6abcc21637283b639e1e801c6041b384c9bf Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 26 Nov 2010 17:24:17 +0100 Subject: vcl118: #i111868# fix an assertion --- vcl/source/gdi/bitmap.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 074935086b0b..2d879d83a247 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -236,9 +236,13 @@ bool BitmapPalette::IsGreyPalette() const const int nEntryCount = GetEntryCount(); if( !nEntryCount ) // NOTE: an empty palette means 1:1 mapping return true; - const BitmapPalette& rGreyPalette = Bitmap::GetGreyPalette( nEntryCount ); - if( rGreyPalette == *this ) - return true; + // see above: only certain entry values will result in a valid call to GetGreyPalette + if( nEntryCount == 2 || nEntryCount == 4 || nEntryCount == 16 || nEntryCount == 256 ) + { + const BitmapPalette& rGreyPalette = Bitmap::GetGreyPalette( nEntryCount ); + if( rGreyPalette == *this ) + return true; + } // TODO: is it worth to compare the entries? return false; } -- cgit From dce4eab176d0b595626935739c84a68738f8d66e Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 30 Nov 2010 13:42:27 +0100 Subject: #i96685# fix drawing of gradients in vcl-canvas --- canvas/source/vcl/canvashelper_texturefill.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index c1e71ceb943f..b1d1f331781b 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -211,6 +211,8 @@ namespace vclcanvas if( (rColors.size() % 2) != (nStepCount % 2) ) ++nStepCount; + rOutDev.SetLineColor(); + basegfx::tools::KeyStopLerp aLerper(rValues.maStops); // only iterate nStepCount-1 steps, as the last strip is @@ -366,6 +368,8 @@ namespace vclcanvas // color). ++nStepCount; + rOutDev.SetLineColor(); + basegfx::tools::KeyStopLerp aLerper(rValues.maStops); if( !bFillNonOverlapping ) -- cgit From 0e761aa2e71ac701e746ccac94e67ee25d2c6bd8 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 30 Nov 2010 13:44:07 +0100 Subject: #i96685# implement b2d-drawing of poly-gradients in vcl-canvas --- canvas/source/vcl/canvashelper_texturefill.cxx | 67 ++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 9 deletions(-) diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index b1d1f331781b..52ab4e2d8f0a 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -211,8 +211,6 @@ namespace vclcanvas if( (rColors.size() % 2) != (nStepCount % 2) ) ++nStepCount; - rOutDev.SetLineColor(); - basegfx::tools::KeyStopLerp aLerper(rValues.maStops); // only iterate nStepCount-1 steps, as the last strip is @@ -368,10 +366,60 @@ namespace vclcanvas // color). ++nStepCount; + basegfx::tools::KeyStopLerp aLerper(rValues.maStops); + rOutDev.SetLineColor(); - basegfx::tools::KeyStopLerp aLerper(rValues.maStops); +#if 0 // draw gradients using overlapping b2dpolygon painting, TODO: use gradient methods directly + if( !bFillNonOverlapping && rOutDev.supportsOperation( OutDevSupport_B2DDraw ) ) + { + ::basegfx::B2DPolygon aB2DTempPoly = aInnerPoly; + + // fill background + rOutDev.SetFillColor( rColors.front() ); + rOutDev.DrawRect( rBounds ); + + // render polygon + // ============== + for( unsigned int i=1,p; iPop(); } } - else -#if defined(QUARTZ) // TODO: other ports should avoid the XOR-trick too (implementation vs. interface!) +#if 1 // use complex clipping directly if available + else if( rOutDev.supportsOperation( OutDevSupport_B2DClip ) ) { const Region aPolyClipRegion( rPoly ); @@ -652,7 +699,9 @@ namespace vclcanvas p2ndOutDev->Pop(); } } -#else // TODO: remove once doing the XOR-trick in the canvas-layer becomes redundant +#endif // using complex clipping directly +#if 1 // fall back to complex clipping using the XOR-trick + else // TODO: remove when no longer needed { // output gradient the hard way: XORing out the polygon rOutDev.Push( PUSH_RASTEROP ); @@ -702,7 +751,7 @@ namespace vclcanvas p2ndOutDev->Pop(); } } -#endif // complex-clipping vs. XOR-trick +#endif // XOR-trick for complex clipping #if 0 //defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 { -- cgit From 608fc9264df96ec7f17bd39ca1c35639a23dee4d Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 30 Nov 2010 13:45:26 +0100 Subject: #i96685# removed not-yet active code to help comment+deadcode removing devs --- canvas/source/vcl/canvashelper_texturefill.cxx | 67 ++++---------------------- 1 file changed, 9 insertions(+), 58 deletions(-) diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index 52ab4e2d8f0a..b1d1f331781b 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -211,6 +211,8 @@ namespace vclcanvas if( (rColors.size() % 2) != (nStepCount % 2) ) ++nStepCount; + rOutDev.SetLineColor(); + basegfx::tools::KeyStopLerp aLerper(rValues.maStops); // only iterate nStepCount-1 steps, as the last strip is @@ -366,60 +368,10 @@ namespace vclcanvas // color). ++nStepCount; - basegfx::tools::KeyStopLerp aLerper(rValues.maStops); - rOutDev.SetLineColor(); -#if 0 // draw gradients using overlapping b2dpolygon painting, TODO: use gradient methods directly - if( !bFillNonOverlapping && rOutDev.supportsOperation( OutDevSupport_B2DDraw ) ) - { - ::basegfx::B2DPolygon aB2DTempPoly = aInnerPoly; - - // fill background - rOutDev.SetFillColor( rColors.front() ); - rOutDev.DrawRect( rBounds ); - - // render polygon - // ============== - for( unsigned int i=1,p; iPop(); } } -#if 1 // use complex clipping directly if available - else if( rOutDev.supportsOperation( OutDevSupport_B2DClip ) ) + else +#if defined(QUARTZ) // TODO: other ports should avoid the XOR-trick too (implementation vs. interface!) { const Region aPolyClipRegion( rPoly ); @@ -699,9 +652,7 @@ namespace vclcanvas p2ndOutDev->Pop(); } } -#endif // using complex clipping directly -#if 1 // fall back to complex clipping using the XOR-trick - else // TODO: remove when no longer needed +#else // TODO: remove once doing the XOR-trick in the canvas-layer becomes redundant { // output gradient the hard way: XORing out the polygon rOutDev.Push( PUSH_RASTEROP ); @@ -751,7 +702,7 @@ namespace vclcanvas p2ndOutDev->Pop(); } } -#endif // XOR-trick for complex clipping +#endif // complex-clipping vs. XOR-trick #if 0 //defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 { -- cgit From 598bd3e1bf5721d1aabd4a5051199c2bf379b037 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 1 Dec 2010 15:28:37 +0100 Subject: #i105655# fix LineInfo::operator== --- vcl/inc/vcl/lineinfo.hxx | 2 ++ vcl/source/gdi/lineinfo.cxx | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/vcl/inc/vcl/lineinfo.hxx b/vcl/inc/vcl/lineinfo.hxx index 9b12966a52ff..3dfdc999cb09 100644 --- a/vcl/inc/vcl/lineinfo.hxx +++ b/vcl/inc/vcl/lineinfo.hxx @@ -56,6 +56,8 @@ struct ImplLineInfo ImplLineInfo(); ImplLineInfo( const ImplLineInfo& rImplLineInfo ); + bool operator==( const ImplLineInfo& ) const; + friend SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo ); friend SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo ); }; diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index bb57a0b582e6..3c642388fc86 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -70,6 +70,20 @@ ImplLineInfo::ImplLineInfo( const ImplLineInfo& rImplLineInfo ) : { } +// ----------------------------------------------------------------------- + +inline bool ImplLineInfo::operator==( const ImplLineInfo& rB ) const +{ + return(meStyle == rB.meStyle + && mnWidth == rB.mnWidth + && mnDashCount == rB.mnDashCount + && mnDashLen == rB.mnDashLen + && mnDotCount == rB.mnDotCount + && mnDotLen == rB.mnDotLen + && mnDistance == rB.mnDistance + && meLineJoin == rB.meLineJoin); +} + // ------------ // - LineInfo - // ------------ @@ -125,13 +139,7 @@ BOOL LineInfo::operator==( const LineInfo& rLineInfo ) const DBG_CHKOBJ( &rLineInfo, LineInfo, NULL ); return( mpImplLineInfo == rLineInfo.mpImplLineInfo || - ( mpImplLineInfo->meStyle == rLineInfo.mpImplLineInfo->meStyle && - mpImplLineInfo->mnWidth == rLineInfo.mpImplLineInfo->mnWidth && - mpImplLineInfo->mnDashCount == rLineInfo.mpImplLineInfo->mnDashCount && - mpImplLineInfo->mnDashLen == rLineInfo.mpImplLineInfo->mnDashLen && - mpImplLineInfo->mnDotCount == rLineInfo.mpImplLineInfo->mnDotCount && - mpImplLineInfo->mnDotLen == rLineInfo.mpImplLineInfo->mnDotLen && - mpImplLineInfo->mnDistance == rLineInfo.mpImplLineInfo->mnDistance ) ); + *mpImplLineInfo == *rLineInfo.mpImplLineInfo ); } // ----------------------------------------------------------------------- -- cgit From 6b142d676ff9461e78a4cbe5afbea5d71c8d82f7 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 1 Dec 2010 16:53:56 +0100 Subject: #i51583# avoid text clipping in MsgBox --- vcl/source/window/msgbox.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index d00d569883d5..78a09e50c09f 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -422,6 +422,8 @@ void MessBox::ImplPosControls() } mpFixedText = new FixedText( this, nWinStyle ); + if( mpFixedText->GetStyle() & WB_EXTRAOFFSET ) // TODO: use CalcMinimumSize() instead + aFixedSize.Width() += 2; mpFixedText->SetPosSizePixel( aTextPos, aFixedSize ); mpFixedText->SetText( aMessText ); mpFixedText->Show(); -- cgit From 8130d39f6b56271aedad5dcfd0d2f065ef15acaf Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 2 Dec 2010 14:26:04 +0100 Subject: vcl118: #i115871# include proper header --- vcl/unx/inc/dtint.hxx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/vcl/unx/inc/dtint.hxx b/vcl/unx/inc/dtint.hxx index 75f197c81e13..6e6cf13575ed 100644 --- a/vcl/unx/inc/dtint.hxx +++ b/vcl/unx/inc/dtint.hxx @@ -31,19 +31,12 @@ #include #include #include +#include "svunx.h" class SalBitmap; class SalDisplay; class AllSettings; -#ifndef _XLIB_H_ -// forwards from X -struct Display; -struct XEvent; -#define Atom UINT32 -#define XLIB_Window UINT32 -#endif - enum DtType { DtGeneric, DtCDE -- cgit From c54074891ced6fae534d1d1c5c8725a2116ec72c Mon Sep 17 00:00:00 2001 From: caolanm Date: Mon, 6 Dec 2010 11:28:14 +0100 Subject: fix glyph fallback for cairocanvas (thanks cmc) * set font fallback info on glyph vector inside vcl * pick actual fallback font when rendering glyphs in cairocanvas --- canvas/source/cairo/cairo_textlayout.cxx | 311 +++++++++++++++++-------------- vcl/inc/vcl/sysdata.hxx | 5 +- vcl/source/gdi/outdev3.cxx | 8 +- 3 files changed, 182 insertions(+), 142 deletions(-) diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index d0873b63f5f0..7db0a3bc6e3e 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -105,6 +105,11 @@ namespace cairocanvas // as required at the API spec rOutDev.SetLayoutMode( nLayoutMode | TEXT_LAYOUT_TEXTORIGIN_LEFT ); } + + bool compareFallbacks(const SystemGlyphData&rA, const SystemGlyphData &rB) + { + return rA.fallbacklevel < rB.fallbacklevel; + } } TextLayout::TextLayout( const rendering::StringContext& aText, @@ -363,7 +368,6 @@ namespace cairocanvas return true; } - /** * TextLayout::draw * @@ -404,18 +408,41 @@ namespace cairocanvas ::canvas::tools::numeric_cast(maText.Length), maLogicalAdvancements.getLength() ? aOffsets.get() : NULL); + // Sort them so that all glyphs on the same glyph fallback level are consecutive + std::sort(aSysLayoutData.rGlyphData.begin(), aSysLayoutData.rGlyphData.end(), compareFallbacks); + bool bCairoRenderable = true; + + //Pull all the fonts we need to render the text + typedef std::pair FontLevel; + typedef std::vector FontLevelVector; + FontLevelVector aFontData; + SystemGlyphDataVector::const_iterator aIter=aSysLayoutData.rGlyphData.begin(); + const SystemGlyphDataVector::const_iterator aEnd=aSysLayoutData.rGlyphData.end(); + for( ; aIter != aEnd; ++aIter ) + { + if( aFontData.empty() || aIter->fallbacklevel != aFontData.back().second ) + { + aFontData.push_back(FontLevel(rOutDev.GetSysFontData(aIter->fallbacklevel), + aIter->fallbacklevel)); + if( !isCairoRenderable(aFontData.back().first) ) + { + bCairoRenderable = false; + OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): VCL FALLBACK %s%s%s%s - %s", + maLogicalAdvancements.getLength() ? "ADV " : "", + aFontData.back().first.bAntialias ? "AA " : "", + aFontData.back().first.bFakeBold ? "FB " : "", + aFontData.back().first.bFakeItalic ? "FI " : "", + ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ), + RTL_TEXTENCODING_UTF8 ).getStr()); + break; + } + } + } + // The ::GetSysTextLayoutData(), i.e. layouting of text to glyphs can change the font being used. // The fallback checks need to be done after final font is known. - if (!isCairoRenderable(aSysLayoutData.aSysFontData)) // VCL FALLBACKS + if (!bCairoRenderable) // VCL FALLBACKS { - OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): VCL FALLBACK %s%s%s%s - %s", - maLogicalAdvancements.getLength() ? "ADV " : "", - aSysLayoutData.aSysFontData.bAntialias ? "AA " : "", - aSysLayoutData.aSysFontData.bFakeBold ? "FB " : "", - aSysLayoutData.aSysFontData.bFakeItalic ? "FI " : "", - ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ), - RTL_TEXTENCODING_UTF8 ).getStr()); - if (maLogicalAdvancements.getLength()) // VCL FALLBACK - with glyph advances { rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets.get(), @@ -438,144 +465,158 @@ namespace cairocanvas * Setup platform independent glyph vector into cairo-based glyphs vector. **/ - // setup glyphs - std::vector cairo_glyphs; - cairo_glyphs.reserve( 256 ); - - for( int nStart = 0; nStart < (int) aSysLayoutData.rGlyphData.size(); nStart++ ) + // Loop through the fonts used and render the matching glyphs for each + FontLevelVector::const_iterator aFontDataIter = aFontData.begin(); + const FontLevelVector::const_iterator aFontDataEnd = aFontData.end(); + for( ; aFontDataIter != aFontDataEnd; ++aFontDataIter ) { - cairo_glyph_t aGlyph; - SystemGlyphData systemGlyph = aSysLayoutData.rGlyphData.at(nStart); - aGlyph.index = systemGlyph.index; -#ifdef CAIRO_HAS_WIN32_SURFACE - // Cairo requires standard glyph indexes (ETO_GLYPH_INDEX), while vcl/win/* uses ucs4 chars. - // Convert to standard indexes - aGlyph.index = cairo::ucs4toindex((unsigned int) aGlyph.index, aSysLayoutData.aSysFontData.hFont); -#endif - aGlyph.x = systemGlyph.x; - aGlyph.y = systemGlyph.y; - cairo_glyphs.push_back(aGlyph); - } - - if (cairo_glyphs.empty()) return true; //true or false?? - - /** - * Setup font - **/ - cairo_font_face_t* font_face = NULL; - -#ifdef CAIRO_HAS_QUARTZ_SURFACE - // TODO: use cairo_quartz_font_face_create_for_cgfont(cgFont) - // when CGFont (Mac OS X 10.5 API) is provided by the AQUA VCL backend. - font_face = cairo_quartz_font_face_create_for_atsu_font_id((ATSUFontID) aSysLayoutData.aSysFontData.aATSUFontID); + const SystemFontData &rSysFontData = aFontDataIter->first; -#elif defined CAIRO_HAS_WIN32_SURFACE - #if (OSL_DEBUG_LEVEL > 1) - GetObjectW( aSysLayoutData.aSysFontData.hFont, sizeof(logfont), &logfont ); - #endif - // Note: cairo library uses logfont fallbacks when lfEscapement, lfOrientation and lfWidth are not zero. - // VCL always has non-zero value for lfWidth - font_face = cairo_win32_font_face_create_for_hfont(aSysLayoutData.aSysFontData.hFont); - -#elif defined CAIRO_HAS_XLIB_SURFACE - font_face = cairo_ft_font_face_create_for_ft_face((FT_Face)aSysLayoutData.aSysFontData.nFontId, - aSysLayoutData.aSysFontData.nFontFlags); -#else -# error Native API needed. -#endif - - CairoSharedPtr pSCairo = pSurface->getCairo(); - - cairo_set_font_face( pSCairo.get(), font_face); - - // create default font options. cairo_get_font_options() does not retrieve the surface defaults, - // only what has been set before with cairo_set_font_options() - cairo_font_options_t* options = cairo_font_options_create(); - if (aSysLayoutData.aSysFontData.bAntialias) { - // CAIRO_ANTIALIAS_GRAY provides more similar result to VCL Canvas, - // so we're not using CAIRO_ANTIALIAS_SUBPIXEL - cairo_font_options_set_antialias(options, CAIRO_ANTIALIAS_GRAY); - } - cairo_set_font_options( pSCairo.get(), options); - - // Font color - Color mTextColor = rOutDev.GetTextColor(); - cairo_set_source_rgb(pSCairo.get(), - mTextColor.GetRed()/255.0, - mTextColor.GetGreen()/255.0, - mTextColor.GetBlue()/255.0); - - // Font rotation and scaling - cairo_matrix_t m; - Font aFont = rOutDev.GetFont(); - FontMetric aMetric( rOutDev.GetFontMetric(aFont) ); - long nWidth = 0; - - // width calculation is deep magic and platform/font dependant. - // width == 0 means no scaling, and usually width == height means the same. - // Other values mean horizontal scaling (narrow or stretching) - // see issue #101566 - - //proper scale calculation across platforms - if (aFont.GetWidth() == 0) { - nWidth = aFont.GetHeight(); - } else { - // any scaling needs to be relative to the platform-dependent definition - // of height of the font - nWidth = aFont.GetWidth() * aFont.GetHeight() / aMetric.GetHeight(); - } - - cairo_matrix_init_identity(&m); + // setup glyphs + std::vector cairo_glyphs; + cairo_glyphs.reserve( 256 ); - if (aSysLayoutData.orientation) cairo_matrix_rotate(&m, (3600 - aSysLayoutData.orientation) * M_PI / 1800.0); + SystemGlyphDataVector::const_iterator aIter=aSysLayoutData.rGlyphData.begin(); + const SystemGlyphDataVector::const_iterator aEnd=aSysLayoutData.rGlyphData.end(); + for( ; aIter != aEnd; ++aIter ) + { + SystemGlyphData systemGlyph = *aIter; + if( systemGlyph.fallbacklevel != aFontDataIter->second ) + continue; + + cairo_glyph_t aGlyph; + aGlyph.index = systemGlyph.index; + #ifdef CAIRO_HAS_WIN32_SURFACE + // Cairo requires standard glyph indexes (ETO_GLYPH_INDEX), while vcl/win/* uses ucs4 chars. + // Convert to standard indexes + aGlyph.index = cairo::ucs4toindex((unsigned int) aGlyph.index, rSysFontData.hFont); + #endif + aGlyph.x = systemGlyph.x; + aGlyph.y = systemGlyph.y; + cairo_glyphs.push_back(aGlyph); + } - cairo_matrix_scale(&m, nWidth, aFont.GetHeight()); + if (cairo_glyphs.empty()) + continue; + + /** + * Setup font + **/ + cairo_font_face_t* font_face = NULL; + + #ifdef CAIRO_HAS_QUARTZ_SURFACE + // TODO: use cairo_quartz_font_face_create_for_cgfont(cgFont) + // when CGFont (Mac OS X 10.5 API) is provided by the AQUA VCL backend. + font_face = cairo_quartz_font_face_create_for_atsu_font_id((ATSUFontID) rSysFontData.aATSUFontID); + + #elif defined CAIRO_HAS_WIN32_SURFACE + #if (OSL_DEBUG_LEVEL > 1) + GetObjectW( rSysFontData.hFont, sizeof(logfont), &logfont ); + #endif + // Note: cairo library uses logfont fallbacks when lfEscapement, lfOrientation and lfWidth are not zero. + // VCL always has non-zero value for lfWidth + font_face = cairo_win32_font_face_create_for_hfont(rSysFontData.hFont); + + #elif defined CAIRO_HAS_XLIB_SURFACE + font_face = cairo_ft_font_face_create_for_ft_face((FT_Face)rSysFontData.nFontId, + rSysFontData.nFontFlags); + #else + # error Native API needed. + #endif + + CairoSharedPtr pSCairo = pSurface->getCairo(); + + cairo_set_font_face( pSCairo.get(), font_face); + + // create default font options. cairo_get_font_options() does not retrieve the surface defaults, + // only what has been set before with cairo_set_font_options() + cairo_font_options_t* options = cairo_font_options_create(); + if (rSysFontData.bAntialias) { + // CAIRO_ANTIALIAS_GRAY provides more similar result to VCL Canvas, + // so we're not using CAIRO_ANTIALIAS_SUBPIXEL + cairo_font_options_set_antialias(options, CAIRO_ANTIALIAS_GRAY); + } + cairo_set_font_options( pSCairo.get(), options); + + // Font color + Color mTextColor = rOutDev.GetTextColor(); + cairo_set_source_rgb(pSCairo.get(), + mTextColor.GetRed()/255.0, + mTextColor.GetGreen()/255.0, + mTextColor.GetBlue()/255.0); + + // Font rotation and scaling + cairo_matrix_t m; + Font aFont = rOutDev.GetFont(); + FontMetric aMetric( rOutDev.GetFontMetric(aFont) ); + long nWidth = 0; + + // width calculation is deep magic and platform/font dependant. + // width == 0 means no scaling, and usually width == height means the same. + // Other values mean horizontal scaling (narrow or stretching) + // see issue #101566 + + //proper scale calculation across platforms + if (aFont.GetWidth() == 0) { + nWidth = aFont.GetHeight(); + } else { + // any scaling needs to be relative to the platform-dependent definition + // of height of the font + nWidth = aFont.GetWidth() * aFont.GetHeight() / aMetric.GetHeight(); + } - //faux italics - if (aSysLayoutData.aSysFontData.bFakeItalic) m.xy = -m.xx * 0x6000L / 0x10000L; + cairo_matrix_init_identity(&m); - cairo_set_font_matrix(pSCairo.get(), &m); + if (aSysLayoutData.orientation) cairo_matrix_rotate(&m, (3600 - aSysLayoutData.orientation) * M_PI / 1800.0); - OSL_TRACE("\r\n:cairocanvas::TextLayout::draw(S,O,p,v,r): Size:(%d,%d), W:%d->%d, Pos (%d,%d), G(%d,%d,%d) %s%s%s%s || Name:%s - %s", - aFont.GetWidth(), - aFont.GetHeight(), - aMetric.GetWidth(), - nWidth, - (int) rOutpos.X(), - (int) rOutpos.Y(), - cairo_glyphs[0].index, cairo_glyphs[1].index, cairo_glyphs[2].index, - maLogicalAdvancements.getLength() ? "ADV " : "", - aSysLayoutData.aSysFontData.bAntialias ? "AA " : "", - aSysLayoutData.aSysFontData.bFakeBold ? "FB " : "", - aSysLayoutData.aSysFontData.bFakeItalic ? "FI " : "", -#if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1) - ::rtl::OUStringToOString( reinterpret_cast (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr(), -#else - ::rtl::OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), -#endif - ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ), - RTL_TEXTENCODING_UTF8 ).getStr() - ); + cairo_matrix_scale(&m, nWidth, aFont.GetHeight()); - cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size()); + //faux italics + if (rSysFontData.bFakeItalic) m.xy = -m.xx * 0x6000L / 0x10000L; - //faux bold - if (aSysLayoutData.aSysFontData.bFakeBold) { - double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() ); - int total_steps = 2 * ((int) (bold_dx + 0.5)); + cairo_set_font_matrix(pSCairo.get(), &m); - // loop to draw the text for every half pixel of displacement - for (int nSteps = 0; nSteps < total_steps; nSteps++) { - for(int nGlyphIdx = 0; nGlyphIdx < (int) cairo_glyphs.size(); nGlyphIdx++) { - cairo_glyphs[nGlyphIdx].x += bold_dx * nSteps / total_steps; + OSL_TRACE("\r\n:cairocanvas::TextLayout::draw(S,O,p,v,r): Size:(%d,%d), W:%d->%d, Pos (%d,%d), G(%d,%d,%d) %s%s%s%s || Name:%s - %s", + aFont.GetWidth(), + aFont.GetHeight(), + aMetric.GetWidth(), + nWidth, + (int) rOutpos.X(), + (int) rOutpos.Y(), + cairo_glyphs[0].index, cairo_glyphs[1].index, cairo_glyphs[2].index, + maLogicalAdvancements.getLength() ? "ADV " : "", + rSysFontData.bAntialias ? "AA " : "", + rSysFontData.bFakeBold ? "FB " : "", + rSysFontData.bFakeItalic ? "FI " : "", + #if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1) + ::rtl::OUStringToOString( reinterpret_cast (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr(), + #else + ::rtl::OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), + #endif + ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ), + RTL_TEXTENCODING_UTF8 ).getStr() + ); + + cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size()); + + //faux bold + if (rSysFontData.bFakeBold) { + double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() ); + int total_steps = 2 * ((int) (bold_dx + 0.5)); + + // loop to draw the text for every half pixel of displacement + for (int nSteps = 0; nSteps < total_steps; nSteps++) { + for(int nGlyphIdx = 0; nGlyphIdx < (int) cairo_glyphs.size(); nGlyphIdx++) { + cairo_glyphs[nGlyphIdx].x += bold_dx * nSteps / total_steps; + } + cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size()); } - cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size()); + OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): FAKEBOLD - dx:%d", (int) bold_dx); } - OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): FAKEBOLD - dx:%d", (int) bold_dx); - } - cairo_restore( pSCairo.get() ); - cairo_font_face_destroy(font_face); + cairo_restore( pSCairo.get() ); + cairo_font_face_destroy(font_face); + } return true; } diff --git a/vcl/inc/vcl/sysdata.hxx b/vcl/inc/vcl/sysdata.hxx index 1146f1b3b842..b9feeaf3a2aa 100644 --- a/vcl/inc/vcl/sysdata.hxx +++ b/vcl/inc/vcl/sysdata.hxx @@ -150,6 +150,7 @@ struct SystemGlyphData unsigned long index; double x; double y; + int fallbacklevel; }; @@ -178,12 +179,14 @@ struct SystemFontData // - SystemTextLayoutData - // -------------------- +typedef std::vector SystemGlyphDataVector; + struct SystemTextLayoutData { unsigned long nSize; // size in bytes of this structure std::vector rGlyphData; // glyph data int orientation; // Text orientation - SystemFontData aSysFontData; // Font data for the text layout }; #endif // _SV_SYSDATA_HXX + diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index f4ea98484c33..ad99b7be2070 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -7414,7 +7414,6 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c // setup glyphs Point aPos; sal_GlyphId aGlyphId; - int nFallbacklevel = 0; for( int nStart = 0; rLayout->GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); ) { // NOTE: Windows backend is producing unicode chars (ucs4), so on windows, @@ -7424,15 +7423,12 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c aGlyph.index = static_cast (aGlyphId & GF_IDXMASK); aGlyph.x = aPos.X(); aGlyph.y = aPos.Y(); - aSysLayoutData.rGlyphData.push_back(aGlyph); - int nLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT; - if (nLevel > nFallbacklevel && nLevel < MAX_FALLBACK) - nFallbacklevel = nLevel; + aGlyph.fallbacklevel = nLevel < MAX_FALLBACK ? nLevel : 0; + aSysLayoutData.rGlyphData.push_back(aGlyph); } // Get font data - aSysLayoutData.aSysFontData = GetSysFontData(nFallbacklevel); aSysLayoutData.orientation = rLayout->GetOrientation(); rLayout->Release(); -- cgit From 307b80588f4ff2b8aa4493b11c75f7123bd26961 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 30 Nov 2010 15:55:22 +0100 Subject: vcl118: #i115838# enable OutDevSupport_B2DClip on Windows --- vcl/win/source/gdi/salgdi.cxx | 37 ++++++++++++++++++++++++++++++----- vcl/win/source/gdi/salgdi2.cxx | 3 +++ vcl/win/source/gdi/salgdi_gdiplus.cxx | 0 3 files changed, 35 insertions(+), 5 deletions(-) mode change 100644 => 100755 vcl/win/source/gdi/salgdi.cxx mode change 100644 => 100755 vcl/win/source/gdi/salgdi2.cxx mode change 100644 => 100755 vcl/win/source/gdi/salgdi_gdiplus.cxx diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx old mode 100644 new mode 100755 index eb260eb808c6..a42636295592 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -37,6 +37,8 @@ #include #include #include +#include +#include #ifndef _RTL_STRINGBUF_HXX #include #endif @@ -927,10 +929,34 @@ BOOL WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeigh // ----------------------------------------------------------------------- -bool WinSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) +bool WinSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& rPolyPolygon ) { - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; + const sal_uInt32 nCount(rPolyPolygon.count()); + + if( nCount ) + { + std::vector< POINT > aPolyPoints; + aPolyPoints.reserve( 1024 ); + std::vector< INT > aPolyCounts( nCount, 0 ); + for(sal_uInt32 a(0); a < nCount; a++) + { + basegfx::B2DPolygon aPoly( rPolyPolygon.getB2DPolygon(a) ); + aPoly = basegfx::tools::adaptiveSubdivideByDistance( aPoly, 1 ); + const sal_uInt32 nPoints = aPoly.count(); + aPolyCounts[a] = nPoints; + for( sal_uInt32 b = 0; b < nPoints; b++ ) + { + basegfx::B2DPoint aPt( aPoly.getB2DPoint( b ) ); + POINT aPOINT; + aPOINT.x = (LONG)aPt.getX(); + aPOINT.y = (LONG)aPt.getY(); + aPolyPoints.push_back( aPOINT ); + } + } + mhRegion = CreatePolyPolygonRgn( &aPolyPoints[0], &aPolyCounts[0], nCount, ALTERNATE ); + } + + return true; } // ----------------------------------------------------------------------- @@ -944,7 +970,7 @@ void WinSalGraphics::EndSetClipRegion() mhRegion = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom ); } - else + else if( mpClipRgnData->rdh.nCount > 1 ) { ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); mhRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData ); @@ -973,7 +999,8 @@ void WinSalGraphics::EndSetClipRegion() delete [] mpClipRgnData; } - SelectClipRgn( mhDC, mhRegion ); + if( mhRegion ) + SelectClipRgn( mhDC, mhRegion ); } // ----------------------------------------------------------------------- diff --git a/vcl/win/source/gdi/salgdi2.cxx b/vcl/win/source/gdi/salgdi2.cxx old mode 100644 new mode 100755 index 803c0886f429..68d70c4ce74c --- a/vcl/win/source/gdi/salgdi2.cxx +++ b/vcl/win/source/gdi/salgdi2.cxx @@ -51,6 +51,9 @@ bool WinSalGraphics::supportsOperation( OutDevSupportType eType ) const case OutDevSupport_TransparentRect: bRet = mbVirDev || mbWindow; break; + case OutDevSupport_B2DClip: + bRet = true; + break; case OutDevSupport_B2DDraw: bRet = bAllowForTest; default: break; diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx old mode 100644 new mode 100755 -- cgit From baddf3f156c3c557c3615aec46b1f95df292a0fd Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 1 Dec 2010 14:42:59 +0100 Subject: vcl118: #i115838# improve region with respect to polygonal regions --- vcl/inc/vcl/region.hxx | 4 ++ vcl/source/gdi/region.cxx | 175 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) mode change 100644 => 100755 vcl/inc/vcl/region.hxx mode change 100644 => 100755 vcl/source/gdi/region.cxx diff --git a/vcl/inc/vcl/region.hxx b/vcl/inc/vcl/region.hxx old mode 100644 new mode 100755 index ddfba57ffdcf..87946574707c --- a/vcl/inc/vcl/region.hxx +++ b/vcl/inc/vcl/region.hxx @@ -76,6 +76,10 @@ private: SAL_DLLPRIVATE void ImplBeginAddRect( ); SAL_DLLPRIVATE BOOL ImplAddRect( const Rectangle& rRect ); SAL_DLLPRIVATE void ImplEndAddRect( ); + SAL_DLLPRIVATE void ImplIntersectWithPolyPolygon( const Region& ); + SAL_DLLPRIVATE void ImplExcludePolyPolygon( const Region& ); + SAL_DLLPRIVATE void ImplUnionPolyPolygon( const Region& ); + SAL_DLLPRIVATE void ImplXOrPolyPolygon( const Region& ); #ifdef DBG_UTIL friend const char* ImplDbgTestRegion( const void* pObj ); diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx old mode 100644 new mode 100755 index 4931ee66e93f..067f5c214323 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -46,6 +46,8 @@ #include #include #include +#include +#include #include #include @@ -1376,6 +1378,28 @@ BOOL Region::Union( const Rectangle& rRect ) if ( rRect.IsEmpty() ) return TRUE; + if( HasPolyPolygon() ) + { + // get this B2DPolyPolygon + basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() ); + aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + + if( aThisPolyPoly.count() == 0 ) + { + *this = rRect; + return true; + } + + // get the other B2DPolyPolygon + basegfx::B2DPolygon aRectPoly( basegfx::tools::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) ); + basegfx::B2DPolyPolygon aOtherPolyPoly( aRectPoly ); + + basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationOr( aThisPolyPoly, aOtherPolyPoly ); + *this = Region( aClip ); + + return TRUE; + } + ImplPolyPolyRegionToBandRegion(); // no instance data? -> create! @@ -1446,6 +1470,22 @@ BOOL Region::Intersect( const Rectangle& rRect ) return TRUE; } + else if( mpImplRegion->mpB2DPolyPoly ) + { + // #127431# make ImplRegion unique, if not already. + if( mpImplRegion->mnRefCount > 1 ) + { + mpImplRegion->mnRefCount--; + mpImplRegion = new ImplRegion( *mpImplRegion->mpB2DPolyPoly ); + } + + *mpImplRegion->mpB2DPolyPoly = + basegfx::tools::clipPolyPolygonOnRange( *mpImplRegion->mpB2DPolyPoly, + basegfx::B2DRange( rRect.Left(), rRect.Top(), + rRect.Right(), rRect.Bottom() ), + true, false ); + return TRUE; + } else ImplPolyPolyRegionToBandRegion(); @@ -1529,6 +1569,25 @@ BOOL Region::Exclude( const Rectangle& rRect ) if ( rRect.IsEmpty() ) return TRUE; + if( HasPolyPolygon() ) + { + // get this B2DPolyPolygon + basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() ); + aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + + if( aThisPolyPoly.count() == 0 ) + return TRUE; + + // get the other B2DPolyPolygon + basegfx::B2DPolygon aRectPoly( basegfx::tools::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) ); + basegfx::B2DPolyPolygon aOtherPolyPoly( aRectPoly ); + + basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly ); + *this = Region( aClip ); + + return TRUE; + } + ImplPolyPolyRegionToBandRegion(); // no instance data? -> create! @@ -1571,6 +1630,28 @@ BOOL Region::XOr( const Rectangle& rRect ) if ( rRect.IsEmpty() ) return TRUE; + if( HasPolyPolygon() ) + { + // get this B2DPolyPolygon + basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() ); + aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + + if( aThisPolyPoly.count() == 0 ) + { + *this = rRect; + return TRUE; + } + + // get the other B2DPolyPolygon + basegfx::B2DPolygon aRectPoly( basegfx::tools::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) ); + basegfx::B2DPolyPolygon aOtherPolyPoly( aRectPoly ); + + basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor( aThisPolyPoly, aOtherPolyPoly ); + *this = Region( aClip ); + + return TRUE; + } + ImplPolyPolyRegionToBandRegion(); // no instance data? -> create! @@ -1604,11 +1685,38 @@ BOOL Region::XOr( const Rectangle& rRect ) } // ----------------------------------------------------------------------- +void Region::ImplUnionPolyPolygon( const Region& i_rRegion ) +{ + // get this B2DPolyPolygon + basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() ); + aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + + if( aThisPolyPoly.count() == 0 ) + { + *this = i_rRegion; + return; + } + + // get the other B2DPolyPolygon + basegfx::B2DPolyPolygon aOtherPolyPoly( const_cast(i_rRegion).ConvertToB2DPolyPolygon() ); + aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly ); + + + basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationOr( aThisPolyPoly, aOtherPolyPoly ); + + *this = Region( aClip ); +} BOOL Region::Union( const Region& rRegion ) { DBG_CHKTHIS( Region, ImplDbgTestRegion ); + if( rRegion.HasPolyPolygon() || HasPolyPolygon() ) + { + ImplUnionPolyPolygon( rRegion ); + return TRUE; + } + ImplPolyPolyRegionToBandRegion(); ((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion(); @@ -1654,6 +1762,22 @@ BOOL Region::Union( const Region& rRegion ) } // ----------------------------------------------------------------------- +void Region::ImplIntersectWithPolyPolygon( const Region& i_rRegion ) +{ + // get this B2DPolyPolygon + basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() ); + if( aThisPolyPoly.count() == 0 ) + { + *this = i_rRegion; + return; + } + + // get the other B2DPolyPolygon + basegfx::B2DPolyPolygon aOtherPolyPoly( const_cast(i_rRegion).ConvertToB2DPolyPolygon() ); + + basegfx::B2DPolyPolygon aClip = basegfx::tools::clipPolyPolygonOnPolyPolygon( aOtherPolyPoly, aThisPolyPoly, true, false ); + *this = Region( aClip ); +} BOOL Region::Intersect( const Region& rRegion ) { @@ -1663,6 +1787,12 @@ BOOL Region::Intersect( const Region& rRegion ) if ( mpImplRegion == rRegion.mpImplRegion ) return TRUE; + if( rRegion.HasPolyPolygon() || HasPolyPolygon() ) + { + ImplIntersectWithPolyPolygon( rRegion ); + return TRUE; + } + ImplPolyPolyRegionToBandRegion(); ((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion(); @@ -1793,11 +1923,32 @@ BOOL Region::Intersect( const Region& rRegion ) } // ----------------------------------------------------------------------- +void Region::ImplExcludePolyPolygon( const Region& i_rRegion ) +{ + // get this B2DPolyPolygon + basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() ); + if( aThisPolyPoly.count() == 0 ) + return; + aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + + // get the other B2DPolyPolygon + basegfx::B2DPolyPolygon aOtherPolyPoly( const_cast(i_rRegion).ConvertToB2DPolyPolygon() ); + aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly ); + + basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly ); + *this = Region( aClip ); +} BOOL Region::Exclude( const Region& rRegion ) { DBG_CHKTHIS( Region, ImplDbgTestRegion ); + if( rRegion.HasPolyPolygon() || HasPolyPolygon() ) + { + ImplExcludePolyPolygon( rRegion ); + return TRUE; + } + ImplPolyPolyRegionToBandRegion(); ((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion(); @@ -1846,11 +1997,35 @@ BOOL Region::Exclude( const Region& rRegion ) } // ----------------------------------------------------------------------- +void Region::ImplXOrPolyPolygon( const Region& i_rRegion ) +{ + // get this B2DPolyPolygon + basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() ); + if( aThisPolyPoly.count() == 0 ) + { + *this = i_rRegion; + return; + } + aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); + + // get the other B2DPolyPolygon + basegfx::B2DPolyPolygon aOtherPolyPoly( const_cast(i_rRegion).ConvertToB2DPolyPolygon() ); + aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly ); + + basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor( aThisPolyPoly, aOtherPolyPoly ); + *this = Region( aClip ); +} BOOL Region::XOr( const Region& rRegion ) { DBG_CHKTHIS( Region, ImplDbgTestRegion ); + if( rRegion.HasPolyPolygon() || HasPolyPolygon() ) + { + ImplXOrPolyPolygon( rRegion ); + return TRUE; + } + ImplPolyPolyRegionToBandRegion(); ((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion(); -- cgit From a6d9aa09b8041c0a11ea21de04d3d2753a0d31a4 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Thu, 2 Dec 2010 11:12:30 +0100 Subject: #164272# preparing creation of 64 bit installation sets --- solenv/bin/make_installer.pl | 3 +- solenv/bin/modules/installer/windows/component.pm | 16 +++- solenv/bin/modules/installer/windows/msiglobal.pm | 109 +++++++++++++++++++++- 3 files changed, 119 insertions(+), 9 deletions(-) diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl index 335ecf961253..77b6feeef292 100644 --- a/solenv/bin/make_installer.pl +++ b/solenv/bin/make_installer.pl @@ -1994,7 +1994,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) installer::windows::registry::create_registry_table($registryitemsinproductlanguageresolvedarrayref, \@allregistrycomponents, $newidtdir, $languagesarrayref, $allvariableshashref); if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems4.log", $registryitemsinproductlanguageresolvedarrayref); } - installer::windows::component::create_component_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, \@allregistrycomponents, $newidtdir, $componentid, $componentidkeypath); + installer::windows::component::create_component_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, \@allregistrycomponents, $newidtdir, $componentid, $componentidkeypath, $allvariableshashref); if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles19.log", $filesinproductlanguageresolvedarrayref); } if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems5.log", $registryitemsinproductlanguageresolvedarrayref); } @@ -2205,6 +2205,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) installer::logger::print_message( "... creating msi database (language $onelanguage) ... \n" ); installer::windows::msiglobal::set_uuid_into_component_table($languageidtdir, $allvariableshashref); # setting new GUID for the components using the tool uuidgen.exe + installer::windows::msiglobal::prepare_64bit_database($languageidtdir, $allvariableshashref); # making last 64 bit changes installer::windows::msiglobal::create_msi_database($languageidtdir ,$msifilename); # validating the database # ToDo diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm index 38989858a4b6..4ab5aac68954 100644 --- a/solenv/bin/modules/installer/windows/component.pm +++ b/solenv/bin/modules/installer/windows/component.pm @@ -193,7 +193,7 @@ sub get_registry_component_directory sub get_file_component_attributes { - my ($componentname, $filesref) = @_; + my ($componentname, $filesref, $allvariables) = @_; my $attributes; @@ -240,6 +240,9 @@ sub get_file_component_attributes $attributes = 4; # Files in shellnew dir and in non advertised startmenu entries must have user registry key as KeyPath } + # Adding 256, if this is a 64 bit installation set. + if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $attributes = $attributes + 256; } + return $attributes } @@ -251,12 +254,15 @@ sub get_file_component_attributes sub get_registry_component_attributes { - my ($componentname) = @_; + my ($componentname, $allvariables) = @_; my $attributes; $attributes = 4; + # Adding 256, if this is a 64 bit installation set. + if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $attributes = $attributes + 256; } + if ( exists($installer::globals::dontdeletecomponents{$componentname}) ) { $attributes = $attributes + 16; } return $attributes @@ -381,7 +387,7 @@ sub get_component_keypath sub create_component_table { - my ($filesref, $registryref, $dirref, $allfilecomponentsref, $allregistrycomponents, $basedir, $componentidhashref, $componentidkeypathhashref) = @_; + my ($filesref, $registryref, $dirref, $allfilecomponentsref, $allregistrycomponents, $basedir, $componentidhashref, $componentidkeypathhashref, $allvariables) = @_; my @componenttable = (); @@ -402,7 +408,7 @@ sub create_component_table $onecomponent{'guid'} = get_component_guid($onecomponent{'name'}, $componentidhashref); $onecomponent{'directory'} = get_file_component_directory($onecomponent{'name'}, $filesref, $dirref); if ( $onecomponent{'directory'} eq "IGNORE_COMP" ) { next; } - $onecomponent{'attributes'} = get_file_component_attributes($onecomponent{'name'}, $filesref); + $onecomponent{'attributes'} = get_file_component_attributes($onecomponent{'name'}, $filesref, $allvariables); $onecomponent{'condition'} = get_file_component_condition($onecomponent{'name'}, $filesref); $onecomponent{'keypath'} = get_component_keypath($onecomponent{'name'}, $filesref, $componentidkeypathhashref); @@ -421,7 +427,7 @@ sub create_component_table $onecomponent{'name'} = ${$allregistrycomponents}[$i]; $onecomponent{'guid'} = get_component_guid($onecomponent{'name'}, $componentidhashref); $onecomponent{'directory'} = get_registry_component_directory(); - $onecomponent{'attributes'} = get_registry_component_attributes($onecomponent{'name'}); + $onecomponent{'attributes'} = get_registry_component_attributes($onecomponent{'name'}, $allvariables); $onecomponent{'condition'} = get_component_condition($onecomponent{'name'}); $onecomponent{'keypath'} = get_component_keypath($onecomponent{'name'}, $registryref, $componentidkeypathhashref); diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm index 9f2d21f8b7f8..2837e0194439 100644 --- a/solenv/bin/modules/installer/windows/msiglobal.pm +++ b/solenv/bin/modules/installer/windows/msiglobal.pm @@ -785,11 +785,16 @@ sub get_codepage_for_sis sub get_template_for_sis { - my ( $language ) = @_; + my ( $language, $allvariables ) = @_; my $windowslanguage = installer::windows::language::get_windows_language($language); - my $value = "\"Intel;" . $windowslanguage; # adding the Windows language + my $architecture = "Intel"; + + # Adding 256, if this is a 64 bit installation set. + if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $architecture = "x64"; } + + my $value = "\"" . $architecture . ";" . $windowslanguage; # adding the Windows language $value = $value . "\""; # adding ending '"' @@ -927,7 +932,7 @@ sub write_summary_into_msi_database my $msiversion = get_msiversion_for_sis(); my $codepage = get_codepage_for_sis($language); - my $template = get_template_for_sis($language); + my $template = get_template_for_sis($language, $allvariableshashref); my $guid = get_packagecode_for_sis(); my $title = get_title_for_sis($sislanguage,$languagefile, "OOO_SIS_TITLE"); my $author = get_author_for_sis(); @@ -1669,6 +1674,104 @@ sub set_uuid_into_component_table } +######################################################################### +# Adding final 64 properties into msi database, if required. +# RegLocator : +16 in type column to search in 64 bit registry. +# All conditions: "VersionNT" -> "VersionNT64" (several tables). +# Already done: "+256" in Attributes column of table "Component". +# Still following: Setting "x64" instead of "Intel" in Summary +# Information Stream of msi database in "get_template_for_sis". +######################################################################### + +sub prepare_64bit_database +{ + my ($basedir, $allvariables) = @_; + + my $infoline = ""; + + if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) + { + # 1. Beginning with table "RegLocat.idt". Adding "16" to the type. + + my $reglocatfile = ""; + my $reglocatfilename = $basedir . $installer::globals::separator . "RegLocat.idt"; + + if ( -f $reglocatfilename ) + { + my $saving_required = 0; + $reglocatfile = installer::files::read_file($reglocatfilename); + + for ( my $i = 3; $i <= $#{$reglocatfile}; $i++ ) # ignoring the first three lines + { + my $oneline = ${$reglocatfile}[$i]; + + if ( $oneline =~ /^\s*\#/ ) { next; } # this is a comment line + if ( $oneline =~ /^\s*$/ ) { next; } + + if ( $oneline =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(\d+)\s*$/ ) + { + # Syntax: Signature_ Root Key Name Type + my $sig = $1; + my $root = $2; + my $key = $3; + my $name = $4; + my $type = $5; + + $type = $type + 16; + + my $newline = $sig . "\t" . $root . "\t" . $key . "\t" . $name . "\t" . $type . "\n"; + ${$reglocatfile}[$i] = $newline; + + $saving_required = 1; + } + } + + if ( $saving_required ) + { + # Saving the files + installer::files::save_file($reglocatfilename ,$reglocatfile); + $infoline = "Making idt file 64 bit conform: $reglocatfilename\n"; + push(@installer::globals::logfileinfo, $infoline); + } + } + + # 2. Replacing all occurences of "VersionNT" by "VersionNT64" + + my @versionnt_files = ("Componen.idt", "InstallE.idt", "InstallU.idt", "LaunchCo.idt"); + + foreach my $onefile ( @versionnt_files ) + { + my $fullfilename = $basedir . $installer::globals::separator . $onefile; + + if ( -f $fullfilename ) + { + my $saving_required = 0; + $filecontent = installer::files::read_file($fullfilename); + + for ( my $i = 3; $i <= $#{$filecontent}; $i++ ) # ignoring the first three lines + { + my $oneline = ${$filecontent}[$i]; + + if ( $oneline =~ /\bVersionNT\b/ ) + { + ${$filecontent}[$i] =~ s/\bVersionNT\b/VersionNT64/g; + $saving_required = 1; + } + } + + if ( $saving_required ) + { + # Saving the files + installer::files::save_file($fullfilename ,$filecontent); + $infoline = "Making idt file 64 bit conform: $fullfilename\n"; + push(@installer::globals::logfileinfo, $infoline); + } + } + } + } + +} + ################################################################# # Include all cab files into the msi database. # This works only on Windows -- cgit From ead04f8f0b7f51bf281ce41d8d590df0ca14af38 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 3 Dec 2010 16:21:36 +0100 Subject: vcl118: #i115905# improved clip region interface on SAL layer (part 1, windows implementation) --- canvas/source/vcl/spritehelper.cxx | 17 +- vcl/inc/vcl/outdev.hxx | 2 - vcl/inc/vcl/region.hxx | 9 +- vcl/inc/vcl/salgdi.hxx | 11 +- vcl/source/gdi/outdev.cxx | 829 +------------------------------------ vcl/source/gdi/salgdilayout.cxx | 60 +-- vcl/win/inc/salgdi.h | 10 +- vcl/win/source/gdi/salgdi.cxx | 226 +++++----- 8 files changed, 172 insertions(+), 992 deletions(-) mode change 100644 => 100755 canvas/source/vcl/spritehelper.cxx mode change 100644 => 100755 vcl/inc/vcl/outdev.hxx mode change 100644 => 100755 vcl/inc/vcl/salgdi.hxx mode change 100644 => 100755 vcl/source/gdi/outdev.cxx diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx old mode 100644 new mode 100755 index a09905e006a8..40bf7c5dc6cd --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -341,21 +341,8 @@ namespace vclcanvas else #endif { - // redraw is direcly on the front buffer, - // or using alpha blending - cannot use - // XOR, thus, employing the still somewhat - // speedier triangle clip method - ::basegfx::B2DPolygon aTriangulatedClip(::basegfx::triangulator::triangulate(aClipPoly)); - - // restrict the clipping area to the visible portion of the output device. - Size aSize(rTargetSurface.GetOutputSizePixel()); - ::basegfx::B2DRange aOutputRect(::basegfx::B2DPoint(0,0),::basegfx::B2DPoint(aSize.Width(),aSize.Height())); - ::basegfx::B2DPolygon aClippedClip(::basegfx::tools::clipTriangleListOnRange(aTriangulatedClip,aOutputRect)); - - // #i76339# - const Polygon aPoly(aClippedClip); - const PolyPolygon aPolyPoly(aPoly); - rTargetSurface.SetTriangleClipRegion(aPolyPoly); + Region aClipRegion( aClipPoly ); + rTargetSurface.SetClipRegion( aClipRegion ); } } } diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx old mode 100644 new mode 100755 index 8edc8c3d6c47..9fad9b0af619 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -400,7 +400,6 @@ public: SAL_DLLPRIVATE void ImplInitClipRegion(); SAL_DLLPRIVATE bool ImplSelectClipRegion( const Region&, SalGraphics* pGraphics = NULL ); SAL_DLLPRIVATE void ImplSetClipRegion( const Region* pRegion ); - SAL_DLLPRIVATE void ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ); SAL_DLLPRIVATE SalLayout* ImplLayout( const String&, xub_StrLen nIndex, xub_StrLen nLen, const Point& rLogicPos = Point(0,0), @@ -838,7 +837,6 @@ public: void SetClipRegion(); void SetClipRegion( const Region& rRegion ); - void SetTriangleClipRegion( const PolyPolygon &rRegion ); Region GetClipRegion() const; BOOL IsClipRegion() const { return mbClipRegion; } Region GetActiveClipRegion() const; diff --git a/vcl/inc/vcl/region.hxx b/vcl/inc/vcl/region.hxx index 87946574707c..ed1dc27f85eb 100755 --- a/vcl/inc/vcl/region.hxx +++ b/vcl/inc/vcl/region.hxx @@ -69,10 +69,6 @@ private: SAL_DLLPRIVATE inline void ImplPolyPolyRegionToBandRegion(); SAL_DLLPRIVATE const ImplRegion* ImplGetImplRegion() const { return mpImplRegion; } SAL_DLLPRIVATE ImplRegion* ImplGetImplRegion() { return mpImplRegion; } - SAL_DLLPRIVATE BOOL ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo, - long& nX, long& nY, long& nWidth, long& nHeight ) const; - SAL_DLLPRIVATE BOOL ImplGetNextRect( ImplRegionInfo& rImplRegionInfo, - long& nX, long& nY, long& nWidth, long& nHeight ) const; SAL_DLLPRIVATE void ImplBeginAddRect( ); SAL_DLLPRIVATE BOOL ImplAddRect( const Rectangle& rRect ); SAL_DLLPRIVATE void ImplEndAddRect( ); @@ -81,6 +77,11 @@ private: SAL_DLLPRIVATE void ImplUnionPolyPolygon( const Region& ); SAL_DLLPRIVATE void ImplXOrPolyPolygon( const Region& ); +public: // public within vcl + SAL_DLLPRIVATE BOOL ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo, + long& nX, long& nY, long& nWidth, long& nHeight ) const; + SAL_DLLPRIVATE BOOL ImplGetNextRect( ImplRegionInfo& rImplRegionInfo, + long& nX, long& nY, long& nWidth, long& nHeight ) const; #ifdef DBG_UTIL friend const char* ImplDbgTestRegion( const void* pObj ); #endif diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx old mode 100644 new mode 100755 index d8276406746e..135d0a85b28e --- a/vcl/inc/vcl/salgdi.hxx +++ b/vcl/inc/vcl/salgdi.hxx @@ -114,8 +114,7 @@ public: virtual ~SalGraphics(); protected: - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ) = 0; + virtual bool setClipRegion( const Region& ) = 0; // draw --> LineColor and FillColor and RasterOp and ClipRegion virtual void drawPixel( long nX, long nY ) = 0; virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0; @@ -205,11 +204,6 @@ public: // set the clip region to empty virtual void ResetClipRegion() = 0; - // begin setting the clip region, add rectangles to the - // region with the UnionClipRegion call - virtual void BeginSetClipRegion( ULONG nCount ) = 0; - // all rectangles were added and the clip region should be set now - virtual void EndSetClipRegion() = 0; // set the line color to transparent (= don't draw lines) virtual void SetLineColor() = 0; @@ -358,8 +352,7 @@ public: // non virtual methods; these do eventual coordinate mirroring and // then delegate to protected virtual methods - BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); - BOOL UnionClipRegion( const ::basegfx::B2DPolyPolygon&, const OutputDevice* ); + bool SetClipRegion( const Region&, const OutputDevice *pOutDev ); // draw --> LineColor and FillColor and RasterOp and ClipRegion void DrawPixel( long nX, long nY, const OutputDevice *pOutDev ); diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx old mode 100644 new mode 100755 index 26a831c7600c..c9a75bb12053 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -214,91 +214,8 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr pGraphics = mpGraphics; } - if( rRegion.HasPolyPolygon() - && pGraphics->supportsOperation( OutDevSupport_B2DClip ) ) - { - const ::basegfx::B2DPolyPolygon& rB2DPolyPolygon = rRegion.GetB2DPolyPolygon(); - pGraphics->BeginSetClipRegion( 0 ); - pGraphics->UnionClipRegion( rB2DPolyPolygon, pOutDev ); - pGraphics->EndSetClipRegion(); - return true; - } - - long nX; - long nY; - long nWidth; - long nHeight; - ULONG nRectCount; - ImplRegionInfo aInfo; - BOOL bRegionRect; - BOOL bClipRegion = TRUE; - const BOOL bClipDeviceBounds( !pOutDev->GetPDFWriter() - && pOutDev->GetOutDevType() != OUTDEV_PRINTER ); - - nRectCount = rRegion.GetRectCount(); - pGraphics->BeginSetClipRegion( nRectCount ); - bRegionRect = rRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight ); - if( bClipDeviceBounds ) - { - // #b6520266# Perform actual rect clip against outdev - // dimensions, to generate empty clips whenever one of the - // values is completely off the device. - const long nOffX( pOutDev->mnOutOffX ); - const long nOffY( pOutDev->mnOutOffY ); - const long nDeviceWidth( pOutDev->GetOutputWidthPixel() ); - const long nDeviceHeight( pOutDev->GetOutputHeightPixel() ); - Rectangle aDeviceBounds( nOffX, nOffY, - nOffX+nDeviceWidth-1, - nOffY+nDeviceHeight-1 ); - while ( bRegionRect ) - { - // #i59315# Limit coordinates passed to sal layer to actual - // outdev dimensions - everything else bears the risk of - // overflowing internal coordinates (e.g. the 16 bit wire - // format of X11). - Rectangle aTmpRect(nX,nY,nX+nWidth-1,nY+nHeight-1); - aTmpRect.Intersection(aDeviceBounds); - - if( !aTmpRect.IsEmpty() ) - { - if ( !pGraphics->UnionClipRegion( aTmpRect.Left(), - aTmpRect.Top(), - aTmpRect.GetWidth(), - aTmpRect.GetHeight(), - pOutDev ) ) - { - bClipRegion = FALSE; - } - } - else - { - // #i79850# Fake off-screen clip - if ( !pGraphics->UnionClipRegion( nDeviceWidth+1, - nDeviceHeight+1, - 1, 1, - pOutDev ) ) - { - bClipRegion = FALSE; - } - } - DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't create region" ); - bRegionRect = rRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight ); - } - } - else - { - // #i65720# Actually, _don't_ clip anything on printer or PDF - // export, since output might be visible outside the specified - // device boundaries. - while ( bRegionRect ) - { - if ( !pGraphics->UnionClipRegion( nX, nY, nWidth, nHeight, pOutDev ) ) - bClipRegion = FALSE; - DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't cerate region" ); - bRegionRect = rRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight ); - } - } - pGraphics->EndSetClipRegion(); + bool bClipRegion = pGraphics->SetClipRegion( rRegion, this ); + OSL_ENSURE( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't cerate region" ); return bClipRegion; } @@ -1075,9 +992,22 @@ void OutputDevice::ImplInitClipRegion() else { mbOutputClipped = FALSE; - ImplSelectClipRegion( - // #102532# Respect output offset also for clip region - ImplPixelToDevicePixel( maRegion ) ); + + // #102532# Respect output offset also for clip region + Region aRegion( ImplPixelToDevicePixel( maRegion ) ); + const BOOL bClipDeviceBounds( ! GetPDFWriter() + && GetOutDevType() != OUTDEV_PRINTER ); + if( bClipDeviceBounds ) + { + // #b6520266# Perform actual rect clip against outdev + // dimensions, to generate empty clips whenever one of the + // values is completely off the device. + Rectangle aDeviceBounds( mnOutOffX, mnOutOffY, + mnOutOffX+GetOutputWidthPixel()-1, + mnOutOffY+GetOutputHeightPixel()-1 ); + aRegion.Intersect( aDeviceBounds ); + } + ImplSelectClipRegion( aRegion ); } mbClipRegionSet = TRUE; @@ -1122,693 +1052,6 @@ void OutputDevice::ImplSetClipRegion( const Region* pRegion ) // ----------------------------------------------------------------------- -namespace -{ - inline int iround( float x ) - { - union - { - float f; - sal_Int32 i; - }; - f = x; - sal_Int32 exponent = (127 + 31) - ((i >> 23) & 0xFF); - sal_Int32 r = ((sal_Int32(i) << 8) | (1U << 31)) >> exponent; - r &= ((exponent - 32) >> 31); - sal_Int32 sign = i >> 31; - return r = (r ^ sign) - sign; - } - - inline int floorDiv(int a, int b) - { - if(b == 0) - return 0x80000000; - if(a >= 0) - return a / b; - int q = -(-a / b); // quotient - int r = -a % b; // remainder - if(r) - q--; - return q; - } - - inline int floorMod( int a, int b ) - { - if(b == 0) - return 0x80000000; - if(a >= 0) - return a % b; - int r = -a % b; // remainder - if(r) - r = b - r; - return r; - } - - inline int ceilDiv( int a, int b ) - { - if(b == 0) - return 0x80000000; - a += - 1 + b; - if(a >= 0) - return a / b; - int q = -(-a / b); // quotient - int r = -a % b; // remainder - if(r) - q--; - return q; - } - - inline int ceilMod( int a, int b ) - { - if(b == 0) - return 0x80000000; - a += - 1 + b; - if(a >= 0) - return (a % b) + 1 - b; - int r = -a % b; - if(r) - r = b - r; - return r + 1 - b; - } - - inline int ceilFix4(int x) { return (x + 0xF) & 0xFFFFFFF0; } - - struct vertex - { - float x,y; - inline vertex( const Point &p ) - : x((float)p.getX()),y((float)p.getY()) {} - }; - - template inline void swap(T &a, T &b) { T t=a; a=b; b=t; } - - class SpanIterator - { - public: - - SpanIterator( sal_Int32 *pTable, size_t dwPitch, sal_Int32 dwNumScanlines ); - std::pair GetNextSpan( void ); - sal_Int32 GetNumRemainingScanlines( void ); - sal_Int32 GetNumEqualScanlines( void ); - SpanIterator &operator++ (); - SpanIterator &Skip( sal_Int32 dwNumScanlines ); - sal_Int32 GetRemainingSpans( void ) const { return maNumSpans; } - - private: - - sal_Int32 *mpTable; - sal_Int32 *mpSpanArray; - sal_Int32 maNumSpans; - sal_Int32 maRemainingScanlines; - size_t maPitch; - }; - - inline SpanIterator::SpanIterator( sal_Int32 *pTable, size_t dwPitch, sal_Int32 dwNumScanlines ) - : mpTable(pTable),maRemainingScanlines(dwNumScanlines),maPitch(dwPitch) - { - sal_Int32 *pNumSpans = mpTable; - mpSpanArray = reinterpret_cast(pNumSpans+2); - maNumSpans = *pNumSpans; - } - - inline SpanIterator &SpanIterator::operator++ () - { - --maRemainingScanlines; - mpTable += maPitch; - sal_Int32 *pNumSpans = mpTable; - mpSpanArray = reinterpret_cast(pNumSpans+2); - maNumSpans = *pNumSpans; - return (*this); - } - - inline SpanIterator &SpanIterator::Skip( sal_Int32 dwNumScanlines ) - { - // don't skip more scanlines than there are... - if(dwNumScanlines > maRemainingScanlines) - dwNumScanlines = maRemainingScanlines; - - // skip in one fellow swoop... - maRemainingScanlines -= dwNumScanlines; - mpTable += maPitch * dwNumScanlines; - - // initialize necessary query fields... - sal_Int32 *pNumSpans = mpTable; - mpSpanArray = reinterpret_cast(pNumSpans+2); - maNumSpans = *pNumSpans; - return (*this); - } - - inline std::pair SpanIterator::GetNextSpan( void ) - { - sal_Int32 x(0); - sal_Int32 w(0); - if(maNumSpans) - { - x = *mpSpanArray++; - w = *mpSpanArray++; - --maNumSpans; - } - return std::pair(x,w); - } - - inline sal_Int32 SpanIterator::GetNumEqualScanlines( void ) - { - return mpTable[1]; - } - - inline sal_Int32 SpanIterator::GetNumRemainingScanlines( void ) - { - return maRemainingScanlines; - } - - class ScanlineContainer - { - - public: - - ScanlineContainer( sal_uInt32 dwNumScanlines, - sal_uInt32 dwNumSpansPerScanline ); - - ~ScanlineContainer( void ); - - void InsertSpan( sal_Int32 y, sal_Int32 lx, sal_Int32 rx ); - - SpanIterator Iterate( void ) const { return SpanIterator(mpTable,maPitch,maNumScanlines); } - - inline sal_uInt32 GetNumSpans( void ) const { return maNumberOfSpans; } - - void Consolidate( void ); - - private: - - // the span table will assist in determinate exactly how many clipping - // regions [that is *spans*] we will end up with. - // the counter for this purpose is right ahead. - sal_uInt32 maNumberOfSpans; - - struct span - { - sal_Int32 x; - sal_Int32 w; - }; - - sal_uInt32 maNumScanlines; - sal_uInt32 maNumSpansPerScanline; - sal_Int32 *mpTable; - size_t maPitch; - }; - - ScanlineContainer::ScanlineContainer( sal_uInt32 dwNumScanlines, - sal_uInt32 dwNumSpansPerScanline ) : maNumScanlines(dwNumScanlines), - maNumSpansPerScanline(dwNumSpansPerScanline) - { - // #128002# add one scanline buffer at the end, as - // SpanIterator::Skip reads two bytes past the end. - ++dwNumScanlines; - - // since each triangle could possibly add another span - // we can calculate the upper limit by [num scanlines * num triangles]. - const sal_uInt32 dwNumPossibleRegions = dwNumScanlines*dwNumSpansPerScanline; - - // calculate the number of bytes the span table will consume - const size_t dwTableSize = dwNumPossibleRegions*sizeof(span)+dwNumScanlines*(sizeof(sal_Int32)<<1); - - // allocate the span table [on the stack] - mpTable = static_cast(rtl_allocateMemory(dwTableSize)); - - // calculate the table pitch, that is how many int's do i need to get from a scanline to the next. - maPitch = (dwNumSpansPerScanline*sizeof(span)/sizeof(sal_Int32))+2; - - // we need to initialize the table here. - // the first *int* on each scanline tells us how many spans are on it. - sal_Int32 *pNumSpans = mpTable; - for(unsigned int i=0; i(pNumSpans+2); - - // retrieve the number of already contained spans. - sal_Int32 dwNumSpan = *pNumSpans; - - // since we need to sort the spans from top to bottom - // and left to right, we need to find the correct location - // in the table. - sal_Int32 dwIndex = 0; - while(dwIndex lx) - break; - - // forward to next element in the list. - ++dwIndex; - } - - // if we reach here, the new span needs to be stored - // in the table, increase the number of spans in the - // current scanline. - *pNumSpans = dwNumSpan+1; - - // keep the list of spans in sorted order. 'dwIndex' - // is where we want to store the new span. 'dwNumSpan' - // is the number of spans already there. now we need - // to move the offending spans out of the way. - while(dwIndex != dwNumSpan) - { - pSpanArray[dwNumSpan].x = pSpanArray[dwNumSpan-1].x; - pSpanArray[dwNumSpan].w = pSpanArray[dwNumSpan-1].w; - --dwNumSpan; - } - - // insert the new span - pSpanArray[dwIndex].x = lx; - pSpanArray[dwIndex].w = rx-lx; - - // remember the total number of spans in the table. - ++maNumberOfSpans; - } - } - - void ScanlineContainer::Consolidate( void ) - { - sal_Int32 *pScanline = mpTable; - - sal_Int32 dwRemaining = maNumScanlines; - while(dwRemaining) - { - sal_Int32 dwNumSpans = pScanline[0]; - sal_Int32 *pSpanArray = pScanline+2; - - sal_Int32 dwRest = dwRemaining-1; - sal_Int32 *pNext = pScanline; - while(dwRest) - { - pNext += maPitch; - sal_Int32 dwNumNextSpans = pNext[0]; - sal_Int32 *pSpanArrayNext = pNext+2; - if(dwNumSpans != dwNumNextSpans) - break; - - sal_Int32 dwCompare = dwNumSpans<<1; - while(dwCompare) - { - if(pSpanArray[dwCompare-1] != pSpanArrayNext[dwCompare-1]) - break; - --dwCompare; - } - if(dwCompare) - break; - - --dwRest; - } - - const sal_Int32 dwNumEqualScanlines(dwRemaining-dwRest); - pScanline[1] = dwNumEqualScanlines; - pScanline += maPitch*dwNumEqualScanlines; - dwRemaining -= dwNumEqualScanlines; - - // since we track the total number of spans to generate, - // we need to account for consolidated scanlines here. - if(dwNumEqualScanlines > 1) - maNumberOfSpans -= dwNumSpans * (dwNumEqualScanlines-1); - } - } -} - -// TODO: we should consider passing a basegfx b2dpolypolygon here to -// ensure that the signature isn't misleading. -// if we could pass a b2dpolypolygon here, we could easily triangulate it. -void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) -{ - DBG_TESTSOLARMUTEX(); - - if(!(IsDeviceOutputNecessary())) - return; - if(!(mpGraphics)) - if(!(ImplGetGraphics())) - return; - - if( mpGraphics->supportsOperation( OutDevSupport_B2DClip ) ) - { -#if 0 - ::basegfx::B2DPolyPolygon aB2DPolyPolygon = rPolyPolygon.getB2DPolyPolygon(); -#else - // getB2DPolyPolygon() "optimizes away" some points - // which prevents reliable undoing of the "triangle thingy" parameter - // so the toolspoly -> b2dpoly conversion has to be done manually - ::basegfx::B2DPolyPolygon aB2DPolyPolygon; - for( USHORT nPolyIdx = 0; nPolyIdx < rPolyPolygon.Count(); ++nPolyIdx ) - { - const Polygon& rPolygon = rPolyPolygon[ nPolyIdx ]; - ::basegfx::B2DPolygon aB2DPoly; - for( USHORT nPointIdx = 0; nPointIdx < rPolygon.GetSize(); ++nPointIdx ) - { - const Point& rPoint = rPolygon[ nPointIdx ]; - const ::basegfx::B2DPoint aB2DPoint( rPoint.X(), rPoint.Y() ); - aB2DPoly.append( aB2DPoint ); - } - aB2DPolyPolygon.append( aB2DPoly ); - } -#endif - - const ::basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation(); - aB2DPolyPolygon.transform( aTransform ); - - // the rPolyPolygon argument is a "triangle thingy" - // so convert it to a normal polypolyon first - ::basegfx::B2DPolyPolygon aPolyTriangle; - const int nPolyCount = aB2DPolyPolygon.count(); - for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) - { - const ::basegfx::B2DPolygon rPolygon = aB2DPolyPolygon.getB2DPolygon( nPolyIdx ); - const int nPointCount = rPolygon.count(); - for( int nPointIdx = 0; nPointIdx+2 < nPointCount; nPointIdx +=3 ) - { - ::basegfx::B2DPolygon aTriangle; - aTriangle.append( rPolygon.getB2DPoint( nPointIdx+0 ) ); - aTriangle.append( rPolygon.getB2DPoint( nPointIdx+1 ) ); - aTriangle.append( rPolygon.getB2DPoint( nPointIdx+2 ) ); - aPolyTriangle.append( aTriangle ); - } - } - - // now set the clip region with the real polypolygon - mpGraphics->BeginSetClipRegion( 0 ); - mpGraphics->UnionClipRegion( aPolyTriangle, this ); - mpGraphics->EndSetClipRegion(); - - // and mark the clip status as ready - mbOutputClipped = FALSE; - mbClipRegion = TRUE; - mbClipRegionSet = TRUE; - mbInitClipRegion = FALSE; - return; - } - - sal_Int32 offset_x = 0; - sal_Int32 offset_y = 0; - if ( GetOutDevType() == OUTDEV_WINDOW ) - { - offset_x = mnOutOffX+mnOutOffOrigX; - offset_y = mnOutOffY+mnOutOffOrigY; - } - - // first of all we need to know the upper limit - // of the amount of possible clipping regions. - sal_Int32 maxy = SAL_MIN_INT32; - sal_Int32 miny = SAL_MAX_INT32; - sal_uInt32 dwNumTriangles = 0; - for(USHORT i=0; i maxy) - maxy = p.Y(); - } - dwNumTriangles += dwNumVertices / 3; - } - } - - const sal_uInt32 dwNumScanlines = (maxy-miny); - if(!(dwNumScanlines)) - { - // indicates that no output needs to be produced - // since the clipping region did not provide any - // visible areas. - mbOutputClipped = TRUE; - - // indicates that a clip region has been - // presented to the output device. - mbClipRegion = TRUE; - - // indicates that the set clipping region - // has been processed. - mbClipRegionSet = TRUE; - - // under 'normal' circumstances a new clipping region - // needs to be processed by ImplInitClipRegion(), - // which we need to circumvent. - mbInitClipRegion = FALSE; - return; - } - - // this container provides all services we need to - // efficiently store/retrieve spans from the table. - const sal_uInt32 dwNumSpansPerScanline = dwNumTriangles; - ScanlineContainer container(dwNumScanlines,dwNumSpansPerScanline); - - // convert the incoming polypolygon to spans, we assume that - // the polypolygon has already been triangulated since we don't - // want to use the basegfx-types here. this could be leveraged - // after the tools-types had been removed. - for(USHORT i=0; i v2.y) ::swap(v0, v2); - if(v1.y > v2.y) ::swap(v1, v2); - if(v0.y > v1.y) ::swap(v0, v1); - - const float float2fixed(16.0f); - - // vertex coordinates of the triangle [28.4 fixed-point] - const int i4x0 = iround(float2fixed * (v0.x - 0.5f)); - const int i4y0 = iround(float2fixed * (v0.y - 0.5f)); - const int i4x1 = iround(float2fixed * (v1.x - 0.5f)); - const int i4y1 = iround(float2fixed * (v1.y - 0.5f)); - const int i4x2 = iround(float2fixed * (v2.x - 0.5f)); - const int i4y2 = iround(float2fixed * (v2.y - 0.5f)); - - // vertex coordinate deltas [28.4 fixed-point] - const int i4dx12 = i4x1-i4x0; - const int i4dy12 = i4y1-i4y0; - const int i4dx13 = i4x2-i4x0; - const int i4dy13 = i4y2-i4y0; - const int i4dx23 = i4x2-i4x1; - const int i4dy23 = i4y2-i4y1; - - // slope of edges [quotient,remainder] - const int mq12 = floorDiv(i4dx12 << 4, i4dy12 << 4); - const int mq13 = floorDiv(i4dx13 << 4, i4dy13 << 4); - const int mq23 = floorDiv(i4dx23 << 4, i4dy23 << 4); - const int mr12 = floorMod(i4dx12 << 4, i4dy12 << 4); - const int mr13 = floorMod(i4dx13 << 4, i4dy13 << 4); - const int mr23 = floorMod(i4dx23 << 4, i4dy23 << 4); - - // convert the vertical coordinates back to integers. - // according to the top-left fillrule we need to step - // the coordinates to the ceiling. - const int y0 = (i4y0+15)>>4; - const int y1 = (i4y1+15)>>4; - const int y2 = (i4y2+15)>>4; - - // calculate the value of the horizontal coordinate - // from the edge that 'spans' the triangle. - const int x = ceilDiv(i4dx13*i4dy12 + i4x0*i4dy13, i4dy13); - - // this will hold the horizontal coordinates - // of the seperate spans during the rasterization process. - int lx,rx; - - // this pair will serve as the error accumulator while - // we step along the edges. - int ld,rd,lD,rD; - - // these are the edge and error stepping values that - // will be used while stepping. - int lQ,rQ,lR,rR; - - if(i4x1 < x) - { - lx = ceilDiv(i4dx12 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy12, i4dy12 << 4); - ld = ceilMod(i4dx12 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy12, i4dy12 << 4); - rx = ceilDiv(i4dx13 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy13, i4dy13 << 4); - rd = ceilMod(i4dx13 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy13, i4dy13 << 4); - lQ = mq12; - rQ = mq13; - lR = mr12; - rR = mr13; - lD = i4dy12 << 4; - rD = i4dy13 << 4; - } - else - { - lx = ceilDiv(i4dx13 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy13, i4dy13 << 4); - ld = ceilMod(i4dx13 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy13, i4dy13 << 4); - rx = ceilDiv(i4dx12 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy12, i4dy12 << 4); - rd = ceilMod(i4dx12 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy12, i4dy12 << 4); - lQ = mq13; - rQ = mq12; - lR = mr13; - rR = mr12; - lD = i4dy13 << 4; - rD = i4dy12 << 4; - } - - for(signed int y=y0; y 0) { ld -= lD; lx += 1; } - rx += rQ; rd += rR; - if(rd > 0) { rd -= rD; rx += 1; } - } - - if(i4x1 < x) - { - lx = ceilDiv(i4dx23 * (ceilFix4(i4y1) - i4y1) + i4x1 * i4dy23, i4dy23 << 4); - ld = ceilMod(i4dx23 * (ceilFix4(i4y1) - i4y1) + i4x1 * i4dy23, i4dy23 << 4); - rx = ceilDiv(i4dx13 * (ceilFix4(i4y1) - i4y0) + i4x0 * i4dy13, i4dy13 << 4); - rd = ceilMod(i4dx13 * (ceilFix4(i4y1) - i4y0) + i4x0 * i4dy13, i4dy13 << 4); - lQ = mq23; - lR = mr23; - lD = i4dy23 << 4; - } - else - { - rx = ceilDiv(i4dx23 * (ceilFix4(i4y1) - i4y1) + i4x1 * i4dy23, i4dy23 << 4); - rd = ceilMod(i4dx23 * (ceilFix4(i4y1) - i4y1) + i4x1 * i4dy23, i4dy23 << 4); - rQ = mq23; - rR = mr23; - rD = i4dy23 << 4; - } - - for(signed int y=y1; y 0) { ld -= lD; lx += 1; } - rx += rQ; rd += rR; - if(rd > 0) { rd -= rD; rx += 1; } - } - } - } - } - - // now try to consolidate as many scanlines as possible. - // please note that this will probably change the number - // of spans [at least this is why we do all this hassle]. - // so, if you use 'consolidate' you should *use* this - // information during iteration, because the 'graphics' - // object we tell all those regions about is a bit, - // hm, how to say, *picky* if you supply not correctly - // the amount of regions. - container.Consolidate(); - - // now forward the spantable to the graphics handler. - SpanIterator it(container.Iterate()); - mpGraphics->BeginSetClipRegion( container.GetNumSpans() ); - while(miny < maxy) - { - const sal_Int32 dwNumEqual(it.GetNumEqualScanlines()); - while(it.GetRemainingSpans()) - { - // retrieve the next span [x-coordinate, width] from the current scanline. - std::pair span(it.GetNextSpan()); - - // now forward this to the graphics object. - // the only part that is worth noting is that we use - // the number of equal spanlines [the current is always the - // first one of the equal bunch] as the height of the region. - mpGraphics->UnionClipRegion( offset_x+span.first, - offset_y+miny, - span.second, - dwNumEqual, - this ); - } - it.Skip(dwNumEqual); - miny += dwNumEqual; - } - mpGraphics->EndSetClipRegion(); - - // indicates that no output needs to be produced - // since the clipping region did not provide any - // visible areas. the clip covers the whole area - // if there's not a single region. - mbOutputClipped = (container.GetNumSpans() == 0); - - // indicates that a clip region has been - // presented to the output device. - mbClipRegion = TRUE; - - // indicates that the set clipping region - // has been processed. - mbClipRegionSet = TRUE; - - // under 'normal' circumstances a new clipping region - // needs to be processed by ImplInitClipRegion(), - // which we need to circumvent. - mbInitClipRegion = FALSE; -} - -// ----------------------------------------------------------------------- - void OutputDevice::SetClipRegion() { DBG_TRACE( "OutputDevice::SetClipRegion()" ); @@ -1848,42 +1091,6 @@ void OutputDevice::SetClipRegion( const Region& rRegion ) // ----------------------------------------------------------------------- -void OutputDevice::SetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) -{ - DBG_TRACE( "OutputDevice::SetTriangleClipRegion( rPolyPolygon )" ); - DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); - - // in case the passed polypolygon is empty, use the - // existing SetClipRegion() method which gracefully - // unsets any previously set clipping region. - if(!(rPolyPolygon.Count())) - SetClipRegion(); - - sal_Int32 offset_x = 0; - sal_Int32 offset_y = 0; - if ( GetOutDevType() == OUTDEV_WINDOW ) - { - offset_x = mnOutOffX+mnOutOffOrigX; - offset_y = mnOutOffY+mnOutOffOrigY; - } - - // play nice with the rest of the system and provide an old-style region. - // the rest of this method does not rely on this. - maRegion = Region::GetRegionFromPolyPolygon( LogicToPixel(rPolyPolygon) ); - maRegion.Move(offset_x,offset_x); - - // feed region to metafile - if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( maRegion, TRUE ) ); - - ImplSetTriangleClipRegion( rPolyPolygon ); - - if( mpAlphaVDev ) - mpAlphaVDev->SetTriangleClipRegion( rPolyPolygon ); -} - -// ----------------------------------------------------------------------- - Region OutputDevice::GetClipRegion() const { DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 97e11c5a6aa4..f8cb5529c1df 100755 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -253,14 +253,29 @@ BOOL SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint * void SalGraphics::mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack ) const { - // mirror the bounding rect and move Region by resulting offset - Rectangle aRect( rRgn.GetBoundRect() ); - long nWidth = aRect.GetWidth(); - long x = aRect.Left(); - long x_org = x; + if( rRgn.HasPolyPolygon() ) + { + basegfx::B2DPolyPolygon aPolyPoly( rRgn.ConvertToB2DPolyPolygon() ); + aPolyPoly = mirror( aPolyPoly, pOutDev, bBack ); + rRgn = Region( aPolyPoly ); + } + else + { + ImplRegionInfo aInfo; + bool bRegionRect; + Region aMirroredRegion; + long nX, nY, nWidth, nHeight; - mirror( x, nWidth, pOutDev, bBack ); - rRgn.Move( x - x_org, 0 ); + bRegionRect = rRgn.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight ); + while ( bRegionRect ) + { + Rectangle aRect( Point(nX, nY), Size(nWidth, nHeight) ); + mirror( aRect, pOutDev, bBack ); + aMirroredRegion.Union( aRect ); + bRegionRect = rRgn.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight ); + } + rRgn = aMirroredRegion; + } } void SalGraphics::mirror( Rectangle& rRect, const OutputDevice *pOutDev, bool bBack ) const @@ -358,22 +373,15 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP // ---------------------------------------------------------------------------- -BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ) +bool SalGraphics::SetClipRegion( const Region& i_rClip, const OutputDevice *pOutDev ) { if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) - mirror( nX, nWidth, pOutDev ); - return unionClipRegion( nX, nY, nWidth, nHeight ); -} - -bool SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - return false; -} - -BOOL SalGraphics::UnionClipRegion( const ::basegfx::B2DPolyPolygon& rPoly, const OutputDevice* pOutDev ) -{ - (void)pOutDev;// TODO: SAL_LAYOUT_BIDI_RTL - return unionClipRegion( rPoly ); + { + Region aMirror( i_rClip ); + mirror( aMirror, pOutDev ); + return setClipRegion( aMirror ); + } + return setClipRegion( i_rClip ); } void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev ) @@ -465,7 +473,7 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, bool SalGraphics::DrawPolyPolygon( const ::basegfx::B2DPolyPolygon& i_rPolyPolygon, double i_fTransparency, const OutputDevice* i_pOutDev ) { bool bRet = false; - if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) ) { basegfx::B2DPolyPolygon aMirror( mirror( i_rPolyPolygon, i_pOutDev ) ); bRet = drawPolyPolygon( aMirror, i_fTransparency ); @@ -483,7 +491,7 @@ bool SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fT sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev ) { sal_Bool bResult = sal_False; - if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); @@ -498,7 +506,7 @@ sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev ) { sal_Bool bResult = sal_False; - if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); @@ -514,7 +522,7 @@ sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt3 const SalPoint* const* i_pPtAry, const BYTE* const* i_pFlgAry, const OutputDevice* i_pOutDev ) { sal_Bool bRet = sal_False; - if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) ) { // TODO: optimize, reduce new/delete calls SalPoint **pPtAry2 = new SalPoint*[i_nPoly]; @@ -542,7 +550,7 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double const OutputDevice* i_pOutDev ) { bool bRet = false; - if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) ) { basegfx::B2DPolygon aMirror( mirror( i_rPolygon, i_pOutDev ) ); bRet = drawPolyLine( aMirror, fTransparency, i_rLineWidth, i_eLineJoin ); diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h index f592f53ae29c..43f8967497a2 100755 --- a/vcl/win/inc/salgdi.h +++ b/vcl/win/inc/salgdi.h @@ -152,8 +152,6 @@ public: COLORREF mnTextColor; // TextColor RGNDATA* mpClipRgnData; // ClipRegion-Data RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data - RECT* mpNextClipRect; // Naechstes ClipRegion-Rect - BOOL mbFirstClipRect; // Flag for first cliprect to insert LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x) ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts BYTE* mpFontCharSets; // All Charsets for the current font @@ -183,8 +181,7 @@ public: virtual ~WinSalGraphics(); protected: - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); + virtual bool setClipRegion( const Region& ); // draw --> LineColor and FillColor and RasterOp and ClipRegion virtual void drawPixel( long nX, long nY ); virtual void drawPixel( long nX, long nY, SalColor nSalColor ); @@ -256,11 +253,6 @@ public: // set the clip region to empty virtual void ResetClipRegion(); - // begin setting the clip region, add rectangles to the - // region with the UnionClipRegion call - virtual void BeginSetClipRegion( ULONG nCount ); - // all rectangles were added and the clip region should be set now - virtual void EndSetClipRegion(); // set the line color to transparent (= don't draw lines) virtual void SetLineColor(); diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index a42636295592..96e10def3388 100755 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -39,9 +39,8 @@ #include #include #include -#ifndef _RTL_STRINGBUF_HXX #include -#endif +#include using namespace rtl; @@ -851,7 +850,7 @@ void WinSalGraphics::ResetClipRegion() // ----------------------------------------------------------------------- -void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount ) +bool WinSalGraphics::setClipRegion( const Region& i_rClip ) { if ( mhRegion ) { @@ -859,148 +858,143 @@ void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount ) mhRegion = 0; } - ULONG nRectBufSize = sizeof(RECT)*nRectCount; - if ( nRectCount < SAL_CLIPRECT_COUNT ) + if( i_rClip.HasPolyPolygon() ) { - if ( !mpStdClipRgnData ) - mpStdClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+(SAL_CLIPRECT_COUNT*sizeof(RECT))]; - mpClipRgnData = mpStdClipRgnData; + // TODO: ConvertToB2DPolyPolygon actually is kind of const, just it does not advertise it in the header + basegfx::B2DPolyPolygon aPolyPolygon( const_cast(i_rClip).ConvertToB2DPolyPolygon() ); + const sal_uInt32 nCount(aPolyPolygon.count()); + + if( nCount ) + { + std::vector< POINT > aPolyPoints; + aPolyPoints.reserve( 1024 ); + std::vector< INT > aPolyCounts( nCount, 0 ); + for(sal_uInt32 a(0); a < nCount; a++) + { + basegfx::B2DPolygon aPoly( aPolyPolygon.getB2DPolygon(a) ); + aPoly = basegfx::tools::adaptiveSubdivideByDistance( aPoly, 1 ); + const sal_uInt32 nPoints = aPoly.count(); + aPolyCounts[a] = nPoints; + for( sal_uInt32 b = 0; b < nPoints; b++ ) + { + basegfx::B2DPoint aPt( aPoly.getB2DPoint( b ) ); + POINT aPOINT; + aPOINT.x = (LONG)aPt.getX(); + aPOINT.y = (LONG)aPt.getY(); + aPolyPoints.push_back( aPOINT ); + } + } + mhRegion = CreatePolyPolygonRgn( &aPolyPoints[0], &aPolyCounts[0], nCount, ALTERNATE ); + } } else - mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize]; - mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER ); - mpClipRgnData->rdh.iType = RDH_RECTANGLES; - mpClipRgnData->rdh.nCount = nRectCount; - mpClipRgnData->rdh.nRgnSize = nRectBufSize; - SetRectEmpty( &(mpClipRgnData->rdh.rcBound) ); - mpNextClipRect = (RECT*)(&(mpClipRgnData->Buffer)); - mbFirstClipRect = TRUE; -} - - -// ----------------------------------------------------------------------- - -BOOL WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight ) -{ - if ( nWidth && nHeight ) { - RECT* pRect = mpNextClipRect; - RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound); - long nRight = nX + nWidth; - long nBottom = nY + nHeight; + ULONG nRectCount = i_rClip.GetRectCount(); - if ( mbFirstClipRect ) + ULONG nRectBufSize = sizeof(RECT)*nRectCount; + if ( nRectCount < SAL_CLIPRECT_COUNT ) { - pBoundRect->left = nX; - pBoundRect->top = nY; - pBoundRect->right = nRight; - pBoundRect->bottom = nBottom; - mbFirstClipRect = FALSE; + if ( !mpStdClipRgnData ) + mpStdClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+(SAL_CLIPRECT_COUNT*sizeof(RECT))]; + mpClipRgnData = mpStdClipRgnData; } else + mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize]; + mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER ); + mpClipRgnData->rdh.iType = RDH_RECTANGLES; + mpClipRgnData->rdh.nCount = nRectCount; + mpClipRgnData->rdh.nRgnSize = nRectBufSize; + RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound); + SetRectEmpty( pBoundRect ); + RECT* pNextClipRect = (RECT*)(&(mpClipRgnData->Buffer)); + bool bFirstClipRect = true; + + ImplRegionInfo aInfo; + long nX, nY, nW, nH; + bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH ); + while( bRegionRect ) { - if ( nX < pBoundRect->left ) - pBoundRect->left = (int)nX; - - if ( nY < pBoundRect->top ) - pBoundRect->top = (int)nY; - - if ( nRight > pBoundRect->right ) - pBoundRect->right = (int)nRight; - - if ( nBottom > pBoundRect->bottom ) - pBoundRect->bottom = (int)nBottom; - } + if ( nW && nH ) + { + long nRight = nX + nW; + long nBottom = nY + nH; - pRect->left = (int)nX; - pRect->top = (int)nY; - pRect->right = (int)nRight; - pRect->bottom = (int)nBottom; - mpNextClipRect++; - } - else - { - mpClipRgnData->rdh.nCount--; - mpClipRgnData->rdh.nRgnSize -= sizeof( RECT ); - } + if ( bFirstClipRect ) + { + pBoundRect->left = nX; + pBoundRect->top = nY; + pBoundRect->right = nRight; + pBoundRect->bottom = nBottom; + bFirstClipRect = false; + } + else + { + if ( nX < pBoundRect->left ) + pBoundRect->left = (int)nX; - return TRUE; -} + if ( nY < pBoundRect->top ) + pBoundRect->top = (int)nY; -// ----------------------------------------------------------------------- + if ( nRight > pBoundRect->right ) + pBoundRect->right = (int)nRight; -bool WinSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& rPolyPolygon ) -{ - const sal_uInt32 nCount(rPolyPolygon.count()); + if ( nBottom > pBoundRect->bottom ) + pBoundRect->bottom = (int)nBottom; + } - if( nCount ) - { - std::vector< POINT > aPolyPoints; - aPolyPoints.reserve( 1024 ); - std::vector< INT > aPolyCounts( nCount, 0 ); - for(sal_uInt32 a(0); a < nCount; a++) - { - basegfx::B2DPolygon aPoly( rPolyPolygon.getB2DPolygon(a) ); - aPoly = basegfx::tools::adaptiveSubdivideByDistance( aPoly, 1 ); - const sal_uInt32 nPoints = aPoly.count(); - aPolyCounts[a] = nPoints; - for( sal_uInt32 b = 0; b < nPoints; b++ ) + pNextClipRect->left = (int)nX; + pNextClipRect->top = (int)nY; + pNextClipRect->right = (int)nRight; + pNextClipRect->bottom = (int)nBottom; + pNextClipRect++; + } + else { - basegfx::B2DPoint aPt( aPoly.getB2DPoint( b ) ); - POINT aPOINT; - aPOINT.x = (LONG)aPt.getX(); - aPOINT.y = (LONG)aPt.getY(); - aPolyPoints.push_back( aPOINT ); + mpClipRgnData->rdh.nCount--; + mpClipRgnData->rdh.nRgnSize -= sizeof( RECT ); } + bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH ); } - mhRegion = CreatePolyPolygonRgn( &aPolyPoints[0], &aPolyCounts[0], nCount, ALTERNATE ); - } - - return true; -} - -// ----------------------------------------------------------------------- - -void WinSalGraphics::EndSetClipRegion() -{ - // create clip region from ClipRgnData - if ( mpClipRgnData->rdh.nCount == 1 ) - { - RECT* pRect = &(mpClipRgnData->rdh.rcBound); - mhRegion = CreateRectRgn( pRect->left, pRect->top, - pRect->right, pRect->bottom ); - } - else if( mpClipRgnData->rdh.nCount > 1 ) - { - ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); - mhRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData ); - - // if ExtCreateRegion(...) is not supported - if( !mhRegion ) + // create clip region from ClipRgnData + if ( mpClipRgnData->rdh.nCount == 1 ) { - RGNDATAHEADER* pHeader = (RGNDATAHEADER*) mpClipRgnData; + RECT* pRect = &(mpClipRgnData->rdh.rcBound); + mhRegion = CreateRectRgn( pRect->left, pRect->top, + pRect->right, pRect->bottom ); + } + else if( mpClipRgnData->rdh.nCount > 1 ) + { + ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); + mhRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData ); - if( pHeader->nCount ) + // if ExtCreateRegion(...) is not supported + if( !mhRegion ) { - RECT* pRect = (RECT*) mpClipRgnData->Buffer; - mhRegion = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom ); - pRect++; + RGNDATAHEADER* pHeader = (RGNDATAHEADER*) mpClipRgnData; - for( ULONG n = 1; n < pHeader->nCount; n++, pRect++ ) + if( pHeader->nCount ) { - HRGN hRgn = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom ); - CombineRgn( mhRegion, mhRegion, hRgn, RGN_OR ); - DeleteRegion( hRgn ); + RECT* pRect = (RECT*) mpClipRgnData->Buffer; + mhRegion = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom ); + pRect++; + + for( ULONG n = 1; n < pHeader->nCount; n++, pRect++ ) + { + HRGN hRgn = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom ); + CombineRgn( mhRegion, mhRegion, hRgn, RGN_OR ); + DeleteRegion( hRgn ); + } } } - } - if ( mpClipRgnData != mpStdClipRgnData ) - delete [] mpClipRgnData; + if ( mpClipRgnData != mpStdClipRgnData ) + delete [] mpClipRgnData; + } } if( mhRegion ) SelectClipRgn( mhDC, mhRegion ); + return mhRegion != 0; } // ----------------------------------------------------------------------- -- cgit From 65d95afb7eadeabb540de3a3ea31a35ae41ec70e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 3 Dec 2010 17:47:10 +0100 Subject: vcl118: #i115905# improved clip region interface on SAL layer (part 2, mac implementation) --- vcl/aqua/inc/salgdi.h | 8 +----- vcl/aqua/source/gdi/salgdi.cxx | 59 +++++++++++++++++++----------------------- vcl/source/gdi/outdev.cxx | 4 --- 3 files changed, 27 insertions(+), 44 deletions(-) diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h index 17c4aa7acd44..b1262dca499c 100644 --- a/vcl/aqua/inc/salgdi.h +++ b/vcl/aqua/inc/salgdi.h @@ -176,8 +176,7 @@ public: // InvalidateContext does an UnsetState and sets mrContext to 0 void InvalidateContext(); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); + virtual bool setClipRegion( const Region& ); // draw --> LineColor and FillColor and RasterOp and ClipRegion virtual void drawPixel( long nX, long nY ); @@ -250,11 +249,6 @@ public: // set the clip region to empty virtual void ResetClipRegion(); - // begin setting the clip region, add rectangles to the - // region with the UnionClipRegion call - virtual void BeginSetClipRegion( ULONG nCount ); - // all rectangles were added and the clip region should be set now - virtual void EndSetClipRegion(); // set the line color to transparent (= don't draw lines) virtual void SetLineColor(); diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index e1daf649f6da..9fcf3edcdddf 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -41,6 +41,7 @@ #include "vcl/sysdata.hxx" #include "vcl/sallayout.hxx" #include "vcl/svapp.hxx" +#include "vcl/region.h" #include "osl/file.hxx" #include "osl/process.h" @@ -562,7 +563,7 @@ void AquaSalGraphics::ResetClipRegion() // ----------------------------------------------------------------------- -void AquaSalGraphics::BeginSetClipRegion( ULONG nRectCount ) +bool AquaSalGraphics::setClipRegion( const Region& i_rClip ) { // release old clip path if( mxClipPath ) @@ -570,41 +571,33 @@ void AquaSalGraphics::BeginSetClipRegion( ULONG nRectCount ) CGPathRelease( mxClipPath ); mxClipPath = NULL; } -} - -// ----------------------------------------------------------------------- - -BOOL AquaSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight ) -{ - if( (nWidth <= 0) || (nHeight <= 0) ) - return TRUE; - - if( !mxClipPath ) - mxClipPath = CGPathCreateMutable(); - const CGRect aClipRect = {{nX,nY},{nWidth,nHeight}}; - CGPathAddRect( mxClipPath, NULL, aClipRect ); - return TRUE; -} - -// ----------------------------------------------------------------------- - -bool AquaSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& rPolyPolygon ) -{ - if( rPolyPolygon.count() <= 0 ) - return true; - - if( !mxClipPath ) - mxClipPath = CGPathCreateMutable(); - AddPolyPolygonToPath( mxClipPath, rPolyPolygon, !getAntiAliasB2DDraw(), false ); - return true; -} - -// ----------------------------------------------------------------------- + mxClipPath = CGPathCreateMutable(); -void AquaSalGraphics::EndSetClipRegion() -{ + // set current path, either as polypolgon or sequence of rectangles + if( i_rClip.HasPolyPolygon() ) + { + basegfx::B2DPolyPolygon aClip( const_cast(i_rClip).ConvertToB2DPolyPolygon() ); + AddPolyPolygonToPath( mxClipPath, aClip, !getAntiAliasB2DDraw(), false ); + } + else + { + long nX, nY, nW, nH; + ImplRegionInfo aInfo; + bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH ); + while( bRegionRect ) + { + if( nW && nH ) + { + CGRect aRect = {{nX,nY}, {nW,nH}}; + CGPathAddRect( mxClipPath, NULL, aRect ); + } + bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH ); + } + } + // set the current path as clip region if( CheckContext() ) SetState(); + return true; } // ----------------------------------------------------------------------- diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index c9a75bb12053..7be953358e35 100755 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -202,10 +202,6 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr { DBG_TESTSOLARMUTEX(); - // TODO(Q3): Change from static to plain method - everybody's - // calling it with pOutDev=this! - // => done, but only with minimal changes for now => TODO - OutputDevice* const pOutDev = this; if( !pGraphics ) { if( !mpGraphics ) -- cgit From 2033a625d3a213755d8c5015bd233b748b514b83 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 6 Dec 2010 14:14:11 +0100 Subject: gridsort: give the UnoControl(Model/Base) classes a ctor taking a service factory, so we have access to the factory which created us, and don't need to resort to the process'es service factory --- toolkit/inc/toolkit/controls/dialogcontrol.hxx | 4 +- toolkit/inc/toolkit/controls/formattedcontrol.hxx | 9 +- .../inc/toolkit/controls/geometrycontrolmodel.hxx | 2 +- .../toolkit/controls/geometrycontrolmodel_impl.hxx | 4 +- toolkit/inc/toolkit/controls/roadmapcontrol.hxx | 38 +++--- toolkit/inc/toolkit/controls/tkscrollbar.hxx | 4 +- toolkit/inc/toolkit/controls/tksimpleanimation.hxx | 4 +- toolkit/inc/toolkit/controls/tkspinbutton.hxx | 4 +- toolkit/inc/toolkit/controls/tkthrobber.hxx | 4 +- toolkit/inc/toolkit/controls/unocontrol.hxx | 7 +- toolkit/inc/toolkit/controls/unocontrolbase.hxx | 8 ++ .../inc/toolkit/controls/unocontrolcontainer.hxx | 5 +- .../toolkit/controls/unocontrolcontainermodel.hxx | 2 +- toolkit/inc/toolkit/controls/unocontrolmodel.hxx | 49 ++++--- toolkit/inc/toolkit/controls/unocontrols.hxx | 87 ++++++------ toolkit/source/controls/dialogcontrol.cxx | 84 ++++++------ toolkit/source/controls/formattedcontrol.cxx | 8 +- toolkit/source/controls/grid/gridcontrol.cxx | 7 +- toolkit/source/controls/grid/gridcontrol.hxx | 9 +- toolkit/source/controls/roadmapcontrol.cxx | 8 +- toolkit/source/controls/tkscrollbar.cxx | 8 +- toolkit/source/controls/tksimpleanimation.cxx | 6 +- toolkit/source/controls/tkspinbutton.cxx | 8 +- toolkit/source/controls/tkthrobber.cxx | 6 +- toolkit/source/controls/tree/treecontrol.cxx | 7 +- toolkit/source/controls/tree/treecontrol.hxx | 2 +- toolkit/source/controls/unocontrol.cxx | 22 ++- toolkit/source/controls/unocontrolbase.cxx | 9 ++ toolkit/source/controls/unocontrolcontainer.cxx | 9 +- .../source/controls/unocontrolcontainermodel.cxx | 3 +- toolkit/source/controls/unocontrolmodel.cxx | 64 ++++----- toolkit/source/controls/unocontrols.cxx | 151 ++++++++++++--------- toolkit/source/helper/registerservices.cxx | 110 +++++++-------- toolkit/source/helper/vclunohelper.cxx | 5 +- 34 files changed, 430 insertions(+), 327 deletions(-) diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx index f6a0f768bc10..0be8070f0ce1 100644 --- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx +++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx @@ -96,7 +96,7 @@ protected: UnoControlModelHolderList::iterator ImplFindElement( const ::rtl::OUString& rName ); public: - UnoControlDialogModel(); + UnoControlDialogModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlDialogModel( const UnoControlDialogModel& rModel ); ~UnoControlDialogModel(); @@ -242,7 +242,7 @@ protected: public: - UnoDialogControl(); + UnoDialogControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlContainer::queryInterface(rType); } diff --git a/toolkit/inc/toolkit/controls/formattedcontrol.hxx b/toolkit/inc/toolkit/controls/formattedcontrol.hxx index f589dabd47aa..93f675dae03f 100644 --- a/toolkit/inc/toolkit/controls/formattedcontrol.hxx +++ b/toolkit/inc/toolkit/controls/formattedcontrol.hxx @@ -67,8 +67,11 @@ namespace toolkit ) throw (::com::sun::star::uno::Exception); public: - UnoControlFormattedFieldModel(); - UnoControlFormattedFieldModel( const UnoControlFormattedFieldModel& rModel ) : UnoControlModel( rModel ) {;} + UnoControlFormattedFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + UnoControlFormattedFieldModel( const UnoControlFormattedFieldModel& rModel ) + :UnoControlModel( rModel ) + { + } UnoControlModel* Clone() const { return new UnoControlFormattedFieldModel( *this ); } @@ -110,7 +113,7 @@ namespace toolkit class UnoFormattedFieldControl : public UnoSpinFieldControl { public: - UnoFormattedFieldControl(); + UnoFormattedFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); // ::com::sun::star::awt::XTextListener diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx index 05b3016e690a..ef86ec8eb5b8 100644 --- a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx @@ -185,7 +185,7 @@ FORWARD_DECLARE_INTERFACE( script, XNameContainer ) ,public ::comphelper::OAggregationArrayUsageHelper< OTemplateInstanceDisambiguation< CONTROLMODEL > > { public: - OGeometryControlModel(); + OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); private: OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance); diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx index d6491877c7ad..9a71b5462f44 100644 --- a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx +++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx @@ -32,8 +32,8 @@ //==================================================================== //-------------------------------------------------------------------- template -OGeometryControlModel::OGeometryControlModel() - :OGeometryControlModel_Base(new CONTROLMODEL) +OGeometryControlModel::OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :OGeometryControlModel_Base(new CONTROLMODEL( i_factory ) ) { } diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx index 1b86d277fde2..0848fb21b8b5 100644 --- a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx +++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx @@ -45,37 +45,37 @@ #include - #include -typedef GraphicControlModel UnoControlRoadmapModel_Base; +//........................................................................ +namespace toolkit +{ +//........................................................................ + typedef GraphicControlModel UnoControlRoadmapModel_Base; -typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory - , ::com::sun::star::container::XContainer - , ::com::sun::star::container::XIndexContainer - > UnoControlRoadmapModel_IBase; + typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory + , ::com::sun::star::container::XContainer + , ::com::sun::star::container::XIndexContainer + > UnoControlRoadmapModel_IBase; -typedef UnoControlBase UnoControlRoadmap_Base; -typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XItemEventBroadcaster - , ::com::sun::star::container::XContainerListener - , ::com::sun::star::awt::XItemListener - , ::com::sun::star::beans::XPropertyChangeListener - > UnoControlRoadmap_IBase; + typedef UnoControlBase UnoControlRoadmap_Base; + typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XItemEventBroadcaster + , ::com::sun::star::container::XContainerListener + , ::com::sun::star::awt::XItemListener + , ::com::sun::star::beans::XPropertyChangeListener + > UnoControlRoadmap_IBase; -typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener, - ::com::sun::star::awt::XItemEventBroadcaster> SVTXRoadmap_Base; + typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener, + ::com::sun::star::awt::XItemEventBroadcaster> SVTXRoadmap_Base; -//........................................................................ -namespace toolkit{ -//........................................................................ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::lang; @@ -110,7 +110,7 @@ namespace toolkit{ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlRoadmapModel(); + UnoControlRoadmapModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlRoadmapModel( const UnoControlRoadmapModel& rModel ) : UnoControlRoadmapModel_Base( rModel ), UnoControlRoadmapModel_IBase( rModel ), @@ -167,7 +167,7 @@ namespace toolkit{ private: ItemListenerMultiplexer maItemListeners; public: - UnoRoadmapControl(); + UnoRoadmapControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); } diff --git a/toolkit/inc/toolkit/controls/tkscrollbar.hxx b/toolkit/inc/toolkit/controls/tkscrollbar.hxx index 78795aa240c2..da3d97ab1bc2 100644 --- a/toolkit/inc/toolkit/controls/tkscrollbar.hxx +++ b/toolkit/inc/toolkit/controls/tkscrollbar.hxx @@ -50,7 +50,7 @@ namespace toolkit ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlScrollBarModel(); + UnoControlScrollBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlScrollBarModel( const UnoControlScrollBarModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlScrollBarModel( *this ); } @@ -76,7 +76,7 @@ namespace toolkit AdjustmentListenerMultiplexer maAdjustmentListeners; public: - UnoScrollBarControl(); + UnoScrollBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); } diff --git a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx index 697d1679af45..e947a7921457 100644 --- a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx +++ b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx @@ -51,7 +51,7 @@ namespace toolkit ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoSimpleAnimationControlModel(); + UnoSimpleAnimationControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoSimpleAnimationControlModel( const UnoSimpleAnimationControlModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoSimpleAnimationControlModel( *this ); } @@ -80,7 +80,7 @@ namespace toolkit private: public: - UnoSimpleAnimationControl(); + UnoSimpleAnimationControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); DECLARE_UNO3_AGG_DEFAULTS( UnoSimpleAnimationControl, UnoControlBase ); diff --git a/toolkit/inc/toolkit/controls/tkspinbutton.hxx b/toolkit/inc/toolkit/controls/tkspinbutton.hxx index 48c602f76cfc..7600c3e6f9e7 100644 --- a/toolkit/inc/toolkit/controls/tkspinbutton.hxx +++ b/toolkit/inc/toolkit/controls/tkspinbutton.hxx @@ -51,7 +51,7 @@ namespace toolkit ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoSpinButtonModel(); + UnoSpinButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoSpinButtonModel( const UnoSpinButtonModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoSpinButtonModel( *this ); } @@ -82,7 +82,7 @@ namespace toolkit AdjustmentListenerMultiplexer maAdjustmentListeners; public: - UnoSpinButtonControl(); + UnoSpinButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); DECLARE_UNO3_AGG_DEFAULTS( UnoSpinButtonControl, UnoControlBase ); diff --git a/toolkit/inc/toolkit/controls/tkthrobber.hxx b/toolkit/inc/toolkit/controls/tkthrobber.hxx index d6c3a3d8a511..1c149639fc47 100644 --- a/toolkit/inc/toolkit/controls/tkthrobber.hxx +++ b/toolkit/inc/toolkit/controls/tkthrobber.hxx @@ -51,7 +51,7 @@ namespace toolkit ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoThrobberControlModel(); + UnoThrobberControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoThrobberControlModel( const UnoThrobberControlModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoThrobberControlModel( *this ); } @@ -80,7 +80,7 @@ namespace toolkit private: public: - UnoThrobberControl(); + UnoThrobberControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); DECLARE_UNO3_AGG_DEFAULTS( UnoThrobberControl, UnoControlBase ); diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx index 6bcfa519ed3d..44836ec28dd6 100644 --- a/toolkit/inc/toolkit/controls/unocontrol.hxx +++ b/toolkit/inc/toolkit/controls/unocontrol.hxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -95,6 +96,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer > mxVclWindowPeer; // just to avoid the query_interface thing protected: + const ::comphelper::ComponentContext maContext; EventListenerMultiplexer maDisposeListeners; WindowListenerMultiplexer maWindowListeners; FocusListenerMultiplexer maFocusListeners; @@ -144,8 +146,11 @@ protected: virtual sal_Bool requiresNewPeer( const ::rtl::OUString& _rPropertyName ) const; -public: +protected: UnoControl(); + +public: + UnoControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ~UnoControl(); UnoControlComponentInfos& GetComponentInfos() { return maComponentInfos; } diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx index f12dd23a5c67..1ce56c11cec1 100644 --- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx @@ -39,6 +39,14 @@ class TOOLKIT_DLLPUBLIC UnoControlBase : public UnoControl { protected: + UnoControlBase(); + +protected: + UnoControlBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControl( i_factory ) + { + } + sal_Bool ImplHasProperty( sal_uInt16 nProp ); sal_Bool ImplHasProperty( const ::rtl::OUString& aPropertyName ); void ImplSetPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue, sal_Bool bUpdateThis ); diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx index 1175d0e85abb..dcba4fdcbf9a 100644 --- a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx @@ -64,8 +64,9 @@ protected: void ImplActivateTabControllers(); public: - UnoControlContainer(); - UnoControlContainer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer ); + UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory, + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xPeer ); ~UnoControlContainer(); diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx index ef0d9a4068ee..cdc908718988 100644 --- a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx @@ -45,7 +45,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlContainerModel(); + UnoControlContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlContainerModel( const UnoControlContainerModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlContainerModel( *this ); } diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx index 5ac3c33aa1c9..bdb6e5d4bc68 100644 --- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx @@ -44,6 +44,9 @@ #include #include +#include +#include +#include #include @@ -53,21 +56,25 @@ class ImplPropertyTable; // class UnoControlModel // ---------------------------------------------------- -class TOOLKIT_DLLPUBLIC UnoControlModel : public ::com::sun::star::awt::XControlModel, - public ::com::sun::star::beans::XPropertyState, - public ::com::sun::star::io::XPersistObject, - public ::com::sun::star::lang::XComponent, - public ::com::sun::star::lang::XServiceInfo, - public ::com::sun::star::lang::XTypeProvider, - public ::com::sun::star::lang::XUnoTunnel, - public ::com::sun::star::util::XCloneable, - public MutexAndBroadcastHelper, - public ::cppu::OPropertySetHelper, - public ::cppu::OWeakAggObject +typedef ::cppu::WeakAggImplHelper7 < ::com::sun::star::awt::XControlModel + , ::com::sun::star::beans::XPropertyState + , ::com::sun::star::io::XPersistObject + , ::com::sun::star::lang::XComponent + , ::com::sun::star::lang::XServiceInfo + , ::com::sun::star::lang::XUnoTunnel + , ::com::sun::star::util::XCloneable + > UnoControlModel_Base; + +class TOOLKIT_DLLPUBLIC UnoControlModel :public UnoControlModel_Base + ,public MutexAndBroadcastHelper + ,public ::cppu::OPropertySetHelper { private: - ImplPropertyTable* mpData; - EventListenerMultiplexer maDisposeListeners; + ImplPropertyTable* mpData; + EventListenerMultiplexer maDisposeListeners; + +protected: + const ::comphelper::ComponentContext maContext; protected: void ImplRegisterProperty( sal_uInt16 nPropType ); @@ -99,18 +106,21 @@ protected: sal_Int32 _nSecondHandle /// second handle, which should supersede _nFirstHandle in the sequence ) const; -public: +protected: UnoControlModel(); +public: + UnoControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlModel( const UnoControlModel& rModel ); ~UnoControlModel(); virtual UnoControlModel* Clone() const = 0; - // ::com::sun::star::uno::XAggregation + // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return OWeakAggObject::queryInterface(rType); } - void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); } - void SAL_CALL release() throw() { OWeakAggObject::release(); } + void SAL_CALL acquire() throw(); + void SAL_CALL release() throw(); + // ::com::sun::star::uno::XAggregation ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XUnoTunnel @@ -122,10 +132,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XTypeProvider - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::awt::XControlModel + DECLARE_XTYPEPROVIDER() // ::com::sun::star::lang::XComponent void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index 01ff047ee3de..15a465167085 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -82,7 +82,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlEditModel(); + UnoControlEditModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlEditModel( const UnoControlEditModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlEditModel( *this ); } @@ -124,7 +124,7 @@ private: public: - UnoEditControl(); + UnoEditControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); TextListenerMultiplexer& GetTextListeners() { return maTextListeners; } @@ -185,7 +185,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFileControlModel(); + UnoControlFileControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlFileControlModel( const UnoControlFileControlModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlFileControlModel( *this ); } @@ -206,7 +206,7 @@ public: class UnoFileControl : public UnoEditControl { public: - UnoFileControl(); + UnoFileControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); // ::com::sun::star::lang::XServiceInfo @@ -226,7 +226,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL ); protected: - GraphicControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } + GraphicControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) + ,mbAdjustingImagePosition( false ) + ,mbAdjustingGraphic( false ) + { + } GraphicControlModel( const GraphicControlModel& _rSource ) : UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } // ::cppu::OPropertySetHelper @@ -242,14 +247,14 @@ private: // ---------------------------------------------------- // class UnoControlButtonModel // ---------------------------------------------------- -class UnoControlButtonModel : public GraphicControlModel +class UnoControlButtonModel : public GraphicControlModel { protected: ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlButtonModel(); + UnoControlButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlButtonModel( *this ); } @@ -282,7 +287,7 @@ private: public: - UnoButtonControl(); + UnoButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); @@ -327,7 +332,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlImageControlModel(); + UnoControlImageControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { } UnoControlModel* Clone() const { return new UnoControlImageControlModel( *this ); } @@ -359,7 +364,7 @@ private: public: - UnoImageControlControl(); + UnoImageControlControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); @@ -387,7 +392,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlRadioButtonModel(); + UnoControlRadioButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlRadioButtonModel( *this ); } @@ -421,7 +426,7 @@ private: public: - UnoRadioButtonControl(); + UnoRadioButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); @@ -466,7 +471,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlCheckBoxModel(); + UnoControlCheckBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlCheckBoxModel( *this ); } @@ -499,7 +504,7 @@ private: public: - UnoCheckBoxControl(); + UnoCheckBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ~UnoCheckBoxControl(){;} ::rtl::OUString GetComponentServiceName(); @@ -547,7 +552,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedHyperlinkModel(); + UnoControlFixedHyperlinkModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlFixedHyperlinkModel( const UnoControlFixedHyperlinkModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlFixedHyperlinkModel( *this ); } @@ -573,7 +578,7 @@ private: ActionListenerMultiplexer maActionListeners; public: - UnoFixedHyperlinkControl(); + UnoFixedHyperlinkControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); @@ -621,7 +626,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedTextModel(); + UnoControlFixedTextModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlFixedTextModel( const UnoControlFixedTextModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlFixedTextModel( *this ); } @@ -645,7 +650,7 @@ class UnoFixedTextControl : public UnoControlBase, public ::com::sun::star::awt::XLayoutConstrains { public: - UnoFixedTextControl(); + UnoFixedTextControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); } @@ -686,7 +691,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlGroupBoxModel(); + UnoControlGroupBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlGroupBoxModel( const UnoControlGroupBoxModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlGroupBoxModel( *this ); } @@ -708,7 +713,7 @@ public: class UnoGroupBoxControl : public UnoControlBase { public: - UnoGroupBoxControl(); + UnoGroupBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException); @@ -725,12 +730,10 @@ struct UnoControlListBoxModel_Data; typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel , ::com::sun::star::awt::XItemList > UnoControlListBoxModel_Base; -class TOOLKIT_DLLPUBLIC UnoControlListBoxModel :public UnoControlListBoxModel_Base +class TOOLKIT_DLLPUBLIC UnoControlListBoxModel : public UnoControlListBoxModel_Base { -protected: - UnoControlListBoxModel(bool asComboBox); public: - UnoControlListBoxModel(); + UnoControlListBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource ); ~UnoControlListBoxModel(); @@ -828,7 +831,7 @@ typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base { public: - UnoListBoxControl(); + UnoListBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); @@ -908,7 +911,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlComboBoxModel(); + UnoControlComboBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlComboBoxModel( *this ); } @@ -942,7 +945,7 @@ private: public: - UnoComboBoxControl(); + UnoComboBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); @@ -1009,7 +1012,7 @@ private: BOOL mbRepeat; public: - UnoSpinFieldControl(); + UnoSpinFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoEditControl::queryInterface(rType); } ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); @@ -1047,7 +1050,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlDateFieldModel(); + UnoControlDateFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlDateFieldModel( const UnoControlDateFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlDateFieldModel( *this ); } @@ -1074,7 +1077,7 @@ private: sal_Int32 mnLast; sal_Bool mbLongFormat; public: - UnoDateFieldControl(); + UnoDateFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1123,7 +1126,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlTimeFieldModel(); + UnoControlTimeFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlTimeFieldModel( const UnoControlTimeFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlTimeFieldModel( *this ); } @@ -1150,7 +1153,7 @@ private: sal_Int32 mnLast; public: - UnoTimeFieldControl(); + UnoTimeFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1198,7 +1201,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlNumericFieldModel(); + UnoControlNumericFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlNumericFieldModel( const UnoControlNumericFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlNumericFieldModel( *this ); } @@ -1225,7 +1228,7 @@ private: double mnLast; public: - UnoNumericFieldControl(); + UnoNumericFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1275,7 +1278,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlCurrencyFieldModel(); + UnoControlCurrencyFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlCurrencyFieldModel( const UnoControlCurrencyFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlCurrencyFieldModel( *this ); } @@ -1302,7 +1305,7 @@ private: double mnLast; public: - UnoCurrencyFieldControl(); + UnoCurrencyFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1351,7 +1354,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlPatternFieldModel(); + UnoControlPatternFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlPatternFieldModel( const UnoControlPatternFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlPatternFieldModel( *this ); } @@ -1377,7 +1380,7 @@ protected: void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal ); public: - UnoPatternFieldControl(); + UnoPatternFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1412,7 +1415,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlProgressBarModel(); + UnoControlProgressBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlProgressBarModel( const UnoControlProgressBarModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlProgressBarModel( *this ); } @@ -1434,7 +1437,7 @@ class UnoProgressBarControl : public UnoControlBase, public ::com::sun::star::awt::XProgressBar { public: - UnoProgressBarControl(); + UnoProgressBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); } @@ -1468,7 +1471,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedLineModel(); + UnoControlFixedLineModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlFixedLineModel( *this ); } @@ -1490,7 +1493,7 @@ public: class UnoFixedLineControl : public UnoControlBase { public: - UnoFixedLineControl(); + UnoFixedLineControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index ecb4d7765723..31c1a9c850dd 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -117,7 +117,7 @@ namespace return s_aLanguageDependentProperties; } - static uno::Reference< graphic::XGraphic > lcl_getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL ) + static uno::Reference< graphic::XGraphic > lcl_getGraphicFromURL_nothrow( const ::comphelper::ComponentContext& i_context, const ::rtl::OUString& _rURL ) { uno::Reference< graphic::XGraphic > xGraphic; if ( !_rURL.getLength() ) @@ -125,9 +125,8 @@ namespace try { - ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); uno::Reference< graphic::XGraphicProvider > xProvider; - if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) ) + if ( i_context.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) ) { uno::Sequence< beans::PropertyValue > aMediaProperties(1); aMediaProperties[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ); @@ -251,8 +250,9 @@ static const ::rtl::OUString& getStepPropertyName( ) // ---------------------------------------------------- // class UnoControlDialogModel // ---------------------------------------------------- -UnoControlDialogModel::UnoControlDialogModel() - :maContainerListeners( *this ) +UnoControlDialogModel::UnoControlDialogModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlDialogModel_Base( i_factory ) + ,maContainerListeners( *this ) ,maChangeListeners ( GetMutex() ) ,mbGroupsUpToDate( sal_False ) { @@ -410,63 +410,63 @@ Reference< XInterface > UnoControlDialogModel::createInstance( const ::rtl::OUSt OGeometryControlModel_Base* pNewModel = NULL; + const Reference< XMultiServiceFactory > xFactory( maContext.getLegacyServiceFactory() ); if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlEditModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlEditModel >; + pNewModel = new OGeometryControlModel< UnoControlEditModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFormattedFieldModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlFormattedFieldModel >; + pNewModel = new OGeometryControlModel< UnoControlFormattedFieldModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFileControlModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlFileControlModel >; + pNewModel = new OGeometryControlModel< UnoControlFileControlModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlButtonModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlButtonModel >; + pNewModel = new OGeometryControlModel< UnoControlButtonModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlImageControlModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlImageControlModel >; + pNewModel = new OGeometryControlModel< UnoControlImageControlModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlRadioButtonModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlRadioButtonModel >; + pNewModel = new OGeometryControlModel< UnoControlRadioButtonModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlCheckBoxModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlCheckBoxModel >; + pNewModel = new OGeometryControlModel< UnoControlCheckBoxModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlFixedHyperlinkModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlFixedHyperlinkModel >; + pNewModel = new OGeometryControlModel< UnoControlFixedHyperlinkModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlFixedTextModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlFixedTextModel >; + pNewModel = new OGeometryControlModel< UnoControlFixedTextModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlGroupBoxModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlGroupBoxModel >; + pNewModel = new OGeometryControlModel< UnoControlGroupBoxModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlListBoxModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlListBoxModel >; + pNewModel = new OGeometryControlModel< UnoControlListBoxModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlComboBoxModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlComboBoxModel >; + pNewModel = new OGeometryControlModel< UnoControlComboBoxModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlDateFieldModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlDateFieldModel >; + pNewModel = new OGeometryControlModel< UnoControlDateFieldModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlTimeFieldModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlTimeFieldModel >; + pNewModel = new OGeometryControlModel< UnoControlTimeFieldModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlNumericFieldModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlNumericFieldModel >; + pNewModel = new OGeometryControlModel< UnoControlNumericFieldModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlCurrencyFieldModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlCurrencyFieldModel >; + pNewModel = new OGeometryControlModel< UnoControlCurrencyFieldModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlPatternFieldModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlPatternFieldModel >; + pNewModel = new OGeometryControlModel< UnoControlPatternFieldModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlProgressBarModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlProgressBarModel >; + pNewModel = new OGeometryControlModel< UnoControlProgressBarModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlScrollBarModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlScrollBarModel >; + pNewModel = new OGeometryControlModel< UnoControlScrollBarModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFixedLineModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlFixedLineModel >; + pNewModel = new OGeometryControlModel< UnoControlFixedLineModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlRoadmapModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoControlRoadmapModel >; + pNewModel = new OGeometryControlModel< UnoControlRoadmapModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName_TreeControlModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoTreeModel >; + pNewModel = new OGeometryControlModel< UnoTreeModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName_GridControlModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoGridModel >; + pNewModel = new OGeometryControlModel< UnoGridModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoSimpleAnimationControlModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoSimpleAnimationControlModel >; + pNewModel = new OGeometryControlModel< UnoSimpleAnimationControlModel >( xFactory ); else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoThrobberControlModel ) == 0 ) - pNewModel = new OGeometryControlModel< UnoThrobberControlModel >; + pNewModel = new OGeometryControlModel< UnoThrobberControlModel >( xFactory ); if ( !pNewModel ) { - Reference< XMultiServiceFactory > xORB( ::comphelper::getProcessServiceFactory() ); - if ( xORB.is() ) + if ( xFactory.is() ) { - Reference< XInterface > xObject = xORB->createInstance( aServiceSpecifier ); + Reference< XInterface > xObject = xFactory->createInstance( aServiceSpecifier ); Reference< XServiceInfo > xSI( xObject, UNO_QUERY ); Reference< XCloneable > xCloneAccess( xSI, UNO_QUERY ); Reference< XAggregation > xAgg( xCloneAccess, UNO_QUERY ); @@ -1329,11 +1329,12 @@ throw ( RuntimeException ) // = class UnoDialogControl // ============================================================================ -UnoDialogControl::UnoDialogControl() : - maTopWindowListeners( *this ), - mbWindowListener(false), - mbSizeModified(false), - mbPosModified(false) +UnoDialogControl::UnoDialogControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) + :UnoControlContainer( i_factory ) + ,maTopWindowListeners( *this ) + ,mbWindowListener(false) + ,mbSizeModified(false) + ,mbPosModified(false) { maComponentInfos.nWidth = 300; maComponentInfos.nHeight = 450; @@ -1387,7 +1388,8 @@ void UnoDialogControl::ImplInsertControl( Reference< XControlModel >& rxModel, c xP->setPropertyValue( aPropName, aAny ); Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XControl > xCtrl( xMSF->createInstance( aDefCtrl ), UNO_QUERY ); + Reference < XControl > xCtrl; + maContext.createComponent( aDefCtrl, xCtrl ); DBG_ASSERT( xCtrl.is(), "UnoDialogControl::ImplInsertControl: could not create the control!" ); if ( xCtrl.is() ) @@ -1657,7 +1659,7 @@ void UnoDialogControl::PrepareWindowDescriptor( ::com::sun::star::awt::WindowDes getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ), ImplGetPropertyValue( PROPERTY_IMAGEURL )); - xGraphic = lcl_getGraphicFromURL_nothrow( absoluteUrl ); + xGraphic = lcl_getGraphicFromURL_nothrow( maContext, absoluteUrl ); ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::makeAny( xGraphic ), sal_True ); } } @@ -1899,7 +1901,7 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ), ImplGetPropertyValue( PROPERTY_IMAGEURL )); - xGraphic = lcl_getGraphicFromURL_nothrow( absoluteUrl ); + xGraphic = lcl_getGraphicFromURL_nothrow( maContext, absoluteUrl ); } ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::makeAny( xGraphic ), sal_True ); diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index 67c9c40ebd38..158d5d0c3c8e 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -125,8 +125,9 @@ namespace toolkit // = UnoControlFormattedFieldModel // =================================================================== // ------------------------------------------------------------------- - UnoControlFormattedFieldModel::UnoControlFormattedFieldModel() - :m_bRevokedAsClient( false ) + UnoControlFormattedFieldModel::UnoControlFormattedFieldModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) + ,m_bRevokedAsClient( false ) ,m_bSettingValueAndText( false ) { ImplRegisterProperty( BASEPROPERTY_ALIGN ); @@ -433,7 +434,8 @@ namespace toolkit // = UnoFormattedFieldControl // =================================================================== // ------------------------------------------------------------------- - UnoFormattedFieldControl::UnoFormattedFieldControl() + UnoFormattedFieldControl::UnoFormattedFieldControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoSpinFieldControl( i_factory ) { } diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 5125c1349ade..267c4a6b5bef 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -55,7 +55,8 @@ namespace toolkit // ---------------------------------------------------- // class UnoGridModel // ---------------------------------------------------- -UnoGridModel::UnoGridModel() +UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_BORDER ); @@ -278,7 +279,7 @@ Reference< XInterface > SAL_CALL GridControl_CreateInstance( const Reference< XM return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridControl ); } -Reference< XInterface > SAL_CALL GridControlModel_CreateInstance( const Reference< XMultiServiceFactory >& ) +Reference< XInterface > SAL_CALL GridControlModel_CreateInstance( const Reference< XMultiServiceFactory >& i_factory ) { - return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridModel ); + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridModel( i_factory ) ); } diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index 0c8ddb1c02b6..c41981cacfd1 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -56,7 +56,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoGridModel(); + UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoGridModel( const UnoGridModel& rModel ); UnoControlModel* Clone() const; @@ -75,10 +75,13 @@ public: // =================================================================== // = UnoGridControl // =================================================================== -class UnoGridControl : public ::cppu::ImplInheritanceHelper1< UnoControlBase, ::com::sun::star::awt::grid::XGridControl > +typedef ::cppu::ImplInheritanceHelper1 < UnoControlBase + , ::com::sun::star::awt::grid::XGridControl + > UnoGridControl_Base; +class UnoGridControl : public UnoGridControl_Base { public: - UnoGridControl(); + UnoGridControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); // ::com::sun::star::lang::XComponent diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx index 96f51b39dc72..875f05e2f80d 100644 --- a/toolkit/source/controls/roadmapcontrol.cxx +++ b/toolkit/source/controls/roadmapcontrol.cxx @@ -66,7 +66,9 @@ static void lcl_throwIndexOutOfBoundsException( ) // = UnoControlRoadmapModel // =================================================================== // ------------------------------------------------------------------- - UnoControlRoadmapModel::UnoControlRoadmapModel() : maContainerListeners( *this ) + UnoControlRoadmapModel::UnoControlRoadmapModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlRoadmapModel_Base( i_factory ) + ,maContainerListeners( *this ) { ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_BORDER ); @@ -368,7 +370,9 @@ static void lcl_throwIndexOutOfBoundsException( ) // = UnoRoadmapControl // =================================================================== // ------------------------------------------------------------------- - UnoRoadmapControl::UnoRoadmapControl(): maItemListeners( *this ) + UnoRoadmapControl::UnoRoadmapControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlRoadmap_Base( i_factory ) + ,maItemListeners( *this ) { } diff --git a/toolkit/source/controls/tkscrollbar.cxx b/toolkit/source/controls/tkscrollbar.cxx index 2de8b56131c8..f75183186610 100644 --- a/toolkit/source/controls/tkscrollbar.cxx +++ b/toolkit/source/controls/tkscrollbar.cxx @@ -47,7 +47,8 @@ namespace toolkit //= UnoControlScrollBarModel //==================================================================== //-------------------------------------------------------------------- - UnoControlScrollBarModel::UnoControlScrollBarModel() + UnoControlScrollBarModel::UnoControlScrollBarModel( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXScrollBar ); } @@ -96,8 +97,9 @@ namespace toolkit //==================================================================== //= UnoControlScrollBarModel //==================================================================== - UnoScrollBarControl::UnoScrollBarControl() - : maAdjustmentListeners( *this ) + UnoScrollBarControl::UnoScrollBarControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) + ,maAdjustmentListeners( *this ) { } diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx index 3d89bf59af82..f6e559f6e6fc 100644 --- a/toolkit/source/controls/tksimpleanimation.cxx +++ b/toolkit/source/controls/tksimpleanimation.cxx @@ -44,7 +44,8 @@ namespace toolkit //= UnoSimpleAnimationControlModel //==================================================================== //-------------------------------------------------------------------- - UnoSimpleAnimationControlModel::UnoSimpleAnimationControlModel() + UnoSimpleAnimationControlModel::UnoSimpleAnimationControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); ImplRegisterProperty( BASEPROPERTY_REPEAT ); @@ -119,7 +120,8 @@ namespace toolkit //= UnoSimpleAnimationControl //==================================================================== //-------------------------------------------------------------------- - UnoSimpleAnimationControl::UnoSimpleAnimationControl() + UnoSimpleAnimationControl::UnoSimpleAnimationControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) { } diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx index 5929dc7a4635..9396aea43290 100644 --- a/toolkit/source/controls/tkspinbutton.cxx +++ b/toolkit/source/controls/tkspinbutton.cxx @@ -50,7 +50,8 @@ namespace toolkit //= UnoSpinButtonModel //==================================================================== //-------------------------------------------------------------------- - UnoSpinButtonModel::UnoSpinButtonModel() + UnoSpinButtonModel::UnoSpinButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_BORDER ); @@ -137,8 +138,9 @@ namespace toolkit //= UnoSpinButtonControl //==================================================================== //-------------------------------------------------------------------- - UnoSpinButtonControl::UnoSpinButtonControl() - :maAdjustmentListeners( *this ) + UnoSpinButtonControl::UnoSpinButtonControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) + ,maAdjustmentListeners( *this ) { } diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx index 1dc83f860e34..8a1927a732cb 100644 --- a/toolkit/source/controls/tkthrobber.cxx +++ b/toolkit/source/controls/tkthrobber.cxx @@ -44,7 +44,8 @@ namespace toolkit //= UnoThrobberControlModel //==================================================================== //-------------------------------------------------------------------- - UnoThrobberControlModel::UnoThrobberControlModel() + UnoThrobberControlModel::UnoThrobberControlModel( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_BORDER ); ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); @@ -117,7 +118,8 @@ namespace toolkit //= UnoThrobberControl //==================================================================== //-------------------------------------------------------------------- - UnoThrobberControl::UnoThrobberControl() + UnoThrobberControl::UnoThrobberControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) { } diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index d56ca82bb845..5dd1e60a7c29 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -55,7 +55,8 @@ namespace toolkit // ---------------------------------------------------- // class UnoTreeModel // ---------------------------------------------------- -UnoTreeModel::UnoTreeModel() +UnoTreeModel::UnoTreeModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_BORDER ); @@ -457,9 +458,9 @@ Reference< XInterface > SAL_CALL TreeControl_CreateInstance( const Reference< XM return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeControl ); } -Reference< XInterface > SAL_CALL TreeControlModel_CreateInstance( const Reference< XMultiServiceFactory >& ) +Reference< XInterface > SAL_CALL TreeControlModel_CreateInstance( const Reference< XMultiServiceFactory >& i_factory ) { - return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeModel ); + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeModel( i_factory ) ); } void SAL_CALL TreeEditListenerMultiplexer::nodeEditing( const Reference< XTreeNode >& Node ) throw (RuntimeException, ::com::sun::star::util::VetoException) diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx index e646664c4a64..2b36bd4e53e9 100644 --- a/toolkit/source/controls/tree/treecontrol.hxx +++ b/toolkit/source/controls/tree/treecontrol.hxx @@ -54,7 +54,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoTreeModel(); + UnoTreeModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoTreeModel( const UnoTreeModel& rModel ); UnoControlModel* Clone() const; diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 075080906900..7fbac44035c6 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -164,7 +165,26 @@ struct UnoControl_Data // ---------------------------------------------------- DBG_NAME( UnoControl ) UnoControl::UnoControl() - : maDisposeListeners( *this ) + :maContext( ::comphelper::getProcessServiceFactory() ) + ,maDisposeListeners( *this ) + ,maWindowListeners( *this ) + ,maFocusListeners( *this ) + ,maKeyListeners( *this ) + ,maMouseListeners( *this ) + ,maMouseMotionListeners( *this ) + ,maPaintListeners( *this ) + ,maModeChangeListeners( GetMutex() ) + ,mpData( new UnoControl_Data ) +{ + DBG_CTOR( UnoControl, NULL ); + OSL_ENSURE( false, "UnoControl::UnoControl: not implemented. Well, not really." ); + // just implemented to let the various FooImplInheritanceHelper compile, you should use the + // version taking a service factory +} + +UnoControl::UnoControl( const Reference< XMultiServiceFactory >& i_factory ) + : maContext( i_factory ) + , maDisposeListeners( *this ) , maWindowListeners( *this ) , maFocusListeners( *this ) , maKeyListeners( *this ) diff --git a/toolkit/source/controls/unocontrolbase.cxx b/toolkit/source/controls/unocontrolbase.cxx index bbd0fc507e80..4dc1412ba661 100644 --- a/toolkit/source/controls/unocontrolbase.cxx +++ b/toolkit/source/controls/unocontrolbase.cxx @@ -32,6 +32,7 @@ #include #include +#include #include @@ -39,6 +40,14 @@ // class UnoControlBase // ---------------------------------------------------- +UnoControlBase::UnoControlBase() + :UnoControl( ::comphelper::getProcessServiceFactory() ) +{ + OSL_ENSURE( false, "UnoControlBase::UnoControlBase: not implemented. Well, not really." ); + // just implemented to let the various FooImplInheritanceHelper compile, you should use the + // version taking a service factory +} + sal_Bool UnoControlBase::ImplHasProperty( sal_uInt16 nPropId ) { ::rtl::OUString aPropName( GetPropertyName( nPropId ) ); diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index c3149a8cc869..9c551d4b984f 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -412,13 +412,16 @@ void SAL_CALL DialogStepChangedListener::propertyChange( const beans::PropertyC // ---------------------------------------------------- // class UnoControlContainer // ---------------------------------------------------- -UnoControlContainer::UnoControlContainer() : maCListeners( *this ) +UnoControlContainer::UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControlContainer_Base( i_factory ) + ,maCListeners( *this ) { mpControls = new UnoControlHolderList; } -UnoControlContainer::UnoControlContainer( uno::Reference< awt::XWindowPeer > xP ) - : maCListeners( *this ) +UnoControlContainer::UnoControlContainer( const uno::Reference< lang::XMultiServiceFactory >& i_factory, const uno::Reference< awt::XWindowPeer >& xP ) + :UnoControlContainer_Base( i_factory ) + ,maCListeners( *this ) { setPeer( xP ); mbDisposePeer = sal_False; diff --git a/toolkit/source/controls/unocontrolcontainermodel.cxx b/toolkit/source/controls/unocontrolcontainermodel.cxx index 7630971d8a57..66948ce095d1 100644 --- a/toolkit/source/controls/unocontrolcontainermodel.cxx +++ b/toolkit/source/controls/unocontrolcontainermodel.cxx @@ -36,7 +36,8 @@ // ---------------------------------------------------- // class UnoControlContainerModel // ---------------------------------------------------- -UnoControlContainerModel::UnoControlContainerModel() +UnoControlContainerModel::UnoControlContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_BORDER ); diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 91d202409e86..dceffdfe77f8 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -154,7 +154,24 @@ static void lcl_ImplMergeFontProperty( FontDescriptor& rFD, sal_uInt16 nPropId, // class UnoControlModel // ---------------------------------------------------- UnoControlModel::UnoControlModel() - : OPropertySetHelper( BrdcstHelper ), maDisposeListeners( *this ) + :UnoControlModel_Base() + ,MutexAndBroadcastHelper() + ,OPropertySetHelper( BrdcstHelper ) + ,maDisposeListeners( *this ) + ,maContext( ::comphelper::getProcessServiceFactory() ) +{ + OSL_ENSURE( false, "UnoControlModel::UnoControlModel: not implemented. Well, not really." ); + // just implemented to let the various FooImplInheritanceHelper compile, you should use the + // version taking a service factory + mpData = new ImplPropertyTable; +} + +UnoControlModel::UnoControlModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel_Base() + ,MutexAndBroadcastHelper() + ,OPropertySetHelper( BrdcstHelper ) + ,maDisposeListeners( *this ) + ,maContext( i_factory ) { // Die Properties muessen vom Model in die Tabelle gestopft werden, // nur vorhandene Properties sind gueltige Properties, auch wenn VOID. @@ -162,18 +179,11 @@ UnoControlModel::UnoControlModel() } UnoControlModel::UnoControlModel( const UnoControlModel& rModel ) - : XControlModel() - , XPropertyState() - , XPersistObject() - , XComponent() - , XServiceInfo() - , XTypeProvider() - , XUnoTunnel() - , XCloneable() + : UnoControlModel_Base() , MutexAndBroadcastHelper() , OPropertySetHelper( BrdcstHelper ) - , OWeakAggObject() , maDisposeListeners( *this ) + , maContext( rModel.maContext ) { mpData = new ImplPropertyTable; @@ -403,7 +413,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const aLocale.Country = sDefaultCurrency.copy( nSepPos + 1 ); } - LocaleDataWrapper aLocaleInfo( ::comphelper::getProcessServiceFactory(), aLocale ); + LocaleDataWrapper aLocaleInfo( maContext.getLegacyServiceFactory(), aLocale ); if ( !sBankSymbol.getLength() ) sBankSymbol = aLocaleInfo.getCurrBankSymbol(); @@ -484,36 +494,20 @@ void UnoControlModel::ImplRegisterProperties( const std::list< sal_uInt16 > &rId // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any UnoControlModel::queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { - ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, - SAL_STATIC_CAST( ::com::sun::star::awt::XControlModel*, this ), - SAL_STATIC_CAST( ::com::sun::star::io::XPersistObject*, this ), - SAL_STATIC_CAST( ::com::sun::star::lang::XComponent*, this ), - SAL_STATIC_CAST( ::com::sun::star::lang::XServiceInfo*, this ), - SAL_STATIC_CAST( ::com::sun::star::util::XCloneable*, this ), - SAL_STATIC_CAST( ::com::sun::star::beans::XPropertyState*, this ), - SAL_STATIC_CAST( ::com::sun::star::beans::XMultiPropertySet*, this ), - SAL_STATIC_CAST( ::com::sun::star::beans::XFastPropertySet*, this ), - SAL_STATIC_CAST( ::com::sun::star::beans::XPropertySet*, this ), - SAL_STATIC_CAST( ::com::sun::star::lang::XTypeProvider*, this ), - SAL_STATIC_CAST( ::com::sun::star::lang::XUnoTunnel*, this ) ); - return (aRet.hasValue() ? aRet : OWeakAggObject::queryAggregation( rType )); + Any aRet = UnoControlModel_Base::queryAggregation( rType ); + if ( !aRet.hasValue() ) + aRet = ::cppu::OPropertySetHelper::queryInterface( rType ); + return aRet; } // ::com::sun::star::lang::XUnoTunnel IMPL_XUNOTUNNEL( UnoControlModel ) +// XInterface +IMPLEMENT_FORWARD_REFCOUNT( UnoControlModel, UnoControlModel_Base ) + // ::com::sun::star::lang::XTypeProvider -IMPL_XTYPEPROVIDER_START( UnoControlModel ) - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>* ) NULL ) -IMPL_XTYPEPROVIDER_END +IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoControlModel, UnoControlModel_Base, ::cppu::OPropertySetHelper ) uno::Reference< util::XCloneable > UnoControlModel::createClone() throw(::com::sun::star::uno::RuntimeException) diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index d3838a7421a4..9599a75672cf 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -95,7 +94,8 @@ using namespace ::toolkit; // ---------------------------------------------------- // class UnoControlEditModel // ---------------------------------------------------- -UnoControlEditModel::UnoControlEditModel() +UnoControlEditModel::UnoControlEditModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXEdit ); } @@ -146,8 +146,9 @@ uno::Reference< beans::XPropertySetInfo > UnoControlEditModel::getPropertySetInf // ---------------------------------------------------- // class UnoEditControl // ---------------------------------------------------- -UnoEditControl::UnoEditControl() - :maTextListeners( *this ) +UnoEditControl::UnoEditControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) + ,maTextListeners( *this ) ,mnMaxTextLen( 0 ) ,mbSetTextInPeer( sal_False ) ,mbSetMaxTextLenInPeer( sal_False ) @@ -460,7 +461,8 @@ void UnoEditControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) t // ---------------------------------------------------- // class UnoControlFileControlModel // ---------------------------------------------------- -UnoControlFileControlModel::UnoControlFileControlModel() +UnoControlFileControlModel::UnoControlFileControlModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_ALIGN ); ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); @@ -519,7 +521,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFileControlModel::getPropert // ---------------------------------------------------- // class UnoFileControl // ---------------------------------------------------- -UnoFileControl::UnoFileControl() +UnoFileControl::UnoFileControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoEditControl( i_factory ) { } @@ -547,8 +550,7 @@ uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const // graphic manager uniqueid rtl::OUString sID = _rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ); // get the DefaultContext - ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); - mxGrfObj = graphic::GraphicObject::createWithId( aContext.getUNOContext(), sID ); + mxGrfObj = graphic::GraphicObject::createWithId( maContext.getUNOContext(), sID ); } else // linked mxGrfObj = NULL; // release the GraphicObject @@ -558,9 +560,8 @@ uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const try { - ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); uno::Reference< graphic::XGraphicProvider > xProvider; - if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) ) + if ( maContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) ) { uno::Sequence< beans::PropertyValue > aMediaProperties(1); aMediaProperties[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ); @@ -638,7 +639,8 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n // ---------------------------------------------------- // class UnoControlButtonModel // ---------------------------------------------------- -UnoControlButtonModel::UnoControlButtonModel() +UnoControlButtonModel::UnoControlButtonModel( const Reference< XMultiServiceFactory >& i_factory ) + :GraphicControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXButton ); @@ -694,9 +696,10 @@ uno::Reference< beans::XPropertySetInfo > UnoControlButtonModel::getPropertySetI // ---------------------------------------------------- // class UnoButtonControl // ---------------------------------------------------- -UnoButtonControl::UnoButtonControl() - : maActionListeners( *this ) - , maItemListeners( *this ) +UnoButtonControl::UnoButtonControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) + :UnoButtonControl_Base( i_factory ) + ,maActionListeners( *this ) + ,maItemListeners( *this ) { maComponentInfos.nWidth = 50; maComponentInfos.nHeight = 14; @@ -833,8 +836,9 @@ awt::Size UnoButtonControl::calcAdjustedSize( const awt::Size& rNewSize ) throw( // ---------------------------------------------------- // class UnoControlImageControlModel // ---------------------------------------------------- -UnoControlImageControlModel::UnoControlImageControlModel() - :mbAdjustingImageScaleMode( false ) +UnoControlImageControlModel::UnoControlImageControlModel( const Reference< XMultiServiceFactory >& i_factory ) + :GraphicControlModel( i_factory ) + ,mbAdjustingImageScaleMode( false ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXImageControl ); } @@ -914,8 +918,9 @@ void SAL_CALL UnoControlImageControlModel::setFastPropertyValue_NoBroadcast( sal // ---------------------------------------------------- // class UnoImageControlControl // ---------------------------------------------------- -UnoImageControlControl::UnoImageControlControl() - : maActionListeners( *this ) +UnoImageControlControl::UnoImageControlControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoImageControlControl_Base( i_factory ) + ,maActionListeners( *this ) { // Woher die Defaults nehmen? maComponentInfos.nWidth = 100; @@ -958,7 +963,8 @@ awt::Size UnoImageControlControl::calcAdjustedSize( const awt::Size& rNewSize ) // ---------------------------------------------------- // class UnoControlRadioButtonModel // ---------------------------------------------------- -UnoControlRadioButtonModel::UnoControlRadioButtonModel() +UnoControlRadioButtonModel::UnoControlRadioButtonModel( const Reference< XMultiServiceFactory >& i_factory ) + :GraphicControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXRadioButton ); } @@ -1005,8 +1011,10 @@ uno::Reference< beans::XPropertySetInfo > UnoControlRadioButtonModel::getPropert // ---------------------------------------------------- // class UnoRadioButtonControl // ---------------------------------------------------- -UnoRadioButtonControl::UnoRadioButtonControl() - : maItemListeners( *this ), maActionListeners( *this ) +UnoRadioButtonControl::UnoRadioButtonControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoRadioButtonControl_Base( i_factory ) + ,maItemListeners( *this ) + ,maActionListeners( *this ) { maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 12; @@ -1165,7 +1173,8 @@ awt::Size UnoRadioButtonControl::calcAdjustedSize( const awt::Size& rNewSize ) t // ---------------------------------------------------- // class UnoControlCheckBoxModel // ---------------------------------------------------- -UnoControlCheckBoxModel::UnoControlCheckBoxModel() +UnoControlCheckBoxModel::UnoControlCheckBoxModel( const Reference< XMultiServiceFactory >& i_factory ) + :GraphicControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXCheckBox ); } @@ -1212,8 +1221,9 @@ uno::Reference< beans::XPropertySetInfo > UnoControlCheckBoxModel::getPropertySe // ---------------------------------------------------- // class UnoCheckBoxControl // ---------------------------------------------------- -UnoCheckBoxControl::UnoCheckBoxControl() - : maItemListeners( *this ), maActionListeners( *this ) +UnoCheckBoxControl::UnoCheckBoxControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory ) + :UnoCheckBoxControl_Base( i_factory ) + ,maItemListeners( *this ), maActionListeners( *this ) { maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 12; @@ -1348,7 +1358,8 @@ awt::Size UnoCheckBoxControl::calcAdjustedSize( const awt::Size& rNewSize ) thro // ---------------------------------------------------- // class UnoControlFixedHyperlinkModel // ---------------------------------------------------- -UnoControlFixedHyperlinkModel::UnoControlFixedHyperlinkModel() +UnoControlFixedHyperlinkModel::UnoControlFixedHyperlinkModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXFixedHyperlink ); } @@ -1403,8 +1414,9 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedHyperlinkModel::getProp // ---------------------------------------------------- // class UnoFixedHyperlinkControl // ---------------------------------------------------- -UnoFixedHyperlinkControl::UnoFixedHyperlinkControl() - : maActionListeners( *this ) +UnoFixedHyperlinkControl::UnoFixedHyperlinkControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) + ,maActionListeners( *this ) { maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 12; @@ -1533,7 +1545,8 @@ void UnoFixedHyperlinkControl::removeActionListener(const uno::Reference< awt::X // ---------------------------------------------------- // class UnoControlFixedTextModel // ---------------------------------------------------- -UnoControlFixedTextModel::UnoControlFixedTextModel() +UnoControlFixedTextModel::UnoControlFixedTextModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXFixedText ); } @@ -1583,7 +1596,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedTextModel::getPropertyS // ---------------------------------------------------- // class UnoFixedTextControl // ---------------------------------------------------- -UnoFixedTextControl::UnoFixedTextControl() +UnoFixedTextControl::UnoFixedTextControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) { maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 12; @@ -1663,7 +1677,8 @@ awt::Size UnoFixedTextControl::calcAdjustedSize( const awt::Size& rNewSize ) thr // ---------------------------------------------------- // class UnoControlGroupBoxModel // ---------------------------------------------------- -UnoControlGroupBoxModel::UnoControlGroupBoxModel() +UnoControlGroupBoxModel::UnoControlGroupBoxModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); ImplRegisterProperty( BASEPROPERTY_ENABLED ); @@ -1714,7 +1729,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlGroupBoxModel::getPropertySe // ---------------------------------------------------- // class UnoGroupBoxControl // ---------------------------------------------------- -UnoGroupBoxControl::UnoGroupBoxControl() +UnoGroupBoxControl::UnoGroupBoxControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) { maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 100; @@ -1831,21 +1847,13 @@ private: // = UnoControlListBoxModel // ===================================================================================================================== // --------------------------------------------------------------------------------------------------------------------- -UnoControlListBoxModel::UnoControlListBoxModel() - :UnoControlListBoxModel_Base() +UnoControlListBoxModel::UnoControlListBoxModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlListBoxModel_Base( i_factory ) ,m_pData( new UnoControlListBoxModel_Data( *this ) ) ,m_aItemListListeners( GetMutex() ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXListBox ); } -// --------------------------------------------------------------------------------------------------------------------- -UnoControlListBoxModel::UnoControlListBoxModel(bool) - :UnoControlListBoxModel_Base() - ,m_pData( new UnoControlListBoxModel_Data( *this ) ) - ,m_aItemListListeners( GetMutex() ) -{ -} - // --------------------------------------------------------------------------------------------------------------------- UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource ) :UnoControlListBoxModel_Base( i_rSource ) @@ -2277,8 +2285,9 @@ void UnoControlListBoxModel::impl_notifyItemListEvent_nolck( const sal_Int32 i_n // ---------------------------------------------------- // class UnoListBoxControl // ---------------------------------------------------- -UnoListBoxControl::UnoListBoxControl() - :maActionListeners( *this ) +UnoListBoxControl::UnoListBoxControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoListBoxControl_Base( i_factory ) + ,maActionListeners( *this ) ,maItemListeners( *this ) { maComponentInfos.nWidth = 100; @@ -2707,7 +2716,8 @@ ItemListenerMultiplexer& UnoListBoxControl::getItemListeners() // ---------------------------------------------------- // class UnoControlComboBoxModel // ---------------------------------------------------- -UnoControlComboBoxModel::UnoControlComboBoxModel() : UnoControlListBoxModel(true) +UnoControlComboBoxModel::UnoControlComboBoxModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlListBoxModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXComboBox ); } @@ -2782,9 +2792,10 @@ uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons // ---------------------------------------------------- // class UnoComboBoxControl // ---------------------------------------------------- -UnoComboBoxControl::UnoComboBoxControl() - : maActionListeners( *this ), - maItemListeners( *this ) +UnoComboBoxControl::UnoComboBoxControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoEditControl( i_factory ) + ,maActionListeners( *this ) + ,maItemListeners( *this ) { maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 12; @@ -3102,7 +3113,9 @@ sal_Int16 UnoComboBoxControl::getDropDownLineCount() throw(uno::RuntimeException // ---------------------------------------------------- // UnoSpinFieldControl // ---------------------------------------------------- -UnoSpinFieldControl::UnoSpinFieldControl() : maSpinListeners( *this ) +UnoSpinFieldControl::UnoSpinFieldControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoEditControl( i_factory ) + ,maSpinListeners( *this ) { mbRepeat = sal_False; } @@ -3192,7 +3205,8 @@ void UnoSpinFieldControl::enableRepeat( sal_Bool bRepeat ) throw(::com::sun::sta // ---------------------------------------------------- // class UnoControlDateFieldModel // ---------------------------------------------------- -UnoControlDateFieldModel::UnoControlDateFieldModel() +UnoControlDateFieldModel::UnoControlDateFieldModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXDateField ); } @@ -3237,7 +3251,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlDateFieldModel::getPropertyS // ---------------------------------------------------- // class UnoDateFieldControl // ---------------------------------------------------- -UnoDateFieldControl::UnoDateFieldControl() +UnoDateFieldControl::UnoDateFieldControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoSpinFieldControl( i_factory ) { mnFirst = Date( 1, 1, 1900 ).GetDate(); mnLast = Date( 31, 12, 2200 ).GetDate(); @@ -3432,7 +3447,8 @@ sal_Bool UnoDateFieldControl::isStrictFormat() throw(uno::RuntimeException) // ---------------------------------------------------- // class UnoControlTimeFieldModel // ---------------------------------------------------- -UnoControlTimeFieldModel::UnoControlTimeFieldModel() +UnoControlTimeFieldModel::UnoControlTimeFieldModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXTimeField ); } @@ -3477,7 +3493,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlTimeFieldModel::getPropertyS // ---------------------------------------------------- // class UnoTimeFieldControl // ---------------------------------------------------- -UnoTimeFieldControl::UnoTimeFieldControl() +UnoTimeFieldControl::UnoTimeFieldControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoSpinFieldControl( i_factory ) { mnFirst = Time( 0, 0 ).GetTime(); mnLast = Time( 23, 59, 59, 99 ).GetTime(); @@ -3631,7 +3648,8 @@ sal_Bool UnoTimeFieldControl::isStrictFormat() throw(uno::RuntimeException) // ---------------------------------------------------- // class UnoControlNumericFieldModel // ---------------------------------------------------- -UnoControlNumericFieldModel::UnoControlNumericFieldModel() +UnoControlNumericFieldModel::UnoControlNumericFieldModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXNumericField ); } @@ -3676,7 +3694,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlNumericFieldModel::getProper // ---------------------------------------------------- // class UnoNumericFieldControl // ---------------------------------------------------- -UnoNumericFieldControl::UnoNumericFieldControl() +UnoNumericFieldControl::UnoNumericFieldControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoSpinFieldControl( i_factory ) { mnFirst = 0; mnLast = 0x7FFFFFFF; @@ -3827,7 +3846,8 @@ sal_Int16 UnoNumericFieldControl::getDecimalDigits() throw(uno::RuntimeException // ---------------------------------------------------- // class UnoControlCurrencyFieldModel // ---------------------------------------------------- -UnoControlCurrencyFieldModel::UnoControlCurrencyFieldModel() +UnoControlCurrencyFieldModel::UnoControlCurrencyFieldModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXCurrencyField ); } @@ -3876,7 +3896,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlCurrencyFieldModel::getPrope // ---------------------------------------------------- // class UnoCurrencyFieldControl // ---------------------------------------------------- -UnoCurrencyFieldControl::UnoCurrencyFieldControl() +UnoCurrencyFieldControl::UnoCurrencyFieldControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoSpinFieldControl( i_factory ) { mnFirst = 0; mnLast = 0x7FFFFFFF; @@ -4026,7 +4047,8 @@ sal_Int16 UnoCurrencyFieldControl::getDecimalDigits() throw(uno::RuntimeExceptio // ---------------------------------------------------- // class UnoControlPatternFieldModel // ---------------------------------------------------- -UnoControlPatternFieldModel::UnoControlPatternFieldModel() +UnoControlPatternFieldModel::UnoControlPatternFieldModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXPatternField ); } @@ -4069,7 +4091,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlPatternFieldModel::getProper // ---------------------------------------------------- // class UnoPatternFieldControl // ---------------------------------------------------- -UnoPatternFieldControl::UnoPatternFieldControl() +UnoPatternFieldControl::UnoPatternFieldControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoSpinFieldControl( i_factory ) { } @@ -4158,7 +4181,8 @@ sal_Bool UnoPatternFieldControl::isStrictFormat() throw(uno::RuntimeException) // ---------------------------------------------------- // class UnoControlProgressBarModel // ---------------------------------------------------- -UnoControlProgressBarModel::UnoControlProgressBarModel() +UnoControlProgressBarModel::UnoControlProgressBarModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_BORDER ); @@ -4214,7 +4238,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlProgressBarModel::getPropert // ---------------------------------------------------- // class UnoProgressBarControl // ---------------------------------------------------- -UnoProgressBarControl::UnoProgressBarControl() +UnoProgressBarControl::UnoProgressBarControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) { } @@ -4290,7 +4315,8 @@ sal_Int32 UnoProgressBarControl::getValue() throw(::com::sun::star::uno::Runtime // ---------------------------------------------------- // class UnoControlFixedLineModel // ---------------------------------------------------- -UnoControlFixedLineModel::UnoControlFixedLineModel() +UnoControlFixedLineModel::UnoControlFixedLineModel( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) { ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); @@ -4341,7 +4367,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedLineModel::getPropertyS // ---------------------------------------------------- // class UnoFixedLineControl // ---------------------------------------------------- -UnoFixedLineControl::UnoFixedLineControl() +UnoFixedLineControl::UnoFixedLineControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoControlBase( i_factory ) { maComponentInfos.nWidth = 100; // ?? maComponentInfos.nHeight = 100; // ?? diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index 477032538af8..c8ef067246f7 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -119,12 +119,12 @@ namespace toolkit { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName ); } #define IMPL_CREATEINSTANCE2( ImplName ) \ - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr) \ - { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName( rSMgr ) ); } + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) \ + { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName( i_factory ) ); } -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL UnoControlDialogModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL UnoControlDialogModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) { - return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new OGeometryControlModel ); + return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new OGeometryControlModel( i_factory ) ); } #define CHECKANDCREATEFACTORY( ImplName, ServiceName1, ServiceName2 ) \ @@ -140,61 +140,61 @@ using namespace toolkit; IMPL_CREATEINSTANCE2( VCLXToolkit ) IMPL_CREATEINSTANCE( StdTabController ) IMPL_CREATEINSTANCE( StdTabControllerModel ) -IMPL_CREATEINSTANCE( UnoButtonControl ) -IMPL_CREATEINSTANCE( UnoCheckBoxControl ) -IMPL_CREATEINSTANCE( UnoComboBoxControl ) -IMPL_CREATEINSTANCE( UnoControlButtonModel ) -IMPL_CREATEINSTANCE( UnoControlCheckBoxModel ) -IMPL_CREATEINSTANCE( UnoControlComboBoxModel ) -IMPL_CREATEINSTANCE( UnoControlContainer ) -IMPL_CREATEINSTANCE( UnoControlContainerModel ) -IMPL_CREATEINSTANCE( UnoControlCurrencyFieldModel ) -IMPL_CREATEINSTANCE( UnoControlDateFieldModel ) -IMPL_CREATEINSTANCE( UnoControlEditModel ) -IMPL_CREATEINSTANCE( UnoControlFileControlModel ) -IMPL_CREATEINSTANCE( UnoControlFixedHyperlinkModel ) -IMPL_CREATEINSTANCE( UnoControlFixedTextModel ) -IMPL_CREATEINSTANCE( UnoControlFormattedFieldModel ) -IMPL_CREATEINSTANCE( UnoControlGroupBoxModel ) -IMPL_CREATEINSTANCE( UnoControlImageControlModel ) -IMPL_CREATEINSTANCE( UnoControlListBoxModel ) -IMPL_CREATEINSTANCE( UnoControlNumericFieldModel ) -IMPL_CREATEINSTANCE( UnoControlPatternFieldModel ) -IMPL_CREATEINSTANCE( UnoControlRadioButtonModel ) -IMPL_CREATEINSTANCE( UnoControlTimeFieldModel ) -IMPL_CREATEINSTANCE( UnoControlProgressBarModel ) -IMPL_CREATEINSTANCE( UnoControlScrollBarModel ) -IMPL_CREATEINSTANCE( UnoSpinButtonModel ) -IMPL_CREATEINSTANCE( UnoControlFixedLineModel ) -IMPL_CREATEINSTANCE( UnoCurrencyFieldControl ) -IMPL_CREATEINSTANCE( UnoDateFieldControl ) -IMPL_CREATEINSTANCE( UnoDialogControl ) -IMPL_CREATEINSTANCE( UnoEditControl ) -IMPL_CREATEINSTANCE( UnoFileControl ) -IMPL_CREATEINSTANCE( UnoFixedHyperlinkControl ) -IMPL_CREATEINSTANCE( UnoFixedTextControl ) -IMPL_CREATEINSTANCE( UnoFormattedFieldControl ) -IMPL_CREATEINSTANCE( UnoGroupBoxControl ) -IMPL_CREATEINSTANCE( UnoImageControlControl ) -IMPL_CREATEINSTANCE( UnoListBoxControl ) -IMPL_CREATEINSTANCE( UnoNumericFieldControl ) -IMPL_CREATEINSTANCE( UnoPatternFieldControl ) -IMPL_CREATEINSTANCE( UnoRadioButtonControl ) -IMPL_CREATEINSTANCE( UnoTimeFieldControl ) -IMPL_CREATEINSTANCE( UnoProgressBarControl ) -IMPL_CREATEINSTANCE( UnoScrollBarControl ) -IMPL_CREATEINSTANCE( UnoSpinButtonControl ) -IMPL_CREATEINSTANCE( UnoFixedLineControl ) +IMPL_CREATEINSTANCE2( UnoButtonControl ) +IMPL_CREATEINSTANCE2( UnoCheckBoxControl ) +IMPL_CREATEINSTANCE2( UnoComboBoxControl ) +IMPL_CREATEINSTANCE2( UnoControlButtonModel ) +IMPL_CREATEINSTANCE2( UnoControlCheckBoxModel ) +IMPL_CREATEINSTANCE2( UnoControlComboBoxModel ) +IMPL_CREATEINSTANCE2( UnoControlContainer ) +IMPL_CREATEINSTANCE2( UnoControlContainerModel ) +IMPL_CREATEINSTANCE2( UnoControlCurrencyFieldModel ) +IMPL_CREATEINSTANCE2( UnoControlDateFieldModel ) +IMPL_CREATEINSTANCE2( UnoControlEditModel ) +IMPL_CREATEINSTANCE2( UnoControlFileControlModel ) +IMPL_CREATEINSTANCE2( UnoControlFixedHyperlinkModel ) +IMPL_CREATEINSTANCE2( UnoControlFixedTextModel ) +IMPL_CREATEINSTANCE2( UnoControlFormattedFieldModel ) +IMPL_CREATEINSTANCE2( UnoControlGroupBoxModel ) +IMPL_CREATEINSTANCE2( UnoControlImageControlModel ) +IMPL_CREATEINSTANCE2( UnoControlListBoxModel ) +IMPL_CREATEINSTANCE2( UnoControlNumericFieldModel ) +IMPL_CREATEINSTANCE2( UnoControlPatternFieldModel ) +IMPL_CREATEINSTANCE2( UnoControlRadioButtonModel ) +IMPL_CREATEINSTANCE2( UnoControlTimeFieldModel ) +IMPL_CREATEINSTANCE2( UnoControlProgressBarModel ) +IMPL_CREATEINSTANCE2( UnoControlScrollBarModel ) +IMPL_CREATEINSTANCE2( UnoSpinButtonModel ) +IMPL_CREATEINSTANCE2( UnoControlFixedLineModel ) +IMPL_CREATEINSTANCE2( UnoCurrencyFieldControl ) +IMPL_CREATEINSTANCE2( UnoDateFieldControl ) +IMPL_CREATEINSTANCE2( UnoDialogControl ) +IMPL_CREATEINSTANCE2( UnoEditControl ) +IMPL_CREATEINSTANCE2( UnoFileControl ) +IMPL_CREATEINSTANCE2( UnoFixedHyperlinkControl ) +IMPL_CREATEINSTANCE2( UnoFixedTextControl ) +IMPL_CREATEINSTANCE2( UnoFormattedFieldControl ) +IMPL_CREATEINSTANCE2( UnoGroupBoxControl ) +IMPL_CREATEINSTANCE2( UnoImageControlControl ) +IMPL_CREATEINSTANCE2( UnoListBoxControl ) +IMPL_CREATEINSTANCE2( UnoNumericFieldControl ) +IMPL_CREATEINSTANCE2( UnoPatternFieldControl ) +IMPL_CREATEINSTANCE2( UnoRadioButtonControl ) +IMPL_CREATEINSTANCE2( UnoTimeFieldControl ) +IMPL_CREATEINSTANCE2( UnoProgressBarControl ) +IMPL_CREATEINSTANCE2( UnoScrollBarControl ) +IMPL_CREATEINSTANCE2( UnoSpinButtonControl ) +IMPL_CREATEINSTANCE2( UnoFixedLineControl ) IMPL_CREATEINSTANCE( VCLXMenuBar ) IMPL_CREATEINSTANCE( VCLXPointer ) IMPL_CREATEINSTANCE( VCLXPopupMenu ) IMPL_CREATEINSTANCE( VCLXPrinterServer ) -IMPL_CREATEINSTANCE( UnoRoadmapControl ) -IMPL_CREATEINSTANCE( UnoControlRoadmapModel ) -IMPL_CREATEINSTANCE( UnoSimpleAnimationControl ) -IMPL_CREATEINSTANCE( UnoSimpleAnimationControlModel ) -IMPL_CREATEINSTANCE( UnoThrobberControl ) -IMPL_CREATEINSTANCE( UnoThrobberControlModel ) +IMPL_CREATEINSTANCE2( UnoRoadmapControl ) +IMPL_CREATEINSTANCE2( UnoControlRoadmapModel ) +IMPL_CREATEINSTANCE2( UnoSimpleAnimationControl ) +IMPL_CREATEINSTANCE2( UnoSimpleAnimationControlModel ) +IMPL_CREATEINSTANCE2( UnoThrobberControl ) +IMPL_CREATEINSTANCE2( UnoThrobberControlModel ) extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControlModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index da91945c0b0e..e69cab9a8368 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -212,10 +212,11 @@ Polygon VCLUnoHelper::CreatePolygon( const ::com::sun::star::uno::Sequence< sal_ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> VCLUnoHelper::CreateControlContainer( Window* pWindow ) { - UnoControlContainer* pContainer = new UnoControlContainer( pWindow->GetComponentInterface( sal_True ) ); + const uno::Reference< lang::FDXMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + UnoControlContainer* pContainer = new UnoControlContainer( xFactory, pWindow->GetComponentInterface( sal_True ) ); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > x = pContainer; - UnoControlModel* pContainerModel = new UnoControlContainerModel; + UnoControlModel* pContainerModel = new UnoControlContainerModel( xFactory ); pContainer->setModel( (::com::sun::star::awt::XControlModel*)pContainerModel ); return x; -- cgit From 09cfbd6086296a987ded9275d9dad4b607c3e38c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 6 Dec 2010 14:14:11 +0100 Subject: gridsort: give the UnoControl(Model/Base) classes a ctor taking a service factory, so we have access to the factory which created us, and don't need to resort to the process'es service factory --- forms/source/component/Filter.cxx | 14 +++++++------- forms/source/component/Filter.hxx | 1 - forms/source/richtext/richtextcontrol.cxx | 2 +- forms/source/richtext/richtextcontrol.hxx | 4 ---- forms/source/solar/component/navbarcontrol.cxx | 4 ++-- forms/source/solar/component/navbarcontrol.hxx | 4 ---- 6 files changed, 10 insertions(+), 19 deletions(-) diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index d664be8e4a86..dacfd334579c 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -104,8 +104,8 @@ namespace frm //===================================================================== //--------------------------------------------------------------------- OFilterControl::OFilterControl( const Reference< XMultiServiceFactory >& _rxORB ) - :m_aTextListeners( *this ) - ,m_aContext( _rxORB ) + :UnoControl( _rxORB ) + ,m_aTextListeners( *this ) ,m_aParser( _rxORB ) ,m_nControlClass( FormComponentType::TEXTFIELD ) ,m_bFilterList( sal_False ) @@ -132,11 +132,11 @@ namespace frm if ( !m_xFormatter.is() ) { // we can create one from the connection, if it's an SDB connection - Reference< XNumberFormatsSupplier > xFormatSupplier = ::dbtools::getNumberFormats( m_xConnection, sal_True, m_aContext.getLegacyServiceFactory() ); + Reference< XNumberFormatsSupplier > xFormatSupplier = ::dbtools::getNumberFormats( m_xConnection, sal_True, maContext.getLegacyServiceFactory() ); if ( xFormatSupplier.is() ) { - m_aContext.createComponent( "com.sun.star.util.NumberFormatter", m_xFormatter ); + maContext.createComponent( "com.sun.star.util.NumberFormatter", m_xFormatter ); if ( m_xFormatter.is() ) m_xFormatter->attachNumberFormatsSupplier( xFormatSupplier ); } @@ -354,7 +354,7 @@ namespace frm sItemText = itemPos->second; if ( sItemText.getLength() ) { - ::dbtools::OPredicateInputController aPredicateInput( m_aContext.getLegacyServiceFactory(), m_xConnection, getParseContext() ); + ::dbtools::OPredicateInputController aPredicateInput( maContext.getLegacyServiceFactory(), m_xConnection, getParseContext() ); ::rtl::OUString sErrorMessage; OSL_VERIFY( aPredicateInput.normalizePredicateString( sItemText, m_xField, &sErrorMessage ) ); } @@ -539,7 +539,7 @@ namespace frm aNewText.trim(); if ( aNewText.getLength() ) { - ::dbtools::OPredicateInputController aPredicateInput( m_aContext.getLegacyServiceFactory(), m_xConnection, getParseContext() ); + ::dbtools::OPredicateInputController aPredicateInput( maContext.getLegacyServiceFactory(), m_xConnection, getParseContext() ); ::rtl::OUString sErrorMessage; if ( !aPredicateInput.normalizePredicateString( aNewText, m_xField, &sErrorMessage ) ) { @@ -743,7 +743,7 @@ namespace frm static ::rtl::OUString s_sDialogServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.sdb.ErrorMessageDialog" ); - Reference< XExecutableDialog > xErrorDialog( m_aContext.createComponentWithArguments( s_sDialogServiceName, aArgs ), UNO_QUERY ); + Reference< XExecutableDialog > xErrorDialog( maContext.createComponentWithArguments( s_sDialogServiceName, aArgs ), UNO_QUERY ); if ( xErrorDialog.is() ) xErrorDialog->execute(); else diff --git a/forms/source/component/Filter.hxx b/forms/source/component/Filter.hxx index 99c621d6cdf6..6ebc7c49df6b 100644 --- a/forms/source/component/Filter.hxx +++ b/forms/source/component/Filter.hxx @@ -68,7 +68,6 @@ namespace frm { TextListenerMultiplexer m_aTextListeners; - ::comphelper::ComponentContext m_aContext; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xField; ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 0755510cdd48..9b37ba6d67c4 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -109,7 +109,7 @@ namespace frm DBG_NAME( ORichTextControl ) //------------------------------------------------------------------ ORichTextControl::ORichTextControl( const Reference< XMultiServiceFactory >& _rxORB ) - :m_xORB( _rxORB ) + :UnoEditControl( _rxORB ) { DBG_CTOR( ORichTextControl, NULL ); } diff --git a/forms/source/richtext/richtextcontrol.hxx b/forms/source/richtext/richtextcontrol.hxx index a3f0da71aca7..2909922cd5b0 100644 --- a/forms/source/richtext/richtextcontrol.hxx +++ b/forms/source/richtext/richtextcontrol.hxx @@ -59,10 +59,6 @@ namespace frm class ORichTextControl :public UnoEditControl ,public ORichTextControl_Base { - private: - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xORB; - public: ORichTextControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index d31727cff125..4e9b4c494fc4 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -106,7 +106,7 @@ namespace frm DBG_NAME( ONavigationBarControl ) //------------------------------------------------------------------ ONavigationBarControl::ONavigationBarControl( const Reference< XMultiServiceFactory >& _rxORB ) - :m_xORB( _rxORB ) + :UnoControl( _rxORB ) { DBG_CTOR( ONavigationBarControl, NULL ); } @@ -181,7 +181,7 @@ namespace frm } // create the peer - ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( m_xORB, pParentWin, getModel() ); + ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( maContext.getLegacyServiceFactory(), pParentWin, getModel() ); DBG_ASSERT( pPeer, "ONavigationBarControl::createPeer: invalid peer returned!" ); if ( pPeer ) // by definition, the returned component is aquired once diff --git a/forms/source/solar/component/navbarcontrol.hxx b/forms/source/solar/component/navbarcontrol.hxx index 1e7c6cd8b854..ce283a2e1611 100644 --- a/forms/source/solar/component/navbarcontrol.hxx +++ b/forms/source/solar/component/navbarcontrol.hxx @@ -56,10 +56,6 @@ namespace frm :public UnoControl ,public ONavigationBarControl_Base { - private: - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xORB; - public: ONavigationBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB -- cgit From 22b333e4aea06744493f9598f162cce451e73e21 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 6 Dec 2010 14:14:11 +0100 Subject: gridsort: give the UnoControl(Model/Base) classes a ctor taking a service factory, so we have access to the factory which created us, and don't need to resort to the process'es service factory --- svx/source/fmcomp/fmgridif.cxx | 3 ++- svx/source/form/formcontroller.cxx | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 5a033cd77d44..316be74510f6 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -365,7 +365,8 @@ Reference< XInterface > SAL_CALL FmXGridControl_NewInstance_Impl(const Reference DBG_NAME(FmXGridControl ) //------------------------------------------------------------------------------ FmXGridControl::FmXGridControl(const Reference< XMultiServiceFactory >& _rxFactory) - :m_aModifyListeners(*this, GetMutex()) + :UnoControl( _rxFactory) + ,m_aModifyListeners(*this, GetMutex()) ,m_aUpdateListeners(*this, GetMutex()) ,m_aContainerListeners(*this, GetMutex()) ,m_aSelectionListeners(*this, GetMutex()) diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index f43233ae08ba..027d199269c2 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -479,7 +479,10 @@ class FmXAutoControl: public UnoControl friend Reference< XInterface > SAL_CALL FmXAutoControl_NewInstance_Impl(); public: - FmXAutoControl(){} + FmXAutoControl( const ::comphelper::ComponentContext& i_context ) + :UnoControl( i_context.getLegacyServiceFactory() ) + { + } virtual ::rtl::OUString GetComponentServiceName() {return ::rtl::OUString::createFromAscii("Edit");} virtual void SAL_CALL createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw( RuntimeException ); @@ -1451,7 +1454,7 @@ void FormController::toggleAutoFields(sal_Bool bAutoFields) && ::comphelper::getBOOL( xField->getPropertyValue( FM_PROP_AUTOINCREMENT ) ) ) { - replaceControl( xControl, new FmXAutoControl ); + replaceControl( xControl, new FmXAutoControl( m_aContext ) ); } } } -- cgit From 9e2da7c807f6955a2eee6913f429e507f101c58e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 6 Dec 2010 14:14:11 +0100 Subject: gridsort: give the UnoControl(Model/Base) classes a ctor taking a service factory, so we have access to the factory which created us, and don't need to resort to the process'es service factory --- dbaccess/source/ui/uno/ColumnControl.cxx | 4 ++-- dbaccess/source/ui/uno/ColumnControl.hxx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx index 6d9d1eba083a..53e6f5907401 100644 --- a/dbaccess/source/ui/uno/ColumnControl.cxx +++ b/dbaccess/source/ui/uno/ColumnControl.cxx @@ -61,7 +61,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; OColumnControl::OColumnControl(const Reference& _rxFactory) -: m_xORB(_rxFactory) + :UnoControl( _rxFactory ) { } // ----------------------------------------------------------------------------- @@ -87,7 +87,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit pParentWin = pParent->GetWindow(); } - OColumnPeer* pPeer = new OColumnPeer(pParentWin,m_xORB); + OColumnPeer* pPeer = new OColumnPeer( pParentWin, maContext.getLegacyServiceFactory() ); OSL_ENSURE(pPeer != NULL, "FmXGridControl::createPeer : imp_CreatePeer didn't return a peer !"); setPeer( pPeer ); diff --git a/dbaccess/source/ui/uno/ColumnControl.hxx b/dbaccess/source/ui/uno/ColumnControl.hxx index 866eba99b18c..4d2a7de9829d 100644 --- a/dbaccess/source/ui/uno/ColumnControl.hxx +++ b/dbaccess/source/ui/uno/ColumnControl.hxx @@ -38,7 +38,6 @@ namespace dbaui { class OColumnControl : public UnoControl { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB; public: OColumnControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); -- cgit From 6d85cb5f029b0c3ac8e597d02e5875974dc9757f Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 6 Dec 2010 15:21:36 +0100 Subject: vcl118: #i115905# improved clip region interface on SAL layer (part 3, X11 implementation) --- vcl/inc/vcl/dllapi.h | 6 +++ vcl/inc/vcl/region.hxx | 4 +- vcl/unx/gtk/app/gtkdata.cxx | 6 ++- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 25 ++-------- vcl/unx/headless/svpgdi.cxx | 50 +++++++++---------- vcl/unx/headless/svpgdi.hxx | 5 +- vcl/unx/headless/svppspgraphics.cxx | 36 +++++++------- vcl/unx/headless/svppspgraphics.hxx | 5 +- vcl/unx/inc/plugins/gtk/gtkgdi.hxx | 5 +- vcl/unx/inc/pspgraphics.h | 5 +- vcl/unx/inc/salgdi.h | 7 +-- vcl/unx/source/gdi/pspgraphics.cxx | 36 +++++++------- vcl/unx/source/gdi/salgdi.cxx | 84 +++++++++++++++----------------- vcl/unx/source/gdi/salgdi2.cxx | 12 ++--- vcl/unx/source/gdi/salgdi3.cxx | 24 ++++----- 15 files changed, 136 insertions(+), 174 deletions(-) diff --git a/vcl/inc/vcl/dllapi.h b/vcl/inc/vcl/dllapi.h index bcf4001aa671..2c5c2c6801ac 100644 --- a/vcl/inc/vcl/dllapi.h +++ b/vcl/inc/vcl/dllapi.h @@ -37,4 +37,10 @@ #define VCL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT #endif +#if defined UNX && ! defined MACOS +#define VCL_PLUGIN_PUBLIC VCL_DLLPUBLIC +#else +#define VCL_PLUGIN_PUBLIC SAL_DLLPRIVATE +#endif + #endif diff --git a/vcl/inc/vcl/region.hxx b/vcl/inc/vcl/region.hxx index ed1dc27f85eb..c33144a45d36 100755 --- a/vcl/inc/vcl/region.hxx +++ b/vcl/inc/vcl/region.hxx @@ -78,9 +78,9 @@ private: SAL_DLLPRIVATE void ImplXOrPolyPolygon( const Region& ); public: // public within vcl - SAL_DLLPRIVATE BOOL ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo, + VCL_PLUGIN_PUBLIC BOOL ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo, long& nX, long& nY, long& nWidth, long& nHeight ) const; - SAL_DLLPRIVATE BOOL ImplGetNextRect( ImplRegionInfo& rImplRegionInfo, + VCL_PLUGIN_PUBLIC BOOL ImplGetNextRect( ImplRegionInfo& rImplRegionInfo, long& nX, long& nY, long& nWidth, long& nHeight ) const; #ifdef DBG_UTIL friend const char* ImplDbgTestRegion( const void* pObj ); diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index f308822df147..a031c3dc242e 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -246,13 +246,15 @@ int GtkSalDisplay::GetDefaultMonitorNumber() const int n = 0; GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, m_nDefaultScreen ); #if GTK_CHECK_VERSION(2,20,0) - n = m_aXineramaScreenIndexMap[gdk_screen_get_primary_monitor(pScreen)]; + n = gdk_screen_get_primary_monitor(pScreen); #else static screen_get_primary_monitor sym_gdk_screen_get_primary_monitor = (screen_get_primary_monitor)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_primary_monitor" ); if (sym_gdk_screen_get_primary_monitor) - n = m_aXineramaScreenIndexMap[sym_gdk_screen_get_primary_monitor( pScreen )]; + n = sym_gdk_screen_get_primary_monitor( pScreen ); #endif + if( n >= 0 && size_t(n) < m_aXineramaScreenIndexMap.size() ) + n = m_aXineramaScreenIndexMap[n]; return n; } diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 318f593ac6a3..812394b488ce 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -479,30 +479,13 @@ void GtkSalGraphics::ResetClipRegion() X11SalGraphics::ResetClipRegion(); } -void GtkSalGraphics::BeginSetClipRegion( ULONG nCount ) -{ - m_aClipRegion.SetNull(); - X11SalGraphics::BeginSetClipRegion( nCount ); -} - -BOOL GtkSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight ) -{ - Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) ); - m_aClipRegion.Union( aRect ); - return X11SalGraphics::unionClipRegion( nX, nY, nWidth, nHeight ); -} - -bool GtkSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; -} - -void GtkSalGraphics::EndSetClipRegion() +bool GtkSalGraphics::setClipRegion( const Region& i_rClip ) { + m_aClipRegion = i_rClip; + bool bRet = X11SalGraphics::setClipRegion( m_aClipRegion ); if( m_aClipRegion.IsEmpty() ) m_aClipRegion.SetNull(); - X11SalGraphics::EndSetClipRegion(); + return bRet; } void GtkSalGraphics::copyBits( const SalTwoRect* pPosAry, diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx index 68d8be7cb4eb..01a953987640 100644 --- a/vcl/unx/headless/svpgdi.cxx +++ b/vcl/unx/headless/svpgdi.cxx @@ -29,6 +29,7 @@ #include "svpbmp.hxx" #include +#include #include #include #include @@ -152,11 +153,16 @@ void SvpSalGraphics::ResetClipRegion() m_aClipMap.reset(); } -void SvpSalGraphics::BeginSetClipRegion( ULONG n ) +bool SvpSalGraphics::setClipRegion( const Region& i_rClip ) { - if( n <= 1 ) + if( i_rClip.IsEmpty() ) + m_aClipMap.reset(); + else if( i_rClip.GetRectCount() == 1 ) { m_aClipMap.reset(); + Rectangle aBoundRect( i_rClip.GetBoundRect() ); + m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice, + basegfx::B2IRange(aBoundRect.Left(),aBoundRect.Top(),aBoundRect.Right(),aBoundRect.Bottom()) ); } else { @@ -164,34 +170,22 @@ void SvpSalGraphics::BeginSetClipRegion( ULONG n ) B2IVector aSize = m_aDevice->getSize(); m_aClipMap = createBitmapDevice( aSize, false, Format::ONE_BIT_MSB_GREY ); m_aClipMap->clear( basebmp::Color(0xFFFFFFFF) ); - } -} -BOOL SvpSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight ) -{ - if( m_aClipMap ) - { - B2DPolyPolygon aFull; - aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nWidth, nY+nHeight ) ) ); - m_aClipMap->fillPolyPolygon( aFull, basebmp::Color(0), DrawMode_PAINT ); - } - else - { - m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice, - basegfx::B2IRange(nX,nY,nX+nWidth,nY+nHeight) ); + ImplRegionInfo aInfo; + long nX, nY, nW, nH; + bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH ); + while( bRegionRect ) + { + if ( nW && nH ) + { + B2DPolyPolygon aFull; + aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nW, nY+nH ) ) ); + m_aClipMap->fillPolyPolygon( aFull, basebmp::Color(0), DrawMode_PAINT ); + } + bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH ); + } } - - return TRUE; -} - -bool SvpSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; -} - -void SvpSalGraphics::EndSetClipRegion() -{ + return true; } void SvpSalGraphics::SetLineColor() diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx index 93ec080d0136..9d26d576a664 100644 --- a/vcl/unx/headless/svpgdi.hxx +++ b/vcl/unx/headless/svpgdi.hxx @@ -68,10 +68,7 @@ public: virtual long GetGraphicsWidth() const; virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nCount ); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - virtual void EndSetClipRegion(); + virtual bool setClipRegion( const Region& ); virtual void SetLineColor(); virtual void SetLineColor( SalColor nSalColor ); diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx index c7b1f4f41fca..ad3cc099157f 100644 --- a/vcl/unx/headless/svppspgraphics.cxx +++ b/vcl/unx/headless/svppspgraphics.cxx @@ -43,6 +43,7 @@ #include "vcl/svapp.hxx" #include "vcl/salprn.hxx" #include "vcl/sysdata.hxx" +#include "vcl/region.h" #include "basegfx/vector/b2ivector.hxx" #include "basegfx/point/b2ipoint.hxx" @@ -216,28 +217,27 @@ long PspGraphics::GetGraphicsWidth() const void PspGraphics::ResetClipRegion() { - m_pPrinterGfx->ResetClipRegion (); + m_pPrinterGfx->ResetClipRegion(); } -void PspGraphics::BeginSetClipRegion( ULONG n ) +bool PspGraphics::setClipRegion( const Region& i_rClip ) { - m_pPrinterGfx->BeginSetClipRegion(n); -} - -BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) -{ - return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY); -} + // TODO: support polygonal clipregions here + m_pPrinterGfx->BeginSetClipRegion( i_rClip.GetRectCount() ); -bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; -} - -void PspGraphics::EndSetClipRegion() -{ - m_pPrinterGfx->EndSetClipRegion (); + ImplRegionInfo aInfo; + long nX, nY, nW, nH; + bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH ); + while( bRegionRect ) + { + if ( nW && nH ) + { + m_pPrinterGfx->UnionClipRegion( nX, nY, nW, nH ); + } + bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH ); + } + m_pPrinterGfx->EndSetClipRegion(); + return true; } void PspGraphics::SetLineColor() diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx index 138198239621..ba60a50dedeb 100644 --- a/vcl/unx/headless/svppspgraphics.hxx +++ b/vcl/unx/headless/svppspgraphics.hxx @@ -90,10 +90,7 @@ public: virtual long GetGraphicsWidth() const; virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nCount ); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - virtual void EndSetClipRegion(); + virtual bool setClipRegion( const Region& ); virtual void SetLineColor(); virtual void SetLineColor( SalColor nSalColor ); diff --git a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx index 38c79b3e11df..7729d14a42fe 100644 --- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx +++ b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx @@ -78,11 +78,8 @@ public: //helper methods for frame's UpdateSettings void updateSettings( AllSettings& rSettings ); + virtual bool setClipRegion( const Region& ); virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nCount ); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - virtual void EndSetClipRegion(); // some themes set the background pixmap of our window EVERY time // a control is painted; but presentation effects need diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h index d4f5a9f156e0..a4f5bbf86d5f 100644 --- a/vcl/unx/inc/pspgraphics.h +++ b/vcl/unx/inc/pspgraphics.h @@ -87,10 +87,7 @@ public: virtual long GetGraphicsWidth() const; virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nCount ); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - virtual void EndSetClipRegion(); + virtual bool setClipRegion( const Region& ); virtual void SetLineColor(); virtual void SetLineColor( SalColor nSalColor ); diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h index b5fdce50eee9..a43ff9dc363b 100644 --- a/vcl/unx/inc/salgdi.h +++ b/vcl/unx/inc/salgdi.h @@ -93,7 +93,7 @@ protected: CairoFontsCache m_aCairoFontsCache; XLIB_Region pPaintRegion_; - XLIB_Region pClipRegion_; + XLIB_Region mpClipRegion; GC pPenGC_; // Pen attributes SalColor nPenColor_; @@ -235,10 +235,7 @@ public: virtual long GetGraphicsHeight() const; virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nCount ); - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); - virtual void EndSetClipRegion(); + virtual bool setClipRegion( const Region& ); virtual void SetLineColor(); virtual void SetLineColor( SalColor nSalColor ); diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx index bab78b0cb2df..d1d78f5f390b 100644 --- a/vcl/unx/source/gdi/pspgraphics.cxx +++ b/vcl/unx/source/gdi/pspgraphics.cxx @@ -41,6 +41,7 @@ #include "vcl/svapp.hxx" #include "vcl/salprn.hxx" #include "vcl/sysdata.hxx" +#include "vcl/region.h" #include #include @@ -290,28 +291,27 @@ long PspGraphics::GetGraphicsWidth() const void PspGraphics::ResetClipRegion() { - m_pPrinterGfx->ResetClipRegion (); + m_pPrinterGfx->ResetClipRegion(); } -void PspGraphics::BeginSetClipRegion( ULONG n ) +bool PspGraphics::setClipRegion( const Region& i_rClip ) { - m_pPrinterGfx->BeginSetClipRegion(n); -} - -BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) -{ - return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY); -} + // TODO: support polygonal clipregions here + m_pPrinterGfx->BeginSetClipRegion( i_rClip.GetRectCount() ); -bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; -} - -void PspGraphics::EndSetClipRegion() -{ - m_pPrinterGfx->EndSetClipRegion (); + ImplRegionInfo aInfo; + long nX, nY, nW, nH; + bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH ); + while( bRegionRect ) + { + if ( nW && nH ) + { + m_pPrinterGfx->UnionClipRegion( nX, nY, nW, nH ); + } + bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH ); + } + m_pPrinterGfx->EndSetClipRegion(); + return true; } void PspGraphics::SetLineColor() diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 9215f2e25b16..cd8df8439247 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -40,6 +40,7 @@ #include "vcl/printergfx.hxx" #include "vcl/jobdata.hxx" +#include "vcl/region.h" #include "tools/debug.hxx" @@ -104,7 +105,7 @@ X11SalGraphics::X11SalGraphics() m_aRenderPicture = 0; m_pRenderFormat = NULL; - pClipRegion_ = NULL; + mpClipRegion = NULL; pPaintRegion_ = NULL; pPenGC_ = NULL; @@ -170,7 +171,7 @@ void X11SalGraphics::freeResources() Display *pDisplay = GetXDisplay(); DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" ); - if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ), pClipRegion_ = None; + if( mpClipRegion ) XDestroyRegion( mpClipRegion ), mpClipRegion = None; if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None; if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ), pPenGC_ = None; @@ -260,8 +261,8 @@ void X11SalGraphics::SetClipRegion( GC pGC, XLIB_Region pXReg ) const int n = 0; XLIB_Region Regions[3]; - if( pClipRegion_ /* && !XEmptyRegion( pClipRegion_ ) */ ) - Regions[n++] = pClipRegion_; + if( mpClipRegion /* && !XEmptyRegion( mpClipRegion ) */ ) + Regions[n++] = mpClipRegion; // if( pPaintRegion_ /* && !XEmptyRegion( pPaintRegion_ ) */ ) // Regions[n++] = pPaintRegion_; @@ -579,7 +580,7 @@ long X11SalGraphics::GetGraphicsHeight() const // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void X11SalGraphics::ResetClipRegion() { - if( pClipRegion_ ) + if( mpClipRegion ) { bPenGC_ = FALSE; bFontGC_ = FALSE; @@ -591,46 +592,36 @@ void X11SalGraphics::ResetClipRegion() bStippleGC_ = FALSE; bTrackingGC_ = FALSE; - XDestroyRegion( pClipRegion_ ); - pClipRegion_ = NULL; + XDestroyRegion( mpClipRegion ); + mpClipRegion = NULL; } } -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::BeginSetClipRegion( ULONG ) -{ - if( pClipRegion_ ) - XDestroyRegion( pClipRegion_ ); - pClipRegion_ = XCreateRegion(); -} - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) +bool X11SalGraphics::setClipRegion( const Region& i_rClip ) { - if (!nDX || !nDY) - return TRUE; - - XRectangle aRect; - aRect.x = (short)nX; - aRect.y = (short)nY; - aRect.width = (unsigned short)nDX; - aRect.height = (unsigned short)nDY; - - XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ ); - - return TRUE; -} + if( mpClipRegion ) + XDestroyRegion( mpClipRegion ); + mpClipRegion = XCreateRegion(); + + ImplRegionInfo aInfo; + long nX, nY, nW, nH; + bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH ); + while( bRegionRect ) + { + if ( nW && nH ) + { + XRectangle aRect; + aRect.x = (short)nX; + aRect.y = (short)nY; + aRect.width = (unsigned short)nW; + aRect.height = (unsigned short)nH; -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -bool X11SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; -} + XUnionRectWithRegion( &aRect, mpClipRegion, mpClipRegion ); + } + bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH ); + } -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::EndSetClipRegion() -{ + // done, invalidate GCs bPenGC_ = FALSE; bFontGC_ = FALSE; bBrushGC_ = FALSE; @@ -641,11 +632,12 @@ void X11SalGraphics::EndSetClipRegion() bStippleGC_ = FALSE; bTrackingGC_ = FALSE; - if( XEmptyRegion( pClipRegion_ ) ) + if( XEmptyRegion( mpClipRegion ) ) { - XDestroyRegion( pClipRegion_ ); - pClipRegion_= NULL; + XDestroyRegion( mpClipRegion ); + mpClipRegion= NULL; } + return true; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -1054,8 +1046,8 @@ XID X11SalGraphics::GetXRenderPicture() #if 0 // setup clipping so the callers don't have to do it themselves // TODO: avoid clipping if already set correctly - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); + if( mpClipRegion && !XEmptyRegion( mpClipRegion ) ) + rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion ); else #endif { @@ -1192,8 +1184,8 @@ bool X11SalGraphics::drawFilledTrapezoids( const ::basegfx::B2DTrapezoid* pB2DTr // set clipping // TODO: move into GetXRenderPicture? - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); + if( mpClipRegion && !XEmptyRegion( mpClipRegion ) ) + rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion ); // render the trapezoids const XRenderPictFormat* pMaskFormat = rRenderPeer.GetStandardFormatA8(); diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx index 1cb2abbedf43..6cf1c3e1f470 100644 --- a/vcl/unx/source/gdi/salgdi2.cxx +++ b/vcl/unx/source/gdi/salgdi2.cxx @@ -308,8 +308,8 @@ int X11SalGraphics::Clip( int &nX, && RectangleOut == Clip( pPaintRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) ) return RectangleOut; - if( pClipRegion_ - && RectangleOut == Clip( pClipRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) ) + if( mpClipRegion + && RectangleOut == Clip( mpClipRegion, nX, nY, nDX, nDY, nSrcX, nSrcY ) ) return RectangleOut; int nPaint; @@ -323,9 +323,9 @@ int X11SalGraphics::Clip( int &nX, nPaint = RectangleIn; int nClip; - if( pClipRegion_ ) + if( mpClipRegion ) { - nClip = XRectInRegion( pClipRegion_, nX, nY, nDX, nDY ); + nClip = XRectInRegion( mpClipRegion, nX, nY, nDX, nDY ); if( RectangleOut == nClip ) return RectangleOut; } @@ -888,8 +888,8 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, return false; // set clipping - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); + if( mpClipRegion && !XEmptyRegion( mpClipRegion ) ) + rPeer.SetPictureClipRegion( aDstPic, mpClipRegion ); // paint source * mask over destination picture rPeer.CompositePicture( PictOpOver, aSrcPic, aAlphaPic, aDstPic, diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index 62e575ebc5ef..670966f1c2ea 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -1016,16 +1016,16 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout ) if (const void *pOptions = Application::GetSettings().GetStyleSettings().GetCairoFontOptions()) rCairo.set_font_options( cr, pOptions); - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - { - for (long i = 0; i < pClipRegion_->numRects; ++i) + if( mpClipRegion && !XEmptyRegion( mpClipRegion ) ) { + for (long i = 0; i < mpClipRegion->numRects; ++i) + { rCairo.rectangle(cr, - pClipRegion_->rects[i].x1, - pClipRegion_->rects[i].y1, - pClipRegion_->rects[i].x2 - pClipRegion_->rects[i].x1, - pClipRegion_->rects[i].y2 - pClipRegion_->rects[i].y1); - } + mpClipRegion->rects[i].x1, + mpClipRegion->rects[i].y1, + mpClipRegion->rects[i].x2 - mpClipRegion->rects[i].x1, + mpClipRegion->rects[i].y2 - mpClipRegion->rects[i].y1); + } rCairo.clip(cr); } @@ -1109,8 +1109,8 @@ void X11SalGraphics::DrawServerAAFontString( const ServerFontLayout& rLayout ) // set clipping // TODO: move into GetXRenderPicture()? - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); + if( mpClipRegion && !XEmptyRegion( mpClipRegion ) ) + rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion ); ServerFont& rFont = rLayout.GetServerFont(); X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); @@ -1193,10 +1193,10 @@ bool X11SalGraphics::DrawServerAAForcedString( const ServerFontLayout& rLayout ) else if( m_pVDev ) nWidth = m_pVDev->GetWidth(), nHeight = m_pVDev->GetHeight(); - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) + if( mpClipRegion && !XEmptyRegion( mpClipRegion ) ) { // get bounding box - XClipBox( pClipRegion_, &aXRect ); + XClipBox( mpClipRegion, &aXRect ); // clip with window if( aXRect.x < 0 ) aXRect.x = 0; -- cgit From 3a6b23954f4a19158fdfab283f2f4c55e46be67d Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 6 Dec 2010 15:27:52 +0100 Subject: vcl118: #i115905# improved clip region interface on SAL layer (part 4, OS2 implementation) --- vcl/os2/inc/salgdi.h | 8 +------ vcl/os2/source/gdi/salgdi.cxx | 50 +++++++++++++++++++------------------------ 2 files changed, 23 insertions(+), 35 deletions(-) diff --git a/vcl/os2/inc/salgdi.h b/vcl/os2/inc/salgdi.h index 94b2b98b4183..1c9b66d89a0b 100644 --- a/vcl/os2/inc/salgdi.h +++ b/vcl/os2/inc/salgdi.h @@ -151,8 +151,6 @@ public: virtual ~Os2SalGraphics(); protected: - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); - virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); // draw --> LineColor and FillColor and RasterOp and ClipRegion virtual void drawPixel( long nX, long nY ); virtual void drawPixel( long nX, long nY, SalColor nSalColor ); @@ -226,11 +224,7 @@ public: // set the clip region to empty virtual void ResetClipRegion(); - // begin setting the clip region, add rectangles to the - // region with the UnionClipRegion call - virtual void BeginSetClipRegion( ULONG nCount ); - // all rectangles were added and the clip region should be set now - virtual void EndSetClipRegion(); + virtual bool setClipRegion( const Region& ); // set the line color to transparent (= don't draw lines) virtual void SetLineColor(); diff --git a/vcl/os2/source/gdi/salgdi.cxx b/vcl/os2/source/gdi/salgdi.cxx index dff1557170fb..069abb1026e3 100644 --- a/vcl/os2/source/gdi/salgdi.cxx +++ b/vcl/os2/source/gdi/salgdi.cxx @@ -38,6 +38,7 @@ #ifndef _RTL_STRINGBUF_HXX #include #endif +#include "vcl/region.h" #ifndef __H_FT2LIB #include @@ -217,38 +218,29 @@ void Os2SalGraphics::ResetClipRegion() // ----------------------------------------------------------------------- -void Os2SalGraphics::BeginSetClipRegion( ULONG nCount ) +bool Os2SalGraphics::setClipRegion( const Region& i_rClip ) { + ULONG nCount = i_rClip.GetRectCount(); + mpClipRectlAry = new RECTL[ nCount ]; mnClipElementCount = 0; -} - -// ----------------------------------------------------------------------- -BOOL Os2SalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight ) -{ - RECTL* pClipRect = &mpClipRectlAry[ mnClipElementCount ]; - pClipRect->xLeft = nX; - pClipRect->yTop = mnHeight - nY; - pClipRect->xRight = nX + nWidth; - pClipRect->yBottom = mnHeight - (nY + nHeight); - mnClipElementCount++; - - return TRUE; -} - -// ----------------------------------------------------------------------- - -bool Os2SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) -{ - // TODO: implement and advertise OutDevSupport_B2DClip support - return false; -} - -// ----------------------------------------------------------------------- - -void Os2SalGraphics::EndSetClipRegion() -{ + ImplRegionInfo aInfo; + long nX, nY, nW, nH; + bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH ); + while( bRegionRect ) + { + if ( nW && nH ) + { + RECTL* pClipRect = &mpClipRectlAry[ mnClipElementCount ]; + pClipRect->xLeft = nX; + pClipRect->yTop = mnHeight - nY; + pClipRect->xRight = nX + nW; + pClipRect->yBottom = mnHeight - (nY + nH); + mnClipElementCount++; + } + bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH ); + } #ifdef SAL_PRINTER_CLIPPATH if ( mbPrinter ) { @@ -287,6 +279,8 @@ void Os2SalGraphics::EndSetClipRegion() } delete [] mpClipRectlAry; + + return true; } // ----------------------------------------------------------------------- -- cgit From 62364aa5411b5ac6ed1169748706b26a704d8ecc Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 6 Dec 2010 17:02:05 +0100 Subject: vcl118: fix a warning --- vcl/unx/inc/salgdi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h index a43ff9dc363b..72b3766d9bb0 100644 --- a/vcl/unx/inc/salgdi.h +++ b/vcl/unx/inc/salgdi.h @@ -137,6 +137,7 @@ protected: bool bXORMode_ : 1; // is ROP XOR Mode set BOOL bDitherBrush_ : 1; // is solid or tile + using SalGraphics::SetClipRegion; void SetClipRegion( GC pGC, XLIB_Region pXReg = NULL ) const; -- cgit From 6019b3a2c1d014e46e3c603a1612fd8997966db5 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 6 Dec 2010 17:06:23 +0100 Subject: vcl118: fix dll exports --- vcl/inc/vcl/print.hxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index 810fbd353f8c..b5595f2cde20 100644 --- a/vcl/inc/vcl/print.hxx +++ b/vcl/inc/vcl/print.hxx @@ -514,24 +514,24 @@ public: bool isDirectPrint() const; // implementation details, not usable outside vcl - // don't use outside vcl. Some of these ar exported for + // don't use outside vcl. Some of these are exported for // the benefit of vcl's plugins. // Still: DO NOT USE OUTSIDE VCL - int getFilteredPageCount(); + VCL_PLUGIN_PUBLIC int getFilteredPageCount(); SAL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf, bool i_bMayUseCache = false ); - PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false ); + VCL_PLUGIN_PUBLIC PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false ); SAL_DLLPRIVATE void printFilteredPage( int i_nPage ); SAL_DLLPRIVATE void setPrinter( const boost::shared_ptr& ); SAL_DLLPRIVATE void setOptionChangeHdl( const Link& ); - void createProgressDialog(); - bool isProgressCanceled() const; + VCL_PLUGIN_PUBLIC void createProgressDialog(); + VCL_PLUGIN_PUBLIC bool isProgressCanceled() const; SAL_DLLPRIVATE void setMultipage( const MultiPageSetup& ); SAL_DLLPRIVATE const MultiPageSetup& getMultipage() const; - void setLastPage( sal_Bool i_bLastPage ); + VCL_PLUGIN_PUBLIC void setLastPage( sal_Bool i_bLastPage ); SAL_DLLPRIVATE void setReversePrint( sal_Bool i_bReverse ); SAL_DLLPRIVATE bool getReversePrint() const; SAL_DLLPRIVATE void pushPropertiesToPrinter(); - void setJobState( com::sun::star::view::PrintableState ); + VCL_PLUGIN_PUBLIC void setJobState( com::sun::star::view::PrintableState ); SAL_DLLPRIVATE bool setupPrinter( Window* i_pDlgParent ); SAL_DLLPRIVATE int getPageCountProtected() const; -- cgit From bbef9c4dba3edbf69052229fc02f57301a1545e9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 7 Dec 2010 09:51:12 +0100 Subject: gridsort: re-enabled those tests --- toolkit/prj/build.lst | 4 +- .../qa/complex/toolkit/AccessibleStatusBar.java | 338 +++++++ .../complex/toolkit/AccessibleStatusBarItem.java | 381 ++++++++ toolkit/qa/complex/toolkit/CallbackClass.java | 67 -- .../complex/toolkit/CheckAccessibleStatusBar.java | 379 ------- .../toolkit/CheckAccessibleStatusBarItem.java | 439 --------- toolkit/qa/complex/toolkit/CheckAsyncCallback.java | 156 --- toolkit/qa/complex/toolkit/UnitConversion.java | 244 +++++ .../qa/complex/toolkit/_XAccessibleComponent.java | 499 ---------- .../qa/complex/toolkit/_XAccessibleContext.java | 273 ------ .../toolkit/_XAccessibleEventBroadcaster.java | 214 ---- .../toolkit/_XAccessibleExtendedComponent.java | 101 -- toolkit/qa/complex/toolkit/_XAccessibleText.java | 1033 -------------------- toolkit/qa/complex/toolkit/_XRequestCallback.java | 88 -- .../accessibility/_XAccessibleComponent.java | 498 ++++++++++ .../toolkit/accessibility/_XAccessibleContext.java | 273 ++++++ .../_XAccessibleEventBroadcaster.java | 204 ++++ .../_XAccessibleExtendedComponent.java | 101 ++ .../toolkit/accessibility/_XAccessibleText.java | 1033 ++++++++++++++++++++ .../qa/complex/toolkit/interface_tests/makefile.mk | 57 -- toolkit/qa/complex/toolkit/makefile.mk | 117 +-- .../xunitconversion/XUnitConversionTest.java | 250 ----- toolkit/qa/complex/xunitconversion/makefile.mk | 52 - toolkit/source/controls/grid/gridcontrol.cxx | 11 +- toolkit/source/helper/vclunohelper.cxx | 2 +- 25 files changed, 3123 insertions(+), 3691 deletions(-) create mode 100755 toolkit/qa/complex/toolkit/AccessibleStatusBar.java create mode 100755 toolkit/qa/complex/toolkit/AccessibleStatusBarItem.java delete mode 100644 toolkit/qa/complex/toolkit/CallbackClass.java delete mode 100755 toolkit/qa/complex/toolkit/CheckAccessibleStatusBar.java delete mode 100755 toolkit/qa/complex/toolkit/CheckAccessibleStatusBarItem.java delete mode 100644 toolkit/qa/complex/toolkit/CheckAsyncCallback.java create mode 100644 toolkit/qa/complex/toolkit/UnitConversion.java delete mode 100755 toolkit/qa/complex/toolkit/_XAccessibleComponent.java delete mode 100755 toolkit/qa/complex/toolkit/_XAccessibleContext.java delete mode 100755 toolkit/qa/complex/toolkit/_XAccessibleEventBroadcaster.java delete mode 100755 toolkit/qa/complex/toolkit/_XAccessibleExtendedComponent.java delete mode 100755 toolkit/qa/complex/toolkit/_XAccessibleText.java delete mode 100644 toolkit/qa/complex/toolkit/_XRequestCallback.java create mode 100755 toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java create mode 100755 toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java create mode 100755 toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java create mode 100755 toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java create mode 100755 toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java delete mode 100755 toolkit/qa/complex/toolkit/interface_tests/makefile.mk delete mode 100644 toolkit/qa/complex/xunitconversion/XUnitConversionTest.java delete mode 100644 toolkit/qa/complex/xunitconversion/makefile.mk diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index f4854de8e0c4..d7e4b24c8b02 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -14,9 +14,7 @@ ti toolkit\util nmake - all ti_util ti_awt ti_controls ti_layout_core ti_h ti toolkit\qa\unoapi nmake - all ti_qa_unoapi NULL +ti toolkit\qa\complex\toolkit nmake - all ti_complex_toolkit NULL # fail on unxsoli4 #ti toolkit\qa\complex\xunitconversion nmake - all ti_complex_conv ti_util NULL - -# fails -# ti toolkit\qa\complex\toolkit nmake - all ti_complex_ti ti_qa_complex_toolkit_interface_tests ti_util NULL diff --git a/toolkit/qa/complex/toolkit/AccessibleStatusBar.java b/toolkit/qa/complex/toolkit/AccessibleStatusBar.java new file mode 100755 index 000000000000..d4f2329d8f31 --- /dev/null +++ b/toolkit/qa/complex/toolkit/AccessibleStatusBar.java @@ -0,0 +1,338 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.toolkit; + +import complex.toolkit.accessibility._XAccessibleEventBroadcaster; +import complex.toolkit.accessibility._XAccessibleExtendedComponent; +import complex.toolkit.accessibility._XAccessibleComponent; +import complex.toolkit.accessibility._XAccessibleContext; +import java.util.logging.Logger; +import java.util.logging.Level; +import util.SOfficeFactory; +import util.AccessibilityTools; +import com.sun.star.awt.XWindow; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.sheet.XSpreadsheetDocument; +import com.sun.star.text.XTextDocument; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.util.XCloseable; +import com.sun.star.accessibility.AccessibleRole; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.awt.XExtendedToolkit; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; + +/** + * + */ +public class AccessibleStatusBar { + + XInterface testObject = null; + XMultiServiceFactory xMSF = null; + XWindow xWindow = null; + + private XMultiServiceFactory getMSF() + { + final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); + return xMSF1; + } + + + /** + * Sleeps for 0.5 sec. to allow StarOffice to react on + * reset call. + */ + private void shortWait() { + try { + Thread.sleep(500) ; + } catch (InterruptedException e) { + System.out.println("While waiting :" + e) ; + } + } + + /** + * Check document types + */ + @Test + public void checkDocs() { + checkWriterDoc(); + checkMathDoc(); + checkDrawDoc(); + checkImpressDoc(); + checkCalcDoc(); + } + + /** + * Test the interfaces on a writer document + */ + public void checkWriterDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XTextDocument xTextDoc = null; + try { + System.out.println("****** Open a new writer document"); + xTextDoc = xSOF.createTextDoc("_blank"); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xTextDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xTextDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + + /** + * Test the interfaces on a math document + */ + public void checkMathDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XComponent xMathDoc = null; + try { + System.out.println("****** Open a new math document"); + xMathDoc = xSOF.createMathDoc("_blank"); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xMathDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xMathDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + + /** + * Test the interfaces on a draw document + */ + public void checkDrawDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XComponent xDrawDoc = null; + try { + System.out.println("****** Open a new draw document"); + xDrawDoc = xSOF.createDrawDoc("_blank"); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xDrawDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xDrawDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + + /** + * Test the interfaces on an impress document + */ + public void checkImpressDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XComponent xImpressDoc = null; + try { + System.out.println("****** Open a new impress document"); + xImpressDoc = xSOF.createImpressDoc("_blank"); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xImpressDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xImpressDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + /** + * Test the interfaces on an calc document + */ + public void checkCalcDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XSpreadsheetDocument xSpreadsheetDoc = null; + try { + System.out.println("****** Open a new calc document"); + xSpreadsheetDoc = xSOF.createCalcDoc("_blank"); + shortWait(); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xSpreadsheetDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xSpreadsheetDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + + public void getTestObject() { + try { + XInterface xIfc = (XInterface) xMSF.createInstance( + "com.sun.star.awt.Toolkit") ; + XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class, xIfc); + + shortWait(); + xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); + + shortWait(); + XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); + XAccessibleContext parentContext = null; + + System.out.println("Get the accessible status bar."); + parentContext = AccessibilityTools.getAccessibleObjectForRole( + xRoot, AccessibleRole.STATUS_BAR, ""); + shortWait(); + System.out.println("...OK."); + + XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, parentContext); + String[] services = xSI.getSupportedServiceNames(); + System.out.println("*****"); + System.out.println("* Implementation Name: " + xSI.getImplementationName()); + for (int i=0; i + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.toolkit; + +import java.util.logging.Logger; +import java.util.logging.Level; +import complex.toolkit.accessibility._XAccessibleEventBroadcaster; +import complex.toolkit.accessibility._XAccessibleExtendedComponent; +import complex.toolkit.accessibility._XAccessibleText; +import complex.toolkit.accessibility._XAccessibleComponent; +import complex.toolkit.accessibility._XAccessibleContext; +import util.SOfficeFactory; +import util.AccessibilityTools; +import com.sun.star.awt.XWindow; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.sheet.XSpreadsheetDocument; +import com.sun.star.text.XTextDocument; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.util.XCloseable; +import com.sun.star.accessibility.AccessibleRole; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.awt.XExtendedToolkit; + + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; + +/** + * + */ +public class AccessibleStatusBarItem { + + XMultiServiceFactory xMSF = null; + XAccessibleContext testObject = null; + XWindow xWindow = null; + + /** + * Sleeps for a certain time. + * @param Thread is sleeping for this time in milliseconds. + */ + private void shortWait() { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + System.out.println("While waiting :" + e) ; + } + } + + /** + * Check document types + */ + @Test + public void checkDocs() + { + checkWriterDoc(); + checkMathDoc(); + checkDrawDoc(); + checkImpressDoc(); + checkCalcDoc(); + } + + private XMultiServiceFactory getMSF() + { + final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); + return xMSF1; + } + + /** + * Test the interfaces on a writer document + */ + private void checkWriterDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XTextDocument xTextDoc = null; + try { + System.out.println("****** Open a new writer document"); + xTextDoc = xSOF.createTextDoc("_blank"); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xTextDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xTextDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + + /** + * Test the interfaces on a math document + */ + public void checkMathDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XComponent xMathDoc = null; + try { + System.out.println("****** Open a new math document"); + xMathDoc = xSOF.createMathDoc("_blank"); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xMathDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xMathDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + + /** + * Test the interfaces on a draw document + */ + public void checkDrawDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XComponent xDrawDoc = null; + try { + System.out.println("****** Open a new draw document"); + xDrawDoc = xSOF.createDrawDoc("_blank"); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xDrawDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xDrawDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + + /** + * Test the interfaces on an impress document + */ + public void checkImpressDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XComponent xImpressDoc = null; + try { + System.out.println("****** Open a new impress document"); + xImpressDoc = xSOF.createImpressDoc("_blank"); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xImpressDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xImpressDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + /** + * Test the interfaces on an calc document + */ + public void checkCalcDoc() { + xMSF = getMSF(); + SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); + XSpreadsheetDocument xSpreadsheetDoc = null; + try { + System.out.println("****** Open a new calc document"); + xSpreadsheetDoc = xSOF.createCalcDoc("_blank"); + shortWait(); + getTestObject(); + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + runAllInterfaceTests(); + + if (xSpreadsheetDoc != null) { + XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xSpreadsheetDoc); + try { + xClose.close(false); + } + catch(com.sun.star.util.CloseVetoException e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + } + } + + public void getTestObject() { + try { + XInterface xIfc = (XInterface) xMSF.createInstance( + "com.sun.star.awt.Toolkit") ; + XExtendedToolkit tk = + UnoRuntime.queryInterface(XExtendedToolkit.class,xIfc); + + shortWait(); + xWindow = UnoRuntime.queryInterface( + XWindow.class,tk.getActiveTopWindow()); + + shortWait(); + XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); + XAccessibleContext parentContext = null; + + System.out.println("Get the accessible status bar."); + parentContext = AccessibilityTools.getAccessibleObjectForRole( + xRoot, AccessibleRole.STATUS_BAR, ""); + shortWait(); + if ( parentContext == null ) { + fail("Could not create a test object."); + } + System.out.println("...OK."); + + testObject=parentContext; + } + catch(com.sun.star.uno.Exception e) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e ); + } + catch(Throwable t) { + Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", t ); + } + } + + public void runAllInterfaceTests() { + int count = testObject.getAccessibleChildCount(); + System.out.println("*****"); + System.out.println("**** Found items to test: " + count); + for (int i=0;i - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -import com.sun.star.awt.XCallback; -// import lib.MultiMethodTest; -import com.sun.star.lang.XMultiServiceFactory; -// import com.sun.star.uno.XInterface; -// import com.sun.star.uno.UnoRuntime; -// import share.LogWriter; - -/** - * Testing com.sun.star.awt.XRequestCallback - * interface methods : - *
    - *
  • addCallback()
  • - *

- * @see com.sun.star.awt.XRequestCallback - */ -public class CallbackClass implements XCallback{ - - // private LogWriter log; - - private XMultiServiceFactory xMSF; - - - public CallbackClass(XMultiServiceFactory xMSF ) { - - this.xMSF = xMSF; - // this.log = log; - } - - - /** - * Callback method which will be called by the asynchronous - * service where we have added our request before. - */ - public void notify( Object aData ) { - - System.out.println("callback called successfully" ); - } -} diff --git a/toolkit/qa/complex/toolkit/CheckAccessibleStatusBar.java b/toolkit/qa/complex/toolkit/CheckAccessibleStatusBar.java deleted file mode 100755 index cfb40614beab..000000000000 --- a/toolkit/qa/complex/toolkit/CheckAccessibleStatusBar.java +++ /dev/null @@ -1,379 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -// import complexlib.ComplexTestCase; -import lib.TestParameters; -import util.SOfficeFactory; -import util.AccessibilityTools; -import com.sun.star.awt.XWindow; -// import com.sun.star.chart.XChartDocument; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XServiceInfo; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.text.XTextDocument; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.util.XCloseable; -import com.sun.star.accessibility.AccessibleRole; -import com.sun.star.accessibility.XAccessible; -import com.sun.star.accessibility.XAccessibleContext; -import com.sun.star.awt.XExtendedToolkit; -// import java.io.PrintWriter; - -// import org.junit.After; -import org.junit.AfterClass; -// import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.openoffice.test.OfficeConnection; -import static org.junit.Assert.*; - -/** - * - */ -public class CheckAccessibleStatusBar { - - XInterface testObject = null; - XMultiServiceFactory xMSF = null; - XWindow xWindow = null; - - /** - * The test parameters - */ - private static TestParameters param = null; - -// public String[] getTestMethodNames() { -// return new String[]{"checkDocs"};//WriterDoc", "checkDrawDoc", -//// "checkMathDoc", "checkImpressDoc", "checkCalcDoc"}; -// } - -/* public String getTestObjectName() { - return "com.sun.star.awt.AccessibleStatusBar"; - } -*/ - private XMultiServiceFactory getMSF() - { - final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); - return xMSF1; - } - - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - - /** - * Check document types - */ - @Test public void checkDocs() { - Object doc = param.get("DocType"); - String testDocType; - if (doc == null) - { - testDocType = "all"; - } - else - { - testDocType = (String)doc; - } - - System.out.println("Param was " + doc); - System.out.println("DocType " + testDocType); - if (testDocType.equalsIgnoreCase("writer") || testDocType.equalsIgnoreCase("all")) - { - checkWriterDoc(); - } - if (testDocType.equalsIgnoreCase("math") || testDocType.equalsIgnoreCase("all")) - { - checkMathDoc(); - } - if (testDocType.equalsIgnoreCase("draw") || testDocType.equalsIgnoreCase("all")) - { - checkDrawDoc(); - } - if (testDocType.equalsIgnoreCase("impress") || testDocType.equalsIgnoreCase("all")) - { - checkImpressDoc(); - } - if (testDocType.equalsIgnoreCase("calc") || testDocType.equalsIgnoreCase("all")) - { - checkCalcDoc(); - } - - } - - /** - * Test the interfaces on a writer document - */ - public void checkWriterDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XTextDocument xTextDoc = null; - try { - System.out.println("****** Open a new writer document"); - xTextDoc = xSOF.createTextDoc("_blank"); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xTextDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xTextDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - - /** - * Test the interfaces on a math document - */ - public void checkMathDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XComponent xMathDoc = null; - try { - System.out.println("****** Open a new math document"); - xMathDoc = xSOF.createMathDoc("_blank"); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xMathDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xMathDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - - /** - * Test the interfaces on a draw document - */ - public void checkDrawDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XComponent xDrawDoc = null; - try { - System.out.println("****** Open a new draw document"); - xDrawDoc = xSOF.createDrawDoc("_blank"); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xDrawDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xDrawDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - - /** - * Test the interfaces on an impress document - */ - public void checkImpressDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XComponent xImpressDoc = null; - try { - System.out.println("****** Open a new impress document"); - xImpressDoc = xSOF.createImpressDoc("_blank"); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xImpressDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xImpressDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - /** - * Test the interfaces on an calc document - */ - public void checkCalcDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XSpreadsheetDocument xSpreadsheetDoc = null; - try { - System.out.println("****** Open a new calc document"); - xSpreadsheetDoc = xSOF.createCalcDoc("_blank"); - shortWait(); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xSpreadsheetDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xSpreadsheetDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - - public void getTestObject() { - try { - XInterface xIfc = (XInterface) xMSF.createInstance( - "com.sun.star.awt.Toolkit") ; - XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class, xIfc); - - shortWait(); - xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow()); - - shortWait(); - AccessibilityTools at = new AccessibilityTools(); - XAccessible xRoot = at.getAccessibleObject(xWindow); - XAccessibleContext parentContext = null; - - System.out.println("Get the accessible status bar."); - parentContext = at.getAccessibleObjectForRole( - xRoot, AccessibleRole.STATUS_BAR, ""); - shortWait(); - System.out.println("...OK."); - - XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class, parentContext); - String[] services = xSI.getSupportedServiceNames(); - System.out.println("*****"); - System.out.println("* Implementation Name: " + xSI.getImplementationName()); - for (int i=0; i - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -// import complexlib.ComplexTestCase; -import lib.TestParameters; -// import util.SOfficeFactory; -// import complexlib.ComplexTestCase; -import util.SOfficeFactory; -import util.AccessibilityTools; -import com.sun.star.awt.XWindow; -// import com.sun.star.chart.XChartDocument; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XServiceInfo; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.text.XTextDocument; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.util.XCloseable; -import com.sun.star.accessibility.AccessibleRole; -import com.sun.star.accessibility.XAccessible; -import com.sun.star.accessibility.XAccessibleContext; -import com.sun.star.awt.XExtendedToolkit; -// import java.io.PrintWriter; - - -// import org.junit.After; -import org.junit.AfterClass; -// import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.openoffice.test.OfficeConnection; -import static org.junit.Assert.*; - -/** - * - */ -public class CheckAccessibleStatusBarItem { - - XMultiServiceFactory xMSF = null; - XAccessibleContext testObject = null; - XWindow xWindow = null; - - /** - * The test parameters - */ - private static TestParameters param = null; - -// public String[] getTestMethodNames() { -// return new String[]{"checkDocs"};//{"checkWriterDoc", "checkDrawDoc", -//// "checkMathDoc", "checkImpressDoc", "checkCalcDoc"}; -// } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - shortWait(500) ; - } - - /** - * Sleeps for a certain time. - * @param Thread is sleeping for this time in milliseconds. - */ - private void shortWait(int time) { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - - /** - * Check document types - */ - @Test public void checkDocs() - { - param = new TestParameters(); - Object doc = param.get("DocType"); - String testDocType; - if (doc == null) - { - testDocType = "all"; - } - else - { - testDocType = (String)doc; - } - - System.out.println("Param was " + doc); - System.out.println("DocType " + testDocType); - if (testDocType.equalsIgnoreCase("writer") || testDocType.equalsIgnoreCase("all")) - { - checkWriterDoc(); - } - if (testDocType.equalsIgnoreCase("math") || testDocType.equalsIgnoreCase("all")) - { - checkMathDoc(); - } - if (testDocType.equalsIgnoreCase("draw") || testDocType.equalsIgnoreCase("all")) - { - checkDrawDoc(); - } - if (testDocType.equalsIgnoreCase("impress") || testDocType.equalsIgnoreCase("all")) - { - checkImpressDoc(); - } - if (testDocType.equalsIgnoreCase("calc") || testDocType.equalsIgnoreCase("all")) - { - checkCalcDoc(); - } - - } - - private XMultiServiceFactory getMSF() - { - final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); - return xMSF1; - } - - /** - * Test the interfaces on a writer document - */ - private void checkWriterDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XTextDocument xTextDoc = null; - try { - System.out.println("****** Open a new writer document"); - xTextDoc = xSOF.createTextDoc("_blank"); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xTextDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xTextDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - - /** - * Test the interfaces on a math document - */ - public void checkMathDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XComponent xMathDoc = null; - try { - System.out.println("****** Open a new math document"); - xMathDoc = xSOF.createMathDoc("_blank"); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xMathDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xMathDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - - /** - * Test the interfaces on a draw document - */ - public void checkDrawDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XComponent xDrawDoc = null; - try { - System.out.println("****** Open a new draw document"); - xDrawDoc = xSOF.createDrawDoc("_blank"); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xDrawDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xDrawDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - - /** - * Test the interfaces on an impress document - */ - public void checkImpressDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XComponent xImpressDoc = null; - try { - System.out.println("****** Open a new impress document"); - xImpressDoc = xSOF.createImpressDoc("_blank"); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xImpressDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xImpressDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - /** - * Test the interfaces on an calc document - */ - public void checkCalcDoc() { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - XSpreadsheetDocument xSpreadsheetDoc = null; - try { - System.out.println("****** Open a new calc document"); - xSpreadsheetDoc = xSOF.createCalcDoc("_blank"); - shortWait(); - getTestObject(); - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - runAllInterfaceTests(); - - if (xSpreadsheetDoc != null) { - XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xSpreadsheetDoc); - try { - xClose.close(false); - } - catch(com.sun.star.util.CloseVetoException e) { - e.printStackTrace(); - } - } - } - - public void getTestObject() { - try { - XInterface xIfc = (XInterface) xMSF.createInstance( - "com.sun.star.awt.Toolkit") ; - XExtendedToolkit tk = - UnoRuntime.queryInterface(XExtendedToolkit.class,xIfc); - - shortWait(); - xWindow = UnoRuntime.queryInterface( - XWindow.class,tk.getActiveTopWindow()); - - shortWait(); - AccessibilityTools at = new AccessibilityTools(); - XAccessible xRoot = at.getAccessibleObject(xWindow); - XAccessibleContext parentContext = null; - - System.out.println("Get the accessible status bar."); - parentContext = at.getAccessibleObjectForRole( - xRoot, AccessibleRole.STATUS_BAR, ""); - shortWait(); - if ( parentContext == null ) { - System.out.println("Could not get the test object: set the correct focus in the next 30 seconds."); - shortWait(30000); - parentContext = at.getAccessibleObjectForRole( - xRoot, AccessibleRole.STATUS_BAR, ""); - - if ( parentContext == null ) - { - fail("Could not create a test object."); - } - } - System.out.println("...OK."); - - testObject=parentContext; - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - catch(Throwable t) { - System.out.println("Got throwable:"); - t.printStackTrace(); - } - } - - public void runAllInterfaceTests() { - int count = testObject.getAccessibleChildCount(); - System.out.println("*****"); - System.out.println("**** Found items to test: " + count); - for (int i=0;i - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -// import complexlib.ComplexTestCase; -import util.SOfficeFactory; -// import complex.toolkit.CallbackClass; -import com.sun.star.awt.XRequestCallback; -import com.sun.star.lang.XMultiServiceFactory; -// import com.sun.star.lang.XComponent; -// import com.sun.star.lang.XServiceInfo; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -// import com.sun.star.awt.XExtendedToolkit; -// import java.io.PrintWriter; - -// import org.junit.After; -import org.junit.AfterClass; -// import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.openoffice.test.OfficeConnection; -import static org.junit.Assert.*; - -/** - * - */ -public class CheckAsyncCallback /* extends ComplexTestCase*/ { - - - XInterface testObject = null; - XMultiServiceFactory xMSF = null; - -// public String[] getTestMethodNames() { -// return new String[]{"checkService"}; -// } - -/* public String getTestObjectName() { - return "com.sun.star.awt.AccessibleStatusBar"; - } -*/ - private XMultiServiceFactory getMSF() - { - final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); - return xMSF1; - } - - /** - * Sleeps for 0.5 sec. to allow StarOffice to react on - * reset call. - */ - private void shortWait() { - try { - Thread.sleep(500) ; - } catch (InterruptedException e) { - System.out.println("While waiting :" + e) ; - } - } - - /** - * Check services - */ - @Test public void checkService() { - checkAsyncCallbackService(); - - } - - /** - * Test the interfaces - */ - public void checkAsyncCallbackService() { - runAllInterfaceTests(); - } - - public void getTestObject() { - try { - xMSF = getMSF(); - SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF); - - XRequestCallback xAsyncCallback = null; - - XInterface xIfc = (XInterface)xMSF.createInstance( - "com.sun.star.awt.AsyncCallback" ); - xAsyncCallback = UnoRuntime.queryInterface(XRequestCallback.class, xIfc); - - testObject=xAsyncCallback; - } - catch(com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - catch(Throwable t) { - System.out.println("Got throwable:"); - t.printStackTrace(); - } - } - - public void runAllInterfaceTests() { - getTestObject(); - System.out.println("*** Now testing XRequestCallback ***"); - _XRequestCallback _xRequestCallback = - new _XRequestCallback(testObject, xMSF ); - assertTrue("failed: XRequestCallback::addCallback", _xRequestCallback._addCallback()); - } - - public void checkCallback() { - getTestObject(); - System.out.println("*** Now testing asynchronous callback service ***"); - XRequestCallback xAsyncCallback = null; - xAsyncCallback = UnoRuntime.queryInterface(XRequestCallback.class, testObject); - CallbackClass aCallbackClass = new CallbackClass( xMSF ); - xAsyncCallback.addCallback( aCallbackClass, null ); - } - - - - @BeforeClass public static void setUpConnection() throws Exception { - System.out.println("setUpConnection()"); - connection.setUp(); - } - - @AfterClass public static void tearDownConnection() - throws InterruptedException, com.sun.star.uno.Exception - { - System.out.println("tearDownConnection()"); - connection.tearDown(); - } - - private static final OfficeConnection connection = new OfficeConnection(); - - -} diff --git a/toolkit/qa/complex/toolkit/UnitConversion.java b/toolkit/qa/complex/toolkit/UnitConversion.java new file mode 100644 index 000000000000..6441a7ecb4ff --- /dev/null +++ b/toolkit/qa/complex/toolkit/UnitConversion.java @@ -0,0 +1,244 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.toolkit; + +import com.sun.star.awt.XUnitConversion; +import com.sun.star.uno.UnoRuntime; + +import com.sun.star.awt.XWindow; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.awt.XWindowPeer; + +import util.DesktopTools; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; + +/** + * This complex test is only for testing the com.sun.star.awt.XUnitConversion methods + * These are converter methods to get the size of a well known awt component + * in a com.sun.star.util.MeasureUnit you want. + * You don't need to know the factors to calculate by hand. + * + * @author ll93751 + */ +public class UnitConversion +{ + /** + * returns the delta value between a and b + * @param a + * @param b + * @return + */ + private int delta(int a, int b) + { + final int n = Math.abs(a - b); + return n; + } + + private XUnitConversion m_xConversion = null; + + /** + * Not really a check, + * only a simple test call to convertSizeToLogic(...) with different parameters + * @param _aSize + * @param _aMeasureUnit + * @param _sEinheit + */ + private void checkSize(com.sun.star.awt.Size _aSize, short _aMeasureUnit, String _sEinheit) + { + try + { + com.sun.star.awt.Size aSizeIn = m_xConversion.convertSizeToLogic(_aSize, _aMeasureUnit); + System.out.println("Window size:"); + System.out.println("Width:" + aSizeIn.Width + " " + _sEinheit); + System.out.println("Height:" + aSizeIn.Height + " " + _sEinheit); + System.out.println(""); + } + catch (com.sun.star.lang.IllegalArgumentException e) + { + System.out.println("Caught IllegalArgumentException in convertSizeToLogic with '" + _sEinheit + "' " + e.getMessage()); + } + } + + /** + * The real test function + * 1. try to get the XMultiServiceFactory of an already running office. Therefore make sure an (open|star)office is running with + * parameters like -accept="socket,host=localhost,port=8100;urp;" + * 2. try to create an empty window + * 3. try to convert the WindowPeer to an XWindow + * 4. try to resize and move the window to an other position, so we get a well knowing position and size. + * 5. run some more tests + * + * If no test fails, the test is well done and returns with 'PASSED, OK' + * + */ + @Test + public void testXUnitConversion() + { + final XMultiServiceFactory xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); + + assertNotNull("failed: There is no office.", xMSF); + + // create a window + XWindowPeer xWindowPeer = DesktopTools.createFloatingWindow(xMSF); + assertNotNull("failed: there is no window peer", xWindowPeer); + + + // resize and move the window to a well known position and size + XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, xWindowPeer); + assertNotNull("failed: there is no window, cast wrong?", xWindow); + + xWindow.setVisible(Boolean.TRUE); + + int x = 100; + int y = 100; + int width = 640; + int height = 480; + xWindow.setPosSize(x, y, width, height, com.sun.star.awt.PosSize.POSSIZE); + + com.sun.star.awt.Rectangle aRect = xWindow.getPosSize(); + com.sun.star.awt.Point aPoint = new com.sun.star.awt.Point(aRect.X, aRect.Y); + com.sun.star.awt.Size aSize = new com.sun.star.awt.Size(aRect.Width, aRect.Height); + + System.out.println("Window position and size in pixel:"); + System.out.println("X:" + aPoint.X); + System.out.println("Y:" + aPoint.Y); + System.out.println("Width:" + aSize.Width); + System.out.println("Height:" + aSize.Height); + System.out.println(""); + + assertTrue("Window pos size wrong", aSize.Width == width && aSize.Height == height && aPoint.X == x && aPoint.Y == y); + + m_xConversion = UnoRuntime.queryInterface(XUnitConversion.class, xWindowPeer); + + // try to get the position of the window in 1/100mm with the XUnitConversion method + try + { + com.sun.star.awt.Point aPointInMM_100TH = m_xConversion.convertPointToLogic(aPoint, com.sun.star.util.MeasureUnit.MM_100TH); + System.out.println("Window position:"); + System.out.println("X:" + aPointInMM_100TH.X + " 1/100mm"); + System.out.println("Y:" + aPointInMM_100TH.Y + " 1/100mm"); + System.out.println(""); + } + catch (com.sun.star.lang.IllegalArgumentException e) + { + fail("failed: IllegalArgumentException caught in convertPointToLogic " + e.getMessage()); + } + + // try to get the size of the window in 1/100mm with the XUnitConversion method + com.sun.star.awt.Size aSizeInMM_100TH = null; + com.sun.star.awt.Size aSizeInMM_10TH = null; + try + { + aSizeInMM_100TH = m_xConversion.convertSizeToLogic(aSize, com.sun.star.util.MeasureUnit.MM_100TH); + System.out.println("Window size:"); + System.out.println("Width:" + aSizeInMM_100TH.Width + " 1/100mm"); + System.out.println("Height:" + aSizeInMM_100TH.Height + " 1/100mm"); + System.out.println(""); + + // try to get the size of the window in 1/10mm with the XUnitConversion method + + aSizeInMM_10TH = m_xConversion.convertSizeToLogic(aSize, com.sun.star.util.MeasureUnit.MM_10TH); + System.out.println("Window size:"); + System.out.println("Width:" + aSizeInMM_10TH.Width + " 1/10mm"); + System.out.println("Height:" + aSizeInMM_10TH.Height + " 1/10mm"); + System.out.println(""); + + // check the size with a delta which must be smaller a given difference + assertTrue("Size.Width not correct", delta(aSizeInMM_100TH.Width, aSizeInMM_10TH.Width * 10) < 10); + assertTrue("Size.Height not correct", delta(aSizeInMM_100TH.Height, aSizeInMM_10TH.Height * 10) < 10); + + // new + checkSize(aSize, com.sun.star.util.MeasureUnit.PIXEL, "pixel"); + checkSize(aSize, com.sun.star.util.MeasureUnit.APPFONT, "appfont"); + checkSize(aSize, com.sun.star.util.MeasureUnit.SYSFONT, "sysfont"); + + // simply check some more parameters + checkSize(aSize, com.sun.star.util.MeasureUnit.MM, "mm"); + checkSize(aSize, com.sun.star.util.MeasureUnit.CM, "cm"); + checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_1000TH, "1/1000inch"); + checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_100TH, "1/100inch"); + checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_10TH, "1/10inch"); + checkSize(aSize, com.sun.star.util.MeasureUnit.INCH, "inch"); + // checkSize(aSize, com.sun.star.util.MeasureUnit.M, "m"); + checkSize(aSize, com.sun.star.util.MeasureUnit.POINT, "point"); + checkSize(aSize, com.sun.star.util.MeasureUnit.TWIP, "twip"); + // checkSize(aSize, com.sun.star.util.MeasureUnit.KM, "km"); + // checkSize(aSize, com.sun.star.util.MeasureUnit.PICA, "pica"); + // checkSize(aSize, com.sun.star.util.MeasureUnit.FOOT, "foot"); + // checkSize(aSize, com.sun.star.util.MeasureUnit.MILE, "mile"); + } + catch (com.sun.star.lang.IllegalArgumentException e) + { + fail("failed: IllegalArgumentException caught in convertSizeToLogic " + e.getMessage()); + } + + // convert the 1/100mm window size back to pixel + try + { + com.sun.star.awt.Size aNewSize = m_xConversion.convertSizeToPixel(aSizeInMM_100TH, com.sun.star.util.MeasureUnit.MM_100TH); + System.out.println("Window size:"); + System.out.println("Width:" + aNewSize.Width + " pixel"); + System.out.println("Height:" + aNewSize.Height + " pixel"); + + // assure the pixels are the same as we already know + assertTrue("failed: Size from pixel to 1/100mm to pixel", aSize.Width == aNewSize.Width && aSize.Height == aNewSize.Height); + } + catch (com.sun.star.lang.IllegalArgumentException e) + { + fail("failed: IllegalArgumentException caught in convertSizeToPixel " + e.getMessage()); + } + + // close the window. + // IMHO a little bit stupid, but the XWindow doesn't support a XCloseable interface + xWindow.dispose(); + } + + + + @BeforeClass + public static void setUpConnection() throws Exception { + System.out.println("setUpConnection()"); + connection.setUp(); + } + + @AfterClass + public static void tearDownConnection() + throws InterruptedException, com.sun.star.uno.Exception + { + System.out.println("tearDownConnection()"); + connection.tearDown(); + } + + private static final OfficeConnection connection = new OfficeConnection(); + +} diff --git a/toolkit/qa/complex/toolkit/_XAccessibleComponent.java b/toolkit/qa/complex/toolkit/_XAccessibleComponent.java deleted file mode 100755 index ae3e293e50fc..000000000000 --- a/toolkit/qa/complex/toolkit/_XAccessibleComponent.java +++ /dev/null @@ -1,499 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -// import share.LogWriter; -import com.sun.star.awt.Point; -import com.sun.star.awt.Rectangle; -import com.sun.star.awt.Size; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.accessibility.XAccessible; -import com.sun.star.accessibility.XAccessibleComponent; -import com.sun.star.accessibility.XAccessibleContext; -import com.sun.star.uno.XInterface; -import java.util.Vector; - -/** - * Testing com.sun.star.accessibility.XAccessibleComponent - * interface methods : - *

    - *
  • containsPoint()
  • - *
  • getAccessibleAtPoint()
  • - *
  • getBounds()
  • - *
  • getLocation()
  • - *
  • getLocationOnScreen()
  • - *
  • getSize()
  • - *
  • grabFocus()
  • - *
  • getAccessibleKeyBinding()
  • - *

- * - * @see com.sun.star.accessibility.XAccessibleComponent - */ -public class _XAccessibleComponent { - - // private LogWriter log; - - public XAccessibleComponent oObj = null; - - private Rectangle bounds = null ; - - private static final String className = - "com.sun.star.accessibility.XAccessibleComponent"; - - /** - * Constructor - * @param object - */ - public _XAccessibleComponent(XInterface object/*, LogWriter log*/) { - oObj = UnoRuntime.queryInterface( - XAccessibleComponent.class, object); - // this.log = log; - } - - /** - * First checks 4 inner bounds (upper, lower, left and right) - * of component bounding box to contain - * at least one point of the component. Second 4 outer bounds - * are checked to not contain any component points.

- * - * Has OK status if inner bounds contain component points - * and outer bounds don't contain any component points.

- * - * The following method tests are to be completed successfully before : - *

    - *
  • getBounds() : to have size of a component.
  • - *
- * @return - */ - public boolean _containsPoint() { - - boolean result = true ; - - int curX = 0; - //while (!oObj.containsPoint(new Point(curX, bounds.Y)) && curX < bounds.Width+bounds.X) { - while (!oObj.containsPoint(new Point(curX, 0)) && curX < bounds.Width) { - curX++; - } - //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { - if (curX < bounds.Width) { - System.out.println("Upper bound of box contains point (" - + curX + ",0) - OK"); - } else { - System.out.println - ("Upper bound of box contains no component points - FAILED"); - result = false; - } - - curX = 0; - //while (!oObj.containsPoint(new Point(curX, bounds.Y+bounds.Height - 1)) - while (!oObj.containsPoint(new Point(curX, bounds.Height - 1)) - && curX < bounds.Width) { - - System.out.println("Contains returns false for ("+curX+","+bounds.Height+")"); - curX++; - } - //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { - if (curX < bounds.Width) { - System.out.println("Lower bound of box contains point (" - + curX + "," + (bounds.Height - 1) + ") - OK"); - } else { - System.out.println - ("Lower bound of box contains no component points - FAILED"); - result = false; - } - - int curY = 0; - //while (!oObj.containsPoint(new Point(bounds.X, curY)) && curY < bounds.Height+bounds.Y) { - while (!oObj.containsPoint(new Point(0, curY)) && curY < bounds.Height) { - curY++; - } - //if ((bounds.Y <= curY) && (curY < bounds.Height+bounds.Y)) { - if (curY < bounds.Height) { - System.out.println("Left bound of box contains point (0," - + curY + ") - OK"); - } else { - System.out.println - ("Left bound of box contains no component points - FAILED"); - result = false; - } - - curY = 0; - //while (!oObj.containsPoint(new Point(bounds.X+bounds.Width - 1, curY)) - // && curY < bounds.Height+bounds.Y) { - while (!oObj.containsPoint(new Point(bounds.Width - 1, curY)) && curY < bounds.Height) { - curY++; - } - //if ((bounds.Y <= curY) && (curY < bounds.Height + bounds.Y)) { - if (curY < bounds.Height) { - System.out.println("Right bound of box contains point (" - + (bounds.Width - 1) + "," + curY + ") - OK"); - } else { - System.out.println - ("Right bound of box contains no component points - FAILED"); - result = false; - } - - boolean locRes = true; - for (int x = -1; x <= bounds.Width; x++) { - locRes &= !oObj.containsPoint(new Point(x, -1)); - locRes &= !oObj.containsPoint(new Point(x, bounds.Height+bounds.Y)); - } - if (locRes) { - System.out.println("Outer upper and lower bounds contain no component " - + "points - OK"); - } else { - System.out.println("Outer upper and lower bounds CONTAIN some component " - + "points - FAILED"); - result = false; - } - - locRes = true; - for (int y = -1; y <= bounds.Height; y++) { - locRes &= !oObj.containsPoint(new Point(-1, y)); - locRes &= !oObj.containsPoint(new Point(bounds.X+bounds.Width, y)); - } - if (locRes) { - System.out.println("Outer left and right bounds contain no component " - + "points - OK"); - } else { - System.out.println("Outer left and right bounds CONTAIN some component " - + "points - FAILED"); - result = false; - } - - return result; - } - - /** - * Iterates through all children which implement - * XAccessibleComponent (if they exist) determines their - * boundaries and tries to get each child by getAccessibleAtPoint - * passing point which belongs to the child. - * Also the point is checked which doesn't belong to child boundary - * box.

- * - * Has OK status if in the first cases the right children - * are returned, and in the second null or - * another child is returned. - * @return - */ - public boolean _getAccessibleAtPoint() { - - boolean result = true ; - XAccessibleComponent[] children = getChildrenComponents(); - - if (children.length > 0) { - for (int i = 0; i < children.length; i++) { - Rectangle chBnd = children[i].getBounds(); - if (chBnd.X == -1) - { - continue; - } - System.out.println("Checking child with bounds " + - "(" + chBnd.X + "," + chBnd.Y + "),(" - + chBnd.Width + "," + chBnd.Height + "): " - + util.AccessibilityTools.accessibleToString(children[i])); - - System.out.println("finding the point which lies on the component"); - int curX = 0; - int curY = 0; - while (!children[i].containsPoint(new Point(curX, curY)) - && curX < chBnd.Width) { - curX++; - curY++; - } - - if (curX==chBnd.Width) { - System.out.println("Couldn't find a point with contains"); - continue; - } - - // trying the point laying on child - XAccessible xAcc = oObj.getAccessibleAtPoint - (new Point(chBnd.X , chBnd.Y)); - if (xAcc == null) { - System.out.println("The child not found at point (" - + (chBnd.X ) + "," + chBnd.Y + ") - FAILED"); - result = false; - } else { - XAccessible xAccCh = UnoRuntime.queryInterface - (XAccessible.class, children[i]); - System.out.println("Child found at point (" - + (chBnd.X ) + "," + chBnd.Y + ") - OK"); - boolean res = util.AccessibilityTools.equals(xAccCh, xAcc); - if (!res) { - int expIndex = xAccCh.getAccessibleContext().getAccessibleIndexInParent(); - int gotIndex = xAcc.getAccessibleContext().getAccessibleIndexInParent(); - if (expIndex < gotIndex) { - System.out.println("The children found is not the same"); - System.out.println("The expected child " + - xAccCh.getAccessibleContext().getAccessibleName()); - System.out.println("is hidden behind the found Child "); - System.out.println(xAcc.getAccessibleContext().getAccessibleName()+" - OK"); - } else { - System.out.println("The children found is not the same - FAILED"); - System.out.println("Expected: " - +xAccCh.getAccessibleContext().getAccessibleName()); - System.out.println("Found: " - +xAcc.getAccessibleContext().getAccessibleName()); - result = false ; - } - } - } - - // trying the point NOT laying on child - xAcc = oObj.getAccessibleAtPoint - (new Point(chBnd.X - 1, chBnd.Y - 1)); - if (xAcc == null) { - System.out.println("No children found at point (" - + (chBnd.X - 1) + "," + (chBnd.Y - 1) + ") - OK"); - result &= true; - } else { - XAccessible xAccCh = UnoRuntime.queryInterface(XAccessible.class, children[i]); - boolean res = util.AccessibilityTools.equals(xAccCh, xAcc); - if (res) { - System.out.println("The same child found outside " - + "its bounds - FAILED"); - result = false ; - } - } - } - } else { - System.out.println("There are no children supporting " - + "XAccessibleComponent"); - } - - return result; - } - - /** - * Retrieves the component bounds and stores it.

- * - * Has OK status if boundary position (x,y) is not negative - * and size (Width, Height) is greater than 0. - * @return - */ - public boolean _getBounds() { - boolean result = true ; - - bounds = oObj.getBounds() ; - result &= bounds != null - && bounds.X >=0 && bounds.Y >=0 - && bounds.Width >0 && bounds.Height >0; - - System.out.println("Bounds = " + (bounds != null - ? "(" + bounds.X + "," + bounds.Y + "),(" - + bounds.Width + "," + bounds.Height + ")" : "null")); - - return result; - } - - /** - * Gets the location.

- * - * Has OK status if the location is the same as location - * of boundary obtained by getBounds() method. - * - * The following method tests are to be completed successfully before : - *

    - *
  • getBounds() : to have bounds
  • - *
- * @return - */ - public boolean _getLocation() { - - boolean result = true ; - Point loc = oObj.getLocation() ; - - result &= loc.X == bounds.X && loc.Y == bounds.Y ; - - return result; - } - - /** - * Get the screen location of the component and its parent - * (if it exists and supports XAccessibleComponent).

- * - * Has OK status if component screen location equals - * to screen location of its parent plus location of the component - * relative to the parent.

- * - * The following method tests are to be completed successfully before : - *

    - *
  • getBounds() : to have location of the component - * relative to its parent
  • - *
- * @return - */ - public boolean _getLocationOnScreen() { - - XAccessibleComponent parent = getParentComponent(); - - boolean result = true ; - Point loc = oObj.getLocationOnScreen(); - System.out.println("Location is (" + loc.X + "," + loc.Y + ")"); - - if (parent != null) { - Point parLoc = parent.getLocationOnScreen(); - System.out.println("Parent location is (" - + parLoc.X + "," + parLoc.Y + ")"); - - result &= parLoc.X + bounds.X == loc.X; - result &= parLoc.Y + bounds.Y == loc.Y; - } - - return result; - } - - /** - * Obtains the size of the component.

- * - * Has OK status if the size is the same as in bounds.

- * - * The following method tests are to be completed successfully before : - *

    - *
  • getBounds()
  • - *
- * @return - */ - public boolean _getSize() { - - boolean result = true ; - Size size = oObj.getSize() ; - - result &= size.Width == bounds.Width; - result &= size.Height == bounds.Height; - - return result; - } - - /** - * Just calls the method.

- * - * Has OK status if no runtime exceptions occured. - * @return - */ - public boolean _grabFocus() { - - boolean result = true ; - oObj.grabFocus() ; - - return result ; - } - - /** - * Retrieves all children (not more than 50) of the current - * component which support XAccessibleComponent. - * - * @return The array of children. Empty array returned if - * such children were not found or some error occured. - */ - private XAccessibleComponent[] getChildrenComponents() { - XAccessible xAcc = UnoRuntime.queryInterface(XAccessible.class, oObj) ; - if (xAcc == null) { - System.out.println("Component doesn't support XAccessible."); - return new XAccessibleComponent[0]; - } - XAccessibleContext xAccCon = xAcc.getAccessibleContext(); - int cnt = xAccCon.getAccessibleChildCount(); - - // for cases when too many children exist checking only first 50 - if (cnt > 50) - { - cnt = 50; - } - - Vector childComp = new Vector(); - for (int i = 0; i < cnt; i++) { - try { - XAccessible child = xAccCon.getAccessibleChild(i); - XAccessibleContext xAccConCh = child.getAccessibleContext(); - XAccessibleComponent xChAccComp = UnoRuntime.queryInterface(XAccessibleComponent.class, xAccConCh); - if (xChAccComp != null) { - childComp.add(xChAccComp) ; - } - } catch (com.sun.star.lang.IndexOutOfBoundsException e) {} - } - - return (XAccessibleComponent[]) childComp.toArray - (new XAccessibleComponent[childComp.size()]); - } - - /** - * Gets the parent of the current component which support - * XAccessibleComponent. - * - * @return The parent or null if the component - * has no parent or some errors occured. - */ - private XAccessibleComponent getParentComponent() { - XAccessible xAcc = UnoRuntime.queryInterface(XAccessible.class, oObj) ; - if (xAcc == null) { - System.out.println("Component doesn't support XAccessible."); - return null; - } - - XAccessibleContext xAccCon = xAcc.getAccessibleContext(); - XAccessible xAccPar = xAccCon.getAccessibleParent(); - - if (xAccPar == null) { - System.out.println("Component has no accessible parent."); - return null; - } - XAccessibleContext xAccConPar = xAccPar.getAccessibleContext(); - XAccessibleComponent parent = UnoRuntime.queryInterface(XAccessibleComponent.class, xAccConPar); - if (parent == null) { - System.out.println - ("Accessible parent doesn't support XAccessibleComponent"); - return null; - } - - return parent; - } - - /** - * Just calls the method. - * @return - */ - public boolean _getForeground() { - int forColor = oObj.getForeground(); - System.out.println("getForeground(): " + forColor); - return true; - } - - /** - * Just calls the method. - * @return - */ - public boolean _getBackground() { - int backColor = oObj.getBackground(); - System.out.println("getBackground(): " + backColor); - return true; - } - -} diff --git a/toolkit/qa/complex/toolkit/_XAccessibleContext.java b/toolkit/qa/complex/toolkit/_XAccessibleContext.java deleted file mode 100755 index de2928fdabe3..000000000000 --- a/toolkit/qa/complex/toolkit/_XAccessibleContext.java +++ /dev/null @@ -1,273 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -import com.sun.star.lang.Locale; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.accessibility.IllegalAccessibleComponentStateException; -import com.sun.star.accessibility.XAccessible; -import com.sun.star.accessibility.XAccessibleContext; -import com.sun.star.accessibility.XAccessibleRelationSet; -import com.sun.star.accessibility.XAccessibleStateSet; -// import com.sun.star.accessibility.AccessibleRelationType; -import util.AccessibilityTools; -// import share.LogWriter; - -/** - * Testing com.sun.star.accessibility.XAccessibleContext - * interface methods : - *

    - *
  • getAccessibleChildCount()
  • - *
  • getAccessibleChild()
  • - *
  • getAccessibleParent()
  • - *
  • getAccessibleIndexInParent()
  • - *
  • getAccessibleRole()
  • - *
  • getAccessibleDescription()
  • - *
  • getAccessibleName()
  • - *
  • getAccessibleRelationSet()
  • - *
  • getAccessibleStateSet()
  • - *
  • getLocale()
  • - *

- * - * @see com.sun.star.accessibility.XAccessibleContext - */ -public class _XAccessibleContext { - - // private LogWriter log; - - private static final String className = - "com.sun.star.accessibility.XAccessibleContext" ; - - public XAccessibleContext oObj = null; - - private int childCount = 0; - private XAccessible parent = null ; - - public _XAccessibleContext(XInterface object) { - oObj = UnoRuntime.queryInterface(XAccessibleContext.class, object); - // this.log = log; - } - - /** - * Calls the method and stores the number of children.

- * Has OK status if non-negative number rutrned. - * @return - */ - public boolean _getAccessibleChildCount() { - childCount = oObj.getAccessibleChildCount(); - System.out.println("" + childCount + " children found."); - return childCount > -1; - } - - /** - * Tries to get every child and checks its parent.

- * - * Has OK status if parent of every child - * and the tested component are the same objects. - * - * The following method tests are to be completed successfully before : - *

    - *
  • getAccessibleChildCount() : to have a number of - * children
  • - *
- * @return - */ - public boolean _getAccessibleChild() { - boolean bOK = true; - int counter = childCount; - if (childCount > 500) - { - counter = 500; - } - for (int i = 0; i < counter; i++) { - try { - XAccessible ch = oObj.getAccessibleChild(i) ; - XAccessibleContext chAC = ch.getAccessibleContext(); - - System.out.println(" Child " + i + ": " + - chAC.getAccessibleDescription()) ; - - if (!AccessibilityTools.equals - (chAC.getAccessibleParent().getAccessibleContext(), oObj)){ - - System.out.println("Role:"); - System.out.println("Getting: "+chAC.getAccessibleParent().getAccessibleContext().getAccessibleRole()); - System.out.println("Expected: "+oObj.getAccessibleRole()); - - System.out.println("ImplementationName:"); - System.out.println("Getting: "+util.utils.getImplName(chAC.getAccessibleParent().getAccessibleContext())); - System.out.println("Expected: "+util.utils.getImplName(oObj)); - - System.out.println("The parent of child and component "+ - "itself differ."); - System.out.println("Getting(Description): " - +chAC.getAccessibleParent().getAccessibleContext().getAccessibleDescription()); - System.out.println("Expected(Description): " - +oObj.getAccessibleDescription()); - - bOK = false; - } else { - System.out.println("Getting the expected Child -- OK"); - } - } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - e.printStackTrace(); - bOK = false; - } - } - - return bOK; - } - - /** - * Just gets the parent.

- * - * Has OK status if parent is not null. - * @return - */ - public boolean _getAccessibleParent() { - // assume that the component is not ROOT - parent = oObj.getAccessibleParent(); - return parent != null; - } - - /** - * Retrieves the index of tested component in its parent. - * Then gets the parent's child by this index and compares - * it with tested component.

- * - * Has OK status if the parent's child and the tested - * component are the same objects. - * - * The following method tests are to be completed successfully before : - *

    - *
  • getAccessibleParent() : to have a parent
  • - *
- * @return - */ - public boolean _getAccessibleIndexInParent() { - - boolean bOK = true; - int idx = oObj.getAccessibleIndexInParent(); - - XAccessibleContext parentAC = parent.getAccessibleContext() ; - try { - bOK &= AccessibilityTools.equals( - parentAC.getAccessibleChild(idx).getAccessibleContext(),oObj); - if (!bOK) { - System.out.println("Expected: "+util.utils.getImplName(oObj)); - System.out.println("Getting: "+util.utils.getImplName( - parentAC.getAccessibleChild(idx).getAccessibleContext())); - } - } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - e.printStackTrace(); - bOK = false; - } - return bOK; - } - - /** - * Get the accessible role of component.

- * - * Has OK status if non-negative number rutrned. - * @return - */ - public boolean _getAccessibleRole() { - short role = oObj.getAccessibleRole(); - System.out.println("The role is " + role); - return role > -1; - } - - /** - * Get the accessible name of the component.

- * - * Has OK status if the name has non-zero length. - * @return - */ - public boolean _getAccessibleName() { - String name = oObj.getAccessibleName(); - System.out.println("The name is '" + name + "'"); - return name != null; - } - - /** - * Get the accessible description of the component.

- * - * Has OK status if the description has non-zero length. - * @return - */ - public boolean _getAccessibleDescription() { - String descr = oObj.getAccessibleDescription(); - System.out.println("The description is '" + descr + "'"); - return descr != null; - } - - /** - * Just gets the set.

- * - * Has OK status if the set is not null. - * @return - */ - public boolean _getAccessibleRelationSet() { - XAccessibleRelationSet set = oObj.getAccessibleRelationSet(); - return set != null; - } - - /** - * Just gets the set.

- * - * Has OK status if the set is not null. - * @return - */ - public boolean _getAccessibleStateSet() { - XAccessibleStateSet set = oObj.getAccessibleStateSet(); - return set != null; - } - - /** - * Gets the locale.

- * - * Has OK status if Country and - * Language fields of locale structure - * are not empty. - * @return - */ - public boolean _getLocale() { - Locale loc = null ; - try { - loc = oObj.getLocale(); - System.out.println("The locale is " + loc.Language + "," + loc.Country); - } catch (IllegalAccessibleComponentStateException e) { - e.printStackTrace(); - } - - return loc != null && loc.Language.length() > 0 && - loc.Country.length() > 0; - } -} - diff --git a/toolkit/qa/complex/toolkit/_XAccessibleEventBroadcaster.java b/toolkit/qa/complex/toolkit/_XAccessibleEventBroadcaster.java deleted file mode 100755 index 899028daec87..000000000000 --- a/toolkit/qa/complex/toolkit/_XAccessibleEventBroadcaster.java +++ /dev/null @@ -1,214 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -import com.sun.star.lang.EventObject; -import com.sun.star.awt.Rectangle; -import com.sun.star.awt.PosSize; -import com.sun.star.awt.XWindow; -import com.sun.star.accessibility.AccessibleEventObject; -import com.sun.star.accessibility.XAccessible; -// import com.sun.star.accessibility.XAccessibleComponent; -import com.sun.star.accessibility.XAccessibleEventBroadcaster; -import com.sun.star.accessibility.XAccessibleEventListener; -import com.sun.star.accessibility.XAccessibleContext; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -// import share.LogWriter; - -/** - * Testing - * com.sun.star.accessibility.XAccessibleEventBroadcaster - * interface methods : - *

    - *
  • addEventListener()
  • - *
  • removeEventListener()
  • - *

- * - * This test needs the following object relations : - *

    - *
  • 'EventProducer' (of type - * ifc.accessibility._XAccessibleEventBroadcaster.EventProducer): - * this must be an implementation of the interface which could perform - * some actions for generating any kind of AccessibleEvent
  • - *

      - * - * @see com.sun.star.accessibility.XAccessibleEventBroadcaster - */ -public class _XAccessibleEventBroadcaster { - - // private LogWriter log; - private static final String className = - "com.sun.star.accessibility.XAccessibleEventBroadcaster" ; - - public XAccessibleEventBroadcaster oObj = null; - public String EventMsg = ""; - EventProducer prod = null ; - EvListener list = new EvListener(); - - /** - * An event producer - */ - public static class EventProducer { - XWindow xWindow; - public EventProducer(XWindow window) { - xWindow = window; - } - - public void fireEvent() { - Rectangle newPosSize = xWindow.getPosSize(); - newPosSize.Width = newPosSize.Width - 20; - newPosSize.Height = newPosSize.Height - 20; - newPosSize.X = newPosSize.X + 20; - newPosSize.Y = newPosSize.Y + 20; - xWindow.setPosSize(newPosSize.X, newPosSize.Y, newPosSize.Width, - newPosSize.Height, PosSize.POSSIZE); - } - } - - /** - * Listener implementation which registers listener calls. - */ - private class EvListener implements XAccessibleEventListener { - public AccessibleEventObject notifiedEvent = null ; - public void notifyEvent(AccessibleEventObject ev) { - System.out.println("Listener, Event : " + ev.EventId); - System.out.println("EventID: " + ev.EventId); - Object old=ev.OldValue; - if (old instanceof com.sun.star.accessibility.XAccessible) { - System.out.println("Old: "+((XAccessible)old).getAccessibleContext().getAccessibleName()); - } - - Object nev=ev.NewValue; - if (nev instanceof com.sun.star.accessibility.XAccessible) { - System.out.println("New: "+((XAccessible)nev).getAccessibleContext().getAccessibleName()); - } - notifiedEvent = ev; - } - - public void disposing(EventObject ev) {} - } - - /** - * c'tor - * @param object - * @param eventMessage - * @param window - */ - public _XAccessibleEventBroadcaster(XInterface object, String eventMessage, XWindow window) { - oObj = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, object); - // this.log = log; - prod = new EventProducer(window); - EventMsg = eventMessage; - } - - /** - * Adds two listeners and fires event by mean of object relation.

      - * Has OK status if both listeners were called - * @return - */ - public boolean _addEventListener() { - System.out.println("adding two listeners"); - oObj.addEventListener(list); - boolean isTransient = chkTransient(oObj); - System.out.println("fire event"); - prod.fireEvent() ; - - try { - Thread.sleep(1500); - } - catch (InterruptedException ex) { - } - - boolean works = true; - - if (list.notifiedEvent == null) { - if (!isTransient) { - System.out.println("listener wasn't called"); - works = false; - } else { - System.out.println("Object is Transient, listener isn't expected to be called"); - } - oObj.removeEventListener(list); - } - -// System.out.println(EventMsg); - return works; - } - - /** - * Removes one of two listeners added before and and fires event - * by mean of object relation.

      - * - * Has OK status if the removed listener wasn't called.

      - * - * The following method tests are to be completed successfully before : - *

        - *
      • addEventListener() : to have added listeners
      • - *
      - * @return - */ - public boolean _removeEventListener() { - - list.notifiedEvent = null; - - System.out.println("remove first listener"); - oObj.removeEventListener(list); - - System.out.println("fire event"); - prod.fireEvent() ; - - try { - Thread.sleep(500); - } - catch (InterruptedException ex) { - } - - if (list.notifiedEvent == null) { - System.out.println("listener wasn't called -- OK"); - } - - return list.notifiedEvent == null; - - } - - protected static boolean chkTransient(Object Testcase) { - XAccessibleContext accCon = UnoRuntime.queryInterface(XAccessibleContext.class, Testcase); - if (accCon.getAccessibleStateSet().contains( - com.sun.star.accessibility.AccessibleStateType.TRANSIENT)){ - if (!accCon.getAccessibleParent().getAccessibleContext().getAccessibleStateSet().contains( - com.sun.star.accessibility.AccessibleStateType.MANAGES_DESCENDANTS)) { - return false; - } - return true; - } - return false; - } - -} - diff --git a/toolkit/qa/complex/toolkit/_XAccessibleExtendedComponent.java b/toolkit/qa/complex/toolkit/_XAccessibleExtendedComponent.java deleted file mode 100755 index 2ba5c190cf31..000000000000 --- a/toolkit/qa/complex/toolkit/_XAccessibleExtendedComponent.java +++ /dev/null @@ -1,101 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -// import lib.MultiMethodTest; -import com.sun.star.accessibility.XAccessibleExtendedComponent; -// import com.sun.star.accessibility.XAccessibleStateSet; -// import com.sun.star.accessibility.AccessibleStateType; -import com.sun.star.awt.XFont; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -// import share.LogWriter; - -/** - * Testing com.sun.star.accessibility.XAccessibleExtendedComponent - * interface methods : - *
        - *
      • getForeground()
      • - *
      • getBackground()
      • - *
      • getFont()
      • - *
      • isEnabled()
      • - *
      • getTitledBorderText()
      • - *
      • getToolTipText()
      • - *

      - * @see com.sun.star.accessibility.XAccessibleExtendedComponent - */ -public class _XAccessibleExtendedComponent { - - // private LogWriter log; - private static final String className = - "com.sun.star.accessibility.XAccessibleExtendedComponent" ; - - public XAccessibleExtendedComponent oObj = null; - - // temporary while accessibility package is in com.sun.star - protected String getTestedClassName() { - return className; - } - - public _XAccessibleExtendedComponent(XInterface object/*, LogWriter log*/) { - oObj = UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, object); - // this.log = log; - } - - /** - * Just calls the method. - * @return - */ - public boolean _getFont() { - XFont font = oObj.getFont(); - System.out.println("getFont(): " + font); - return true; - } - - /** - * Calls the method and checks returned value. - * Has OK status if returned value isn't null. - * @return - */ - public boolean _getTitledBorderText() { - String titleBorderText = oObj.getTitledBorderText(); - System.out.println("getTitledBorderText(): '" + titleBorderText + "'"); - return titleBorderText != null; - } - - /** - * Calls the method and checks returned value. - * Has OK status if returned value isn't null. - * @return - */ - public boolean _getToolTipText() { - String toolTipText = oObj.getToolTipText(); - System.out.println("getToolTipText(): '" + toolTipText + "'"); - return toolTipText != null; - } -} diff --git a/toolkit/qa/complex/toolkit/_XAccessibleText.java b/toolkit/qa/complex/toolkit/_XAccessibleText.java deleted file mode 100755 index 151e6b3f7d0b..000000000000 --- a/toolkit/qa/complex/toolkit/_XAccessibleText.java +++ /dev/null @@ -1,1033 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -import com.sun.star.accessibility.XAccessibleText; -// import lib.MultiMethodTest; -//import lib.StatusException; -//import lib.Status; -import com.sun.star.beans.PropertyValue; -import com.sun.star.awt.Rectangle; -import com.sun.star.awt.Point; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.accessibility.AccessibleTextType; -import com.sun.star.accessibility.TextSegment; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -// import share.LogWriter; - -/** - * Testing com.sun.star.accessibility.XAccessibleText - * interface methods : - *

        - *
      • getCaretPosition()
      • - *
      • setCaretPosition()
      • - *
      • getCharacter()
      • - *
      • getCharacterAttributes()
      • - *
      • getCharacterBounds()
      • - *
      • getCharacterCount()
      • - *
      • getIndexAtPoint()
      • - *
      • getSelectedText()
      • - *
      • getSelectionStart()
      • - *
      • getSelectionEnd()
      • - *
      • setSelection()
      • - *
      • getText()
      • - *
      • getTextRange()
      • - *
      • getTextAtIndex()
      • - *
      • getTextBeforeIndex()
      • - *
      • getTextBehindIndex()
      • - *
      • copyText()
      • - *

      - * This test needs the following object relations : - *

        - *
      • 'XAccessibleText.Text' (of type String) - * optional : - * the string presentation of component's text. If the relation - * is not specified, then text from method getText() - * is used. - *
      • - *

      - * @see com.sun.star.accessibility.XAccessibleText - */ -public class _XAccessibleText { - - // private LogWriter log; - - private static final String className = - "com.sun.star.accessibility.XAccessibleText" ; - - public XAccessibleText oObj = null; - private XMultiServiceFactory xMSF; - - Rectangle chBounds = null; - int chCount = 0; - - String text = null; - String editOnly = null; - - - public _XAccessibleText(XInterface object, XMultiServiceFactory xMSF, String editOnly) { - oObj = UnoRuntime.queryInterface(XAccessibleText.class, object); - this.xMSF = xMSF; - // this.log = log; - this.editOnly = editOnly; - } - - - /** - * Calls the method and checks returned value. - * Has OK status if returned value is equal to chCount - 1. - * The following method tests are to be executed before: - *

        - *
      • setCaretPosition()
      • - *
      - * @return - */ - public boolean _getCaretPosition() { - - if (editOnly != null) { - System.out.println(editOnly); - return true; - } - - boolean res = true; - if ( chCount > 0 ) { - try { - oObj.setCaretPosition(chCount - 1); - } catch (com.sun.star.lang.IndexOutOfBoundsException ie) { - - } - int carPos = oObj.getCaretPosition(); - System.out.println("getCaretPosition: " + carPos); - res = carPos == (chCount - 1); - } - return res; - } - - /** - * Calls the method with the wrong index and with the correct index - * chCount - 1. - * Has OK status if exception was thrown for wrong index and - * if exception wasn't thrown for the correct index. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _setCaretPosition() { - boolean res = true; - - try { - System.out.println("setCaretPosition(-1):"); - oObj.setCaretPosition(-1); - res &= false; - System.out.println("exception was expected"); - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("expected exception"); - res &= true; - } - - try { - System.out.println("setCaretPosition(chCount+1):"); - oObj.setCaretPosition(chCount+1); - res &= false; - System.out.println("exception was expected"); - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("expected exception"); - res &= true; - } - if ( chCount > 0 ) { - try { - System.out.println("setCaretPosition(chCount - 1)"); - oObj.setCaretPosition(chCount - 1); - res &= true; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("unexpected exception"); - e.printStackTrace(); - res &= false; - } - } - - return res; - } - - /** - * Calls the method with the wrong index and with the correct indexes. - * Checks every character in the text. - * Has OK status if exception was thrown for wrong index, - * if exception wasn't thrown for the correct index and - * if every character is equal to corresponding character in the text. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _getCharacter() { - boolean res = true; - - try { - System.out.println("getCharacter(-1)"); - oObj.getCharacter(-1); - System.out.println("Exception was expected"); - res = false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res = true; - } - - try { - System.out.println("getCharacter(chCount)"); - oObj.getCharacter(chCount); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("Checking of every character in the text..."); - boolean isEqCh = true; - for(int i = 0; i < chCount; i++) { - char ch = oObj.getCharacter(i); - isEqCh = ch == text.charAt(i); - res &= isEqCh; - if (!isEqCh) { - System.out.println("At the position " + i + - "was expected character: " + text.charAt(i)); - System.out.println("but was returned: " + ch); - break; - } - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - return res; - } - - /** - * Calls the method with the wrong indexes and with the correct index, - * checks a returned value. - * Has OK status if exception was thrown for the wrong indexes, - * if exception wasn't thrown for the correct index and - * if returned value isn't null. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _getCharacterAttributes() { - boolean res = true; - - try { - System.out.println("getCharacterAttributes(-1)"); - oObj.getCharacterAttributes(-1, new String[0]); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("getCharacterAttributes(chCount)"); - oObj.getCharacterAttributes(chCount, new String[0]); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - if ( chCount > 0 ) { - System.out.println("getCharacterAttributes(chCount-1)"); - PropertyValue[] props = oObj.getCharacterAttributes(chCount - 1, new String[0]); - res &= props != null; - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - return res; - } - - - /** - * Calls the method with the wrong indexes and with the correct index. - * checks and stores a returned value. - * Has OK status if exception was thrown for the wrong indexes, - * if exception wasn't thrown for the correct index and - * if returned value isn't null. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _getCharacterBounds() { - boolean res = true; - - try { - System.out.println("getCharacterBounds(-1)"); - oObj.getCharacterBounds(-1); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("getCharacterBounds(chCount)"); - oObj.getCharacterBounds(chCount); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - if (chCount > 0) { - System.out.println("getCharacterBounds(chCount-1)"); - chBounds = oObj.getCharacterBounds(chCount-1); - res &= chBounds != null; - System.out.println("rect: " + chBounds.X + ", " + chBounds.Y + ", " + - chBounds.Width + ", " + chBounds.Height); - } - - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - return res; - } - - - /** - * Calls the method and stores a returned value to the variable - * chCount. - * Has OK status if a returned value is equal to the text length. - * @return - */ - public boolean _getCharacterCount() { - chCount = oObj.getCharacterCount(); - System.out.println("Character count:" + chCount); - boolean res = chCount == text.length(); - return res; - } - - /** - * Calls the method for an invalid point and for the point of rectangle - * returned by the method getCharacterBounds(). - * Has OK status if returned value is equal to -1 for an - * invalid point and if returned value is equal to chCount-1 - * for a valid point. - * The following method tests are to be executed before: - *
        - *
      • getCharacterBounds()
      • - *
      - * @return - */ - public boolean _getIndexAtPoint() { - - boolean res = true; - System.out.println("getIndexAtPoint(-1, -1):"); - Point pt = new Point(-1, -1); - int index = oObj.getIndexAtPoint(pt); - System.out.println(Integer.toString(index)); - res &= index == -1; - - if (chBounds != null) { - pt = new Point(chBounds.X , chBounds.Y ); - System.out.println("getIndexAtPoint(" + pt.X + ", " + pt.Y + "):"); - index = oObj.getIndexAtPoint(pt); - System.out.println(Integer.toString(index)); - res &= index == (chCount - 1); - } - - return res; - } - - /** - * Checks a returned values after different calls of the method - * setSelection(). - * The following method tests are to be executed before: - *
        - *
      • setSelection()
      • - *
      - * @return - */ - public boolean _getSelectedText() { - if (editOnly != null) { - System.out.println(editOnly); - return true; - } - - boolean res = true; - - try { - System.out.println("setSelection(0, 0)"); - oObj.setSelection(0, 0); - System.out.println("getSelectedText():"); - String txt = oObj.getSelectedText(); - System.out.println("'" + txt + "'"); - res &= txt.length() == 0; - - System.out.println("setSelection(0, chCount)"); - oObj.setSelection(0, chCount); - System.out.println("getSelectedText():"); - txt = oObj.getSelectedText(); - System.out.println("'" + txt + "'"); - res &= txt.equals(text); - - if (chCount > 2) { - System.out.println("setSelection(1, chCount-1)"); - oObj.setSelection(1, chCount - 1); - System.out.println("getSelectedText():"); - txt = oObj.getSelectedText(); - System.out.println("'" + txt + "'"); - res &= txt.equals(text.substring(1, chCount - 1)); - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - return res; - } - - /** - * Checks a returned values after different calls of the method - * setSelection(). - * The following method tests are to be executed before: - *
        - *
      • setSelection()
      • - *
      - * @return - */ - public boolean _getSelectionStart() { - if (editOnly != null) { - System.out.println(editOnly); - return true; - } - - boolean res = true; - - try { - System.out.println("setSelection(0, chCount)"); - oObj.setSelection(0, chCount); - int start = oObj.getSelectionStart(); - System.out.println("getSelectionStart():" + start); - res &= start == 0; - - if (chCount > 2) { - System.out.println("setSelection(1, chCount-1)"); - oObj.setSelection(1, chCount - 1); - start = oObj.getSelectionStart(); - System.out.println("getSelectionStart():" + start); - res &= start == 1; - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - return res; - } - - /** - * Checks a returned values after different calls of the method - * setSelection(). - * The following method tests are to be executed before: - *
        - *
      • setSelection()
      • - *
      - * @return - */ - public boolean _getSelectionEnd() { - if (editOnly != null) { - System.out.println(editOnly); - return true; - } - - boolean res = true; - - try { - System.out.println("setSelection(0, chCount)"); - oObj.setSelection(0, chCount); - int end = oObj.getSelectionEnd(); - System.out.println("getSelectionEnd():" + end); - res &= end == chCount; - - if (chCount > 2) { - System.out.println("setSelection(1, chCount-1)"); - oObj.setSelection(1, chCount - 1); - end = oObj.getSelectionEnd(); - System.out.println("getSelectionEnd():" + end); - res &= end == chCount - 1; - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - return res; - } - - /** - * Calls the method with invalid parameters an with valid parameters. - * Has OK status if exception was thrown for invalid parameters, - * if exception wasn't thrown for valid parameters. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _setSelection() { - boolean res = true; - boolean locRes = true; - - if (editOnly != null) { - System.out.println(editOnly); - return true; - } - - try { - System.out.println("setSelection(-1, chCount-1):"); - locRes = oObj.setSelection(-1, chCount - 1); - System.out.println(locRes + " exception was expected"); - res &= !locRes; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("setSelection(0, chCount+1):"); - locRes = oObj.setSelection(0, chCount + 1); - System.out.println(locRes + " excepion was expected"); - res &= !locRes; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - if (chCount > 2) { - System.out.println("setSelection(1, chCount-1):"); - locRes = oObj.setSelection(1, chCount - 1); - System.out.println(Boolean.toString(locRes)); - res &= locRes; - - System.out.println("setSelection(chCount-1, 1):"); - locRes = oObj.setSelection(chCount - 1, 1); - System.out.println(Boolean.toString(locRes)); - res &= locRes; - } - - if (chCount > 1) { - System.out.println("setSelection(0, chCount-1):"); - locRes = oObj.setSelection(0, chCount-1); - System.out.println(Boolean.toString(locRes)); - res &= locRes; - - System.out.println("setSelection(chCount-1, 0):"); - locRes = oObj.setSelection(chCount-1, 0); - System.out.println(Boolean.toString(locRes)); - res &= locRes; - } - - System.out.println("setSelection(0, 0):"); - locRes = oObj.setSelection(0, 0); - System.out.println(Boolean.toString(locRes)); - res &= locRes; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - return res; - } - - /** - * Calls the method and checks returned value. - * Has OK status if returned string is not null - * received from relation. - * @return - */ - public boolean _getText() { - text = oObj.getText(); - System.out.println("getText: '" + text + "'"); - return (text != null); - } - - /** - * Calls the method with invalid parameters an with valid parameters, - * checks returned values. - * Has OK status if exception was thrown for invalid parameters, - * if exception wasn't thrown for valid parameters and if returned values - * are equal to corresponding substrings of the text received by relation. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _getTextRange() { - boolean res = true; - boolean locRes = true; - - try { - if (chCount > 3) { - System.out.println("getTextRange(1, chCount - 2): "); - String txtRange = oObj.getTextRange(1, chCount - 2); - System.out.println(txtRange); - locRes = txtRange.equals(text.substring(1, chCount - 2)); - res &= locRes; - if (!locRes) { - System.out.println("Was expected: " + - text.substring(1, chCount - 2)); - } - } - - if (chCount > 0) { - System.out.println("getTextRange(0, chCount-1): "); - String txtRange = oObj.getTextRange(0, chCount-1); - System.out.println(txtRange); - locRes = txtRange.equals(text.substring(0, chCount - 1)); - res &= locRes; - if (!locRes) { - System.out.println("Was expected: " + - text.substring(0, chCount - 1)); - } - - System.out.println("getTextRange(chCount, 0): "); - txtRange = oObj.getTextRange(chCount, 0); - System.out.println(txtRange); - res &= txtRange.equals(text); - - System.out.println("getTextRange(0, 0): "); - txtRange = oObj.getTextRange(0, 0); - System.out.println(txtRange); - locRes = txtRange.equals(""); - res &= locRes; - if (!locRes) { - System.out.println("Empty string was expected"); - } - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - try { - System.out.println("getTextRange(-1, chCount - 1): "); - String txtRange = oObj.getTextRange(-1, chCount - 1); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("getTextRange(0, chCount + 1): "); - String txtRange = oObj.getTextRange(0, chCount + 1); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("getTextRange(chCount+1, -1): "); - String txtRange = oObj.getTextRange(chCount+1, -1); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - return res; - } - - /** - * Calls the method with invalid parameters an with valid parameters, - * checks returned values. - * Has OK status if exception was thrown for invalid parameters, - * if exception wasn't thrown for valid parameters and if returned values - * are equal to corresponding substrings of the text received by relation. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _getTextAtIndex() { - boolean res = true; - - try { - System.out.println("getTextAtIndex(-1, AccessibleTextType.PARAGRAPH):"); - TextSegment txt = - oObj.getTextAtIndex(-1, AccessibleTextType.PARAGRAPH); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("getTextAtIndex(chCount+1," + - " AccessibleTextType.PARAGRAPH):"); - TextSegment txt = oObj.getTextAtIndex(chCount + 1, - AccessibleTextType.PARAGRAPH); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Expected exception"); - res &= true; - } - - - try { - if ( chCount > 0 ) { - System.out.println("getTextAtIndex(chCount," + - " AccessibleTextType.PARAGRAPH):"); - TextSegment txt = oObj.getTextAtIndex(chCount, - AccessibleTextType.PARAGRAPH); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.length() == 0; - - System.out.println("getTextAtIndex(1," + - " AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextAtIndex(1, - AccessibleTextType.PARAGRAPH); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.equals(text); - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Unexpected exception"); - res &= false; - } - - - return res; - } - - /** - * Calls the method with invalid parameters an with valid parameters, - * checks returned values. - * Has OK status if exception was thrown for invalid parameters, - * if exception wasn't thrown for valid parameters and if returned values - * are equal to corresponding substrings of the text received by relation. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _getTextBeforeIndex() { - boolean res = true; - - try { - System.out.println("getTextBeforeIndex(-1, AccessibleTextType.PARAGRAPH):"); - TextSegment txt = oObj.getTextBeforeIndex(-1, - AccessibleTextType.PARAGRAPH); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Expected exception"); - res &= true; - } - - - try { - System.out.println("getTextBeforeIndex(chCount+1, " + - "AccessibleTextType.PARAGRAPH):"); - TextSegment txt = oObj.getTextBeforeIndex(chCount + 1, - AccessibleTextType.PARAGRAPH); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Expected exception"); - res &= true; - } - - TextSegment txt = null; - try { - if (chCount > 0) { - System.out.println("getTextBeforeIndex(chCount," + - " AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBeforeIndex(chCount, - AccessibleTextType.PARAGRAPH); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.length() == chCount ; - - System.out.println("getTextBeforeIndex(1," + - " AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBeforeIndex(1, - AccessibleTextType.PARAGRAPH); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.length() == 0; - } - - if (chCount > 2) { - System.out.println("getTextBeforeIndex(chCount-1," + - " AccessibleTextType.CHARACTER):"); - txt = oObj.getTextBeforeIndex(chCount - 1, - AccessibleTextType.CHARACTER); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.equals(text.substring(chCount - 2, chCount - 1)); - System.out.println("getTextBeforeIndex(2," + - " AccessibleTextType.CHARACTER):"); - txt = oObj.getTextBeforeIndex(2, - AccessibleTextType.CHARACTER); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.equals(text.substring(1, 2)); - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Unexpected exception"); - res &= false; - } - - - return res; - } - - /** - * Calls the method with invalid parameters an with valid parameters, - * checks returned values. - * Has OK status if exception was thrown for invalid parameters, - * if exception wasn't thrown for valid parameters and if returned values - * are equal to corresponding substrings of the text received by relation. - * The following method tests are to be executed before: - *
        - *
      • getCharacterCount()
      • - *
      - * @return - */ - public boolean _getTextBehindIndex() { - boolean res = true; - - try { - System.out.println("getTextBehindIndex(-1, AccessibleTextType.PARAGRAPH):"); - TextSegment txt = oObj.getTextBehindIndex(-1, - AccessibleTextType.PARAGRAPH); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Expected exception"); - res &= true; - } - - - try { - System.out.println("getTextBehindIndex(chCount+1, " + - "AccessibleTextType.PARAGRAPH):"); - TextSegment txt = oObj.getTextBehindIndex(chCount + 1, - AccessibleTextType.PARAGRAPH); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Expected exception"); - res &= true; - } - - - try { - if ( chCount > 0 ) { - System.out.println("getTextBehindIndex(chCount," + - " AccessibleTextType.PARAGRAPH):"); - TextSegment txt = oObj.getTextBehindIndex(chCount, - AccessibleTextType.PARAGRAPH); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.length() == 0; - - System.out.println("getTextBehindIndex(chCount-1," + - " AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBehindIndex(chCount - 1, - AccessibleTextType.PARAGRAPH); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.length() == 0; - } - if ( chCount > 1 ) { - System.out.println("getTextBehindIndex(1," + - " AccessibleTextType.CHARACTER):"); - TextSegment txt = oObj.getTextBehindIndex(1, - AccessibleTextType.CHARACTER); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.equals(text.substring(2, 3)); - } - if (chCount > 2) { - System.out.println("getTextBehindIndex(chCount-2," + - " AccessibleTextType.CHARACTER):"); - TextSegment txt = oObj.getTextBehindIndex(chCount - 2, - AccessibleTextType.CHARACTER); - System.out.println("'" + txt.SegmentText + "'"); - res &= txt.SegmentText.equals(text.substring(chCount - 1, chCount)); - } - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } catch(com.sun.star.lang.IllegalArgumentException e) { - System.out.println("Unexpected exception"); - res &= false; - } - - - return res; - } - - /** - * Calls the method with invalid parameters an with valid parameter, - * checks returned values. - * Has OK status if exception was thrown for invalid parameters, - * if exception wasn't thrown for valid parameter and if returned value for - * valid parameter is equal to true. - * @return - */ - public boolean _copyText() { - boolean res = true; - boolean locRes = true; - - if (editOnly != null) { - System.out.println(editOnly); - return true; - } - - try { - System.out.println("copyText(-1,chCount):"); - oObj.copyText(-1, chCount); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("copyText(0,chCount+1):"); - oObj.copyText(0, chCount + 1); - System.out.println("Exception was expected"); - res &= false; - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Expected exception"); - res &= true; - } - - try { - System.out.println("copyText(0,chCount):"); - locRes = oObj.copyText(0, chCount); - System.out.println(""+locRes); - res &= locRes; - - String cbText = null; - try { - cbText = - util.SysUtils.getSysClipboardText(xMSF); - } catch (com.sun.star.uno.Exception e) { - System.out.println("Couldn't access system clipboard :"); - e.printStackTrace(); - } - System.out.println("Clipboard: '" + cbText + "'"); - res &= text.equals(cbText); - - if (chCount > 2) { - System.out.println("copyText(1,chCount-1):"); - locRes = oObj.copyText(1, chCount - 1); - System.out.println(""+locRes); - res &= locRes; - - try { - cbText = util.SysUtils.getSysClipboardText(xMSF); - } catch (com.sun.star.uno.Exception e) { - System.out.println("Couldn't access system clipboard :"); - e.printStackTrace(); - } - - System.out.println("Clipboard: '" + cbText + "'"); - res &= text.substring(1, chCount - 1).equals(cbText); - } - - } catch(com.sun.star.lang.IndexOutOfBoundsException e) { - System.out.println("Unexpected exception"); - e.printStackTrace(); - res &= false; - } - - return res; - } -} diff --git a/toolkit/qa/complex/toolkit/_XRequestCallback.java b/toolkit/qa/complex/toolkit/_XRequestCallback.java deleted file mode 100644 index b9486c04c80a..000000000000 --- a/toolkit/qa/complex/toolkit/_XRequestCallback.java +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.toolkit; - -import com.sun.star.awt.XRequestCallback; -// import lib.MultiMethodTest; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.UnoRuntime; -// import share.LogWriter; - -/** - * Testing com.sun.star.awt.XRequestCallback - * interface methods : - *
        - *
      • addCallback()
      • - *

      - * @see com.sun.star.awt.XRequestCallback - */ -public class _XRequestCallback { - - // private LogWriter log; - - private static final String className = - "com.sun.star.awt.XRequestCallback" ; - - public XRequestCallback oObj = null; - private XMultiServiceFactory xMSF; - - String text = null; - - - public _XRequestCallback(XInterface object, XMultiServiceFactory xMSF ) { - oObj = UnoRuntime.queryInterface(XRequestCallback.class, object); - this.xMSF = xMSF; - // this.log = log; - } - - - /** - * Calls the method and checks returned value. - * Has OK status if returned value is equal to chCount - 1. - * The following method tests are to be executed before: - *

        - *
      • addCallback()
      • - *
      - * @return - */ - public boolean _addCallback() { - - boolean res = true; - try { - Object a = new Object(); - oObj.addCallback( null, a ); - } catch (com.sun.star.uno.RuntimeException ie) { - res = false; - } - System.out.println("addCallback called" ); - - return res; - } - -} diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java new file mode 100755 index 000000000000..7dca37ce18b7 --- /dev/null +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java @@ -0,0 +1,498 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.toolkit.accessibility; + +import com.sun.star.awt.Point; +import com.sun.star.awt.Rectangle; +import com.sun.star.awt.Size; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleComponent; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.uno.XInterface; +import java.util.Vector; + +/** + * Testing com.sun.star.accessibility.XAccessibleComponent + * interface methods : + *
        + *
      • containsPoint()
      • + *
      • getAccessibleAtPoint()
      • + *
      • getBounds()
      • + *
      • getLocation()
      • + *
      • getLocationOnScreen()
      • + *
      • getSize()
      • + *
      • grabFocus()
      • + *
      • getAccessibleKeyBinding()
      • + *

      + * + * @see com.sun.star.accessibility.XAccessibleComponent + */ +public class _XAccessibleComponent { + + // private LogWriter log; + + public XAccessibleComponent oObj = null; + + private Rectangle bounds = null ; + + private static final String className = + "com.sun.star.accessibility.XAccessibleComponent"; + + /** + * Constructor + * @param object + */ + public _XAccessibleComponent(XInterface object/*, LogWriter log*/) { + oObj = UnoRuntime.queryInterface( + XAccessibleComponent.class, object); + // this.log = log; + } + + /** + * First checks 4 inner bounds (upper, lower, left and right) + * of component bounding box to contain + * at least one point of the component. Second 4 outer bounds + * are checked to not contain any component points.

      + * + * Has OK status if inner bounds contain component points + * and outer bounds don't contain any component points.

      + * + * The following method tests are to be completed successfully before : + *

        + *
      • getBounds() : to have size of a component.
      • + *
      + * @return + */ + public boolean _containsPoint() { + + boolean result = true ; + + int curX = 0; + //while (!oObj.containsPoint(new Point(curX, bounds.Y)) && curX < bounds.Width+bounds.X) { + while (!oObj.containsPoint(new Point(curX, 0)) && curX < bounds.Width) { + curX++; + } + //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { + if (curX < bounds.Width) { + System.out.println("Upper bound of box contains point (" + + curX + ",0) - OK"); + } else { + System.out.println + ("Upper bound of box contains no component points - FAILED"); + result = false; + } + + curX = 0; + //while (!oObj.containsPoint(new Point(curX, bounds.Y+bounds.Height - 1)) + while (!oObj.containsPoint(new Point(curX, bounds.Height - 1)) + && curX < bounds.Width) { + + System.out.println("Contains returns false for ("+curX+","+bounds.Height+")"); + curX++; + } + //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { + if (curX < bounds.Width) { + System.out.println("Lower bound of box contains point (" + + curX + "," + (bounds.Height - 1) + ") - OK"); + } else { + System.out.println + ("Lower bound of box contains no component points - FAILED"); + result = false; + } + + int curY = 0; + //while (!oObj.containsPoint(new Point(bounds.X, curY)) && curY < bounds.Height+bounds.Y) { + while (!oObj.containsPoint(new Point(0, curY)) && curY < bounds.Height) { + curY++; + } + //if ((bounds.Y <= curY) && (curY < bounds.Height+bounds.Y)) { + if (curY < bounds.Height) { + System.out.println("Left bound of box contains point (0," + + curY + ") - OK"); + } else { + System.out.println + ("Left bound of box contains no component points - FAILED"); + result = false; + } + + curY = 0; + //while (!oObj.containsPoint(new Point(bounds.X+bounds.Width - 1, curY)) + // && curY < bounds.Height+bounds.Y) { + while (!oObj.containsPoint(new Point(bounds.Width - 1, curY)) && curY < bounds.Height) { + curY++; + } + //if ((bounds.Y <= curY) && (curY < bounds.Height + bounds.Y)) { + if (curY < bounds.Height) { + System.out.println("Right bound of box contains point (" + + (bounds.Width - 1) + "," + curY + ") - OK"); + } else { + System.out.println + ("Right bound of box contains no component points - FAILED"); + result = false; + } + + boolean locRes = true; + for (int x = -1; x <= bounds.Width; x++) { + locRes &= !oObj.containsPoint(new Point(x, -1)); + locRes &= !oObj.containsPoint(new Point(x, bounds.Height+bounds.Y)); + } + if (locRes) { + System.out.println("Outer upper and lower bounds contain no component " + + "points - OK"); + } else { + System.out.println("Outer upper and lower bounds CONTAIN some component " + + "points - FAILED"); + result = false; + } + + locRes = true; + for (int y = -1; y <= bounds.Height; y++) { + locRes &= !oObj.containsPoint(new Point(-1, y)); + locRes &= !oObj.containsPoint(new Point(bounds.X+bounds.Width, y)); + } + if (locRes) { + System.out.println("Outer left and right bounds contain no component " + + "points - OK"); + } else { + System.out.println("Outer left and right bounds CONTAIN some component " + + "points - FAILED"); + result = false; + } + + return result; + } + + /** + * Iterates through all children which implement + * XAccessibleComponent (if they exist) determines their + * boundaries and tries to get each child by getAccessibleAtPoint + * passing point which belongs to the child. + * Also the point is checked which doesn't belong to child boundary + * box.

      + * + * Has OK status if in the first cases the right children + * are returned, and in the second null or + * another child is returned. + * @return + */ + public boolean _getAccessibleAtPoint() { + + boolean result = true ; + XAccessibleComponent[] children = getChildrenComponents(); + + if (children.length > 0) { + for (int i = 0; i < children.length; i++) { + Rectangle chBnd = children[i].getBounds(); + if (chBnd.X == -1) + { + continue; + } + System.out.println("Checking child with bounds " + + "(" + chBnd.X + "," + chBnd.Y + "),(" + + chBnd.Width + "," + chBnd.Height + "): " + + util.AccessibilityTools.accessibleToString(children[i])); + + System.out.println("finding the point which lies on the component"); + int curX = 0; + int curY = 0; + while (!children[i].containsPoint(new Point(curX, curY)) + && curX < chBnd.Width) { + curX++; + curY++; + } + + if (curX==chBnd.Width) { + System.out.println("Couldn't find a point with contains"); + continue; + } + + // trying the point laying on child + XAccessible xAcc = oObj.getAccessibleAtPoint + (new Point(chBnd.X , chBnd.Y)); + if (xAcc == null) { + System.out.println("The child not found at point (" + + (chBnd.X ) + "," + chBnd.Y + ") - FAILED"); + result = false; + } else { + XAccessible xAccCh = UnoRuntime.queryInterface + (XAccessible.class, children[i]); + System.out.println("Child found at point (" + + (chBnd.X ) + "," + chBnd.Y + ") - OK"); + boolean res = util.AccessibilityTools.equals(xAccCh, xAcc); + if (!res) { + int expIndex = xAccCh.getAccessibleContext().getAccessibleIndexInParent(); + int gotIndex = xAcc.getAccessibleContext().getAccessibleIndexInParent(); + if (expIndex < gotIndex) { + System.out.println("The children found is not the same"); + System.out.println("The expected child " + + xAccCh.getAccessibleContext().getAccessibleName()); + System.out.println("is hidden behind the found Child "); + System.out.println(xAcc.getAccessibleContext().getAccessibleName()+" - OK"); + } else { + System.out.println("The children found is not the same - FAILED"); + System.out.println("Expected: " + +xAccCh.getAccessibleContext().getAccessibleName()); + System.out.println("Found: " + +xAcc.getAccessibleContext().getAccessibleName()); + result = false ; + } + } + } + + // trying the point NOT laying on child + xAcc = oObj.getAccessibleAtPoint + (new Point(chBnd.X - 1, chBnd.Y - 1)); + if (xAcc == null) { + System.out.println("No children found at point (" + + (chBnd.X - 1) + "," + (chBnd.Y - 1) + ") - OK"); + result &= true; + } else { + XAccessible xAccCh = UnoRuntime.queryInterface(XAccessible.class, children[i]); + boolean res = util.AccessibilityTools.equals(xAccCh, xAcc); + if (res) { + System.out.println("The same child found outside " + + "its bounds - FAILED"); + result = false ; + } + } + } + } else { + System.out.println("There are no children supporting " + + "XAccessibleComponent"); + } + + return result; + } + + /** + * Retrieves the component bounds and stores it.

      + * + * Has OK status if boundary position (x,y) is not negative + * and size (Width, Height) is greater than 0. + * @return + */ + public boolean _getBounds() { + boolean result = true ; + + bounds = oObj.getBounds() ; + result &= bounds != null + && bounds.X >=0 && bounds.Y >=0 + && bounds.Width >0 && bounds.Height >0; + + System.out.println("Bounds = " + (bounds != null + ? "(" + bounds.X + "," + bounds.Y + "),(" + + bounds.Width + "," + bounds.Height + ")" : "null")); + + return result; + } + + /** + * Gets the location.

      + * + * Has OK status if the location is the same as location + * of boundary obtained by getBounds() method. + * + * The following method tests are to be completed successfully before : + *

        + *
      • getBounds() : to have bounds
      • + *
      + * @return + */ + public boolean _getLocation() { + + boolean result = true ; + Point loc = oObj.getLocation() ; + + result &= loc.X == bounds.X && loc.Y == bounds.Y ; + + return result; + } + + /** + * Get the screen location of the component and its parent + * (if it exists and supports XAccessibleComponent).

      + * + * Has OK status if component screen location equals + * to screen location of its parent plus location of the component + * relative to the parent.

      + * + * The following method tests are to be completed successfully before : + *

        + *
      • getBounds() : to have location of the component + * relative to its parent
      • + *
      + * @return + */ + public boolean _getLocationOnScreen() { + + XAccessibleComponent parent = getParentComponent(); + + boolean result = true ; + Point loc = oObj.getLocationOnScreen(); + System.out.println("Location is (" + loc.X + "," + loc.Y + ")"); + + if (parent != null) { + Point parLoc = parent.getLocationOnScreen(); + System.out.println("Parent location is (" + + parLoc.X + "," + parLoc.Y + ")"); + + result &= parLoc.X + bounds.X == loc.X; + result &= parLoc.Y + bounds.Y == loc.Y; + } + + return result; + } + + /** + * Obtains the size of the component.

      + * + * Has OK status if the size is the same as in bounds.

      + * + * The following method tests are to be completed successfully before : + *

        + *
      • getBounds()
      • + *
      + * @return + */ + public boolean _getSize() { + + boolean result = true ; + Size size = oObj.getSize() ; + + result &= size.Width == bounds.Width; + result &= size.Height == bounds.Height; + + return result; + } + + /** + * Just calls the method.

      + * + * Has OK status if no runtime exceptions occured. + * @return + */ + public boolean _grabFocus() { + + boolean result = true ; + oObj.grabFocus() ; + + return result ; + } + + /** + * Retrieves all children (not more than 50) of the current + * component which support XAccessibleComponent. + * + * @return The array of children. Empty array returned if + * such children were not found or some error occured. + */ + private XAccessibleComponent[] getChildrenComponents() { + XAccessible xAcc = UnoRuntime.queryInterface(XAccessible.class, oObj) ; + if (xAcc == null) { + System.out.println("Component doesn't support XAccessible."); + return new XAccessibleComponent[0]; + } + XAccessibleContext xAccCon = xAcc.getAccessibleContext(); + int cnt = xAccCon.getAccessibleChildCount(); + + // for cases when too many children exist checking only first 50 + if (cnt > 50) + { + cnt = 50; + } + + Vector childComp = new Vector(); + for (int i = 0; i < cnt; i++) { + try { + XAccessible child = xAccCon.getAccessibleChild(i); + XAccessibleContext xAccConCh = child.getAccessibleContext(); + XAccessibleComponent xChAccComp = UnoRuntime.queryInterface(XAccessibleComponent.class, xAccConCh); + if (xChAccComp != null) { + childComp.add(xChAccComp) ; + } + } catch (com.sun.star.lang.IndexOutOfBoundsException e) {} + } + + return (XAccessibleComponent[]) childComp.toArray + (new XAccessibleComponent[childComp.size()]); + } + + /** + * Gets the parent of the current component which support + * XAccessibleComponent. + * + * @return The parent or null if the component + * has no parent or some errors occured. + */ + private XAccessibleComponent getParentComponent() { + XAccessible xAcc = UnoRuntime.queryInterface(XAccessible.class, oObj) ; + if (xAcc == null) { + System.out.println("Component doesn't support XAccessible."); + return null; + } + + XAccessibleContext xAccCon = xAcc.getAccessibleContext(); + XAccessible xAccPar = xAccCon.getAccessibleParent(); + + if (xAccPar == null) { + System.out.println("Component has no accessible parent."); + return null; + } + XAccessibleContext xAccConPar = xAccPar.getAccessibleContext(); + XAccessibleComponent parent = UnoRuntime.queryInterface(XAccessibleComponent.class, xAccConPar); + if (parent == null) { + System.out.println + ("Accessible parent doesn't support XAccessibleComponent"); + return null; + } + + return parent; + } + + /** + * Just calls the method. + * @return + */ + public boolean _getForeground() { + int forColor = oObj.getForeground(); + System.out.println("getForeground(): " + forColor); + return true; + } + + /** + * Just calls the method. + * @return + */ + public boolean _getBackground() { + int backColor = oObj.getBackground(); + System.out.println("getBackground(): " + backColor); + return true; + } + +} diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java new file mode 100755 index 000000000000..14debda92cd8 --- /dev/null +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java @@ -0,0 +1,273 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.toolkit.accessibility; + +import com.sun.star.lang.Locale; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.accessibility.IllegalAccessibleComponentStateException; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleRelationSet; +import com.sun.star.accessibility.XAccessibleStateSet; +// import com.sun.star.accessibility.AccessibleRelationType; +import util.AccessibilityTools; +// import share.LogWriter; + +/** + * Testing com.sun.star.accessibility.XAccessibleContext + * interface methods : + *

        + *
      • getAccessibleChildCount()
      • + *
      • getAccessibleChild()
      • + *
      • getAccessibleParent()
      • + *
      • getAccessibleIndexInParent()
      • + *
      • getAccessibleRole()
      • + *
      • getAccessibleDescription()
      • + *
      • getAccessibleName()
      • + *
      • getAccessibleRelationSet()
      • + *
      • getAccessibleStateSet()
      • + *
      • getLocale()
      • + *

      + * + * @see com.sun.star.accessibility.XAccessibleContext + */ +public class _XAccessibleContext { + + // private LogWriter log; + + private static final String className = + "com.sun.star.accessibility.XAccessibleContext" ; + + public XAccessibleContext oObj = null; + + private int childCount = 0; + private XAccessible parent = null ; + + public _XAccessibleContext(XInterface object) { + oObj = UnoRuntime.queryInterface(XAccessibleContext.class, object); + // this.log = log; + } + + /** + * Calls the method and stores the number of children.

      + * Has OK status if non-negative number rutrned. + * @return + */ + public boolean _getAccessibleChildCount() { + childCount = oObj.getAccessibleChildCount(); + System.out.println("" + childCount + " children found."); + return childCount > -1; + } + + /** + * Tries to get every child and checks its parent.

      + * + * Has OK status if parent of every child + * and the tested component are the same objects. + * + * The following method tests are to be completed successfully before : + *

        + *
      • getAccessibleChildCount() : to have a number of + * children
      • + *
      + * @return + */ + public boolean _getAccessibleChild() { + boolean bOK = true; + int counter = childCount; + if (childCount > 500) + { + counter = 500; + } + for (int i = 0; i < counter; i++) { + try { + XAccessible ch = oObj.getAccessibleChild(i) ; + XAccessibleContext chAC = ch.getAccessibleContext(); + + System.out.println(" Child " + i + ": " + + chAC.getAccessibleDescription()) ; + + if (!AccessibilityTools.equals + (chAC.getAccessibleParent().getAccessibleContext(), oObj)){ + + System.out.println("Role:"); + System.out.println("Getting: "+chAC.getAccessibleParent().getAccessibleContext().getAccessibleRole()); + System.out.println("Expected: "+oObj.getAccessibleRole()); + + System.out.println("ImplementationName:"); + System.out.println("Getting: "+util.utils.getImplName(chAC.getAccessibleParent().getAccessibleContext())); + System.out.println("Expected: "+util.utils.getImplName(oObj)); + + System.out.println("The parent of child and component "+ + "itself differ."); + System.out.println("Getting(Description): " + +chAC.getAccessibleParent().getAccessibleContext().getAccessibleDescription()); + System.out.println("Expected(Description): " + +oObj.getAccessibleDescription()); + + bOK = false; + } else { + System.out.println("Getting the expected Child -- OK"); + } + } catch (com.sun.star.lang.IndexOutOfBoundsException e) { + e.printStackTrace(); + bOK = false; + } + } + + return bOK; + } + + /** + * Just gets the parent.

      + * + * Has OK status if parent is not null. + * @return + */ + public boolean _getAccessibleParent() { + // assume that the component is not ROOT + parent = oObj.getAccessibleParent(); + return parent != null; + } + + /** + * Retrieves the index of tested component in its parent. + * Then gets the parent's child by this index and compares + * it with tested component.

      + * + * Has OK status if the parent's child and the tested + * component are the same objects. + * + * The following method tests are to be completed successfully before : + *

        + *
      • getAccessibleParent() : to have a parent
      • + *
      + * @return + */ + public boolean _getAccessibleIndexInParent() { + + boolean bOK = true; + int idx = oObj.getAccessibleIndexInParent(); + + XAccessibleContext parentAC = parent.getAccessibleContext() ; + try { + bOK &= AccessibilityTools.equals( + parentAC.getAccessibleChild(idx).getAccessibleContext(),oObj); + if (!bOK) { + System.out.println("Expected: "+util.utils.getImplName(oObj)); + System.out.println("Getting: "+util.utils.getImplName( + parentAC.getAccessibleChild(idx).getAccessibleContext())); + } + } catch (com.sun.star.lang.IndexOutOfBoundsException e) { + e.printStackTrace(); + bOK = false; + } + return bOK; + } + + /** + * Get the accessible role of component.

      + * + * Has OK status if non-negative number rutrned. + * @return + */ + public boolean _getAccessibleRole() { + short role = oObj.getAccessibleRole(); + System.out.println("The role is " + role); + return role > -1; + } + + /** + * Get the accessible name of the component.

      + * + * Has OK status if the name has non-zero length. + * @return + */ + public boolean _getAccessibleName() { + String name = oObj.getAccessibleName(); + System.out.println("The name is '" + name + "'"); + return name != null; + } + + /** + * Get the accessible description of the component.

      + * + * Has OK status if the description has non-zero length. + * @return + */ + public boolean _getAccessibleDescription() { + String descr = oObj.getAccessibleDescription(); + System.out.println("The description is '" + descr + "'"); + return descr != null; + } + + /** + * Just gets the set.

      + * + * Has OK status if the set is not null. + * @return + */ + public boolean _getAccessibleRelationSet() { + XAccessibleRelationSet set = oObj.getAccessibleRelationSet(); + return set != null; + } + + /** + * Just gets the set.

      + * + * Has OK status if the set is not null. + * @return + */ + public boolean _getAccessibleStateSet() { + XAccessibleStateSet set = oObj.getAccessibleStateSet(); + return set != null; + } + + /** + * Gets the locale.

      + * + * Has OK status if Country and + * Language fields of locale structure + * are not empty. + * @return + */ + public boolean _getLocale() { + Locale loc = null ; + try { + loc = oObj.getLocale(); + System.out.println("The locale is " + loc.Language + "," + loc.Country); + } catch (IllegalAccessibleComponentStateException e) { + e.printStackTrace(); + } + + return loc != null && loc.Language.length() > 0 && + loc.Country.length() > 0; + } +} + diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java new file mode 100755 index 000000000000..535c7ce36c68 --- /dev/null +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java @@ -0,0 +1,204 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.toolkit.accessibility; + +import com.sun.star.lang.EventObject; +import com.sun.star.awt.Rectangle; +import com.sun.star.awt.PosSize; +import com.sun.star.awt.XWindow; +import com.sun.star.accessibility.AccessibleEventObject; +import com.sun.star.accessibility.XAccessible; +import com.sun.star.accessibility.XAccessibleEventBroadcaster; +import com.sun.star.accessibility.XAccessibleEventListener; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; + +/** + * Testing + * com.sun.star.accessibility.XAccessibleEventBroadcaster + * interface methods : + *

        + *
      • addEventListener()
      • + *
      • removeEventListener()
      • + *

      + * + * This test needs the following object relations : + *

        + *
      • 'EventProducer' (of type + * ifc.accessibility._XAccessibleEventBroadcaster.EventProducer): + * this must be an implementation of the interface which could perform + * some actions for generating any kind of AccessibleEvent
      • + *

          + * + * @see com.sun.star.accessibility.XAccessibleEventBroadcaster + */ +public class _XAccessibleEventBroadcaster { + + public XAccessibleEventBroadcaster oObj = null; + EventProducer prod = null ; + EvListener list = new EvListener(); + + /** + * An event producer + */ + public static class EventProducer { + XWindow xWindow; + public EventProducer(XWindow window) { + xWindow = window; + } + + public void fireEvent() { + Rectangle newPosSize = xWindow.getPosSize(); + newPosSize.Width = newPosSize.Width - 20; + newPosSize.Height = newPosSize.Height - 20; + newPosSize.X = newPosSize.X + 20; + newPosSize.Y = newPosSize.Y + 20; + xWindow.setPosSize(newPosSize.X, newPosSize.Y, newPosSize.Width, + newPosSize.Height, PosSize.POSSIZE); + } + } + + /** + * Listener implementation which registers listener calls. + */ + private class EvListener implements XAccessibleEventListener { + public AccessibleEventObject notifiedEvent = null ; + public void notifyEvent(AccessibleEventObject ev) { + System.out.println("Listener, Event : " + ev.EventId); + System.out.println("EventID: " + ev.EventId); + Object old=ev.OldValue; + if (old instanceof com.sun.star.accessibility.XAccessible) { + System.out.println("Old: "+((XAccessible)old).getAccessibleContext().getAccessibleName()); + } + + Object nev=ev.NewValue; + if (nev instanceof com.sun.star.accessibility.XAccessible) { + System.out.println("New: "+((XAccessible)nev).getAccessibleContext().getAccessibleName()); + } + notifiedEvent = ev; + } + + public void disposing(EventObject ev) {} + } + + /** + * c'tor + * @param object + * @param eventMessage + * @param window + */ + public _XAccessibleEventBroadcaster(XInterface object, XWindow window) { + oObj = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, object); + prod = new EventProducer(window); + } + + /** + * Adds two listeners and fires event by mean of object relation.

          + * Has OK status if both listeners were called + * @return + */ + public boolean _addEventListener() { + System.out.println("adding two listeners"); + oObj.addEventListener(list); + boolean isTransient = chkTransient(oObj); + System.out.println("fire event"); + prod.fireEvent() ; + + try { + Thread.sleep(1500); + } + catch (InterruptedException ex) { + } + + boolean works = true; + + if (list.notifiedEvent == null) { + if (!isTransient) { + System.out.println("listener wasn't called"); + works = false; + } else { + System.out.println("Object is Transient, listener isn't expected to be called"); + } + oObj.removeEventListener(list); + } + + return works; + } + + /** + * Removes one of two listeners added before and and fires event + * by mean of object relation.

          + * + * Has OK status if the removed listener wasn't called.

          + * + * The following method tests are to be completed successfully before : + *

            + *
          • addEventListener() : to have added listeners
          • + *
          + * @return + */ + public boolean _removeEventListener() { + + list.notifiedEvent = null; + + System.out.println("remove first listener"); + oObj.removeEventListener(list); + + System.out.println("fire event"); + prod.fireEvent() ; + + try { + Thread.sleep(500); + } + catch (InterruptedException ex) { + } + + if (list.notifiedEvent == null) { + System.out.println("listener wasn't called -- OK"); + } + + return list.notifiedEvent == null; + + } + + protected static boolean chkTransient(Object Testcase) { + XAccessibleContext accCon = UnoRuntime.queryInterface(XAccessibleContext.class, Testcase); + if (accCon.getAccessibleStateSet().contains( + com.sun.star.accessibility.AccessibleStateType.TRANSIENT)){ + if (!accCon.getAccessibleParent().getAccessibleContext().getAccessibleStateSet().contains( + com.sun.star.accessibility.AccessibleStateType.MANAGES_DESCENDANTS)) { + return false; + } + return true; + } + return false; + } + +} + diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java new file mode 100755 index 000000000000..551b00acada7 --- /dev/null +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.toolkit.accessibility; + +// import lib.MultiMethodTest; +import com.sun.star.accessibility.XAccessibleExtendedComponent; +// import com.sun.star.accessibility.XAccessibleStateSet; +// import com.sun.star.accessibility.AccessibleStateType; +import com.sun.star.awt.XFont; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; +// import share.LogWriter; + +/** + * Testing com.sun.star.accessibility.XAccessibleExtendedComponent + * interface methods : + *
            + *
          • getForeground()
          • + *
          • getBackground()
          • + *
          • getFont()
          • + *
          • isEnabled()
          • + *
          • getTitledBorderText()
          • + *
          • getToolTipText()
          • + *

          + * @see com.sun.star.accessibility.XAccessibleExtendedComponent + */ +public class _XAccessibleExtendedComponent { + + // private LogWriter log; + private static final String className = + "com.sun.star.accessibility.XAccessibleExtendedComponent" ; + + public XAccessibleExtendedComponent oObj = null; + + // temporary while accessibility package is in com.sun.star + protected String getTestedClassName() { + return className; + } + + public _XAccessibleExtendedComponent(XInterface object/*, LogWriter log*/) { + oObj = UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, object); + // this.log = log; + } + + /** + * Just calls the method. + * @return + */ + public boolean _getFont() { + XFont font = oObj.getFont(); + System.out.println("getFont(): " + font); + return true; + } + + /** + * Calls the method and checks returned value. + * Has OK status if returned value isn't null. + * @return + */ + public boolean _getTitledBorderText() { + String titleBorderText = oObj.getTitledBorderText(); + System.out.println("getTitledBorderText(): '" + titleBorderText + "'"); + return titleBorderText != null; + } + + /** + * Calls the method and checks returned value. + * Has OK status if returned value isn't null. + * @return + */ + public boolean _getToolTipText() { + String toolTipText = oObj.getToolTipText(); + System.out.println("getToolTipText(): '" + toolTipText + "'"); + return toolTipText != null; + } +} diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java new file mode 100755 index 000000000000..a12d93a2d9e2 --- /dev/null +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java @@ -0,0 +1,1033 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.toolkit.accessibility; + +import com.sun.star.accessibility.XAccessibleText; +// import lib.MultiMethodTest; +//import lib.StatusException; +//import lib.Status; +import com.sun.star.beans.PropertyValue; +import com.sun.star.awt.Rectangle; +import com.sun.star.awt.Point; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.accessibility.AccessibleTextType; +import com.sun.star.accessibility.TextSegment; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; +// import share.LogWriter; + +/** + * Testing com.sun.star.accessibility.XAccessibleText + * interface methods : + *

            + *
          • getCaretPosition()
          • + *
          • setCaretPosition()
          • + *
          • getCharacter()
          • + *
          • getCharacterAttributes()
          • + *
          • getCharacterBounds()
          • + *
          • getCharacterCount()
          • + *
          • getIndexAtPoint()
          • + *
          • getSelectedText()
          • + *
          • getSelectionStart()
          • + *
          • getSelectionEnd()
          • + *
          • setSelection()
          • + *
          • getText()
          • + *
          • getTextRange()
          • + *
          • getTextAtIndex()
          • + *
          • getTextBeforeIndex()
          • + *
          • getTextBehindIndex()
          • + *
          • copyText()
          • + *

          + * This test needs the following object relations : + *

            + *
          • 'XAccessibleText.Text' (of type String) + * optional : + * the string presentation of component's text. If the relation + * is not specified, then text from method getText() + * is used. + *
          • + *

          + * @see com.sun.star.accessibility.XAccessibleText + */ +public class _XAccessibleText { + + // private LogWriter log; + + private static final String className = + "com.sun.star.accessibility.XAccessibleText" ; + + public XAccessibleText oObj = null; + private XMultiServiceFactory xMSF; + + Rectangle chBounds = null; + int chCount = 0; + + String text = null; + String editOnly = null; + + + public _XAccessibleText(XInterface object, XMultiServiceFactory xMSF, String editOnly) { + oObj = UnoRuntime.queryInterface(XAccessibleText.class, object); + this.xMSF = xMSF; + // this.log = log; + this.editOnly = editOnly; + } + + + /** + * Calls the method and checks returned value. + * Has OK status if returned value is equal to chCount - 1. + * The following method tests are to be executed before: + *

            + *
          • setCaretPosition()
          • + *
          + * @return + */ + public boolean _getCaretPosition() { + + if (editOnly != null) { + System.out.println(editOnly); + return true; + } + + boolean res = true; + if ( chCount > 0 ) { + try { + oObj.setCaretPosition(chCount - 1); + } catch (com.sun.star.lang.IndexOutOfBoundsException ie) { + + } + int carPos = oObj.getCaretPosition(); + System.out.println("getCaretPosition: " + carPos); + res = carPos == (chCount - 1); + } + return res; + } + + /** + * Calls the method with the wrong index and with the correct index + * chCount - 1. + * Has OK status if exception was thrown for wrong index and + * if exception wasn't thrown for the correct index. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _setCaretPosition() { + boolean res = true; + + try { + System.out.println("setCaretPosition(-1):"); + oObj.setCaretPosition(-1); + res &= false; + System.out.println("exception was expected"); + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("expected exception"); + res &= true; + } + + try { + System.out.println("setCaretPosition(chCount+1):"); + oObj.setCaretPosition(chCount+1); + res &= false; + System.out.println("exception was expected"); + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("expected exception"); + res &= true; + } + if ( chCount > 0 ) { + try { + System.out.println("setCaretPosition(chCount - 1)"); + oObj.setCaretPosition(chCount - 1); + res &= true; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("unexpected exception"); + e.printStackTrace(); + res &= false; + } + } + + return res; + } + + /** + * Calls the method with the wrong index and with the correct indexes. + * Checks every character in the text. + * Has OK status if exception was thrown for wrong index, + * if exception wasn't thrown for the correct index and + * if every character is equal to corresponding character in the text. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _getCharacter() { + boolean res = true; + + try { + System.out.println("getCharacter(-1)"); + oObj.getCharacter(-1); + System.out.println("Exception was expected"); + res = false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res = true; + } + + try { + System.out.println("getCharacter(chCount)"); + oObj.getCharacter(chCount); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("Checking of every character in the text..."); + boolean isEqCh = true; + for(int i = 0; i < chCount; i++) { + char ch = oObj.getCharacter(i); + isEqCh = ch == text.charAt(i); + res &= isEqCh; + if (!isEqCh) { + System.out.println("At the position " + i + + "was expected character: " + text.charAt(i)); + System.out.println("but was returned: " + ch); + break; + } + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + return res; + } + + /** + * Calls the method with the wrong indexes and with the correct index, + * checks a returned value. + * Has OK status if exception was thrown for the wrong indexes, + * if exception wasn't thrown for the correct index and + * if returned value isn't null. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _getCharacterAttributes() { + boolean res = true; + + try { + System.out.println("getCharacterAttributes(-1)"); + oObj.getCharacterAttributes(-1, new String[0]); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("getCharacterAttributes(chCount)"); + oObj.getCharacterAttributes(chCount, new String[0]); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + if ( chCount > 0 ) { + System.out.println("getCharacterAttributes(chCount-1)"); + PropertyValue[] props = oObj.getCharacterAttributes(chCount - 1, new String[0]); + res &= props != null; + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + return res; + } + + + /** + * Calls the method with the wrong indexes and with the correct index. + * checks and stores a returned value. + * Has OK status if exception was thrown for the wrong indexes, + * if exception wasn't thrown for the correct index and + * if returned value isn't null. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _getCharacterBounds() { + boolean res = true; + + try { + System.out.println("getCharacterBounds(-1)"); + oObj.getCharacterBounds(-1); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("getCharacterBounds(chCount)"); + oObj.getCharacterBounds(chCount); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + if (chCount > 0) { + System.out.println("getCharacterBounds(chCount-1)"); + chBounds = oObj.getCharacterBounds(chCount-1); + res &= chBounds != null; + System.out.println("rect: " + chBounds.X + ", " + chBounds.Y + ", " + + chBounds.Width + ", " + chBounds.Height); + } + + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + return res; + } + + + /** + * Calls the method and stores a returned value to the variable + * chCount. + * Has OK status if a returned value is equal to the text length. + * @return + */ + public boolean _getCharacterCount() { + chCount = oObj.getCharacterCount(); + System.out.println("Character count:" + chCount); + boolean res = chCount == text.length(); + return res; + } + + /** + * Calls the method for an invalid point and for the point of rectangle + * returned by the method getCharacterBounds(). + * Has OK status if returned value is equal to -1 for an + * invalid point and if returned value is equal to chCount-1 + * for a valid point. + * The following method tests are to be executed before: + *
            + *
          • getCharacterBounds()
          • + *
          + * @return + */ + public boolean _getIndexAtPoint() { + + boolean res = true; + System.out.println("getIndexAtPoint(-1, -1):"); + Point pt = new Point(-1, -1); + int index = oObj.getIndexAtPoint(pt); + System.out.println(Integer.toString(index)); + res &= index == -1; + + if (chBounds != null) { + pt = new Point(chBounds.X , chBounds.Y ); + System.out.println("getIndexAtPoint(" + pt.X + ", " + pt.Y + "):"); + index = oObj.getIndexAtPoint(pt); + System.out.println(Integer.toString(index)); + res &= index == (chCount - 1); + } + + return res; + } + + /** + * Checks a returned values after different calls of the method + * setSelection(). + * The following method tests are to be executed before: + *
            + *
          • setSelection()
          • + *
          + * @return + */ + public boolean _getSelectedText() { + if (editOnly != null) { + System.out.println(editOnly); + return true; + } + + boolean res = true; + + try { + System.out.println("setSelection(0, 0)"); + oObj.setSelection(0, 0); + System.out.println("getSelectedText():"); + String txt = oObj.getSelectedText(); + System.out.println("'" + txt + "'"); + res &= txt.length() == 0; + + System.out.println("setSelection(0, chCount)"); + oObj.setSelection(0, chCount); + System.out.println("getSelectedText():"); + txt = oObj.getSelectedText(); + System.out.println("'" + txt + "'"); + res &= txt.equals(text); + + if (chCount > 2) { + System.out.println("setSelection(1, chCount-1)"); + oObj.setSelection(1, chCount - 1); + System.out.println("getSelectedText():"); + txt = oObj.getSelectedText(); + System.out.println("'" + txt + "'"); + res &= txt.equals(text.substring(1, chCount - 1)); + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + return res; + } + + /** + * Checks a returned values after different calls of the method + * setSelection(). + * The following method tests are to be executed before: + *
            + *
          • setSelection()
          • + *
          + * @return + */ + public boolean _getSelectionStart() { + if (editOnly != null) { + System.out.println(editOnly); + return true; + } + + boolean res = true; + + try { + System.out.println("setSelection(0, chCount)"); + oObj.setSelection(0, chCount); + int start = oObj.getSelectionStart(); + System.out.println("getSelectionStart():" + start); + res &= start == 0; + + if (chCount > 2) { + System.out.println("setSelection(1, chCount-1)"); + oObj.setSelection(1, chCount - 1); + start = oObj.getSelectionStart(); + System.out.println("getSelectionStart():" + start); + res &= start == 1; + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + return res; + } + + /** + * Checks a returned values after different calls of the method + * setSelection(). + * The following method tests are to be executed before: + *
            + *
          • setSelection()
          • + *
          + * @return + */ + public boolean _getSelectionEnd() { + if (editOnly != null) { + System.out.println(editOnly); + return true; + } + + boolean res = true; + + try { + System.out.println("setSelection(0, chCount)"); + oObj.setSelection(0, chCount); + int end = oObj.getSelectionEnd(); + System.out.println("getSelectionEnd():" + end); + res &= end == chCount; + + if (chCount > 2) { + System.out.println("setSelection(1, chCount-1)"); + oObj.setSelection(1, chCount - 1); + end = oObj.getSelectionEnd(); + System.out.println("getSelectionEnd():" + end); + res &= end == chCount - 1; + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + return res; + } + + /** + * Calls the method with invalid parameters an with valid parameters. + * Has OK status if exception was thrown for invalid parameters, + * if exception wasn't thrown for valid parameters. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _setSelection() { + boolean res = true; + boolean locRes = true; + + if (editOnly != null) { + System.out.println(editOnly); + return true; + } + + try { + System.out.println("setSelection(-1, chCount-1):"); + locRes = oObj.setSelection(-1, chCount - 1); + System.out.println(locRes + " exception was expected"); + res &= !locRes; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("setSelection(0, chCount+1):"); + locRes = oObj.setSelection(0, chCount + 1); + System.out.println(locRes + " excepion was expected"); + res &= !locRes; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + if (chCount > 2) { + System.out.println("setSelection(1, chCount-1):"); + locRes = oObj.setSelection(1, chCount - 1); + System.out.println(Boolean.toString(locRes)); + res &= locRes; + + System.out.println("setSelection(chCount-1, 1):"); + locRes = oObj.setSelection(chCount - 1, 1); + System.out.println(Boolean.toString(locRes)); + res &= locRes; + } + + if (chCount > 1) { + System.out.println("setSelection(0, chCount-1):"); + locRes = oObj.setSelection(0, chCount-1); + System.out.println(Boolean.toString(locRes)); + res &= locRes; + + System.out.println("setSelection(chCount-1, 0):"); + locRes = oObj.setSelection(chCount-1, 0); + System.out.println(Boolean.toString(locRes)); + res &= locRes; + } + + System.out.println("setSelection(0, 0):"); + locRes = oObj.setSelection(0, 0); + System.out.println(Boolean.toString(locRes)); + res &= locRes; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + return res; + } + + /** + * Calls the method and checks returned value. + * Has OK status if returned string is not null + * received from relation. + * @return + */ + public boolean _getText() { + text = oObj.getText(); + System.out.println("getText: '" + text + "'"); + return (text != null); + } + + /** + * Calls the method with invalid parameters an with valid parameters, + * checks returned values. + * Has OK status if exception was thrown for invalid parameters, + * if exception wasn't thrown for valid parameters and if returned values + * are equal to corresponding substrings of the text received by relation. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _getTextRange() { + boolean res = true; + boolean locRes = true; + + try { + if (chCount > 3) { + System.out.println("getTextRange(1, chCount - 2): "); + String txtRange = oObj.getTextRange(1, chCount - 2); + System.out.println(txtRange); + locRes = txtRange.equals(text.substring(1, chCount - 2)); + res &= locRes; + if (!locRes) { + System.out.println("Was expected: " + + text.substring(1, chCount - 2)); + } + } + + if (chCount > 0) { + System.out.println("getTextRange(0, chCount-1): "); + String txtRange = oObj.getTextRange(0, chCount-1); + System.out.println(txtRange); + locRes = txtRange.equals(text.substring(0, chCount - 1)); + res &= locRes; + if (!locRes) { + System.out.println("Was expected: " + + text.substring(0, chCount - 1)); + } + + System.out.println("getTextRange(chCount, 0): "); + txtRange = oObj.getTextRange(chCount, 0); + System.out.println(txtRange); + res &= txtRange.equals(text); + + System.out.println("getTextRange(0, 0): "); + txtRange = oObj.getTextRange(0, 0); + System.out.println(txtRange); + locRes = txtRange.equals(""); + res &= locRes; + if (!locRes) { + System.out.println("Empty string was expected"); + } + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + try { + System.out.println("getTextRange(-1, chCount - 1): "); + String txtRange = oObj.getTextRange(-1, chCount - 1); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("getTextRange(0, chCount + 1): "); + String txtRange = oObj.getTextRange(0, chCount + 1); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("getTextRange(chCount+1, -1): "); + String txtRange = oObj.getTextRange(chCount+1, -1); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + return res; + } + + /** + * Calls the method with invalid parameters an with valid parameters, + * checks returned values. + * Has OK status if exception was thrown for invalid parameters, + * if exception wasn't thrown for valid parameters and if returned values + * are equal to corresponding substrings of the text received by relation. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _getTextAtIndex() { + boolean res = true; + + try { + System.out.println("getTextAtIndex(-1, AccessibleTextType.PARAGRAPH):"); + TextSegment txt = + oObj.getTextAtIndex(-1, AccessibleTextType.PARAGRAPH); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("getTextAtIndex(chCount+1," + + " AccessibleTextType.PARAGRAPH):"); + TextSegment txt = oObj.getTextAtIndex(chCount + 1, + AccessibleTextType.PARAGRAPH); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Expected exception"); + res &= true; + } + + + try { + if ( chCount > 0 ) { + System.out.println("getTextAtIndex(chCount," + + " AccessibleTextType.PARAGRAPH):"); + TextSegment txt = oObj.getTextAtIndex(chCount, + AccessibleTextType.PARAGRAPH); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.length() == 0; + + System.out.println("getTextAtIndex(1," + + " AccessibleTextType.PARAGRAPH):"); + txt = oObj.getTextAtIndex(1, + AccessibleTextType.PARAGRAPH); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.equals(text); + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Unexpected exception"); + res &= false; + } + + + return res; + } + + /** + * Calls the method with invalid parameters an with valid parameters, + * checks returned values. + * Has OK status if exception was thrown for invalid parameters, + * if exception wasn't thrown for valid parameters and if returned values + * are equal to corresponding substrings of the text received by relation. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _getTextBeforeIndex() { + boolean res = true; + + try { + System.out.println("getTextBeforeIndex(-1, AccessibleTextType.PARAGRAPH):"); + TextSegment txt = oObj.getTextBeforeIndex(-1, + AccessibleTextType.PARAGRAPH); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Expected exception"); + res &= true; + } + + + try { + System.out.println("getTextBeforeIndex(chCount+1, " + + "AccessibleTextType.PARAGRAPH):"); + TextSegment txt = oObj.getTextBeforeIndex(chCount + 1, + AccessibleTextType.PARAGRAPH); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Expected exception"); + res &= true; + } + + TextSegment txt = null; + try { + if (chCount > 0) { + System.out.println("getTextBeforeIndex(chCount," + + " AccessibleTextType.PARAGRAPH):"); + txt = oObj.getTextBeforeIndex(chCount, + AccessibleTextType.PARAGRAPH); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.length() == chCount ; + + System.out.println("getTextBeforeIndex(1," + + " AccessibleTextType.PARAGRAPH):"); + txt = oObj.getTextBeforeIndex(1, + AccessibleTextType.PARAGRAPH); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.length() == 0; + } + + if (chCount > 2) { + System.out.println("getTextBeforeIndex(chCount-1," + + " AccessibleTextType.CHARACTER):"); + txt = oObj.getTextBeforeIndex(chCount - 1, + AccessibleTextType.CHARACTER); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.equals(text.substring(chCount - 2, chCount - 1)); + System.out.println("getTextBeforeIndex(2," + + " AccessibleTextType.CHARACTER):"); + txt = oObj.getTextBeforeIndex(2, + AccessibleTextType.CHARACTER); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.equals(text.substring(1, 2)); + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Unexpected exception"); + res &= false; + } + + + return res; + } + + /** + * Calls the method with invalid parameters an with valid parameters, + * checks returned values. + * Has OK status if exception was thrown for invalid parameters, + * if exception wasn't thrown for valid parameters and if returned values + * are equal to corresponding substrings of the text received by relation. + * The following method tests are to be executed before: + *
            + *
          • getCharacterCount()
          • + *
          + * @return + */ + public boolean _getTextBehindIndex() { + boolean res = true; + + try { + System.out.println("getTextBehindIndex(-1, AccessibleTextType.PARAGRAPH):"); + TextSegment txt = oObj.getTextBehindIndex(-1, + AccessibleTextType.PARAGRAPH); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Expected exception"); + res &= true; + } + + + try { + System.out.println("getTextBehindIndex(chCount+1, " + + "AccessibleTextType.PARAGRAPH):"); + TextSegment txt = oObj.getTextBehindIndex(chCount + 1, + AccessibleTextType.PARAGRAPH); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Expected exception"); + res &= true; + } + + + try { + if ( chCount > 0 ) { + System.out.println("getTextBehindIndex(chCount," + + " AccessibleTextType.PARAGRAPH):"); + TextSegment txt = oObj.getTextBehindIndex(chCount, + AccessibleTextType.PARAGRAPH); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.length() == 0; + + System.out.println("getTextBehindIndex(chCount-1," + + " AccessibleTextType.PARAGRAPH):"); + txt = oObj.getTextBehindIndex(chCount - 1, + AccessibleTextType.PARAGRAPH); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.length() == 0; + } + if ( chCount > 1 ) { + System.out.println("getTextBehindIndex(1," + + " AccessibleTextType.CHARACTER):"); + TextSegment txt = oObj.getTextBehindIndex(1, + AccessibleTextType.CHARACTER); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.equals(text.substring(2, 3)); + } + if (chCount > 2) { + System.out.println("getTextBehindIndex(chCount-2," + + " AccessibleTextType.CHARACTER):"); + TextSegment txt = oObj.getTextBehindIndex(chCount - 2, + AccessibleTextType.CHARACTER); + System.out.println("'" + txt.SegmentText + "'"); + res &= txt.SegmentText.equals(text.substring(chCount - 1, chCount)); + } + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } catch(com.sun.star.lang.IllegalArgumentException e) { + System.out.println("Unexpected exception"); + res &= false; + } + + + return res; + } + + /** + * Calls the method with invalid parameters an with valid parameter, + * checks returned values. + * Has OK status if exception was thrown for invalid parameters, + * if exception wasn't thrown for valid parameter and if returned value for + * valid parameter is equal to true. + * @return + */ + public boolean _copyText() { + boolean res = true; + boolean locRes = true; + + if (editOnly != null) { + System.out.println(editOnly); + return true; + } + + try { + System.out.println("copyText(-1,chCount):"); + oObj.copyText(-1, chCount); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("copyText(0,chCount+1):"); + oObj.copyText(0, chCount + 1); + System.out.println("Exception was expected"); + res &= false; + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Expected exception"); + res &= true; + } + + try { + System.out.println("copyText(0,chCount):"); + locRes = oObj.copyText(0, chCount); + System.out.println(""+locRes); + res &= locRes; + + String cbText = null; + try { + cbText = + util.SysUtils.getSysClipboardText(xMSF); + } catch (com.sun.star.uno.Exception e) { + System.out.println("Couldn't access system clipboard :"); + e.printStackTrace(); + } + System.out.println("Clipboard: '" + cbText + "'"); + res &= text.equals(cbText); + + if (chCount > 2) { + System.out.println("copyText(1,chCount-1):"); + locRes = oObj.copyText(1, chCount - 1); + System.out.println(""+locRes); + res &= locRes; + + try { + cbText = util.SysUtils.getSysClipboardText(xMSF); + } catch (com.sun.star.uno.Exception e) { + System.out.println("Couldn't access system clipboard :"); + e.printStackTrace(); + } + + System.out.println("Clipboard: '" + cbText + "'"); + res &= text.substring(1, chCount - 1).equals(cbText); + } + + } catch(com.sun.star.lang.IndexOutOfBoundsException e) { + System.out.println("Unexpected exception"); + e.printStackTrace(); + res &= false; + } + + return res; + } +} diff --git a/toolkit/qa/complex/toolkit/interface_tests/makefile.mk b/toolkit/qa/complex/toolkit/interface_tests/makefile.mk deleted file mode 100755 index 7d8c4c951d4e..000000000000 --- a/toolkit/qa/complex/toolkit/interface_tests/makefile.mk +++ /dev/null @@ -1,57 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ../../../.. -TARGET = Toolkit -PRJNAME = $(TARGET) -PACKAGE = complex/toolkit/interface_tests - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -JAVAFILES = _XAccessibleComponent.java \ - _XAccessibleContext.java \ - _XAccessibleExtendedComponent.java \ - _XAccessibleEventBroadcaster.java \ - _XAccessibleText.java \ - _XRequestCallback.java -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class) - -# --- Targets ------------------------------------------------------ - -.IF "$(depend)" == "" -ALL : ALLTAR -.ELSE -ALL: ALLDEP -.ENDIF - -.INCLUDE : target.mk - diff --git a/toolkit/qa/complex/toolkit/makefile.mk b/toolkit/qa/complex/toolkit/makefile.mk index 70918d602624..63605dace711 100755 --- a/toolkit/qa/complex/toolkit/makefile.mk +++ b/toolkit/qa/complex/toolkit/makefile.mk @@ -25,96 +25,65 @@ # #************************************************************************* -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +.IF "$(OOO_JUNIT_JAR)" == "" nothing .PHONY: -.ELSE + @echo ----------------------------------------------------- + @echo - JUnit not available, not building anything + @echo ----------------------------------------------------- +.ELSE # IF "$(OOO_JUNIT_JAR)" != "" PRJ = ../../.. PRJNAME = toolkit TARGET = qa_complex_toolkit - -.IF "$(OOO_JUNIT_JAR)" != "" PACKAGE = complex/toolkit -JAVATESTFILES = CheckAccessibleStatusBar.java \ - CheckAccessibleStatusBarItem.java \ - CheckAsyncCallback.java \ - CallbackClass.java +# --- Settings ----------------------------------------------------- +.INCLUDE: settings.mk -JAVAFILES = $(JAVATESTFILES) \ - _XAccessibleComponent.java \ - _XAccessibleContext.java \ - _XAccessibleEventBroadcaster.java \ - _XAccessibleExtendedComponent.java \ - _XAccessibleText.java \ - _XRequestCallback.java +#----- compile .java files ----------------------------------------- -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar +JARFILES = OOoRunnerLight.jar ridl.jar test.jar unoil.jar EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END +JAVAFILES = \ + $(JAVATESTFILES) \ + accessibility/_XAccessibleComponent.java \ + accessibility/_XAccessibleContext.java \ + accessibility/_XAccessibleEventBroadcaster.java \ + accessibility/_XAccessibleExtendedComponent.java \ + accessibility/_XAccessibleText.java \ + +#----- create a jar from compiled files ---------------------------- + +JARTARGET = $(TARGET).jar + +#----- JUnit tests class ------------------------------------------- + +JAVATESTFILES = \ + UnitConversion.java \ + AccessibleStatusBar.java \ + +# fails; no issue, yet (not sure this is worth it. Don't know who to give the issue to, and don't know whether the test really makes sense) +# AccessibleStatusBarItem.java \ + + +# --- Targets ------------------------------------------------------ -.INCLUDE: settings.mk .INCLUDE: target.mk + +ALL : ALLTAR + +# --- subsequent tests --------------------------------------------- + +.IF "$(OOO_SUBSEQUENT_TESTS)" != "" + .INCLUDE: installationtest.mk ALLTAR : javatest -.END + # Sample how to debug + # JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y +.END # "$(OOO_SUBSEQUENT_TESTS)" == "" -# PRJ = ..$/..$/.. -# TARGET = Toolkit -# PRJNAME = $(TARGET) -# PACKAGE = complex$/toolkit -# -# # --- Settings ----------------------------------------------------- -# .INCLUDE: settings.mk -# -# -# #----- compile .java files ----------------------------------------- -# -# JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -# JAVAFILES = CheckAccessibleStatusBar.java CheckAccessibleStatusBarItem.java CheckAsyncCallback.java CallbackClass.java -# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -# SUBDIRS = interface_tests -# -# #----- make a jar from compiled files ------------------------------ -# -# MAXLINELENGTH = 100000 -# -# JARCLASSDIRS = $(PACKAGE) -# JARTARGET = $(TARGET).jar -# JARCOMPRESS = TRUE -# -# # --- Parameters for the test -------------------------------------- -# -# # start an office if the parameter is set for the makefile -# .IF "$(OFFICE)" == "" -# CT_APPEXECCOMMAND = -# .ELSE -# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -# .ENDIF -# -# # test base is java complex -# CT_TESTBASE = -tb java_complex -# -# # build up package name with "." instead of $/ -# CT_PACKAGE = -o $(PACKAGE:s\$/\.\) -# -# # start the runner application -# CT_APP = org.openoffice.Runner -# -# # --- Targets ------------------------------------------------------ -# -# .INCLUDE : target.mk -# -# run: \ -# CheckAccessibleStatusBarItem -# -# CheckAccessibleStatusBar: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckAccessibleStatusBar -# -# CheckAccessibleStatusBarItem: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckAccessibleStatusBarItem -# +.END # ELSE "$(OOO_JUNIT_JAR)" != "" diff --git a/toolkit/qa/complex/xunitconversion/XUnitConversionTest.java b/toolkit/qa/complex/xunitconversion/XUnitConversionTest.java deleted file mode 100644 index f9840e4bde6f..000000000000 --- a/toolkit/qa/complex/xunitconversion/XUnitConversionTest.java +++ /dev/null @@ -1,250 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.xunitconversion; - -import com.sun.star.awt.XUnitConversion; -import com.sun.star.uno.UnoRuntime; - -import com.sun.star.awt.XWindow; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.awt.XWindowPeer; - -import util.DesktopTools; - -// import org.junit.After; -import org.junit.AfterClass; -// import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.openoffice.test.OfficeConnection; -import static org.junit.Assert.*; - -/** - * This complex test is only for testing the com.sun.star.awt.XUnitConversion methods - * These are converter methods to get the size of a well known awt component - * in a com.sun.star.util.MeasureUnit you want. - * You don't need to know the factors to calculate by hand. - * - * @author ll93751 - */ -public class XUnitConversionTest -{ -// public String[] getTestMethodNames() -// { -// return new String[]{"testXUnitConversion"}; // function name of the test method -// } - - /** - * returns the delta value between a and b - * @param a - * @param b - * @return - */ - private int delta(int a, int b) - { - final int n = Math.abs(a - b); - return n; - } - - private XUnitConversion m_xConversion = null; - - /** - * Not really a check, - * only a simple test call to convertSizeToLogic(...) with different parameters - * @param _aSize - * @param _aMeasureUnit - * @param _sEinheit - */ - private void checkSize(com.sun.star.awt.Size _aSize, short _aMeasureUnit, String _sEinheit) - { - try - { - com.sun.star.awt.Size aSizeIn = m_xConversion.convertSizeToLogic(_aSize, _aMeasureUnit); - System.out.println("Window size:"); - System.out.println("Width:" + aSizeIn.Width + " " + _sEinheit); - System.out.println("Height:" + aSizeIn.Height + " " + _sEinheit); - System.out.println(""); - } - catch (com.sun.star.lang.IllegalArgumentException e) - { - System.out.println("Caught IllegalArgumentException in convertSizeToLogic with '" + _sEinheit + "' " + e.getMessage()); - } - } - -/** - * The real test function - * 1. try to get the XMultiServiceFactory of an already running office. Therefore make sure an (open|star)office is running with - * parameters like -accept="socket,host=localhost,port=8100;urp;" - * 2. try to create an empty window - * 3. try to convert the WindowPeer to an XWindow - * 4. try to resize and move the window to an other position, so we get a well knowing position and size. - * 5. run some more tests - * - * If no test fails, the test is well done and returns with 'PASSED, OK' - * - */ - @Test public void testXUnitConversion() - { - // XMultiServiceFactory xMSF = (XMultiServiceFactory) param.getMSF(); - final XMultiServiceFactory xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); - - assertNotNull("failed: There is no office.", xMSF); - - // create a window - XWindowPeer xWindowPeer = DesktopTools.createFloatingWindow(xMSF); - assertNotNull("failed: there is no window peer", xWindowPeer); - - - // resize and move the window to a well known position and size - XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, xWindowPeer); - assertNotNull("failed: there is no window, cast wrong?", xWindow); - - xWindow.setVisible(Boolean.TRUE); - - int x = 100; - int y = 100; - int width = 640; - int height = 480; - xWindow.setPosSize(x, y, width, height, com.sun.star.awt.PosSize.POSSIZE); - - com.sun.star.awt.Rectangle aRect = xWindow.getPosSize(); - com.sun.star.awt.Point aPoint = new com.sun.star.awt.Point(aRect.X, aRect.Y); - com.sun.star.awt.Size aSize = new com.sun.star.awt.Size(aRect.Width, aRect.Height); - - System.out.println("Window position and size in pixel:"); - System.out.println("X:" + aPoint.X); - System.out.println("Y:" + aPoint.Y); - System.out.println("Width:" + aSize.Width); - System.out.println("Height:" + aSize.Height); - System.out.println(""); - - assertTrue("Window pos size wrong", aSize.Width == width && aSize.Height == height && aPoint.X == x && aPoint.Y == y); - - // XToolkit aToolkit = xWindowPeer.getToolkit(); - m_xConversion = UnoRuntime.queryInterface(XUnitConversion.class, xWindowPeer); - - // try to get the position of the window in 1/100mm with the XUnitConversion method - try - { - com.sun.star.awt.Point aPointInMM_100TH = m_xConversion.convertPointToLogic(aPoint, com.sun.star.util.MeasureUnit.MM_100TH); - System.out.println("Window position:"); - System.out.println("X:" + aPointInMM_100TH.X + " 1/100mm"); - System.out.println("Y:" + aPointInMM_100TH.Y + " 1/100mm"); - System.out.println(""); - } - catch (com.sun.star.lang.IllegalArgumentException e) - { - fail("failed: IllegalArgumentException caught in convertPointToLogic " + e.getMessage()); - } - - // try to get the size of the window in 1/100mm with the XUnitConversion method - com.sun.star.awt.Size aSizeInMM_100TH = null; - com.sun.star.awt.Size aSizeInMM_10TH = null; - try - { - aSizeInMM_100TH = m_xConversion.convertSizeToLogic(aSize, com.sun.star.util.MeasureUnit.MM_100TH); - System.out.println("Window size:"); - System.out.println("Width:" + aSizeInMM_100TH.Width + " 1/100mm"); - System.out.println("Height:" + aSizeInMM_100TH.Height + " 1/100mm"); - System.out.println(""); - - // try to get the size of the window in 1/10mm with the XUnitConversion method - - aSizeInMM_10TH = m_xConversion.convertSizeToLogic(aSize, com.sun.star.util.MeasureUnit.MM_10TH); - System.out.println("Window size:"); - System.out.println("Width:" + aSizeInMM_10TH.Width + " 1/10mm"); - System.out.println("Height:" + aSizeInMM_10TH.Height + " 1/10mm"); - System.out.println(""); - - // check the size with a delta which must be smaller a given difference - assertTrue("Size.Width not correct", delta(aSizeInMM_100TH.Width, aSizeInMM_10TH.Width * 10) < 10); - assertTrue("Size.Height not correct", delta(aSizeInMM_100TH.Height, aSizeInMM_10TH.Height * 10) < 10); - - // new - checkSize(aSize, com.sun.star.util.MeasureUnit.PIXEL, "pixel"); - checkSize(aSize, com.sun.star.util.MeasureUnit.APPFONT, "appfont"); - checkSize(aSize, com.sun.star.util.MeasureUnit.SYSFONT, "sysfont"); - - // simply check some more parameters - checkSize(aSize, com.sun.star.util.MeasureUnit.MM, "mm"); - checkSize(aSize, com.sun.star.util.MeasureUnit.CM, "cm"); - checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_1000TH, "1/1000inch"); - checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_100TH, "1/100inch"); - checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_10TH, "1/10inch"); - checkSize(aSize, com.sun.star.util.MeasureUnit.INCH, "inch"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.M, "m"); - checkSize(aSize, com.sun.star.util.MeasureUnit.POINT, "point"); - checkSize(aSize, com.sun.star.util.MeasureUnit.TWIP, "twip"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.KM, "km"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.PICA, "pica"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.FOOT, "foot"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.MILE, "mile"); - } - catch (com.sun.star.lang.IllegalArgumentException e) - { - fail("failed: IllegalArgumentException caught in convertSizeToLogic " + e.getMessage()); - } - - // convert the 1/100mm window size back to pixel - try - { - com.sun.star.awt.Size aNewSize = m_xConversion.convertSizeToPixel(aSizeInMM_100TH, com.sun.star.util.MeasureUnit.MM_100TH); - System.out.println("Window size:"); - System.out.println("Width:" + aNewSize.Width + " pixel"); - System.out.println("Height:" + aNewSize.Height + " pixel"); - - // assure the pixels are the same as we already know - assertTrue("failed: Size from pixel to 1/100mm to pixel", aSize.Width == aNewSize.Width && aSize.Height == aNewSize.Height); - } - catch (com.sun.star.lang.IllegalArgumentException e) - { - fail("failed: IllegalArgumentException caught in convertSizeToPixel " + e.getMessage()); - } - - // close the window. - // IMHO a little bit stupid, but the XWindow doesn't support a XCloseable interface - xWindow.dispose(); - } - - - - @BeforeClass public static void setUpConnection() throws Exception { - System.out.println("setUpConnection()"); - connection.setUp(); - } - - @AfterClass public static void tearDownConnection() - throws InterruptedException, com.sun.star.uno.Exception - { - System.out.println("tearDownConnection()"); - connection.tearDown(); - } - - private static final OfficeConnection connection = new OfficeConnection(); - -} diff --git a/toolkit/qa/complex/xunitconversion/makefile.mk b/toolkit/qa/complex/xunitconversion/makefile.mk deleted file mode 100644 index bc5a0e7c5949..000000000000 --- a/toolkit/qa/complex/xunitconversion/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sc -TARGET = qa_complex_xunitconversiontest - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/xunitconversion - -JAVATESTFILES = \ - XUnitConversionTest.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 267c4a6b5bef..491e5b8bb5cc 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -154,9 +154,10 @@ Reference< XPropertySetInfo > UnoGridModel::getPropertySetInfo( ) throw(Runtime // ---------------------------------------------------- // class UnoGridControl // ---------------------------------------------------- -UnoGridControl::UnoGridControl() -: mSelectionMode(SelectionType(1)), - m_aSelectionListeners( *this ) +UnoGridControl::UnoGridControl( const Reference< XMultiServiceFactory >& i_factory ) + :UnoGridControl_Base( i_factory ) + ,mSelectionMode(SelectionType(1)) + ,m_aSelectionListeners( *this ) { } @@ -274,9 +275,9 @@ void SAL_CALL UnoGridControl::removeSelectionListener(const ::com::sun::star::un } }//namespace toolkit -Reference< XInterface > SAL_CALL GridControl_CreateInstance( const Reference< XMultiServiceFactory >& ) +Reference< XInterface > SAL_CALL GridControl_CreateInstance( const Reference< XMultiServiceFactory >& i_factory ) { - return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridControl ); + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridControl( i_factory ) ); } Reference< XInterface > SAL_CALL GridControlModel_CreateInstance( const Reference< XMultiServiceFactory >& i_factory ) diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index e69cab9a8368..600687a3633b 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -212,7 +212,7 @@ Polygon VCLUnoHelper::CreatePolygon( const ::com::sun::star::uno::Sequence< sal_ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> VCLUnoHelper::CreateControlContainer( Window* pWindow ) { - const uno::Reference< lang::FDXMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + const uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); UnoControlContainer* pContainer = new UnoControlContainer( xFactory, pWindow->GetComponentInterface( sal_True ) ); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > x = pContainer; -- cgit From 2d8c797828962d0a5fb0725c15d1de6b33a04e8b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 7 Dec 2010 09:51:15 +0100 Subject: gridsort: no reason to burden each and every client with creating a default Data/Column model - do this in the ctor of the grid model. If clients want to override this, they of course still can do --- svtools/source/uno/svtxgridcontrol.cxx | 116 +++++++++++++-------------- toolkit/source/controls/grid/gridcontrol.cxx | 9 +++ 2 files changed, 64 insertions(+), 61 deletions(-) mode change 100755 => 100644 svtools/source/uno/svtxgridcontrol.cxx diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx old mode 100755 new mode 100644 index f5bc837f60b0..b1bcfbe7edd5 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -263,45 +263,44 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An { { m_xDataModel = Reference< XGridDataModel >( aValue, UNO_QUERY ); - if(m_xDataModel != NULL) + if ( !m_xDataModel.is() ) + throw GridInvalidDataException(rtl::OUString::createFromAscii("The data model isn't set!"), m_xDataModel); + + Sequence > cellData = m_xDataModel->getData(); + if(cellData.getLength()!= 0) { - Sequence > cellData = m_xDataModel->getData(); - if(cellData.getLength()!= 0) + for (int i = 0; i < cellData.getLength(); i++) { - for (int i = 0; i < cellData.getLength(); i++) + std::vector< Any > newRow; + Sequence< Any > rawRowData = cellData[i]; + //check whether the data row vector length matches with the column count + if(m_xColumnModel->getColumnCount() == 0) { - std::vector< Any > newRow; - Sequence< Any > rawRowData = cellData[i]; - //check whether the data row vector length matches with the column count - if(m_xColumnModel->getColumnCount() == 0) - { - for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col ) - { - UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); - m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn); - } - m_xColumnModel->setDefaultColumns(rawRowData.getLength()); - } - else - if((unsigned int)rawRowData.getLength()!=(unsigned)m_pTableModel->getColumnCount()) - throw GridInvalidDataException(rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), m_xDataModel); - - for ( int k = 0; k < rawRowData.getLength(); k++) + for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col ) { - newRow.push_back(rawRowData[k]); + UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); + m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn); } - m_pTableModel->getCellContent().push_back(newRow); + m_xColumnModel->setDefaultColumns(rawRowData.getLength()); } + else + if((unsigned int)rawRowData.getLength()!=(unsigned)m_pTableModel->getColumnCount()) + throw GridInvalidDataException(rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), m_xDataModel); - Sequence< ::rtl::OUString > rowHeaders = m_xDataModel->getRowHeaders(); - std::vector< rtl::OUString > newRow( - comphelper::sequenceToContainer< std::vector >(rowHeaders)); - m_pTableModel->setRowCount(m_xDataModel->getRowCount()); - m_pTableModel->setRowHeaderName(newRow); + for ( int k = 0; k < rawRowData.getLength(); k++) + { + newRow.push_back(rawRowData[k]); + } + m_pTableModel->getCellContent().push_back(newRow); } + + Sequence< ::rtl::OUString > rowHeaders = m_xDataModel->getRowHeaders(); + std::vector< rtl::OUString > newRow( + comphelper::sequenceToContainer< std::vector >(rowHeaders)); + m_pTableModel->setRowCount(m_xDataModel->getRowCount()); + m_pTableModel->setRowHeaderName(newRow); } - else - throw GridInvalidDataException(rtl::OUString::createFromAscii("The data model isn't set!"), m_xDataModel); + sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height(); if(m_xDataModel->getRowHeight() == 0) { @@ -316,41 +315,36 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_COLUMNMODEL: { - m_xColumnModel = Reference< XGridColumnModel >( aValue, UNO_QUERY ); - if(m_xColumnModel != NULL) + m_xColumnModel = Reference< XGridColumnModel >( aValue, UNO_QUERY_THROW ); + if(m_xColumnModel->getColumnCount() != 0) { - if(m_xColumnModel->getColumnCount() != 0) + Sequence > columns = m_xColumnModel->getColumns(); + std::vector > aNewColumns( + comphelper::sequenceToContainer > >(columns)); + sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height(); + if(m_xColumnModel->getColumnHeaderHeight() == 0) { - Sequence > columns = m_xColumnModel->getColumns(); - std::vector > aNewColumns( - comphelper::sequenceToContainer > >(columns)); - sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height(); - if(m_xColumnModel->getColumnHeaderHeight() == 0) - { - m_pTableModel->setColumnHeaderHeight(fontHeight); - m_xColumnModel->setColumnHeaderHeight(fontHeight); - } - else - m_pTableModel->setColumnHeaderHeight(m_xColumnModel->getColumnHeaderHeight()); - for ( ::svt::table::ColPos col = 0; col < m_xColumnModel->getColumnCount(); ++col ) - { - UnoControlTableColumn* tableColumn = new UnoControlTableColumn(aNewColumns[col]); - Reference< XGridColumn > xGridColumn = m_xColumnModel->getColumn(col); - m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn); - tableColumn->setHorizontalAlign(xGridColumn->getHorizontalAlign()); - tableColumn->setWidth(xGridColumn->getColumnWidth()); - if(xGridColumn->getPreferredWidth() != 0) - tableColumn->setPreferredWidth(xGridColumn->getPreferredWidth()); - if(xGridColumn->getMaxWidth() != 0) - tableColumn->setMaxWidth(xGridColumn->getMaxWidth()); - if(xGridColumn->getMinWidth() != 0) - tableColumn->setMinWidth(xGridColumn->getMinWidth()); - tableColumn->setResizable(xGridColumn->getResizeable()); - } + m_pTableModel->setColumnHeaderHeight(fontHeight); + m_xColumnModel->setColumnHeaderHeight(fontHeight); + } + else + m_pTableModel->setColumnHeaderHeight(m_xColumnModel->getColumnHeaderHeight()); + for ( ::svt::table::ColPos col = 0; col < m_xColumnModel->getColumnCount(); ++col ) + { + UnoControlTableColumn* tableColumn = new UnoControlTableColumn(aNewColumns[col]); + Reference< XGridColumn > xGridColumn = m_xColumnModel->getColumn(col); + m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn); + tableColumn->setHorizontalAlign(xGridColumn->getHorizontalAlign()); + tableColumn->setWidth(xGridColumn->getColumnWidth()); + if(xGridColumn->getPreferredWidth() != 0) + tableColumn->setPreferredWidth(xGridColumn->getPreferredWidth()); + if(xGridColumn->getMaxWidth() != 0) + tableColumn->setMaxWidth(xGridColumn->getMaxWidth()); + if(xGridColumn->getMinWidth() != 0) + tableColumn->setMinWidth(xGridColumn->getMinWidth()); + tableColumn->setResizable(xGridColumn->getResizeable()); } } - else - throw GridInvalidModelException(rtl::OUString::createFromAscii("The column model isn't set!"), m_xColumnModel); break; } diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 491e5b8bb5cc..e15e6683a902 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -85,6 +85,15 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_BACKGROUND ); ImplRegisterProperty( BASEPROPERTY_GRID_LINE_COLOR ); ImplRegisterProperty( BASEPROPERTY_GRID_ROW_BACKGROUND ); + + osl_incrementInterlockedCount( &m_refCount ); + { + setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL, + makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) ); + setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL, + makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) ); + } + osl_decrementInterlockedCount( &m_refCount ); } UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) -- cgit From bf9a90185d7433e92d0ad4ca1a928773881266a1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 7 Dec 2010 09:57:40 +0100 Subject: gridsort: removed unused and empty XGridControlListener interface --- .../com/sun/star/awt/grid/XGridControlListener.idl | 49 ---------------------- offapi/com/sun/star/awt/grid/makefile.mk | 1 - 2 files changed, 50 deletions(-) delete mode 100644 offapi/com/sun/star/awt/grid/XGridControlListener.idl diff --git a/offapi/com/sun/star/awt/grid/XGridControlListener.idl b/offapi/com/sun/star/awt/grid/XGridControlListener.idl deleted file mode 100644 index 6f4fdf68ccd4..000000000000 --- a/offapi/com/sun/star/awt/grid/XGridControlListener.idl +++ /dev/null @@ -1,49 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_grid_XGridControlListener_idl__ -#define __com_sun_star_awt_grid_XGridControlListener_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - -interface XGridControlListener -{ - -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index 02c159f8ffec..489d14c55a75 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -43,7 +43,6 @@ IDLFILES=\ GridDataEvent.idl\ SelectionEventType.idl\ GridSelectionEvent.idl\ - XGridControlListener.idl\ XGridSelectionListener.idl\ XGridSelection.idl\ XGridColumn.idl\ -- cgit From 05175926214a24bc034aa7dfa07eca301e0a1074 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 7 Dec 2010 10:20:00 +0100 Subject: gridsort: derive XGridColumnListener from XEventListener --- .../com/sun/star/awt/grid/XGridColumnListener.idl | 25 +++------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumnListener.idl b/offapi/com/sun/star/awt/grid/XGridColumnListener.idl index 8a2d044f33d5..9a8a02eca8f2 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnListener.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnListener.idl @@ -27,13 +27,8 @@ #ifndef __com_sun_star_awt_grid_XGridColumnListener_idl__ #define __com_sun_star_awt_grid_XGridColumnListener_idl__ -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif - -#ifndef __com_sun_star_awt_grid_GridColumnEvent_idl__ #include -#endif +#include //============================================================================= @@ -44,25 +39,11 @@ module com { module sun { module star { module awt { module grid { /** An instance of this interface is used by the XGridColumnModel to get notifications about column model changes. -

          Usually you must not implement this interface yourself, but you must notify it correctly if - you implement the XGridColumnModel yourself

          . - @since OOo 3.3.0 */ -interface XGridColumnListener +interface XGridColumnListener : ::com::sun::star::lang::XEventListener { - // /** - // Invoked after a column was added to the column model. - //*/ - //void columnAdded( [in] GridColumnEvent event ); - // - // /** - // Invoked after a column was removed from the column model. - //*/ - //void columnRemoved( [in] GridColumnEvent event ); - - /** - Invoked after a column was modified. + /** Invoked after a column was modified. */ void columnChanged( [in] GridColumnEvent event ); }; -- cgit From 0ff80de8b71106beca31cbef6bc1464f6fcd770e Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 7 Dec 2010 11:03:38 +0100 Subject: vcl118: restrict more dll exports to vcl-plugins only This should help to prevent more false positives like those mentioned in http://www.openoffice.org/servlets/ReadMsg?list=dev&msgNo=28195 --- vcl/inc/vcl/graphite_adaptors.hxx | 2 +- vcl/inc/vcl/graphite_layout.hxx | 6 ++---- vcl/inc/vcl/graphite_serverfont.hxx | 8 +++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/vcl/inc/vcl/graphite_adaptors.hxx b/vcl/inc/vcl/graphite_adaptors.hxx index ae2ff2962adb..66f264faf9ef 100644 --- a/vcl/inc/vcl/graphite_adaptors.hxx +++ b/vcl/inc/vcl/graphite_adaptors.hxx @@ -84,7 +84,7 @@ namespace grutils // the Graphite engine. // @author tse // -class VCL_DLLPUBLIC GraphiteFontAdaptor : public gr::Font +class VCL_PLUGIN_PUBLIC GraphiteFontAdaptor : public gr::Font { typedef std::map > GlyphMetricMap; friend class GrFontHasher; diff --git a/vcl/inc/vcl/graphite_layout.hxx b/vcl/inc/vcl/graphite_layout.hxx index cd22abdcdb26..ebd323bebf28 100644 --- a/vcl/inc/vcl/graphite_layout.hxx +++ b/vcl/inc/vcl/graphite_layout.hxx @@ -85,7 +85,7 @@ namespace grutils { class GrFeatureParser; } // This class uses the SIL Graphite engine to provide complex text layout services to the VCL // @author tse // -class VCL_DLLPUBLIC GraphiteLayout : public SalLayout +class VCL_PLUGIN_PUBLIC GraphiteLayout : public SalLayout { public: // Mask to allow Word break status to be stored within mvChar2BaseGlyph @@ -133,7 +133,7 @@ private: const grutils::GrFeatureParser * mpFeatures; public: - GraphiteLayout(const gr::Font & font, const grutils::GrFeatureParser * features = NULL) throw(); + explicit GraphiteLayout( const gr::Font& font, const grutils::GrFeatureParser* features = NULL ) throw(); // used by upper layers virtual bool LayoutText( ImplLayoutArgs& ); // first step of layout @@ -183,6 +183,4 @@ private: void expandOrCondense(ImplLayoutArgs &rArgs); }; - - #endif // _SV_GRAPHITELAYOUT_HXX diff --git a/vcl/inc/vcl/graphite_serverfont.hxx b/vcl/inc/vcl/graphite_serverfont.hxx index 19eb70b11908..cdaed20476e2 100644 --- a/vcl/inc/vcl/graphite_serverfont.hxx +++ b/vcl/inc/vcl/graphite_serverfont.hxx @@ -37,7 +37,7 @@ // Modules -class VCL_DLLPUBLIC GraphiteLayoutImpl : public GraphiteLayout +class VCL_PLUGIN_PUBLIC GraphiteLayoutImpl : public GraphiteLayout { public: GraphiteLayoutImpl(const gr::Font & font, const grutils::GrFeatureParser * features, GraphiteFontAdaptor * pFont) throw() @@ -51,14 +51,14 @@ private: // This class implments the server font specific parts. // @author tse // -class VCL_DLLPUBLIC GraphiteServerFontLayout : public ServerFontLayout +class VCL_PLUGIN_PUBLIC GraphiteServerFontLayout : public ServerFontLayout { private: mutable GraphiteFontAdaptor * mpFont; // mutable so that the DrawOffset/DrawBase can be set mutable GraphiteLayoutImpl maImpl; public: - GraphiteServerFontLayout(GraphiteFontAdaptor * font) throw(); + explicit GraphiteServerFontLayout( GraphiteFontAdaptor* font ) throw(); virtual bool LayoutText( ImplLayoutArgs& rArgs) { SalLayout::AdjustLayout(rArgs); return maImpl.LayoutText(rArgs); }; // first step of layout virtual void AdjustLayout( ImplLayoutArgs& rArgs) @@ -94,7 +94,5 @@ public: int getMaxCharPos() const { return mnEndCharPos; } }; - - #endif #endif //_SV_GRAPHITESERVERFONT_HXX -- cgit From 7bef1fa0ecb93f800ae3d0b0ab049b00560fcdf1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 7 Dec 2010 13:50:47 +0100 Subject: gridsort: introduced container listeners at the grid model, reworked and fixed listener relationship between grid model/control/peer --- svtools/source/uno/svtxgridcontrol.cxx | 293 ++++++++------ svtools/source/uno/svtxgridcontrol.hxx | 64 ++-- .../inc/toolkit/helper/mutexandbroadcasthelper.hxx | 6 - .../controls/grid/defaultgridcolumnmodel.cxx | 379 ++++++++++++------- .../controls/grid/defaultgridcolumnmodel.hxx | 63 ++-- toolkit/source/controls/grid/gridcolumn.cxx | 420 ++++++++++----------- toolkit/source/controls/grid/gridcolumn.hxx | 62 ++- toolkit/source/controls/grid/gridcontrol.cxx | 106 ++++-- toolkit/source/controls/grid/gridcontrol.hxx | 27 +- .../source/controls/grid/grideventforwarder.cxx | 141 +++++++ .../source/controls/grid/grideventforwarder.hxx | 84 +++++ toolkit/source/controls/grid/makefile.mk | 3 +- toolkit/util/tk.component | 2 +- 13 files changed, 1028 insertions(+), 622 deletions(-) mode change 100755 => 100644 svtools/source/uno/svtxgridcontrol.hxx create mode 100755 toolkit/source/controls/grid/grideventforwarder.cxx create mode 100755 toolkit/source/controls/grid/grideventforwarder.hxx diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index b1bcfbe7edd5..765a37e90495 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -36,7 +36,7 @@ #include "unocontroltablemodel.hxx" #include #include -#include +#include #include #include #include @@ -50,12 +50,11 @@ #include #include -using ::rtl::OUString; using namespace ::svt::table; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt::grid; using namespace ::com::sun::star::view; -using namespace ::toolkit; +using namespace ::com::sun::star::container; using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::accessibility::AccessibleEventId; using namespace ::com::sun::star::accessibility::AccessibleTableModelChangeType; @@ -76,38 +75,28 @@ SVTXGridControl::SVTXGridControl() { } -//-------------------------------------------------------------------- +// --------------------------------------------------------------------------------------------------------------------- SVTXGridControl::~SVTXGridControl() { } -::com::sun::star::uno::Any SVTXGridControl::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) -{ - ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, - SAL_STATIC_CAST( ::com::sun::star::awt::grid::XGridControl*, this ), - SAL_STATIC_CAST( ::com::sun::star::awt::grid::XGridDataListener*, this ), - SAL_STATIC_CAST( ::com::sun::star::awt::grid::XGridColumnListener*, this ), - SAL_STATIC_CAST( ::com::sun::star::lang::XTypeProvider*, this ) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -// ::com::sun::star::lang::XTypeProvider -IMPL_XTYPEPROVIDER_START( SVTXGridControl ) - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridControl>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener>* ) NULL ), - VCLXWindow::getTypes() -IMPL_XTYPEPROVIDER_END - +// --------------------------------------------------------------------------------------------------------------------- sal_Int32 SAL_CALL SVTXGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getItemIndexAtPoint: no control (anymore)!", -1 ); return pTable->GetCurrentRow( Point(x,y) ); } +// --------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const com::sun::star::uno::Sequence< sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable != NULL, "SVTXGridControl::setToolTip: no control (anymore)!" ); pTable->setTooltip(text, columns); } @@ -125,7 +114,9 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An { ::vos::OGuard aGuard( GetMutex() ); - TableControl* pTable = (TableControl*)GetWindow(); + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable != NULL, "SVTXGridControl::setProperty: no control (anymore)!" ); + switch( GetPropertyId( PropertyName ) ) { case BASEPROPERTY_BACKGROUNDCOLOR: @@ -151,7 +142,6 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An case SelectionType_SINGLE: eSelMode = SINGLE_SELECTION; break; case SelectionType_RANGE: eSelMode = RANGE_SELECTION; break; case SelectionType_MULTI: eSelMode = MULTIPLE_SELECTION; break; - // case SelectionType_NONE: default: eSelMode = NO_SELECTION; break; } if( pTable->getSelEngine()->GetSelectionMode() != eSelMode ) @@ -264,10 +254,10 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An { m_xDataModel = Reference< XGridDataModel >( aValue, UNO_QUERY ); if ( !m_xDataModel.is() ) - throw GridInvalidDataException(rtl::OUString::createFromAscii("The data model isn't set!"), m_xDataModel); + throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The data model isn't set!"), *this ); - Sequence > cellData = m_xDataModel->getData(); - if(cellData.getLength()!= 0) + Sequence< Sequence< Any > > cellData = m_xDataModel->getData(); + if ( cellData.getLength() != 0 ) { for (int i = 0; i < cellData.getLength(); i++) { @@ -302,14 +292,11 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height(); - if(m_xDataModel->getRowHeight() == 0) - { - m_pTableModel->setRowHeight(fontHeight); - m_xDataModel->setRowHeight(fontHeight); - } + if ( m_xDataModel->getRowHeight() == 0 ) + m_pTableModel->setRowHeight( fontHeight ); else - m_pTableModel->setRowHeight(m_xDataModel->getRowHeight()); - m_pTableModel->setRowHeaderWidth(m_xDataModel->getRowHeaderWidth()); + m_pTableModel->setRowHeight( m_xDataModel->getRowHeight() ); + m_pTableModel->setRowHeaderWidth( m_xDataModel->getRowHeaderWidth() ); } break; } @@ -358,77 +345,72 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru { ::vos::OGuard aGuard( GetMutex() ); + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getProperty: no control (anymore)!", Any() ); + const sal_uInt16 nPropId = GetPropertyId( PropertyName ); - TableControl* pTable = (TableControl*)GetWindow(); - if(pTable) + switch(nPropId) { - switch(nPropId) - { - case BASEPROPERTY_GRID_SELECTIONMODE: - { - SelectionType eSelectionType; + case BASEPROPERTY_GRID_SELECTIONMODE: + { + SelectionType eSelectionType; - SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode(); - switch( eSelMode ) - { - case SINGLE_SELECTION: eSelectionType = SelectionType_SINGLE; break; - case RANGE_SELECTION: eSelectionType = SelectionType_RANGE; break; - case MULTIPLE_SELECTION:eSelectionType = SelectionType_MULTI; break; -// case NO_SELECTION: - default: eSelectionType = SelectionType_NONE; break; - } - return Any( eSelectionType ); - } - case BASEPROPERTY_GRID_SHOWROWHEADER: - { - return Any ((sal_Bool) m_pTableModel->hasRowHeaders()); - } - case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: - return Any ((sal_Bool) m_pTableModel->hasColumnHeaders()); - case BASEPROPERTY_GRID_DATAMODEL: - return Any ( m_xDataModel ); - case BASEPROPERTY_GRID_COLUMNMODEL: - return Any ( m_xColumnModel); - case BASEPROPERTY_HSCROLL: - return Any ( m_bHScroll); - case BASEPROPERTY_VSCROLL: - return Any ( m_bVScroll); + SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode(); + switch( eSelMode ) + { + case SINGLE_SELECTION: eSelectionType = SelectionType_SINGLE; break; + case RANGE_SELECTION: eSelectionType = SelectionType_RANGE; break; + case MULTIPLE_SELECTION:eSelectionType = SelectionType_MULTI; break; + default: eSelectionType = SelectionType_NONE; break; } + return Any( eSelectionType ); } + case BASEPROPERTY_GRID_SHOWROWHEADER: + { + return Any ((sal_Bool) m_pTableModel->hasRowHeaders()); + } + case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: + return Any ((sal_Bool) m_pTableModel->hasColumnHeaders()); + case BASEPROPERTY_GRID_DATAMODEL: + return Any ( m_xDataModel ); + case BASEPROPERTY_GRID_COLUMNMODEL: + return Any ( m_xColumnModel); + case BASEPROPERTY_HSCROLL: + return Any ( m_bHScroll); + case BASEPROPERTY_VSCROLL: + return Any ( m_bVScroll); + } + return VCLXWindow::getProperty( PropertyName ); } void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) { PushPropertyIds( rIds, - BASEPROPERTY_GRID_SHOWROWHEADER, - BASEPROPERTY_GRID_SHOWCOLUMNHEADER, - BASEPROPERTY_GRID_DATAMODEL, - BASEPROPERTY_GRID_COLUMNMODEL, - BASEPROPERTY_GRID_SELECTIONMODE, - BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND, - BASEPROPERTY_GRID_HEADER_BACKGROUND, - BASEPROPERTY_GRID_LINE_COLOR, - BASEPROPERTY_GRID_ROW_BACKGROUND, - 0); + BASEPROPERTY_GRID_SHOWROWHEADER, + BASEPROPERTY_GRID_SHOWCOLUMNHEADER, + BASEPROPERTY_GRID_DATAMODEL, + BASEPROPERTY_GRID_COLUMNMODEL, + BASEPROPERTY_GRID_SELECTIONMODE, + BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND, + BASEPROPERTY_GRID_HEADER_BACKGROUND, + BASEPROPERTY_GRID_LINE_COLOR, + BASEPROPERTY_GRID_ROW_BACKGROUND, + 0 + ); VCLXWindow::ImplGetPropertyIds( rIds, true ); } void SAL_CALL SVTXGridControl::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); - TableControl* pTable = (TableControl*)GetWindow(); - if ( pTable ) - { - pTable->SetModel(PTableModel(m_pTableModel)); - pTable->Show( bVisible ); - } -} -void SAL_CALL SVTXGridControl::setFocus() throw(::com::sun::star::uno::RuntimeException) -{ - ::vos::OGuard aGuard( GetMutex() ); - if ( GetWindow()) - GetWindow()->GrabFocus(); + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable != NULL, "SVTXGridControl::setVisible: no control (anymore)!" ); + + pTable->SetModel( PTableModel( m_pTableModel ) ); + // TODO: what's this SetModel call good for? Looks like a hack to me, to work around some other bug. + pTable->Show( bVisible ); } + void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -449,7 +431,7 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD } else if((unsigned int)rawRowData.getLength()!=(unsigned)colCount) - throw GridInvalidDataException(rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), m_xDataModel); + throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), *this ); for ( int k = 0; k < rawRowData.getLength(); k++) newRow.push_back(rawRowData[k]); @@ -457,7 +439,10 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD if(m_pTableModel->hasRowHeaders()) m_pTableModel->getRowHeaderName().push_back(Event.headerName); m_pTableModel->setRowCount(m_pTableModel->getCellContent().size()); - TableControl* pTable = (TableControl*)GetWindow(); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowAdded: no control (anymore)!" ); + pTable->InvalidateDataWindow(m_pTableModel->getCellContent().size()-1, 0, false); if(pTable->isAccessibleAlive()) { @@ -481,7 +466,9 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri { ::vos::OGuard aGuard( GetMutex() ); - TableControl* pTable = (TableControl*)GetWindow(); + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowRemoved: no control (anymore)!" ); + if(Event.index == -1) { if(!isSelectionEmpty()) @@ -524,7 +511,9 @@ void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid: { ::vos::OGuard aGuard( GetMutex() ); - TableControl* pTable = (TableControl*)GetWindow(); + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::columnChanged: no control (anymore)!" ); + if(Event.valueName == rtl::OUString::createFromAscii("ColumnResize")) { bool resizable = m_pTableModel->getColumnModel()[Event.index]->isResizable(); @@ -573,7 +562,9 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::G { ::vos::OGuard aGuard( GetMutex() ); - TableControl* pTable = (TableControl*)GetWindow(); + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" ); + if(Event.valueName == rtl::OUString::createFromAscii("RowHeight")) { sal_Int32 rowHeight = m_pTableModel->getRowHeight(); @@ -622,6 +613,34 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::G } } +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) +{ + (void)i_event; + + // TODO: add as XGridColumnListener + // TODO: update our TableControl +} + +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL SVTXGridControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) +{ + (void)i_event; + + // TODO: remove as XGridColumnListener + // TODO: update our TableControl +} + +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL SVTXGridControl::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException) +{ + (void)i_event; + + // TODO: add/remove as XGridColumnListener + // TODO: update our TableControl +} + + void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { VCLXWindow::disposing( Source ); @@ -629,7 +648,11 @@ void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObj ::sal_Int32 SAL_CALL SVTXGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable, "SVTXGridControl::getMinSelectionIndex: no control (anymore)!", -1 ); + std::vector& selectedRows = pTable->GetSelectedRows(); if(selectedRows.empty()) return -1; @@ -643,7 +666,11 @@ void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObj ::sal_Int32 SAL_CALL SVTXGridControl::getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable, "SVTXGridControl::getMaxSelectionIndex: no control (anymore)!", -1 ); + std::vector& selectedRows = pTable->GetSelectedRows(); if(selectedRows.empty()) return -1; @@ -657,7 +684,11 @@ void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObj void SAL_CALL SVTXGridControl::selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectRows: no control (anymore)!" ); + SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode(); if(eSelMode != NO_SELECTION) { @@ -695,7 +726,11 @@ void SAL_CALL SVTXGridControl::selectRows(const ::com::sun::star::uno::Sequence< void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectAllRows: no control (anymore)!" ); + SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode(); if(eSelMode != NO_SELECTION) { @@ -713,7 +748,11 @@ void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::Run void SAL_CALL SVTXGridControl::deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectRows: no control (anymore)!" ); + std::vector& selectedRows = pTable->GetSelectedRows(); std::vector::iterator itStart = selectedRows.begin(); std::vector::iterator itEnd = selectedRows.end(); @@ -731,7 +770,11 @@ void SAL_CALL SVTXGridControl::deselectRows(const ::com::sun::star::uno::Sequenc void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectAllRows: no control (anymore)!" ); + std::vector& selectedRows = pTable->GetSelectedRows(); if(!selectedRows.empty()) selectedRows.clear(); @@ -743,7 +786,11 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL SVTXGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", Sequence< sal_Int32 >() ); + std::vector& selectedRows = pTable->GetSelectedRows(); Sequence selectedRowsToSequence(comphelper::containerToSequence(selectedRows)); return selectedRowsToSequence; @@ -756,7 +803,11 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R ::sal_Bool SAL_CALL SVTXGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", sal_True ); + std::vector& selectedRows = pTable->GetSelectedRows(); if(selectedRows.empty()) return sal_True; @@ -766,16 +817,24 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R ::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) { - TableControl* pTable = (TableControl*)GetWindow(); + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable, "SVTXGridControl::isSelectedIndex: no control (anymore)!", sal_False ); + std::vector& selectedRows = pTable->GetSelectedRows(); return std::find(selectedRows.begin(),selectedRows.end(), index) != selectedRows.end(); } void SAL_CALL SVTXGridControl::selectRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::isSelectedIndex: no control (anymore)!" ); + if(index<0 || index>=m_pTableModel->getRowCount()) return; - TableControl* pTable = (TableControl*)GetWindow(); SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode(); if(eSelMode != NO_SELECTION) { @@ -812,8 +871,6 @@ void SAL_CALL SVTXGridControl::selectColumn(::sal_Int32 x) throw (::com::sun::st } void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); - ::com::sun::star::lang::EventObject aObj; aObj.Source = (::cppu::OWeakObject*)this; m_aSelectionListeners.disposeAndClear( aObj ); @@ -822,21 +879,17 @@ void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException) void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xKeepAlive( this ); + ::vos::OGuard aGuard( GetMutex() ); + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xKeepAlive( this ); switch ( rVclWindowEvent.GetId() ) { case VCLEVENT_TABLEROW_SELECT: { - TableControl* pTable = (TableControl*)GetWindow(); - - if( pTable ) - { - if ( m_aSelectionListeners.getLength() ) - { - ImplCallItemListeners(); - } - } + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_BREAK( pTable, "SVTXGridControl::ProcessWindowEvent: no control (anymore)!" ); + if ( m_aSelectionListeners.getLength() ) + ImplCallItemListeners(); } break; @@ -848,8 +901,10 @@ void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent void SVTXGridControl::ImplCallItemListeners() { - TableControl* pTable = (TableControl*) GetWindow(); - if ( pTable && m_aSelectionListeners.getLength() ) + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::ImplCallItemListeners: no control (anymore)!" ); + + if ( m_aSelectionListeners.getLength() ) { ::std::vector selRows = pTable->GetSelectedRows(); ::com::sun::star::awt::grid::GridSelectionEvent aEvent; diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx old mode 100755 new mode 100644 index b15507e4614f..3197b4b8e23b --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -38,55 +38,60 @@ #include #include #include +#include #include #include #include -#include +#include #include using namespace ::svt::table; -class SVTXGridControl : public ::cppu::ImplInheritanceHelper3< VCLXWindow, ::com::sun::star::awt::grid::XGridControl, - ::com::sun::star::awt::grid::XGridDataListener, ::com::sun::star::awt::grid::XGridColumnListener> +typedef ::cppu::ImplInheritanceHelper4 < VCLXWindow + , ::com::sun::star::awt::grid::XGridControl + , ::com::sun::star::awt::grid::XGridDataListener + , ::com::sun::star::awt::grid::XGridColumnListener + , ::com::sun::star::container::XContainerListener + > SVTXGridControl_Base; +class SVTXGridControl : public SVTXGridControl_Base { private: - ::boost::shared_ptr< UnoControlTableModel > m_pTableModel; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel >m_xDataModel; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel >m_xColumnModel; - bool m_bHasColumnHeaders; - bool m_bHasRowHeaders; - bool m_bVScroll; - bool m_bHScroll; - bool m_bUpdate; - sal_Int32 m_nSelectedRowCount; - SelectionListenerMultiplexer m_aSelectionListeners; + ::boost::shared_ptr< UnoControlTableModel > m_pTableModel; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > m_xDataModel; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > m_xColumnModel; + bool m_bHasColumnHeaders; + bool m_bHasRowHeaders; + bool m_bVScroll; + bool m_bHScroll; + bool m_bUpdate; + sal_Int32 m_nSelectedRowCount; + SelectionListenerMultiplexer m_aSelectionListeners; protected: virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); void ImplCallItemListeners(); public: - SVTXGridControl(); + SVTXGridControl(); ~SVTXGridControl(); - //XGridDataListener overridables - virtual void SAL_CALL rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rowRemoved(const ::com::sun::star::awt::grid::GridDataEvent & Event) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dataChanged(const ::com::sun::star::awt::grid::GridDataEvent & Event) throw (::com::sun::star::uno::RuntimeException); + + // XGridDataListener + virtual void SAL_CALL rowAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XContainerListener + virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); //XGridColumnListener overridables virtual void SAL_CALL columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent & Event) throw (::com::sun::star::uno::RuntimeException); + // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL acquire() throw() { VCLXWindow::acquire(); } - void SAL_CALL release() throw() { VCLXWindow::release(); } - - // ::com::sun::star::lang::XTypeProvider - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); - //::com::sun::star::awt::grid::XGridControl virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException); @@ -109,9 +114,10 @@ public: ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); void SAL_CALL setVisible(sal_Bool bVisible) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setFocus() throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XComponent void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); - }; - #endif // _SVT_GRIDCONTROL_HXX_ + + // XContainertListener +}; +#endif // _SVT_GRIDCONTROL_HXX_ diff --git a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx index c84a6e54d73b..611d90427609 100644 --- a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx +++ b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx @@ -39,7 +39,6 @@ class MutexAndBroadcastHelper public: MutexAndBroadcastHelper() : BrdcstHelper( Mutex ) {} - ::osl::Mutex Mutex; ::cppu::OBroadcastHelper BrdcstHelper; @@ -47,11 +46,6 @@ public: }; - - - - - #endif // _TOOLKIT_HELPER_MUTEXANDBROADCASTHELPER_HXX diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 011f3502cdd8..a48f75966bde 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -27,174 +27,273 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" + #include "defaultgridcolumnmodel.hxx" -#include -#include + +/** === begin UNO includes === **/ #include -#include +/** === end UNO includes === **/ -using ::rtl::OUString; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::awt::grid; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::style; +#include +#include +#include +//...................................................................................................................... namespace toolkit +//...................................................................................................................... { + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::awt::grid::XGridColumn; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::lang::XComponent; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::container::XContainerListener; + using ::com::sun::star::container::ContainerEvent; + using ::com::sun::star::uno::Exception; + /** === end UNO using === **/ + + //================================================================================================================== + //= DefaultGridColumnModel + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + DefaultGridColumnModel::DefaultGridColumnModel( const Reference< XMultiServiceFactory >& i_factory ) + :DefaultGridColumnModel_Base( m_aMutex ) + ,m_aContext( i_factory ) + ,m_aContainerListeners( m_aMutex ) + ,m_aColumns() + ,m_nColumnHeaderHeight(0) + { + } -/////////////////////////////////////////////////////////////////////// -// class DefaultGridColumnModel -/////////////////////////////////////////////////////////////////////// - -DefaultGridColumnModel::DefaultGridColumnModel(const Reference< XMultiServiceFactory >& xFactory) -: columns(std::vector< Reference< XGridColumn > >()) - ,m_nColumnHeaderHeight(0) - ,m_xFactory(xFactory) -{ -} - -//--------------------------------------------------------------------- - -DefaultGridColumnModel::~DefaultGridColumnModel() -{ -} - -//--------------------------------------------------------------------- - -::sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException) -{ - return columns.size(); -} - -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + DefaultGridColumnModel::~DefaultGridColumnModel() + { + } -::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - Reference xColumn(column); - columns.push_back(xColumn); - sal_Int32 index = columns.size() - 1; - xColumn->setIndex(index); - return index; -} + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnCount() throw (RuntimeException) + { + return m_aColumns.size(); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL DefaultGridColumnModel::getColumns() throw (::com::sun::star::uno::RuntimeException) -{ - return comphelper::containerToSequence(columns); -} + m_aColumns.push_back( i_column ); + sal_Int32 index = m_aColumns.size() - 1; + i_column->setIndex( index ); -//--------------------------------------------------------------------- + return index; + } -::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) -{ - if ( index >=0 && index < ((sal_Int32)columns.size())) + //------------------------------------------------------------------------------------------------------------------ + Sequence< Reference< XGridColumn > > SAL_CALL DefaultGridColumnModel::getColumns() throw (RuntimeException) { - return columns[index]; + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + return ::comphelper::containerToSequence( m_aColumns ); } - else - return Reference< XGridColumn >(); -} -//--------------------------------------------------------------------- -void SAL_CALL DefaultGridColumnModel::setColumnHeaderHeight(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException) -{ - m_nColumnHeaderHeight = _value; -} -//--------------------------------------------------------------------- -sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnHeaderHeight() throw (::com::sun::star::uno::RuntimeException) -{ - return m_nColumnHeaderHeight; -} - -//--------------------------------------------------------------------- -void SAL_CALL DefaultGridColumnModel::setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - for(sal_Int32 i=0;i SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (RuntimeException) { - Reference xColumn( m_xFactory->createInstance ( OUString::createFromAscii( "com.sun.star.awt.grid.GridColumn" ) ), UNO_QUERY ); - columns.push_back(xColumn); - xColumn->setIndex(i); + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + if ( index >=0 && index < ((sal_Int32)m_aColumns.size())) + { + return m_aColumns[index]; + } + else + // TODO: exception + return Reference< XGridColumn >(); } -} -::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL DefaultGridColumnModel::copyColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException) -{ - Reference xColumn( m_xFactory->createInstance ( OUString::createFromAscii( "com.sun.star.awt.grid.GridColumn" ) ), UNO_QUERY ); - xColumn->setColumnWidth(column->getColumnWidth()); - xColumn->setPreferredWidth(column->getPreferredWidth()); - xColumn->setMaxWidth(column->getMaxWidth()); - xColumn->setMinWidth(column->getMinWidth()); - xColumn->setPreferredWidth(column->getPreferredWidth()); - xColumn->setResizeable(column->getResizeable()); - xColumn->setTitle(column->getTitle()); - xColumn->setHorizontalAlign(column->getHorizontalAlign()); - return xColumn; -} -//--------------------------------------------------------------------- -// XComponent -//--------------------------------------------------------------------- - -void SAL_CALL DefaultGridColumnModel::dispose() throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - ::com::sun::star::lang::EventObject aEvent; - aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); - BrdcstHelper.aLC.disposeAndClear( aEvent ); -} - -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridColumnModel::setColumnHeaderHeight(sal_Int32 _value) throw (RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + m_nColumnHeaderHeight = _value; + } -void SAL_CALL DefaultGridColumnModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.addListener( XEventListener::static_type(), xListener ); -} + //------------------------------------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnHeaderHeight() throw (RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + return m_nColumnHeaderHeight; + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridColumnModel::setDefaultColumns(sal_Int32 rowElements) throw (RuntimeException) + { + ::std::vector< ContainerEvent > aRemovedColumns; + ::std::vector< ContainerEvent > aInsertedColumns; + + { + ::osl::MutexGuard aGuard( m_aMutex ); + + // remove existing columns + while ( !m_aColumns.empty() ) + { + const size_t lastColIndex = m_aColumns.size() - 1; + + ContainerEvent aEvent; + aEvent.Source = *this; + aEvent.Accessor <<= sal_Int32( lastColIndex ); + aEvent.Element <<= m_aColumns[ lastColIndex ]; + aRemovedColumns.push_back( aEvent ); + + m_aColumns.erase( m_aColumns.begin() + lastColIndex ); + } + + // add new columns + for ( sal_Int32 i=0; i xColumn( m_aContext.createComponent( "com.sun.star.awt.grid.GridColumn" ), UNO_QUERY_THROW ); + + ContainerEvent aEvent; + aEvent.Source = *this; + aEvent.Accessor <<= i; + aEvent.Element <<= xColumn; + aInsertedColumns.push_back( aEvent ); + + m_aColumns.push_back( xColumn ); + xColumn->setIndex( i ); + } + } + + // fire removal notifications + for ( ::std::vector< ContainerEvent >::const_iterator event = aRemovedColumns.begin(); + event != aRemovedColumns.end(); + ++event + ) + { + m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, *event ); + } + + // fire insertion notifications + for ( ::std::vector< ContainerEvent >::const_iterator event = aInsertedColumns.begin(); + event != aInsertedColumns.end(); + ++event + ) + { + m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, *event ); + } + + // dispose removed columns + for ( ::std::vector< ContainerEvent >::const_iterator event = aRemovedColumns.begin(); + event != aRemovedColumns.end(); + ++event + ) + { + try + { + const Reference< XComponent > xColComp( event->Element, UNO_QUERY_THROW ); + xColComp->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + } -void SAL_CALL DefaultGridColumnModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.removeListener( XEventListener::static_type(), xListener ); -} + //------------------------------------------------------------------------------------------------------------------ + Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::copyColumn(const Reference< XGridColumn > & column) throw (RuntimeException) + { + Reference< XGridColumn > xColumn( m_aContext.createComponent( "com.sun.star.awt.grid.GridColumn" ), UNO_QUERY_THROW ); + xColumn->setColumnWidth(column->getColumnWidth()); + xColumn->setPreferredWidth(column->getPreferredWidth()); + xColumn->setMaxWidth(column->getMaxWidth()); + xColumn->setMinWidth(column->getMinWidth()); + xColumn->setPreferredWidth(column->getPreferredWidth()); + xColumn->setResizeable(column->getResizeable()); + xColumn->setTitle(column->getTitle()); + xColumn->setHorizontalAlign(column->getHorizontalAlign()); + return xColumn; + } -//--------------------------------------------------------------------- -// XServiceInfo -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL DefaultGridColumnModel::getImplementationName( ) throw (RuntimeException) + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.DefaultGridColumnModel" ) ); + } -::rtl::OUString SAL_CALL DefaultGridColumnModel::getImplementationName( ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridColumnModel" ) ); - return aImplName; -} + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL DefaultGridColumnModel::supportsService( const ::rtl::OUString& i_serviceName ) throw (RuntimeException) + { + const Sequence< ::rtl::OUString > aServiceNames( getSupportedServiceNames() ); + for ( sal_Int32 i=0; i SAL_CALL DefaultGridColumnModel::getSupportedServiceNames( ) throw (RuntimeException) + { + const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( szServiceName_DefaultGridColumnModel ) ); + const Sequence< ::rtl::OUString > aSeq( &aServiceName, 1 ); + return aSeq; + } -sal_Bool SAL_CALL DefaultGridColumnModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - return ServiceName.equalsAscii( szServiceName_DefaultGridColumnModel ); -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridColumnModel::addContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException) + { + if ( i_listener.is() ) + m_aContainerListeners.addInterface( i_listener ); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridColumnModel::removeContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException) + { + if ( i_listener.is() ) + m_aContainerListeners.removeInterface( i_listener ); + } -::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridColumnModel::getSupportedServiceNames( ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridColumnModel ) ); - static const Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridColumnModel::disposing() + { + DefaultGridColumnModel_Base::disposing(); + + EventObject aEvent( *this ); + m_aContainerListeners.disposeAndClear( aEvent ); + + ::osl::MutexGuard aGuard( m_aMutex ); + // remove, dispose and clear columns + { + while ( !m_aColumns.empty() ) + { + try + { + const Reference< XComponent > xColComponent( m_aColumns[ 0 ], UNO_QUERY_THROW ); + xColComponent->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + m_aColumns.erase( m_aColumns.begin() ); + } + + Columns aEmpty; + m_aColumns.swap( aEmpty ); + } + } -} +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... -Reference< XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const Reference< XMultiServiceFactory >& _rFactory) +//---------------------------------------------------------------------------------------------------------------------- +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rFactory) { - return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel( _rFactory ) ); + return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel( _rFactory ) ); } - diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index 8b8c8bfc795c..964d604c8ab1 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -25,76 +25,67 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_toolkit.hxx" +/** === begin UNO includes === **/ #include #include //#include #include #include #include -#include -#include -#include -#include -#include -#include #include -#include +#include +/** === end UNO includes === **/ -using ::rtl::OUString; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::awt::grid; -using namespace ::com::sun::star::lang; +#include +#include +#include +#include namespace toolkit { //enum broadcast_type { column_added, column_removed, column_changed}; -class DefaultGridColumnModel : public ::cppu::WeakImplHelper2< XGridColumnModel, XServiceInfo >, - public MutexAndBroadcastHelper +typedef ::cppu::WeakComponentImplHelper2 < ::com::sun::star::awt::grid::XGridColumnModel + , ::com::sun::star::lang::XServiceInfo + > DefaultGridColumnModel_Base; + +class DefaultGridColumnModel :public ::cppu::BaseMutex + ,public DefaultGridColumnModel_Base { public: - DefaultGridColumnModel(const Reference< XMultiServiceFactory >& xFactory); + DefaultGridColumnModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory); virtual ~DefaultGridColumnModel(); // XGridColumnModel - - //virtual ::sal_Bool SAL_CALL getColumnSelectionAllowed() throw (::com::sun::star::uno::RuntimeException); - //virtual void SAL_CALL setColumnSelectionAllowed(::sal_Bool the_value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL getColumns() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); - //virtual void SAL_CALL addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException); - //virtual void SAL_CALL removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException); virtual void SAL_CALL setColumnHeaderHeight( sal_Int32 _value) throw (com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getColumnHeaderHeight() throw (com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL copyColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException); - // XComponent - virtual void SAL_CALL dispose( ) throw (RuntimeException); - virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException); - virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException); // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); -private: - /*void broadcast( broadcast_type eType, const GridColumnEvent& aEvent ); - void broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue, sal_Int32 index,const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn ); - void broadcast_add( sal_Int32 index,const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn ); - void broadcast_remove( sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn );*/ + // XContainer + virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + + // OComponentHelper + virtual void SAL_CALL disposing(); + +private: + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > Columns; - std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > columns; - sal_Bool selectionAllowed; - sal_Int32 m_nColumnHeaderHeight; - Reference< XMultiServiceFactory > m_xFactory; + ::comphelper::ComponentContext m_aContext; + ::cppu::OInterfaceContainerHelper m_aContainerListeners; + Columns m_aColumns; + sal_Int32 m_nColumnHeaderHeight; }; } diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 6720d639f5c1..4094f4433538 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -25,20 +25,11 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" #include "gridcolumn.hxx" + #include #include -#include - -using ::rtl::OUString; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::awt::grid; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::style; #define COLWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColWidth" )) #define MAXWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MaxWidth" )) @@ -51,255 +42,240 @@ using namespace ::com::sun::star::style; namespace toolkit { + using namespace ::com::sun::star; + using namespace ::com::sun::star::uno; + using namespace ::com::sun::star::awt; + using namespace ::com::sun::star::awt::grid; + using namespace ::com::sun::star::lang; + using namespace ::com::sun::star::style; + + //================================================================================================================== + //= DefaultGridColumnModel + //================================================================================================================== + GridColumn::GridColumn() + :GridColumn_Base( m_aMutex ) + ,m_aIdentifier() + ,m_nIndex(0) + ,m_nColumnWidth(4) + ,m_nPreferredWidth(0) + ,m_nMaxWidth(0) + ,m_nMinWidth(0) + ,m_bResizeable(true) + ,m_eHorizontalAlign(HorizontalAlignment(0)) + { + } -/////////////////////////////////////////////////////////////////////// -// class GridColumn -/////////////////////////////////////////////////////////////////////// - -GridColumn::GridColumn() -: identifier(Any()) -,index(0) -,columnWidth(4) -,preferredWidth(0) -,maxWidth(0) -,minWidth(0) -,bResizeable(true) -,horizontalAlign(HorizontalAlignment(0)) -{ -} - -//--------------------------------------------------------------------- - -GridColumn::~GridColumn() -{ -} - -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + GridColumn::~GridColumn() + { + } -void GridColumn::broadcast( broadcast_column_type eType, const GridColumnEvent& aEvent ) -{ - ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridColumnListener::static_type() ); - if( pIter ) + //------------------------------------------------------------------------------------------------------------------ + void GridColumn::broadcast( broadcast_column_type eType, const GridColumnEvent& aEvent ) { - ::cppu::OInterfaceIteratorHelper aListIter(*pIter); - while(aListIter.hasMoreElements()) + ::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( XGridColumnListener::static_type() ); + if( pIter ) { - XGridColumnListener* pListener = static_cast(aListIter.next()); - switch( eType ) + ::cppu::OInterfaceIteratorHelper aListIter(*pIter); + while(aListIter.hasMoreElements()) { - case column_attribute_changed: pListener->columnChanged(aEvent); break; + XGridColumnListener* pListener = static_cast(aListIter.next()); + switch( eType ) + { + case column_attribute_changed: pListener->columnChanged(aEvent); break; + } } } } -} - -//--------------------------------------------------------------------- -void GridColumn::broadcast_changed(::rtl::OUString name, Any oldValue, Any newValue) -{ - Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridColumnEvent aEvent( xSource, name, oldValue, newValue, index); - broadcast( column_attribute_changed, aEvent); -} - -void SAL_CALL GridColumn::updateColumn(const ::rtl::OUString& name, sal_Int32 width) throw (::com::sun::star::uno::RuntimeException) -{ - if(PREFWIDTH == name) - preferredWidth = width; - else if (COLWIDTH == name) - columnWidth = width; -} -//--------------------------------------------------------------------- -// XGridColumn -//--------------------------------------------------------------------- - -::com::sun::star::uno::Any SAL_CALL GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException) -{ - return identifier; -} - -//--------------------------------------------------------------------- - -void SAL_CALL GridColumn::setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException) -{ - value >>= identifier; -} - -//-------------------------------------------------------------------- - -::sal_Int32 SAL_CALL GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException) -{ - broadcast_changed(UPDATE, Any(columnWidth), Any()); - return columnWidth; -} - -//-------------------------------------------------------------------- - -void SAL_CALL GridColumn::setColumnWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) -{ - columnWidth = value; - broadcast_changed(COLWIDTH, Any(columnWidth),Any(value)); -} -//-------------------------------------------------------------------- - -::sal_Int32 SAL_CALL GridColumn::getPreferredWidth() throw (::com::sun::star::uno::RuntimeException) -{ - broadcast_changed(UPDATE, Any(preferredWidth), Any()); - return preferredWidth; -} - -//-------------------------------------------------------------------- - -void SAL_CALL GridColumn::setPreferredWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) -{ - preferredWidth = value; - broadcast_changed(PREFWIDTH, Any(preferredWidth),Any(value)); -} -//-------------------------------------------------------------------- - -::sal_Int32 SAL_CALL GridColumn::getMaxWidth() throw (::com::sun::star::uno::RuntimeException) -{ - return maxWidth; -} - -//-------------------------------------------------------------------- - -void SAL_CALL GridColumn::setMaxWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) -{ - maxWidth = value; - broadcast_changed(MAXWIDTH, Any(maxWidth),Any(value)); -} -//-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void GridColumn::broadcast_changed(::rtl::OUString name, Any oldValue, Any newValue) + { + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridColumnEvent aEvent( xSource, name, oldValue, newValue, m_nIndex); + broadcast( column_attribute_changed, aEvent); + } -::sal_Int32 SAL_CALL GridColumn::getMinWidth() throw (::com::sun::star::uno::RuntimeException) -{ - return minWidth; -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::updateColumn(const ::rtl::OUString& name, sal_Int32 width) throw (::com::sun::star::uno::RuntimeException) + { + if(PREFWIDTH == name) + m_nPreferredWidth = width; + else if (COLWIDTH == name) + m_nColumnWidth = width; + } -//-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::com::sun::star::uno::Any SAL_CALL GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException) + { + return m_aIdentifier; + } -void SAL_CALL GridColumn::setMinWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) -{ - minWidth = value; - broadcast_changed(MINWIDTH, Any(minWidth),Any(value)); -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException) + { + value >>= m_aIdentifier; + } -//-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException) + { + broadcast_changed(UPDATE, Any(m_nColumnWidth), Any()); + return m_nColumnWidth; + } -::rtl::OUString SAL_CALL GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException) -{ - return title; -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setColumnWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) + { + m_nColumnWidth = value; + broadcast_changed(COLWIDTH, Any(m_nColumnWidth),Any(value)); + } -//-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL GridColumn::getPreferredWidth() throw (::com::sun::star::uno::RuntimeException) + { + broadcast_changed(UPDATE, Any(m_nPreferredWidth), Any()); + return m_nPreferredWidth; + } -void SAL_CALL GridColumn::setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException) -{ - title = value; - broadcast_changed(TITLE, Any(title),Any(value)); -} -//-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setPreferredWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) + { + m_nPreferredWidth = value; + broadcast_changed(PREFWIDTH, Any(m_nPreferredWidth),Any(value)); + } -sal_Bool SAL_CALL GridColumn::getResizeable() throw (::com::sun::star::uno::RuntimeException) -{ - return bResizeable; -} + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL GridColumn::getMaxWidth() throw (::com::sun::star::uno::RuntimeException) + { + return m_nMaxWidth; + } -//-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setMaxWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) + { + m_nMaxWidth = value; + broadcast_changed(MAXWIDTH, Any(m_nMaxWidth),Any(value)); + } -void SAL_CALL GridColumn::setResizeable(sal_Bool value) throw (::com::sun::star::uno::RuntimeException) -{ - bResizeable = value; - broadcast_changed(COLRESIZE, Any(bResizeable),Any(value)); -} -//--------------------------------------------------------------------- -HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException) -{ - return horizontalAlign; -} -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL GridColumn::getMinWidth() throw (::com::sun::star::uno::RuntimeException) + { + return m_nMinWidth; + } -void SAL_CALL GridColumn::setHorizontalAlign(HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException) -{ - horizontalAlign = align; - broadcast_changed(HALIGN, Any(horizontalAlign),Any(align)); -} -//--------------------------------------------------------------------- -void SAL_CALL GridColumn::addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.addListener( XGridColumnListener::static_type(), xListener ); -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setMinWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) + { + m_nMinWidth = value; + broadcast_changed(MINWIDTH, Any(m_nMinWidth),Any(value)); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException) + { + return m_sTitle; + } -void SAL_CALL GridColumn::removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.removeListener( XGridColumnListener::static_type(), xListener ); -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException) + { + m_sTitle = value; + broadcast_changed(TITLE, Any(m_sTitle),Any(value)); + } -//--------------------------------------------------------------------- -// XComponent -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL GridColumn::getResizeable() throw (::com::sun::star::uno::RuntimeException) + { + return m_bResizeable; + } -void SAL_CALL GridColumn::dispose() throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setResizeable(sal_Bool value) throw (::com::sun::star::uno::RuntimeException) + { + m_bResizeable = value; + broadcast_changed(COLRESIZE, Any(m_bResizeable),Any(value)); + } - ::com::sun::star::lang::EventObject aEvent; - aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); - BrdcstHelper.aLC.disposeAndClear( aEvent ); -} + //------------------------------------------------------------------------------------------------------------------ + HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException) + { + return m_eHorizontalAlign; + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setHorizontalAlign(HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException) + { + m_eHorizontalAlign = align; + broadcast_changed(HALIGN, Any(m_eHorizontalAlign),Any(align)); + } -void SAL_CALL GridColumn::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.addListener( XEventListener::static_type(), xListener ); -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) + { + rBHelper.addListener( XGridColumnListener::static_type(), xListener ); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) + { + rBHelper.removeListener( XGridColumnListener::static_type(), xListener ); + } -void SAL_CALL GridColumn::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.removeListener( XEventListener::static_type(), xListener ); -} -void SAL_CALL GridColumn::setIndex(sal_Int32 _nIndex) throw (::com::sun::star::uno::RuntimeException) -{ - index = _nIndex; -} -//--------------------------------------------------------------------- -// XServiceInfo -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::dispose() throw (RuntimeException) + { + // simply disambiguate, the base class handles this + GridColumn_Base::dispose(); + } -::rtl::OUString SAL_CALL GridColumn::getImplementationName( ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.GridColumn" ) ); - return aImplName; -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::addEventListener( const Reference< XEventListener >& i_listener ) throw (RuntimeException) + { + // simply disambiguate, the base class handles this + GridColumn_Base::addEventListener( i_listener ); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::removeEventListener( const Reference< XEventListener >& i_listener ) throw (RuntimeException) + { + // simply disambiguate, the base class handles this + GridColumn_Base::removeEventListener( i_listener ); + } -sal_Bool SAL_CALL GridColumn::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - return ServiceName.equalsAscii( szServiceName_GridColumn ); -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setIndex(sal_Int32 _nIndex) throw (::com::sun::star::uno::RuntimeException) + { + m_nIndex = _nIndex; + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL GridColumn::getImplementationName( ) throw (RuntimeException) + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.GridColumn" ) ); + } -::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GridColumn::getSupportedServiceNames( ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - static const OUString aServiceName( OUString::createFromAscii( szServiceName_GridColumn ) ); - static const Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL GridColumn::supportsService( const ::rtl::OUString& i_serviceName ) throw (RuntimeException) + { + const Sequence< ::rtl::OUString > aServiceNames( getSupportedServiceNames() ); + for ( sal_Int32 i=0; i SAL_CALL GridColumn::getSupportedServiceNames( ) throw (RuntimeException) + { + const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( szServiceName_GridColumn ) ); + const Sequence< ::rtl::OUString > aSeq( &aServiceName, 1 ); + return aSeq; + } } -Reference< XInterface > SAL_CALL GridColumn_CreateInstance( const Reference< XMultiServiceFactory >& ) +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) { - return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::GridColumn ); + return *( new ::toolkit::GridColumn ); } diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index 38d43d55a07b..4a47f44ce674 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -33,32 +33,29 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include -using ::rtl::OUString; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::awt::grid; -using namespace ::com::sun::star::lang; - namespace toolkit { enum broadcast_column_type { column_attribute_changed}; -class GridColumn : public ::cppu::WeakImplHelper2< XGridColumn, XServiceInfo >, - public MutexAndBroadcastHelper + +typedef ::cppu::WeakComponentImplHelper2 < ::com::sun::star::awt::grid::XGridColumn + , ::com::sun::star::lang::XServiceInfo + > GridColumn_Base; +class GridColumn :public ::cppu::BaseMutex + ,public GridColumn_Base { public: GridColumn(); virtual ~GridColumn(); - // XGridColumn + // ::com::sun::star::awt::grid::XGridColumn virtual ::com::sun::star::uno::Any SAL_CALL getIdentifier() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnWidth() throw (::com::sun::star::uno::RuntimeException); @@ -75,33 +72,34 @@ public: virtual void SAL_CALL setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::style::HorizontalAlignment SAL_CALL getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setHorizontalAlign(::com::sun::star::style::HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateColumn( const ::rtl::OUString& name, ::sal_Int32 width ) throw (::com::sun::star::uno::RuntimeException); - // XComponent - virtual void SAL_CALL dispose( ) throw (RuntimeException); - virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException); - virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException); + + // XComponent (base of XGridColumn) + virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException); - virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException); + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setIndex(sal_Int32 _nIndex)throw (::com::sun::star::uno::RuntimeException); private: - void broadcast( broadcast_column_type eType, const GridColumnEvent& aEvent ); - void broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue); + void broadcast( broadcast_column_type eType, const ::com::sun::star::awt::grid::GridColumnEvent& aEvent ); + void broadcast_changed( ::rtl::OUString name, ::com::sun::star::uno::Any oldValue, ::com::sun::star::uno::Any newValue); - Any identifier; - sal_Int32 index; - sal_Int32 columnWidth; - sal_Int32 preferredWidth; - sal_Int32 maxWidth; - sal_Int32 minWidth; - sal_Bool bResizeable; - ::rtl::OUString title; - ::com::sun::star::style::HorizontalAlignment horizontalAlign; + ::com::sun::star::uno::Any m_aIdentifier; + sal_Int32 m_nIndex; + sal_Int32 m_nColumnWidth; + sal_Int32 m_nPreferredWidth; + sal_Int32 m_nMaxWidth; + sal_Int32 m_nMinWidth; + sal_Bool m_bResizeable; + ::rtl::OUString m_sTitle; + ::com::sun::star::style::HorizontalAlignment m_eHorizontalAlign; }; } diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index e15e6683a902..57b5086e2272 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" -#include +#include "gridcontrol.hxx" +#include "grideventforwarder.hxx" #include #include @@ -39,11 +40,12 @@ #include #include #include -#include +#include using ::rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::awt; using namespace ::com::sun::star::awt::grid; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; @@ -55,6 +57,7 @@ namespace toolkit // ---------------------------------------------------- // class UnoGridModel // ---------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------------- UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) :UnoControlModel( i_factory ) { @@ -96,21 +99,25 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: osl_decrementInterlockedCount( &m_refCount ); } +//---------------------------------------------------------------------------------------------------------------------- UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) : UnoControlModel( rModel ) { } +//---------------------------------------------------------------------------------------------------------------------- UnoControlModel* UnoGridModel::Clone() const { return new UnoGridModel( *this ); } +//---------------------------------------------------------------------------------------------------------------------- OUString UnoGridModel::getServiceName() throw(RuntimeException) { return OUString::createFromAscii( szServiceName_GridControlModel ); } +//---------------------------------------------------------------------------------------------------------------------- Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { switch( nPropId ) @@ -141,6 +148,7 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const } +//---------------------------------------------------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& UnoGridModel::getInfoHelper() { static UnoPropertyArrayHelper* pHelper = NULL; @@ -152,6 +160,7 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const return *pHelper; } +//---------------------------------------------------------------------------------------------------------------------- // XMultiPropertySet Reference< XPropertySetInfo > UnoGridModel::getPropertySetInfo( ) throw(RuntimeException) { @@ -160,21 +169,29 @@ Reference< XPropertySetInfo > UnoGridModel::getPropertySetInfo( ) throw(Runtime } -// ---------------------------------------------------- -// class UnoGridControl -// ---------------------------------------------------- +//====================================================================================================================== +//= UnoGridControl +//====================================================================================================================== UnoGridControl::UnoGridControl( const Reference< XMultiServiceFactory >& i_factory ) :UnoGridControl_Base( i_factory ) ,mSelectionMode(SelectionType(1)) ,m_aSelectionListeners( *this ) + ,m_pEventForwarder( new GridEventForwarder( *this ) ) +{ +} + +//---------------------------------------------------------------------------------------------------------------------- +UnoGridControl::~UnoGridControl() { } +//---------------------------------------------------------------------------------------------------------------------- OUString UnoGridControl::GetComponentServiceName() { return OUString::createFromAscii( "Grid" ); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::dispose( ) throw(RuntimeException) { lang::EventObject aEvt; @@ -183,105 +200,146 @@ void SAL_CALL UnoGridControl::dispose( ) throw(RuntimeException) UnoControl::dispose(); } -void UnoGridControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException) +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoGridControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException) { UnoControlBase::createPeer( rxToolkit, rParentPeer ); - Reference< XGridControl > xGrid( getPeer(), UNO_QUERY_THROW ); + const Reference< XGridControl > xGrid( getPeer(), UNO_QUERY_THROW ); xGrid->addSelectionListener(&m_aSelectionListeners); +} - Reference xListener ( getPeer(), UNO_QUERY_THROW ); - Reference xColListener ( getPeer(), UNO_QUERY_THROW ); - Reference xPropSet ( getModel(), UNO_QUERY_THROW ); - - Reference xGridDataModel ( xPropSet->getPropertyValue(OUString::createFromAscii( "GridDataModel" )), UNO_QUERY_THROW ); - if(xGridDataModel != NULL) - xGridDataModel->addDataListener(xListener); - Reference xGridColumnModel ( xPropSet->getPropertyValue(OUString::createFromAscii( "ColumnModel" )), UNO_QUERY_THROW ); - if(xGridColumnModel != NULL) +//---------------------------------------------------------------------------------------------------------------------- +namespace +{ + void lcl_setEventForwarding( const Reference< XControlModel >& i_gridControlModel, const ::boost::scoped_ptr< GridEventForwarder >& i_listener, + bool const i_add ) { - for(int i = 0;igetColumnCount();i++) + const Reference< XPropertySet > xModelProps( i_gridControlModel, UNO_QUERY ); + if ( !xModelProps.is() ) + return; + + try { - xGridColumnModel->getColumn(i)->addColumnListener(xColListener); + const Reference< XContainer > xColModel( + xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnModel" ) ) ), + UNO_QUERY_THROW ); + if ( i_add ) + xColModel->addContainerListener( i_listener.get() ); + else + xColModel->removeContainerListener( i_listener.get() ); + + const Reference< XGridDataModel > xDataModel( + xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GridDataModel" ) ) ), + UNO_QUERY_THROW + ); + if ( i_add ) + xDataModel->addDataListener( i_listener.get() ); + else + xDataModel->removeDataListener( i_listener.get() ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); } } } +//---------------------------------------------------------------------------------------------------------------------- +sal_Bool SAL_CALL UnoGridControl::setModel( const Reference< XControlModel >& i_model ) throw(RuntimeException) +{ + lcl_setEventForwarding( getModel(), m_pEventForwarder, false ); + if ( !UnoGridControl_Base::setModel( i_model ) ) + return sal_False; + lcl_setEventForwarding( getModel(), m_pEventForwarder, true ); + return sal_True; +} -// ------------------------------------------------------------------- -// XGridControl - +//---------------------------------------------------------------------------------------------------------------------- ::sal_Int32 UnoGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) { Reference< XGridControl > xGrid ( getPeer(), UNO_QUERY_THROW ); return xGrid->getItemIndexAtPoint( x, y ); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException) { Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->setToolTip( text, columns ); } -// ------------------------------------------------------------------- -// XGridSelection -// ------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------------- ::sal_Int32 SAL_CALL UnoGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException) { return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getMinSelectionIndex(); } +//---------------------------------------------------------------------------------------------------------------------- ::sal_Int32 SAL_CALL UnoGridControl::getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException) { return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getMaxSelectionIndex(); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) { Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRows( rangeOfRows); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::selectAllRows() throw (::com::sun::star::uno::RuntimeException) { Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectAllRows(); } + +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) { Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->deselectRows( rangeOfRows); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException) { Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->deselectAllRows(); } + +//---------------------------------------------------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL UnoGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException) { return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getSelection(); } +//---------------------------------------------------------------------------------------------------------------------- ::sal_Bool SAL_CALL UnoGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException) { return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectionEmpty(); } +//---------------------------------------------------------------------------------------------------------------------- ::sal_Bool SAL_CALL UnoGridControl::isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) { return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectedIndex( index ); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) { Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRow( y ); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) { m_aSelectionListeners.addInterface( listener ); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) { m_aSelectionListeners.removeInterface( listener ); } + }//namespace toolkit Reference< XInterface > SAL_CALL GridControl_CreateInstance( const Reference< XMultiServiceFactory >& i_factory ) diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index c41981cacfd1..d5c76f4a07f6 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -30,21 +30,20 @@ #include #include + #include #include #include #include #include - #include -namespace toolkit { +#include -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::container; +namespace toolkit +{ + +class GridEventForwarder; // =================================================================== // = UnoGridModel @@ -52,7 +51,7 @@ using namespace ::com::sun::star::container; class UnoGridModel : public UnoControlModel { protected: - Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: @@ -89,14 +88,13 @@ public: // ::com::sun::star::awt::XControl void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::grid::XGridControl - virtual ::sal_Int32 SAL_CALL getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::grid::XGridSelection - virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException); @@ -114,9 +112,14 @@ public: DECLIMPL_SERVICEINFO_DERIVED( UnoGridControl, UnoControlBase, szServiceName_GridControl ) using UnoControl::getPeer; + +protected: + ~UnoGridControl(); + private: - ::com::sun::star::view::SelectionType mSelectionMode; - SelectionListenerMultiplexer m_aSelectionListeners; + ::com::sun::star::view::SelectionType mSelectionMode; + SelectionListenerMultiplexer m_aSelectionListeners; + ::boost::scoped_ptr< GridEventForwarder > m_pEventForwarder; }; } // toolkit diff --git a/toolkit/source/controls/grid/grideventforwarder.cxx b/toolkit/source/controls/grid/grideventforwarder.cxx new file mode 100755 index 000000000000..2c3d740af04e --- /dev/null +++ b/toolkit/source/controls/grid/grideventforwarder.cxx @@ -0,0 +1,141 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_toolkit.hxx" + +#include "grideventforwarder.hxx" +#include "gridcontrol.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::awt::grid::GridDataEvent; + using ::com::sun::star::container::ContainerEvent; + using ::com::sun::star::lang::EventObject; + /** === end UNO using === **/ + + //================================================================================================================== + //= GridEventForwarder + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + GridEventForwarder::GridEventForwarder( UnoGridControl& i_parent ) + :m_parent( i_parent ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + GridEventForwarder::~GridEventForwarder() + { + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::acquire() + { + m_parent.acquire(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::release() + { + m_parent.release(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::rowAdded( const GridDataEvent& i_event ) throw (RuntimeException) + { + Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY ); + if ( xPeer.is() ) + xPeer->rowAdded( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::rowRemoved( const GridDataEvent& i_event ) throw (RuntimeException) + { + Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY ); + if ( xPeer.is() ) + xPeer->rowRemoved( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::dataChanged( const GridDataEvent& i_event ) throw (RuntimeException) + { + Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY ); + if ( xPeer.is() ) + xPeer->dataChanged( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) + { + Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY ); + if ( xPeer.is() ) + xPeer->elementInserted( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) + { + Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY ); + if ( xPeer.is() ) + xPeer->elementRemoved( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException) + { + Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY ); + if ( xPeer.is() ) + xPeer->elementReplaced( i_event ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::disposing( const EventObject& i_event ) throw (RuntimeException) + { + Reference< XEventListener > xPeer( m_parent.getPeer(), UNO_QUERY ); + if ( xPeer.is() ) + xPeer->disposing( i_event ); + } + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... diff --git a/toolkit/source/controls/grid/grideventforwarder.hxx b/toolkit/source/controls/grid/grideventforwarder.hxx new file mode 100755 index 000000000000..3066ead79c94 --- /dev/null +++ b/toolkit/source/controls/grid/grideventforwarder.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_GRIDEVENTFORWARDER_HXX +#define TOOLKIT_GRIDEVENTFORWARDER_HXX + +/** === begin UNO includes === **/ +#include +#include +#include +/** === end UNO includes === **/ + +#include + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + class UnoGridControl; + + //================================================================================================================== + //= GridEventForwarder + //================================================================================================================== + typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::grid::XGridDataListener + , ::com::sun::star::container::XContainerListener + > GridEventForwarder_Base; + + class GridEventForwarder : public GridEventForwarder_Base + { + public: + GridEventForwarder( UnoGridControl& i_parent ); + virtual ~GridEventForwarder(); + + public: + // XInterface + virtual void SAL_CALL acquire(); + virtual void SAL_CALL release(); + + // XGridDataListener + virtual void SAL_CALL rowAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XContainerListener + virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException); + + private: + UnoGridControl& m_parent; + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // TOOLKIT_GRIDEVENTFORWARDER_HXX diff --git a/toolkit/source/controls/grid/makefile.mk b/toolkit/source/controls/grid/makefile.mk index 70bfc34b9d02..c7bc6f038b10 100644 --- a/toolkit/source/controls/grid/makefile.mk +++ b/toolkit/source/controls/grid/makefile.mk @@ -43,7 +43,8 @@ SLOFILES= \ $(SLO)$/gridcontrol.obj\ $(SLO)$/defaultgriddatamodel.obj\ $(SLO)$/defaultgridcolumnmodel.obj\ - $(SLO)$/gridcolumn.obj + $(SLO)$/gridcolumn.obj\ + $(SLO)$/grideventforwarder.obj # --- Targets ------------------------------------------------------ diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component index e782283c39eb..e919e8451dbb 100644 --- a/toolkit/util/tk.component +++ b/toolkit/util/tk.component @@ -41,7 +41,7 @@ - + -- cgit From 6042ad494be453dbfe965f31c6251e66ba6bbe3f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 7 Dec 2010 13:50:47 +0100 Subject: gridsort: introduced container listeners at the grid model, reworked and fixed listener relationship between grid model/control/peer --- .../com/sun/star/awt/grid/UnoControlGridModel.idl | 9 +------- offapi/com/sun/star/awt/grid/XGridColumn.idl | 6 ++--- offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 26 +++++++++++++--------- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl index b9cf8745d96e..631b224470b0 100644 --- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl +++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl @@ -28,19 +28,12 @@ #define __com_sun_star_awt_grid_UnoControlGridModel_idl__ #include - #include - #include - #include - #include - #include - #include - #include //============================================================================= @@ -49,7 +42,7 @@ module com { module sun { module star { module awt { module grid { //============================================================================= -/** specifies the standard model of a UnoControlGridModel. +/** specifies the standard model of a UnoControlGrid control. @since OOo 3.3.0 */ diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index d217ff5d4ac6..59cfaa727167 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -27,9 +27,7 @@ #ifndef __com_sun_star_awt_grid_XGridColumn_idl__ #define __com_sun_star_awt_grid_XGridColumn_idl__ -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif +#include #include #include @@ -43,7 +41,7 @@ module com { module sun { module star { module awt { module grid { /** The XGridColumn defines the properties and behavior of a column in a grid control @since OOo 3.3.0 */ -interface XGridColumn +interface XGridColumn : com::sun::star::lang::XComponent { /** Specifies the an idendifier of the colomn.**/ [attribute] any Identifier; diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index 86e77680cd95..a9023db0a5fe 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -28,10 +28,10 @@ #define __com_sun_star_awt_grid_XGridColumnModel_idl__ #include +#include #include - -#include +#include //============================================================================= @@ -48,9 +48,13 @@ module com { module sun { module star { module awt { module grid { */ interface XGridColumnModel { - ///** Specifies whether column selection is allowed - //*/ - //[attribute] boolean ColumnSelectionAllowed; + /** implements life time control for the component + */ + interface ::com::sun::star::lang::XComponent; + + /** allows to register listeners to be notified when columns are inserted or removed + */ + interface ::com::sun::star::container::XContainer; /**Specifies the height of column header. */ @@ -94,7 +98,13 @@ interface XGridColumnModel */ XGridColumn getColumn( [in] long index); - /** Sets default columns to the column model. + /** Fills the model with the given number of default columns + +

          Existing columns will be removed before adding new columns. Listeners at the column model will + be notified one XContainerListener::elementRemoved event + for each removed column, and one XContainerListener::elementInserted + event for each insertion.

          + @param elements the number of default columns that should be set. */ @@ -106,10 +116,6 @@ interface XGridColumnModel the column, which is already created */ XGridColumn copyColumn( [in] XGridColumn column ); - - /* - long getTotalColumnWidth(); - */ }; //============================================================================= -- cgit From 36a61c3e5471ec9408d6dd27a081e304f1dcbac0 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 8 Dec 2010 13:38:53 +0100 Subject: vcl118: #i115717# tell user that PDF/A cannot be encrypted --- filter/source/pdf/impdialog.cxx | 34 +++++++++++++++++++++++++++++----- filter/source/pdf/impdialog.hrc | 4 ++++ filter/source/pdf/impdialog.hxx | 3 +++ filter/source/pdf/impdialog.src | 16 ++++++++++++++++ 4 files changed, 52 insertions(+), 5 deletions(-) diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 1adbbc63619c..fadd91019703 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -711,9 +711,13 @@ IMPL_LINK( ImpPDFTabGeneralPage, ToggleAddStreamHdl, void*, EMPTYARG ) // ----------------------------------------------------------------------------- IMPL_LINK( ImpPDFTabGeneralPage, ToggleExportPDFAHdl, void*, EMPTYARG ) { + ImpPDFTabSecurityPage* pSecPage = NULL; //set the security page status (and its controls as well) if( mpaParent && mpaParent->GetTabPage( RID_PDF_TAB_SECURITY ) ) - ( ( ImpPDFTabSecurityPage* )mpaParent->GetTabPage( RID_PDF_TAB_SECURITY ) )->ImplPDFASecurityControl( !maCbPDFA1b.IsChecked() ); + { + pSecPage = static_cast(mpaParent->GetTabPage( RID_PDF_TAB_SECURITY )); + pSecPage->ImplPDFASecurityControl( !maCbPDFA1b.IsChecked() ); + } //PDF/A-1 needs tagged PDF, so force disable the control, will be forced in pdfexport. sal_Bool bPDFA1Sel = maCbPDFA1b.IsChecked(); @@ -748,6 +752,13 @@ IMPL_LINK( ImpPDFTabGeneralPage, ToggleExportPDFAHdl, void*, EMPTYARG ) if( mpaParent && mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) ) ( ( ImpPDFTabLinksPage* )mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) )->ImplPDFALinkControl( !maCbPDFA1b.IsChecked() ); + // if a password was set, inform the user that this will not be used in PDF/A case + if( maCbPDFA1b.IsChecked() && pSecPage && pSecPage->hasPassword() ) + { + WarningBox aBox( this, PDFFilterResId( RID_PDF_WARNPDFAPASSWORD ) ); + aBox.Execute(); + } + return 0; } @@ -910,9 +921,8 @@ void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent } } -IMPL_LINK( ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, void*, p ) +IMPL_LINK( ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, void*, EMPTYARG ) { - p = p; //for compiler warning maCbPgLyFirstOnLeft.Enable( maRbPgLyContinueFacing.IsChecked() ); return 0; } @@ -1024,10 +1034,13 @@ ImpPDFTabSecurityPage::ImpPDFTabSecurityPage( Window* i_pParent, maFtUserPwd( this, PDFFilterResId( FT_USER_PWD ) ), maUserPwdSet( PDFFilterResId( STR_USER_PWD_SET ) ), maUserPwdUnset( PDFFilterResId( STR_USER_PWD_UNSET ) ), + maUserPwdPdfa( PDFFilterResId( STR_USER_PWD_PDFA ) ), + maStrSetPwd( PDFFilterResId( STR_SET_PWD ) ), maFtOwnerPwd( this, PDFFilterResId( FT_OWNER_PWD ) ), maOwnerPwdSet( PDFFilterResId( STR_OWNER_PWD_SET ) ), maOwnerPwdUnset( PDFFilterResId( STR_OWNER_PWD_UNSET ) ), + maOwnerPwdPdfa( PDFFilterResId( STR_OWNER_PWD_PDFA ) ), maFlPrintPermissions( this, PDFFilterResId( FL_PRINT_PERMISSIONS ) ), maRbPrintNone( this, PDFFilterResId( RB_PRINT_NONE ) ), @@ -1219,10 +1232,21 @@ IMPL_LINK( ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl, void*, EMPTYARG ) void ImpPDFTabSecurityPage::enablePermissionControls() { - maFtUserPwd.SetText( (mbHaveUserPassword && IsEnabled()) ? maUserPwdSet : maUserPwdUnset ); + sal_Bool bIsPDFASel = sal_False; + ImpPDFTabDialog* pParent = static_cast(GetTabDialog()); + if( pParent && pParent->GetTabPage( RID_PDF_TAB_GENER ) ) + bIsPDFASel = ( ( ImpPDFTabGeneralPage* )pParent-> + GetTabPage( RID_PDF_TAB_GENER ) )->IsPdfaSelected(); + if( bIsPDFASel ) + maFtUserPwd.SetText( maUserPwdPdfa ); + else + maFtUserPwd.SetText( (mbHaveUserPassword && IsEnabled()) ? maUserPwdSet : maUserPwdUnset ); sal_Bool bLocalEnable = mbHaveOwnerPassword && IsEnabled(); - maFtOwnerPwd.SetText( bLocalEnable ? maOwnerPwdSet : maOwnerPwdUnset ); + if( bIsPDFASel ) + maFtOwnerPwd.SetText( maOwnerPwdPdfa ); + else + maFtOwnerPwd.SetText( bLocalEnable ? maOwnerPwdSet : maOwnerPwdUnset ); maFlPrintPermissions.Enable( bLocalEnable ); maRbPrintNone.Enable( bLocalEnable ); diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc index dccdc2cad11b..0946fe3197f8 100644 --- a/filter/source/pdf/impdialog.hrc +++ b/filter/source/pdf/impdialog.hrc @@ -33,6 +33,8 @@ #define RID_PDF_TAB_OPNFTR (RID_PDF_DIALOG_START + 3) #define RID_PDF_TAB_SECURITY (RID_PDF_DIALOG_START + 4) #define RID_PDF_TAB_LINKS (RID_PDF_DIALOG_START + 12) +#define RID_PDF_WARNPDFAPASSWORD (RID_PDF_DIALOG_START + 6) + //strings #define STR_PDF_EXPORT (RID_PDF_DIALOG_START + 5) @@ -152,12 +154,14 @@ #define STR_USER_PWD_UNSET 124 #define STR_USER_PWD_UNENC 125 #define STR_SET_PWD 126 +#define STR_USER_PWD_PDFA 127 #define FT_OWNER_PWD 128 #define STR_OWNER_PWD_SET 129 #define STR_OWNER_PWD_REST 130 #define STR_OWNER_PWD_UNSET 131 #define STR_OWNER_PWD_UNREST 132 +#define STR_OWNER_PWD_PDFA 133 #define FL_PRINT_PERMISSIONS 133 #define RB_PRINT_NONE 134 diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index 3fd98c775e0d..0a5ffe18e0ae 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -321,11 +321,13 @@ class ImpPDFTabSecurityPage : public SfxTabPage FixedText maFtUserPwd; String maUserPwdSet; String maUserPwdUnset; + String maUserPwdPdfa; String maStrSetPwd; FixedText maFtOwnerPwd; String maOwnerPwdSet; String maOwnerPwdUnset; + String maOwnerPwdPdfa; FixedLine maFlPrintPermissions; RadioButton maRbPrintNone; @@ -370,6 +372,7 @@ public: void GetFilterConfigItem( ImpPDFTabDialog* paParent); void SetFilterConfigItem( const ImpPDFTabDialog* paParent ); void ImplPDFASecurityControl( sal_Bool bEnableSecurity ); + bool hasPassword() const { return mbHaveOwnerPassword || mbHaveUserPassword; } }; //class to implement the relative link stuff diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 1c941d6a9972..35cfa93dd854 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -265,6 +265,12 @@ TabPage RID_PDF_TAB_GENER }; }; +WarningBox RID_PDF_WARNPDFAPASSWORD +{ + Title[en-US] = "PDF/A Export"; + Message[ en-US ] = "PDF/A does not allow encryption. The exported PDF file will not be password protected."; +}; + //---------------------------------------------------------- //tab page for PDF Export, opening features TabPage RID_PDF_TAB_OPNFTR @@ -607,6 +613,11 @@ TabPage RID_PDF_TAB_SECURITY Text [ en-US ] = "PDF document will not be encrypted"; }; + String STR_USER_PWD_PDFA + { + Text [en-US] = "PDF doument will not be encrypted due to PDF/A export."; + }; + FixedText FT_OWNER_PWD { Pos = MAP_APPFONT( 12 , 65 ); @@ -633,6 +644,11 @@ TabPage RID_PDF_TAB_SECURITY Text [ en-US ] = "PDF document will be unrestricted"; }; + String STR_OWNER_PWD_PDFA + { + Text [en-US] = "PDF doument will not be restricted due to PDF/A export."; + }; + ////////////////////////////// FixedLine FL_PRINT_PERMISSIONS { -- cgit From 3e9afb1f744f71488ae67e3c9029b8b9ea2692fe Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 8 Dec 2010 13:53:30 +0100 Subject: vcl118: export more sal-symbols to vcl-plugins only --- vcl/inc/vcl/fontcache.hxx | 2 +- vcl/inc/vcl/fontmanager.hxx | 2 +- vcl/inc/vcl/impfont.hxx | 8 ++------ vcl/inc/vcl/salframe.hxx | 2 +- vcl/inc/vcl/salgdi.hxx | 2 +- vcl/inc/vcl/sallayout.hxx | 12 ++++++------ vcl/inc/vcl/salmenu.hxx | 4 ++-- vcl/inc/vcl/salnativewidgets.hxx | 10 +++++----- vcl/inc/vcl/salobj.hxx | 2 +- vcl/inc/vcl/salprn.hxx | 6 +++--- vcl/inc/vcl/salsession.hxx | 2 +- vcl/inc/vcl/salsys.hxx | 2 +- vcl/inc/vcl/saltimer.hxx | 2 +- vcl/inc/vcl/salvd.hxx | 2 +- 14 files changed, 27 insertions(+), 31 deletions(-) diff --git a/vcl/inc/vcl/fontcache.hxx b/vcl/inc/vcl/fontcache.hxx index b18748ed5791..7747b99015fe 100644 --- a/vcl/inc/vcl/fontcache.hxx +++ b/vcl/inc/vcl/fontcache.hxx @@ -38,7 +38,7 @@ namespace psp { -class VCL_DLLPUBLIC FontCache +class VCL_PLUGIN_PUBLIC FontCache { struct FontDir; friend class FontDir; diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx index 33fece8d88e1..f97f21a8f72d 100644 --- a/vcl/inc/vcl/fontmanager.hxx +++ b/vcl/inc/vcl/fontmanager.hxx @@ -222,7 +222,7 @@ class FontCache; class FontCache; -class VCL_DLLPUBLIC PrintFontManager +class VCL_PLUGIN_PUBLIC PrintFontManager { struct PrintFont; struct TrueTypeFontFile; diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx index e38e1dea78d4..e414ab883fcc 100644 --- a/vcl/inc/vcl/impfont.hxx +++ b/vcl/inc/vcl/impfont.hxx @@ -174,7 +174,7 @@ public: class CmapResult; -class VCL_DLLPUBLIC ImplFontCharMap +class VCL_PLUGIN_PUBLIC ImplFontCharMap { public: explicit ImplFontCharMap( const CmapResult& ); @@ -218,11 +218,7 @@ private: }; // CmapResult is a normalized version of the many CMAP formats -class -#ifdef UNX - VCL_DLLPUBLIC // vcl-plugins need it -#endif // UNX -CmapResult +class VCL_PLUGIN_PUBLIC CmapResult { public: explicit CmapResult( bool bSymbolic = false, diff --git a/vcl/inc/vcl/salframe.hxx b/vcl/inc/vcl/salframe.hxx index 08548d7dda40..1f3c52d51352 100644 --- a/vcl/inc/vcl/salframe.hxx +++ b/vcl/inc/vcl/salframe.hxx @@ -143,7 +143,7 @@ using namespace rtl; struct SystemParentData; -class VCL_DLLPUBLIC SalFrame : public vcl::DeletionNotifier +class VCL_PLUGIN_PUBLIC SalFrame : public vcl::DeletionNotifier { // the VCL window corresponding to this frame Window* m_pWindow; diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx index 135d0a85b28e..da4cde655516 100755 --- a/vcl/inc/vcl/salgdi.hxx +++ b/vcl/inc/vcl/salgdi.hxx @@ -97,7 +97,7 @@ typedef std::vector< sal_Int32 > Int32Vector; // note: all positions are in pixel and relative to // the top/left-position of the virtual output area -class VCL_DLLPUBLIC SalGraphics +class VCL_PLUGIN_PUBLIC SalGraphics { int m_nLayout; // 0: mirroring off, 1: mirror x-axis diff --git a/vcl/inc/vcl/sallayout.hxx b/vcl/inc/vcl/sallayout.hxx index e23090c42392..bb5c6e829a70 100755 --- a/vcl/inc/vcl/sallayout.hxx +++ b/vcl/inc/vcl/sallayout.hxx @@ -72,7 +72,7 @@ class ImplFontData; // ----------------- // used for managing runs e.g. for BiDi, glyph and script fallback -class VCL_DLLPUBLIC ImplLayoutRuns +class VCL_PLUGIN_PUBLIC ImplLayoutRuns { private: int mnRunIndex; @@ -148,7 +148,7 @@ sal_UCS4 GetVerticalChar( sal_UCS4 ); // #i80090# GetMirroredChar also needed outside vcl, moved to svapp.hxx // VCL_DLLPUBLIC sal_UCS4 GetMirroredChar( sal_UCS4 ); sal_UCS4 GetLocalizedChar( sal_UCS4, LanguageType ); -VCL_DLLPUBLIC const char* GetAutofallback( sal_UCS4 ) ; +VCL_PLUGIN_PUBLIC const char* GetAutofallback( sal_UCS4 ) ; // ------------- // - SalLayout - @@ -179,7 +179,7 @@ typedef sal_uInt32 sal_GlyphId; // all positions/widths are in font units // one exception: drawposition is in pixel units -class VCL_DLLPUBLIC SalLayout +class VCL_PLUGIN_PUBLIC SalLayout { public: // used by upper layers @@ -258,7 +258,7 @@ protected: // - MultiSalLayout - // ------------------ -class VCL_DLLPUBLIC MultiSalLayout : public SalLayout +class VCL_PLUGIN_PUBLIC MultiSalLayout : public SalLayout { public: virtual void DrawText( SalGraphics& ) const; @@ -271,7 +271,7 @@ public: virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; // used only by OutputDevice::ImplLayout, TODO: make friend - MultiSalLayout( SalLayout& rBaseLayout, + explicit MultiSalLayout( SalLayout& rBaseLayout, const ImplFontData* pBaseFont = NULL ); virtual bool AddFallback( SalLayout& rFallbackLayout, ImplLayoutRuns&, const ImplFontData* pFallbackFont ); @@ -341,7 +341,7 @@ typedef std::vector GlyphVector; // --------------- -class VCL_DLLPUBLIC GenericSalLayout : public SalLayout +class VCL_PLUGIN_PUBLIC GenericSalLayout : public SalLayout { public: // used by layout engines diff --git a/vcl/inc/vcl/salmenu.hxx b/vcl/inc/vcl/salmenu.hxx index cc0438c4e177..8143fa95ec12 100644 --- a/vcl/inc/vcl/salmenu.hxx +++ b/vcl/inc/vcl/salmenu.hxx @@ -60,14 +60,14 @@ struct SalMenuButtonItem : mnId( i_nId ), maImage( rImg ), maToolTipText( i_rTTText ) {} }; -class VCL_DLLPUBLIC SalMenuItem +class VCL_PLUGIN_PUBLIC SalMenuItem { public: SalMenuItem() {} virtual ~SalMenuItem(); }; -class VCL_DLLPUBLIC SalMenu +class VCL_PLUGIN_PUBLIC SalMenu { public: SalMenu() {} diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx index 19c34cbc5e34..8cf7dd84b7c4 100644 --- a/vcl/inc/vcl/salnativewidgets.hxx +++ b/vcl/inc/vcl/salnativewidgets.hxx @@ -268,7 +268,7 @@ enum ButtonValue { * Generic value container for all control parts. */ -class VCL_DLLPUBLIC ImplControlValue +class VCL_PLUGIN_PUBLIC ImplControlValue { friend class SalFrame; @@ -306,7 +306,7 @@ class VCL_DLLPUBLIC ImplControlValue * * Value container for scrollbars. */ - class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue + class VCL_PLUGIN_PUBLIC ScrollbarValue : public ImplControlValue { public: long mnMin; @@ -332,7 +332,7 @@ class VCL_DLLPUBLIC ImplControlValue virtual ~ScrollbarValue(); }; -class VCL_DLLPUBLIC SliderValue : public ImplControlValue +class VCL_PLUGIN_PUBLIC SliderValue : public ImplControlValue { public: long mnMin; @@ -360,7 +360,7 @@ class VCL_DLLPUBLIC SliderValue : public ImplControlValue #define TABITEM_FIRST_IN_GROUP 0x004 // the tabitem is the first in group of tabitems #define TABITEM_LAST_IN_GROUP 0x008 // the tabitem is the last in group of tabitems -class VCL_DLLPUBLIC TabitemValue : public ImplControlValue +class VCL_PLUGIN_PUBLIC TabitemValue : public ImplControlValue { public: unsigned int mnAlignment; @@ -386,7 +386,7 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue * Note: the other parameters of DrawNativeControl will have no meaning * all parameters for spinbuttons are carried here */ -class VCL_DLLPUBLIC SpinbuttonValue : public ImplControlValue +class VCL_PLUGIN_PUBLIC SpinbuttonValue : public ImplControlValue { public: Rectangle maUpperRect; diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx index e453bf5c6f87..ffc6f74e6222 100644 --- a/vcl/inc/vcl/salobj.hxx +++ b/vcl/inc/vcl/salobj.hxx @@ -47,7 +47,7 @@ struct SystemEnvData; // - SalObject - // ------------- -class VCL_DLLPUBLIC SalObject +class VCL_PLUGIN_PUBLIC SalObject { void* m_pInst; SALOBJECTPROC m_pCallback; diff --git a/vcl/inc/vcl/salprn.hxx b/vcl/inc/vcl/salprn.hxx index 19f023108349..28717f333e05 100644 --- a/vcl/inc/vcl/salprn.hxx +++ b/vcl/inc/vcl/salprn.hxx @@ -44,7 +44,7 @@ namespace vcl { class PrinterController; } // - SalPrinterQueueInfo - // ----------------------- -struct VCL_DLLPUBLIC SalPrinterQueueInfo +struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo { XubString maPrinterName; XubString maDriver; @@ -62,7 +62,7 @@ struct VCL_DLLPUBLIC SalPrinterQueueInfo // - SalInfoPrinter - // ------------------ -class VCL_DLLPUBLIC SalInfoPrinter +class VCL_PLUGIN_PUBLIC SalInfoPrinter { public: std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats @@ -104,7 +104,7 @@ public: // - SalPrinter - // -------------- -class VCL_DLLPUBLIC SalPrinter +class VCL_PLUGIN_PUBLIC SalPrinter { public: // public for Sal Implementation SalPrinter() {} diff --git a/vcl/inc/vcl/salsession.hxx b/vcl/inc/vcl/salsession.hxx index 2da1ae551074..c11054a79eef 100644 --- a/vcl/inc/vcl/salsession.hxx +++ b/vcl/inc/vcl/salsession.hxx @@ -85,7 +85,7 @@ struct SalSessionQuitEvent : public SalSessionEvent typedef void(*SessionProc)( SalSessionEvent *pEvent); -class VCL_DLLPUBLIC SalSession +class VCL_PLUGIN_PUBLIC SalSession { SessionProc m_aProc; public: diff --git a/vcl/inc/vcl/salsys.hxx b/vcl/inc/vcl/salsys.hxx index 310b0a27e30f..da16d8d5b656 100644 --- a/vcl/inc/vcl/salsys.hxx +++ b/vcl/inc/vcl/salsys.hxx @@ -58,7 +58,7 @@ const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO = 7; // - SalSystem - // ------------- -class VCL_DLLPUBLIC SalSystem +class VCL_PLUGIN_PUBLIC SalSystem { public: SalSystem() {} diff --git a/vcl/inc/vcl/saltimer.hxx b/vcl/inc/vcl/saltimer.hxx index d693070138d2..08512adcaefb 100644 --- a/vcl/inc/vcl/saltimer.hxx +++ b/vcl/inc/vcl/saltimer.hxx @@ -42,7 +42,7 @@ * this needed to be virtualized for the sal plugin migration */ -class VCL_DLLPUBLIC SalTimer +class VCL_PLUGIN_PUBLIC SalTimer { SALTIMERPROC m_pProc; public: diff --git a/vcl/inc/vcl/salvd.hxx b/vcl/inc/vcl/salvd.hxx index fcbe1fb35383..04b84aed90b2 100644 --- a/vcl/inc/vcl/salvd.hxx +++ b/vcl/inc/vcl/salvd.hxx @@ -37,7 +37,7 @@ class SalGraphics; // - SalVirtualDevice - // -------------------- -class VCL_DLLPUBLIC SalVirtualDevice +class VCL_PLUGIN_PUBLIC SalVirtualDevice { public: // public for Sal Implementation SalVirtualDevice() {} -- cgit From a50d8d23e7542a688b99febc889856188a45f391 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 8 Dec 2010 14:49:18 +0100 Subject: vcl118: yet another round of vcl-plugin-only export restricts --- vcl/inc/vcl/cvtsvm.hxx | 2 +- vcl/inc/vcl/glyphcache.hxx | 12 ++++++------ vcl/inc/vcl/outfont.hxx | 12 ++++++------ vcl/inc/vcl/print.h | 2 +- vcl/inc/vcl/salbmp.hxx | 2 +- vcl/inc/vcl/saldatabasic.hxx | 2 +- vcl/inc/vcl/salimestatus.hxx | 2 +- vcl/inc/vcl/salinst.hxx | 4 ++-- vcl/inc/vcl/svdata.hxx | 4 ++-- vcl/inc/vcl/syswin.hxx | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/vcl/inc/vcl/cvtsvm.hxx b/vcl/inc/vcl/cvtsvm.hxx index 03948ac56690..a8e0d632f7bb 100644 --- a/vcl/inc/vcl/cvtsvm.hxx +++ b/vcl/inc/vcl/cvtsvm.hxx @@ -92,7 +92,7 @@ class Stack; -class VCL_DLLPUBLIC SVMConverter +class VCL_PLUGIN_PUBLIC SVMConverter { private: //#if 0 // _SOLAR__PRIVATE diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx index 0e77d5dd6bc4..6d5c7b0ec8a6 100644 --- a/vcl/inc/vcl/glyphcache.hxx +++ b/vcl/inc/vcl/glyphcache.hxx @@ -57,7 +57,7 @@ class ServerFontLayout; // ======================================================================= -class VCL_DLLPUBLIC GlyphCache +class VCL_PLUGIN_PUBLIC GlyphCache { public: explicit GlyphCache( GlyphCachePeer& ); @@ -172,7 +172,7 @@ private: // ======================================================================= -class VCL_DLLPUBLIC ServerFont +class VCL_PLUGIN_PUBLIC ServerFont { public: virtual const ::rtl::OString* GetFontFileName() const { return NULL; } @@ -254,7 +254,7 @@ private: // ======================================================================= // a class for cache entries for physical font instances that are based on serverfonts -class VCL_DLLPUBLIC ImplServerFontEntry : public ImplFontEntry +class VCL_PLUGIN_PUBLIC ImplServerFontEntry : public ImplFontEntry { private: ServerFont* mpServerFont; @@ -271,7 +271,7 @@ public: // ======================================================================= -class VCL_DLLPUBLIC ServerFontLayout : public GenericSalLayout +class VCL_PLUGIN_PUBLIC ServerFontLayout : public GenericSalLayout { private: ServerFont& mrServerFont; @@ -316,7 +316,7 @@ protected: // ======================================================================= -class VCL_DLLPUBLIC RawBitmap +class VCL_PLUGIN_PUBLIC RawBitmap { public: RawBitmap(); @@ -349,7 +349,7 @@ inline void ServerFont::SetExtended( int nInfo, void* pVoid ) // ExtraKernInfo allows an on-demand query of extra kerning info #i29881# // The kerning values have to be scaled to match the font size before use -class VCL_DLLPUBLIC ExtraKernInfo +class VCL_PLUGIN_PUBLIC ExtraKernInfo { public: ExtraKernInfo( sal_IntPtr nFontId ); diff --git a/vcl/inc/vcl/outfont.hxx b/vcl/inc/vcl/outfont.hxx index 4bbf7176ddb2..693e88562692 100644 --- a/vcl/inc/vcl/outfont.hxx +++ b/vcl/inc/vcl/outfont.hxx @@ -116,7 +116,7 @@ public: // TODO: hide members behind accessor methods // TODO: make cloning cheaper // abstract base class for physical font faces -class VCL_DLLPUBLIC ImplFontData : public ImplDevFontAttributes +class VCL_PLUGIN_PUBLIC ImplFontData : public ImplDevFontAttributes { public: // by using an ImplFontData object as a factory for its corresponding @@ -140,7 +140,7 @@ public: virtual ImplFontData* Clone() const = 0; protected: - ImplFontData( const ImplDevFontAttributes&, int nMagic ); + explicit ImplFontData( const ImplDevFontAttributes&, int nMagic ); void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; } long mnWidth; // Width (in pixels) @@ -185,7 +185,7 @@ public: // TODO: change to private // TODO: merge with ImplFontCache // TODO: rename to LogicalFontManager -class VCL_DLLPUBLIC ImplDevFontList +class VCL_PLUGIN_PUBLIC ImplDevFontList { private: friend class WinGlyphFallbackSubstititution; @@ -267,7 +267,7 @@ struct ImplKernPairData class ImplFontMetricData : public ImplFontAttributes { public: - ImplFontMetricData( const ImplFontSelectData& ); + explicit ImplFontMetricData( const ImplFontSelectData& ); void ImplInitTextLineSize( const OutputDevice* pDev ); void ImplInitAboveTextLineSize(); @@ -324,10 +324,10 @@ public: // TODO: hide members behind accessor methods // TODO: rename ImplFontEntry to LogicalFontInstance // TODO: allow sharing of metrics for related fonts -class VCL_DLLPUBLIC ImplFontEntry +class VCL_PLUGIN_PUBLIC ImplFontEntry { public: - ImplFontEntry( const ImplFontSelectData& ); + explicit ImplFontEntry( const ImplFontSelectData& ); virtual ~ImplFontEntry(); public: // TODO: make data members private diff --git a/vcl/inc/vcl/print.h b/vcl/inc/vcl/print.h index 78c1bb647575..7ac0d04d6dac 100644 --- a/vcl/inc/vcl/print.h +++ b/vcl/inc/vcl/print.h @@ -55,7 +55,7 @@ struct ImplPrnQueueData // - ImplPrnQueueList - // -------------------- -class VCL_DLLPUBLIC ImplPrnQueueList +class VCL_PLUGIN_PUBLIC ImplPrnQueueList { public: std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash > diff --git a/vcl/inc/vcl/salbmp.hxx b/vcl/inc/vcl/salbmp.hxx index 4aca4a9277e9..2fc9dcbf39ac 100644 --- a/vcl/inc/vcl/salbmp.hxx +++ b/vcl/inc/vcl/salbmp.hxx @@ -38,7 +38,7 @@ class SalGraphics; class BitmapPalette; struct BitmapSystemData; -class VCL_DLLPUBLIC SalBitmap +class VCL_PLUGIN_PUBLIC SalBitmap { public: SalBitmap() {} diff --git a/vcl/inc/vcl/saldatabasic.hxx b/vcl/inc/vcl/saldatabasic.hxx index a40cd045611c..d3c1a7254513 100644 --- a/vcl/inc/vcl/saldatabasic.hxx +++ b/vcl/inc/vcl/saldatabasic.hxx @@ -37,7 +37,7 @@ namespace psp class PrinterInfoManager; } -class VCL_DLLPUBLIC SalData +class VCL_PLUGIN_PUBLIC SalData { public: SalInstance* m_pInstance; // pointer to instance diff --git a/vcl/inc/vcl/salimestatus.hxx b/vcl/inc/vcl/salimestatus.hxx index 779a75c9afaa..20184a059d9a 100644 --- a/vcl/inc/vcl/salimestatus.hxx +++ b/vcl/inc/vcl/salimestatus.hxx @@ -30,7 +30,7 @@ #include -class VCL_DLLPUBLIC SalI18NImeStatus +class VCL_PLUGIN_PUBLIC SalI18NImeStatus { public: SalI18NImeStatus() {} diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx index 71b820803473..30212fa5c960 100644 --- a/vcl/inc/vcl/salinst.hxx +++ b/vcl/inc/vcl/salinst.hxx @@ -68,7 +68,7 @@ namespace vos { class IMutex; } // - SalInstance - // --------------- -class VCL_DLLPUBLIC SalInstance +class VCL_PLUGIN_PUBLIC SalInstance { public: typedef bool(*Callback)(void*,void*,int); @@ -197,7 +197,7 @@ void DestroySalInstance( SalInstance* pInst ); void SalAbort( const XubString& rErrorText ); -VCL_DLLPUBLIC const ::rtl::OUString& SalGetDesktopEnvironment(); +VCL_PLUGIN_PUBLIC const ::rtl::OUString& SalGetDesktopEnvironment(); // ----------- // - SalData - diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx index 67aa6806be49..16a3b8c4ded1 100644 --- a/vcl/inc/vcl/svdata.hxx +++ b/vcl/inc/vcl/svdata.hxx @@ -391,8 +391,8 @@ void ImplFreeEventHookData(); long ImplCallPreNotify( NotifyEvent& rEvt ); long ImplCallEvent( NotifyEvent& rEvt ); -extern VCL_DLLPUBLIC ImplSVData* pImplSVData; -inline VCL_DLLPUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; } +extern VCL_PLUGIN_PUBLIC ImplSVData* pImplSVData; +inline VCL_PLUGIN_PUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; } inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); } bool ImplInitAccessBridge( BOOL bAllowCancel, BOOL &rCancelled ); diff --git a/vcl/inc/vcl/syswin.hxx b/vcl/inc/vcl/syswin.hxx index b3a7d9b8775e..d1b3dd4d8799 100644 --- a/vcl/inc/vcl/syswin.hxx +++ b/vcl/inc/vcl/syswin.hxx @@ -85,7 +85,7 @@ class TaskPaneList; #define WINDOWSTATE_STATE_MAXIMIZED_HORZ ((ULONG)0x00000010) #define WINDOWSTATE_STATE_MAXIMIZED_VERT ((ULONG)0x00000020) -class VCL_DLLPUBLIC WindowStateData +class VCL_PLUGIN_PUBLIC WindowStateData { private: sal_uInt32 mnValidMask; -- cgit From 7cbfd9da26a31ca6f32eea39f71af00590d4a93b Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 8 Dec 2010 14:54:55 +0100 Subject: vcl118: Octree and InverseColorMap are vcl-internal only --- vcl/inc/vcl/octree.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vcl/inc/vcl/octree.hxx b/vcl/inc/vcl/octree.hxx index a7ce5e49c31d..ea08fbbe04d2 100644 --- a/vcl/inc/vcl/octree.hxx +++ b/vcl/inc/vcl/octree.hxx @@ -65,7 +65,7 @@ typedef PNODE* PPNODE; class ImpNodeCache; class BitmapReadAccess; -class VCL_DLLPUBLIC Octree +class VCL_PLUGIN_PUBLIC Octree { private: @@ -127,7 +127,7 @@ inline USHORT Octree::GetBestPaletteIndex( const BitmapColor& rColor ) // - InverseColorMap - // ------------------- -class VCL_DLLPUBLIC InverseColorMap +class VCL_PLUGIN_PUBLIC InverseColorMap { private: @@ -143,7 +143,7 @@ private: public: - InverseColorMap( const BitmapPalette& rPal ); + explicit InverseColorMap( const BitmapPalette& rPal ); ~InverseColorMap(); inline USHORT GetBestPaletteIndex( const BitmapColor& rColor ); -- cgit From 9314c9fd9891db08d9588d8ac7e475ea1e2fee5f Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 8 Dec 2010 14:54:55 +0100 Subject: vcl118: Octree and InverseColorMap are vcl-internal only --- sd/source/ui/dlg/vectdlg.cxx | 3 --- 1 file changed, 3 deletions(-) mode change 100644 => 100755 sd/source/ui/dlg/vectdlg.cxx diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx old mode 100644 new mode 100755 index 7cd0be451c4b..88316c0f03fc --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -43,9 +43,6 @@ #include "vectdlg.hxx" #include "vectdlg.hrc" #include -#ifndef _SV_OCTREE_HXX //autogen - #include -#endif #include #include #include -- cgit From 623ab0e0da586fd1d9d756f59f4655a736896bb7 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 8 Dec 2010 19:15:37 +0100 Subject: vcl118: #i115837# add a murphy factor to checkbox width --- vcl/aqua/source/gdi/aquaprintaccessoryview.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm index d19290d8320a..c6703b58be88 100644 --- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm +++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm @@ -813,7 +813,6 @@ static void addBool( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO [pBtn setEnabled: NO]; linebreakCell( [pBtn cell], rText ); [pBtn sizeToFit]; - [pCurParent addSubview: [pBtn autorelease]]; rRightColumn.push_back( ColumnItem( pBtn ) ); @@ -825,10 +824,17 @@ static void addBool( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO [pBtn setTag: nTag]; aCheckRect = [pBtn frame]; + // #i115837# add a murphy factor; it can apparently occasionally happen + // that sizeToFit does not a perfect job and that the button linebreaks again + // if - and only if - there is already a '\n' contained in the text and the width + // is minimally of + aCheckRect.size.width += 1; // move to rCurY aCheckRect.origin.y = rCurY - aCheckRect.size.height; [pBtn setFrame: aCheckRect]; + + [pCurParent addSubview: [pBtn autorelease]]; // update rCurY rCurY = aCheckRect.origin.y - 5; -- cgit From 485d404dc2d12f86acd9c69f19e9075bd375e861 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 9 Dec 2010 15:48:26 +0100 Subject: vcl118: #i115788# fix file specs vs. URI --- vcl/source/gdi/pdfwriter_impl.cxx | 50 +++++++++++++++++++++++++++++---------- vcl/source/gdi/pdfwriter_impl.hxx | 2 +- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 325ccef1c3a6..b3d723ae12c4 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2037,9 +2037,25 @@ inline void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OString& rInSt appendLiteralStringEncrypt( aBufferString, nInObjectNumber, rOutBuffer); } -inline void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer ) +void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer, rtl_TextEncoding nEnc ) { - rtl::OString aBufferString( rtl::OUStringToOString( rInString, RTL_TEXTENCODING_ASCII_US ) ); + rtl::OString aBufferString( rtl::OUStringToOString( rInString, nEnc ) ); + sal_Int32 nLen = aBufferString.getLength(); + rtl::OStringBuffer aBuf( nLen ); + const sal_Char* pT = aBufferString.getStr(); + + for( sal_Int32 i = 0; i < nLen; i++, pT++ ) + { + if( (*pT & 0x80) == 0 ) + aBuf.append( *pT ); + else + { + aBuf.append( '<' ); + appendHex( *pT, aBuf ); + aBuf.append( '>' ); + } + } + aBufferString = aBuf.makeStringAndClear(); appendLiteralStringEncrypt( aBufferString, nInObjectNumber, rOutBuffer); } @@ -4634,18 +4650,20 @@ we check in the following sequence: { aLine.append( "/Launch/Win<>" ); } else { - sal_Int32 nSetRelative = 0; + bool bSetRelative = false; + bool bFileSpec = false; //check if relative file link is requested and if the protocol is 'file://' if( m_aContext.RelFsys && eBaseProtocol == eTargetProtocol && eTargetProtocol == INET_PROT_FILE ) - nSetRelative++; + bSetRelative = true; rtl::OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is, if( nSetGoToRMode == 0 ) + { switch( m_aContext.DefaultLinkAction ) { default: @@ -4665,19 +4683,24 @@ we check in the following sequence: eTargetProtocol != INET_PROT_FILE ) aLine.append( "/URI/URI" ); else + { aLine.append( "/Launch/F" ); + bFileSpec = true; + } break; } + } //fragment are encoded in the same way as in the named destination processing - rtl::OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET ); if( nSetGoToRMode ) {//add the fragment + rtl::OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET ); aLine.append("/GoToR"); aLine.append("/F"); - appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark, + bFileSpec = true; + appendLiteralStringEncrypt( bSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_WITH_CHARSET ) : - aURLNoMark, rLink.m_nObject, aLine ); + aURLNoMark, rLink.m_nObject, aLine, osl_getThreadTextEncoding() ); if( aFragment.getLength() > 0 ) { aLine.append("/D/"); @@ -4696,13 +4719,16 @@ we check in the following sequence: //substitute the fragment aTargetURL.SetMark( aLineLoc.getStr() ); } - rtl::OUString aURL = aTargetURL.GetMainURL( (nSetRelative || eTargetProtocol == INET_PROT_FILE) ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE ); + rtl::OUString aURL = aTargetURL.GetMainURL( bFileSpec ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE ); // check if we have a URL available, if the string is empty, set it as the original one // if( aURL.getLength() == 0 ) // appendLiteralStringEncrypt( rLink.m_aURL , rLink.m_nObject, aLine ); // else - appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL ) : - aURL , rLink.m_nObject, aLine ); + appendLiteralStringEncrypt( bSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL, + INetURLObject::WAS_ENCODED, + bFileSpec ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE + ) : + aURL , rLink.m_nObject, aLine, osl_getThreadTextEncoding() ); } //<--- i56629 } @@ -5606,7 +5632,7 @@ bool PDFWriterImpl::emitWidgetAnnotations() { // create a submit form action aLine.append( "/AA< Date: Thu, 9 Dec 2010 20:00:24 +0100 Subject: vcl118: #i65970# use shadings for gradients to increase efficiency and avoid paint problems --- vcl/source/gdi/pdfwriter_impl.cxx | 108 +++++++++++++------------------------ vcl/source/gdi/pdfwriter_impl.hxx | 2 - vcl/source/gdi/pdfwriter_impl2.cxx | 25 ++------- 3 files changed, 43 insertions(+), 92 deletions(-) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index b3d723ae12c4..cd3b204a2cd8 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2962,12 +2962,9 @@ bool PDFWriterImpl::emitTilings() aTilingObj.setLength( 0 ); -#if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine( "PDFWriterImpl::emitTilings" ); - emitComment( aLine.getStr() ); - } -#endif + #if OSL_DEBUG_LEVEL > 1 + emitComment( "PDFWriterImpl::emitTilings" ); + #endif sal_Int32 nX = (sal_Int32)it->m_aRectangle.Left(); sal_Int32 nY = (sal_Int32)it->m_aRectangle.Top(); @@ -3455,10 +3452,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont // now we can actually write the font stream ! #if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine( " PDFWriterImpl::emitEmbeddedFont" ); - emitComment( aLine.getStr() ); - } + emitComment( " PDFWriterImpl::emitEmbeddedFont" ); #endif OStringBuffer aLine( 512 ); nStreamObject = createObject(); @@ -3884,12 +3878,9 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding, delete pCodec; #endif -#if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine( " PDFWriterImpl::createToUnicodeCMap" ); - emitComment( aLine.getStr() ); - } -#endif + #if OSL_DEBUG_LEVEL > 1 + emitComment( "PDFWriterImpl::createToUnicodeCMap" ); + #endif OStringBuffer aLine( 40 ); aLine.append( nStream ); @@ -4076,10 +4067,7 @@ bool PDFWriterImpl::emitFonts() CHECK_RETURN( (osl_File_E_None == osl_setFilePos( aFontFile, osl_Pos_Absolut, 0 ) ) ); #if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine1( " PDFWriterImpl::emitFonts" ); - emitComment( aLine1.getStr() ); - } + emitComment( "PDFWriterImpl::emitFonts" ); #endif sal_Int32 nFontStream = createObject(); sal_Int32 nStreamLengthObject = createObject(); @@ -5384,12 +5372,9 @@ bool PDFWriterImpl::emitAppearances( PDFWidget& rWidget, OStringBuffer& rAnnotDi pApppearanceStream->Seek( STREAM_SEEK_TO_BEGIN ); sal_Int32 nObject = createObject(); CHECK_RETURN( updateObject( nObject ) ); -#if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine( " PDFWriterImpl::emitAppearances" ); - emitComment( aLine.getStr() ); - } -#endif + #if OSL_DEBUG_LEVEL > 1 + emitComment( "PDFWriterImpl::emitAppearances" ); + #endif OStringBuffer aLine; aLine.append( nObject ); @@ -9277,12 +9262,9 @@ bool PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject ) rObject.m_pContentStream->Seek( STREAM_SEEK_TO_END ); ULONG nSize = rObject.m_pContentStream->Tell(); rObject.m_pContentStream->Seek( STREAM_SEEK_TO_BEGIN ); -#if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine( " PDFWriterImpl::writeTransparentObject" ); - emitComment( aLine.getStr() ); - } -#endif + #if OSL_DEBUG_LEVEL > 1 + emitComment( "PDFWriterImpl::writeTransparentObject" ); + #endif OStringBuffer aLine( 512 ); CHECK_RETURN( updateObject( rObject.m_nObject ) ); aLine.append( rObject.m_nObject ); @@ -9426,28 +9408,21 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject ) sal_Int32 nFunctionObject = createObject(); CHECK_RETURN( updateObject( nFunctionObject ) ); - OutputDevice* pRefDevice = getReferenceDevice(); - pRefDevice->Push( PUSH_ALL ); - if( rObject.m_aSize.Width() > pRefDevice->GetOutputSizePixel().Width() ) - rObject.m_aSize.Width() = pRefDevice->GetOutputSizePixel().Width(); - if( rObject.m_aSize.Height() > pRefDevice->GetOutputSizePixel().Height() ) - rObject.m_aSize.Height() = pRefDevice->GetOutputSizePixel().Height(); - pRefDevice->SetMapMode( MapMode( MAP_PIXEL ) ); - pRefDevice->DrawGradient( Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient ); + VirtualDevice aDev; + aDev.SetOutputSizePixel( rObject.m_aSize ); + aDev.SetMapMode( MapMode( MAP_PIXEL ) ); + aDev.DrawGradient( Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient ); - Bitmap aSample = pRefDevice->GetBitmap( Point( 0, 0 ), rObject.m_aSize ); + Bitmap aSample = aDev.GetBitmap( Point( 0, 0 ), rObject.m_aSize ); BitmapReadAccess* pAccess = aSample.AcquireReadAccess(); AccessReleaser aReleaser( pAccess ); Size aSize = aSample.GetSizePixel(); sal_Int32 nStreamLengthObject = createObject(); -#if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine( " PDFWriterImpl::writeGradientFunction" ); - emitComment( aLine.getStr() ); - } -#endif + #if OSL_DEBUG_LEVEL > 1 + emitComment( "PDFWriterImpl::writeGradientFunction" ); + #endif OStringBuffer aLine( 120 ); aLine.append( nFunctionObject ); aLine.append( " 0 obj\n" @@ -9475,7 +9450,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject ) checkAndEnableStreamEncryption( nFunctionObject ); beginCompression(); - for( int y = 0; y < aSize.Height(); y++ ) + for( int y = aSize.Height()-1; y >= 0; y-- ) { for( int x = 0; x < aSize.Width(); x++ ) { @@ -9526,8 +9501,6 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject ) "endobj\n\n" ); CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) ); - pRefDevice->Pop(); - return true; } @@ -9556,12 +9529,9 @@ bool PDFWriterImpl::writeJPG( JPGEmit& rObject ) m_aErrors.insert( PDFWriter::Warning_Transparency_Omitted_PDF13 ); } -#if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine( " PDFWriterImpl::writeJPG" ); - emitComment( aLine.getStr() ); - } -#endif + #if OSL_DEBUG_LEVEL > 1 + emitComment( "PDFWriterImpl::writeJPG" ); + #endif OStringBuffer aLine(200); aLine.append( rObject.m_nObject ); @@ -9681,12 +9651,9 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) sal_Int32 nStreamLengthObject = createObject(); sal_Int32 nMaskObject = 0; -#if OSL_DEBUG_LEVEL > 1 - { - OStringBuffer aLine( " PDFWriterImpl::writeBitmapObject" ); - emitComment( aLine.getStr() ); - } -#endif + #if OSL_DEBUG_LEVEL > 1 + emitComment( "PDFWriterImpl::writeBitmapObject" ); + #endif OStringBuffer aLine(1024); aLine.append( rObject.m_nObject ); aLine.append( " 0 obj\n" @@ -10076,15 +10043,16 @@ sal_Int32 PDFWriterImpl::createGradient( const Gradient& rGradient, const Size& rSize ) ); // check if we already have this gradient std::list::iterator it; + // rounding to point will generally lose some pixels + // round up to point boundary + aPtSize.Width()++; + aPtSize.Height()++; for( it = m_aGradients.begin(); it != m_aGradients.end(); ++it ) { if( it->m_aGradient == rGradient ) { - if( it->m_aSize.Width() < aPtSize.Width() ) - it->m_aSize.Width() = aPtSize.Width(); - if( it->m_aSize.Height() <= aPtSize.Height() ) - it->m_aSize.Height() = aPtSize.Height(); - break; + if( it->m_aSize == aPtSize ) + break; } } if( it == m_aGradients.end() ) @@ -10159,12 +10127,12 @@ void PDFWriterImpl::drawGradient( const PolyPolygon& rPolyPoly, const Gradient& return; } - sal_Int32 nGradient = createGradient( rGradient, rPolyPoly.GetBoundRect().GetSize() ); + Rectangle aBoundRect = rPolyPoly.GetBoundRect(); + sal_Int32 nGradient = createGradient( rGradient, aBoundRect.GetSize() ); updateGraphicsState(); - Rectangle aBoundRect = rPolyPoly.GetBoundRect(); - Point aTranslate = aBoundRect.BottomLeft() + Point( 0, 1 ); + Point aTranslate = aBoundRect.BottomLeft(); int nPolygons = rPolyPoly.Count(); OStringBuffer aLine( 80*nPolygons ); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 84e3ae183ad3..7b9096ea21eb 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1052,8 +1052,6 @@ i12626 bool prepareEncryption( const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >& ); // helper for playMetafile - void implWriteGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient, - VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx, VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index ee1fe1cc6bc5..19834ea6955d 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -55,21 +55,6 @@ using namespace com::sun::star::beans; // ----------------------------------------------------------------------------- -void PDFWriterImpl::implWriteGradient( const PolyPolygon& i_rPolyPoly, const Gradient& i_rGradient, - VirtualDevice* i_pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& i_rContext ) -{ - GDIMetaFile aTmpMtf; - - i_pDummyVDev->AddGradientActions( i_rPolyPoly.GetBoundRect(), i_rGradient, aTmpMtf ); - - m_rOuterFace.Push(); - m_rOuterFace.IntersectClipRegion( i_rPolyPoly.getB2DPolyPolygon() ); - playMetafile( aTmpMtf, NULL, i_rContext, i_pDummyVDev ); - m_rOuterFace.Pop(); -} - -// ----------------------------------------------------------------------------- - void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSize, const BitmapEx& i_rBitmapEx, VirtualDevice* i_pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& i_rContext ) { @@ -354,16 +339,14 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa case( META_GRADIENT_ACTION ): { const MetaGradientAction* pA = (const MetaGradientAction*) pAction; - const PolyPolygon aPolyPoly( pA->GetRect() ); - - implWriteGradient( aPolyPoly, pA->GetGradient(), pDummyVDev, i_rContext ); + m_rOuterFace.DrawGradient( pA->GetRect(), pA->GetGradient() ); } break; case( META_GRADIENTEX_ACTION ): { const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction; - implWriteGradient( pA->GetPolyPolygon(), pA->GetGradient(), pDummyVDev, i_rContext ); + m_rOuterFace.DrawGradient( pA->GetPolyPolygon(), pA->GetGradient() ); } break; @@ -518,7 +501,9 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa } if( pGradAction ) - implWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), pDummyVDev, i_rContext ); + { + m_rOuterFace.DrawGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient() ); + } } else { -- cgit From 7c0d414bcfde64715552807a985eddb748d96218 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 10 Dec 2010 16:58:03 +0100 Subject: vcl118: #i65970# increase gradient quality especially in ghostscript --- vcl/source/gdi/pdfwriter_impl.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index cd3b204a2cd8..427b025f2051 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9435,6 +9435,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject ) aLine.append( " ]\n" "/BitsPerSample 8\n" "/Range[ 0 1 0 1 0 1 ]\n" + "/Order 3\n" "/Length " ); aLine.append( nStreamLengthObject ); aLine.append( " 0 R\n" -- cgit From 6417dec44650ef333c94d0ecdb2c848dca088ec3 Mon Sep 17 00:00:00 2001 From: Juergen Schmidt Date: Mon, 13 Dec 2010 13:36:58 +0100 Subject: spc01: improve error handling, catch exception in copy_file --- l10ntools/scripts/tool/l10ntool.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/l10ntools/scripts/tool/l10ntool.py b/l10ntools/scripts/tool/l10ntool.py index f1630027ccdc..b44306717b20 100644 --- a/l10ntools/scripts/tool/l10ntool.py +++ b/l10ntools/scripts/tool/l10ntool.py @@ -116,6 +116,11 @@ class AbstractL10nTool: return self._options.inputfile[0] == '@' def copy_file(self, inputfilename, outputfilename): + try: + os.remove(outputfilename) + except: + pass + try: shutil.copy(inputfilename, outputfilename) except IOError: -- cgit From 98e9b844f2f2038d69ae159ee67cc6c3ba7d1a76 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 13 Dec 2010 13:42:14 +0100 Subject: vcl118: #i116048# improve shutdown behavior of unix clipboard (thanks sb !) --- vcl/inc/vcl/displayconnectiondispatch.hxx | 52 +++++++++++++++++++ vcl/inc/vcl/salinst.hxx | 34 +++---------- vcl/inc/vcl/svdata.hxx | 7 +-- vcl/inc/vcl/xconnection.hxx | 15 +++--- vcl/source/app/session.cxx | 36 +++++++------ vcl/source/app/svapp.cxx | 5 +- vcl/source/app/svdata.cxx | 13 +++-- vcl/source/app/svmain.cxx | 16 +++--- vcl/source/control/edit.cxx | 24 ++++----- vcl/source/gdi/pdfwriter_impl2.cxx | 10 ++-- vcl/source/helper/xconnection.cxx | 77 ++++++++++++++-------------- vcl/source/window/window.cxx | 82 +++++++++++++++--------------- vcl/unx/source/dtrans/X11_clipboard.hxx | 26 +++++----- vcl/unx/source/dtrans/X11_dndcontext.hxx | 6 +-- vcl/unx/source/dtrans/X11_selection.cxx | 68 +++++++++++++++---------- vcl/unx/source/dtrans/X11_selection.hxx | 39 +++++++------- vcl/unx/source/dtrans/X11_service.cxx | 24 +++++---- vcl/unx/source/dtrans/X11_transferable.hxx | 4 +- vcl/unx/source/fontmanager/fontmanager.cxx | 10 +++- 19 files changed, 314 insertions(+), 234 deletions(-) create mode 100644 vcl/inc/vcl/displayconnectiondispatch.hxx diff --git a/vcl/inc/vcl/displayconnectiondispatch.hxx b/vcl/inc/vcl/displayconnectiondispatch.hxx new file mode 100644 index 000000000000..fea1d0b7cba9 --- /dev/null +++ b/vcl/inc/vcl/displayconnectiondispatch.hxx @@ -0,0 +1,52 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_VCL_DISPLAYCONNECTIONDISPATCH_HXX +#define INCLUDED_VCL_DISPLAYCONNECTIONDISPATCH_HXX + +#include "sal/config.h" + +#include "com/sun/star/awt/XDisplayConnection.hpp" +#include "cppuhelper/implbase1.hxx" + +namespace vcl { + +class DisplayConnectionDispatch: + public cppu::WeakImplHelper1< com::sun::star::awt::XDisplayConnection > +{ +public: + virtual bool dispatchEvent(void * pData, int nBytes) = 0; + + virtual bool dispatchErrorEvent(void * pData, int nBytes) = 0; + +protected: + virtual ~DisplayConnectionDispatch() {} +}; + +} + +#endif diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx index 30212fa5c960..10441d7527b7 100644 --- a/vcl/inc/vcl/salinst.hxx +++ b/vcl/inc/vcl/salinst.hxx @@ -31,10 +31,12 @@ #include "com/sun/star/uno/Reference.hxx" #include "vcl/sv.h" +#include "vcl/displayconnectiondispatch.hxx" #include "vcl/dllapi.h" #include "tools/string.hxx" +#include "rtl/ref.hxx" #include "rtl/string.hxx" #include @@ -70,21 +72,11 @@ namespace vos { class IMutex; } class VCL_PLUGIN_PUBLIC SalInstance { -public: - typedef bool(*Callback)(void*,void*,int); private: - void* m_pEventInst; - void* m_pErrorInst; - Callback m_pEventCallback; - Callback m_pErrorCallback; + rtl::Reference< vcl::DisplayConnectionDispatch > m_pEventInst; public: - SalInstance() : - m_pEventInst( NULL ), - m_pErrorInst( NULL ), - m_pEventCallback( NULL ), - m_pErrorCallback( NULL ) - {} + SalInstance() {} virtual ~SalInstance(); // Frame @@ -154,22 +146,12 @@ public: // methods for XDisplayConnection - // the parameters for the callbacks are: - // void* pInst: pInstance form the SetCallback call - // void* pEvent: address of the system specific event structure - // int nBytes: length of the system specific event structure - void SetEventCallback( void* pInstance, Callback pCallback ) - { m_pEventInst = pInstance; m_pEventCallback = pCallback; } - Callback GetEventCallback() const - { return m_pEventCallback; } + void SetEventCallback( rtl::Reference< vcl::DisplayConnectionDispatch > const & pInstance ) + { m_pEventInst = pInstance; } bool CallEventCallback( void* pEvent, int nBytes ) - { return m_pEventCallback ? m_pEventCallback( m_pEventInst, pEvent, nBytes ) : false; } - void SetErrorEventCallback( void* pInstance, Callback pCallback ) - { m_pErrorInst = pInstance; m_pErrorCallback = pCallback; } - Callback GetErrorEventCallback() const - { return m_pErrorCallback; } + { return m_pEventInst.is() && m_pEventInst->dispatchEvent( pEvent, nBytes ); } bool CallErrorCallback( void* pEvent, int nBytes ) - { return m_pErrorCallback ? m_pErrorCallback( m_pErrorInst, pEvent, nBytes ) : false; } + { return m_pEventInst.is() && m_pEventInst->dispatchErrorEvent( pEvent, nBytes ); } enum ConnectionIdentifierType { AsciiCString, Blob }; virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0; diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx index 16a3b8c4ded1..035cd1eaccc7 100644 --- a/vcl/inc/vcl/svdata.hxx +++ b/vcl/inc/vcl/svdata.hxx @@ -28,6 +28,7 @@ #ifndef _SV_SVDATA_HXX #define _SV_SVDATA_HXX +#include "rtl/ref.hxx" #include "vos/thread.hxx" #include "tools/string.hxx" #include "tools/gen.hxx" @@ -51,9 +52,6 @@ namespace lang { namespace frame { class XSessionManagerClient; } -namespace awt { - class XDisplayConnection; -} }}} struct ImplTimerData; @@ -361,8 +359,7 @@ struct ImplSVData BOOL mbIsTestTool; vos::OThread::TThreadIdentifier mnMainThreadId; - ::com::sun::star::uno::Reference< - ::com::sun::star::awt::XDisplayConnection > mxDisplayConnection; + rtl::Reference< vcl::DisplayConnection > mxDisplayConnection; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge; com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient; diff --git a/vcl/inc/vcl/xconnection.hxx b/vcl/inc/vcl/xconnection.hxx index aa9d37430ea6..d43e02941cb3 100644 --- a/vcl/inc/vcl/xconnection.hxx +++ b/vcl/inc/vcl/xconnection.hxx @@ -28,11 +28,12 @@ #ifndef _VCL_XCONNECTION_HXX #define _VCL_XCONNECTION_HXX -#include -#include #include +#include #include +#include "vcl/displayconnectiondispatch.hxx" + #ifndef _STLP_LIST #include #endif @@ -40,7 +41,7 @@ namespace vcl { class DisplayConnection : - public ::cppu::WeakImplHelper1< ::com::sun::star::awt::XDisplayConnection > + public DisplayConnectionDispatch { ::osl::Mutex m_aMutex; ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > > @@ -52,9 +53,11 @@ namespace vcl { DisplayConnection(); virtual ~DisplayConnection(); - static bool dispatchEvent( void* pThis, void* pData, int nBytes ); - static bool dispatchErrorEvent( void* pThis, void* pData, int nBytes ); - void dispatchDowningEvent(); + void start(); + void terminate(); + + virtual bool dispatchEvent( void* pData, int nBytes ); + virtual bool dispatchErrorEvent( void* pData, int nBytes ); // XDisplayConnection virtual void SAL_CALL addEventHandler( const ::com::sun::star::uno::Any& window, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler, sal_Int32 eventMask ) throw(); diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index c65eb13224e1..4a9ea98ae3e8 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -39,6 +39,12 @@ #include +namespace { + +namespace css = com::sun::star; + +} + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::frame; @@ -52,12 +58,12 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient { struct Listener { - Reference< XSessionManagerListener > m_xListener; + css::uno::Reference< XSessionManagerListener > m_xListener; bool m_bInteractionRequested; bool m_bInteractionDone; bool m_bSaveDone; - Listener( const Reference< XSessionManagerListener >& xListener ) + Listener( const css::uno::Reference< XSessionManagerListener >& xListener ) : m_xListener( xListener ), m_bInteractionRequested( false ), m_bInteractionDone( false ), @@ -84,11 +90,11 @@ public: VCLSession(); virtual ~VCLSession(); - virtual void SAL_CALL addSessionManagerListener( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ); - virtual void SAL_CALL removeSessionManagerListener( const Reference< XSessionManagerListener>& xListener ) throw( RuntimeException ); - virtual void SAL_CALL queryInteraction( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ); - virtual void SAL_CALL interactionDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ); - virtual void SAL_CALL saveDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ); + virtual void SAL_CALL addSessionManagerListener( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ); + virtual void SAL_CALL removeSessionManagerListener( const css::uno::Reference< XSessionManagerListener>& xListener ) throw( RuntimeException ); + virtual void SAL_CALL queryInteraction( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ); + virtual void SAL_CALL interactionDone( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ); + virtual void SAL_CALL saveDone( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ); virtual sal_Bool SAL_CALL cancelShutdown() throw( RuntimeException ); }; @@ -212,7 +218,7 @@ void VCLSession::callQuit() ULONG nAcquireCount = Application::ReleaseSolarMutex(); for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it ) { - Reference< XSessionManagerListener2 > xListener2( it->m_xListener, UNO_QUERY ); + css::uno::Reference< XSessionManagerListener2 > xListener2( it->m_xListener, UNO_QUERY ); if( xListener2.is() ) xListener2->doQuit(); } @@ -244,14 +250,14 @@ void VCLSession::SalSessionEventProc( SalSessionEvent* pEvent ) } } -void SAL_CALL VCLSession::addSessionManagerListener( const Reference& xListener ) throw( RuntimeException ) +void SAL_CALL VCLSession::addSessionManagerListener( const css::uno::Reference& xListener ) throw( RuntimeException ) { osl::MutexGuard aGuard( m_aMutex ); m_aListeners.push_back( Listener( xListener ) ); } -void SAL_CALL VCLSession::removeSessionManagerListener( const Reference& xListener ) throw( RuntimeException ) +void SAL_CALL VCLSession::removeSessionManagerListener( const css::uno::Reference& xListener ) throw( RuntimeException ) { osl::MutexGuard aGuard( m_aMutex ); @@ -268,7 +274,7 @@ void SAL_CALL VCLSession::removeSessionManagerListener( const Reference& xListener ) throw( RuntimeException ) +void SAL_CALL VCLSession::queryInteraction( const css::uno::Reference& xListener ) throw( RuntimeException ) { if( m_bInteractionGranted ) { @@ -295,7 +301,7 @@ void SAL_CALL VCLSession::queryInteraction( const Reference& xListener ) throw( RuntimeException ) +void SAL_CALL VCLSession::interactionDone( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ) { osl::MutexGuard aGuard( m_aMutex ); int nRequested = 0, nDone = 0; @@ -318,7 +324,7 @@ void SAL_CALL VCLSession::interactionDone( const Reference< XSessionManagerListe } } -void SAL_CALL VCLSession::saveDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ) +void SAL_CALL VCLSession::saveDone( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException ) { osl::MutexGuard aGuard( m_aMutex ); @@ -359,11 +365,11 @@ Sequence< rtl::OUString > SAL_CALL vcl_session_getSupportedServiceNames() return aRet; } -Reference< XInterface > SAL_CALL vcl_session_createInstance( const Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/ ) +css::uno::Reference< XInterface > SAL_CALL vcl_session_createInstance( const css::uno::Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/ ) { ImplSVData* pSVData = ImplGetSVData(); if( ! pSVData->xSMClient.is() ) pSVData->xSMClient = new VCLSession(); - return Reference< XInterface >(pSVData->xSMClient, UNO_QUERY ); + return css::uno::Reference< XInterface >(pSVData->xSMClient, UNO_QUERY ); } diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index e503172eb2c6..759d28e30bb1 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1761,9 +1761,12 @@ void Application::SetUnoWrapper( UnoWrapperBase* pWrapper ) ImplSVData* pSVData = ImplGetSVData(); if( !pSVData->mxDisplayConnection.is() ) + { pSVData->mxDisplayConnection.set( new ::vcl::DisplayConnection ); + pSVData->mxDisplayConnection->start(); + } - return pSVData->mxDisplayConnection; + return pSVData->mxDisplayConnection.get(); } // ----------------------------------------------------------------------- diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 935d2c1894ea..01647af81f7f 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -53,6 +53,7 @@ #include "vcl/salimestatus.hxx" #include "vcl/salsys.hxx" #include "vcl/svids.hrc" +#include "vcl/xconnection.hxx" #include "unotools/fontcfg.hxx" @@ -71,6 +72,12 @@ #include +namespace { + +namespace css = com::sun::star; + +} + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::awt; @@ -362,12 +369,12 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled) ImplSVData* pSVData = ImplGetSVData(); if( ! pSVData->mxAccessBridge.is() ) { - Reference< XMultiServiceFactory > xFactory(vcl::unohelper::GetMultiServiceFactory()); + css::uno::Reference< XMultiServiceFactory > xFactory(vcl::unohelper::GetMultiServiceFactory()); if( xFactory.is() ) { - Reference< XExtendedToolkit > xToolkit = - Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY); + css::uno::Reference< XExtendedToolkit > xToolkit = + css::uno::Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY); Sequence< Any > arguments(1); arguments[0] = makeAny(xToolkit); diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 4efa2b659e7c..2da07db443fd 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -89,6 +89,12 @@ #include "rtl/strbuf.hxx" #endif +namespace { + +namespace css = com::sun::star; + +} + using namespace ::rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -171,7 +177,7 @@ BOOL ImplSVMain() DBG_ASSERT( pSVData->mpApp, "no instance of class Application" ); - Reference xMS; + css::uno::Reference xMS; BOOL bInit = InitVCL( xMS ); @@ -186,11 +192,7 @@ BOOL ImplSVMain() if( pSVData->mxDisplayConnection.is() ) { - vcl::DisplayConnection* pConnection = - dynamic_cast(pSVData->mxDisplayConnection.get()); - - if( pConnection ) - pConnection->dispatchDowningEvent(); + pSVData->mxDisplayConnection->terminate(); pSVData->mxDisplayConnection.clear(); } @@ -199,7 +201,7 @@ BOOL ImplSVMain() // be some events in the AWT EventQueue, which need the SolarMutex which // - on the other hand - is destroyed in DeInitVCL(). So empty the queue // here .. - Reference< XComponent > xComponent(pSVData->mxAccessBridge, UNO_QUERY); + css::uno::Reference< XComponent > xComponent(pSVData->mxAccessBridge, UNO_QUERY); if( xComponent.is() ) { ULONG nCount = Application::ReleaseSolarMutex(); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 5091a4722845..a2c2d9a1ce4c 100755 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -795,19 +795,19 @@ String Edit::ImplGetValidString( const String& rString ) const } // ----------------------------------------------------------------------- -Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const +uno::Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const { //!! since we don't want to become incompatible in the next minor update //!! where this code will get integrated into, xISC will be a local //!! variable instead of a class member! - Reference < i18n::XBreakIterator > xBI; + uno::Reference < i18n::XBreakIterator > xBI; // if ( !xBI.is() ) { - Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ); + uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); + uno::Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ); if ( xI.is() ) { - Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XBreakIterator >*)0) ); + Any x = xI->queryInterface( ::getCppuType((const uno::Reference< i18n::XBreakIterator >*)0) ); x >>= xBI; } } @@ -815,19 +815,19 @@ Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const } // ----------------------------------------------------------------------- -Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenceChecker() const +uno::Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenceChecker() const { //!! since we don't want to become incompatible in the next minor update //!! where this code will get integrated into, xISC will be a local //!! variable instead of a class member! - Reference < i18n::XExtendedInputSequenceChecker > xISC; + uno::Reference < i18n::XExtendedInputSequenceChecker > xISC; // if ( !xISC.is() ) { - Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.InputSequenceChecker" ) ); + uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); + uno::Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.InputSequenceChecker" ) ); if ( xI.is() ) { - Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XExtendedInputSequenceChecker >*)0) ); + Any x = xI->queryInterface( ::getCppuType((const uno::Reference< i18n::XExtendedInputSequenceChecker >*)0) ); x >>= xISC; } } @@ -902,8 +902,8 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_ // get access to the configuration of this office module try { - Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference< container::XNameAccess > xModuleCfg( ::comphelper::ConfigurationHelper::openConfig( + uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); + uno::Reference< container::XNameAccess > xModuleCfg( ::comphelper::ConfigurationHelper::openConfig( xMSF, sModule, ::comphelper::ConfigurationHelper::E_READONLY ), diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 19834ea6955d..8a284e908922 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -163,13 +163,13 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz try { uno::Reference < io::XStream > xStream = new utl::OStreamWrapper( aStrm ); - Reference< io::XSeekable > xSeekable( xStream, UNO_QUERY_THROW ); - Reference< graphic::XGraphicProvider > xGraphicProvider( ImplGetSVData()->maAppData.mxMSF->createInstance( + uno::Reference< io::XSeekable > xSeekable( xStream, UNO_QUERY_THROW ); + uno::Reference< graphic::XGraphicProvider > xGraphicProvider( ImplGetSVData()->maAppData.mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ) ), UNO_QUERY ); if ( xGraphicProvider.is() ) { - Reference< graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() ); - Reference < io::XOutputStream > xOut( xStream->getOutputStream() ); + uno::Reference< graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() ); + uno::Reference < io::XOutputStream > xOut( xStream->getOutputStream() ); rtl::OUString aMimeType( ::rtl::OUString::createFromAscii( "image/jpeg" ) ); uno::Sequence< beans::PropertyValue > aOutMediaProperties( 3 ); aOutMediaProperties[0].Name = ::rtl::OUString::createFromAscii( "OutputStream" ); @@ -192,7 +192,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz Sequence< PropertyValue > aArgs( 1 ); aArgs[ 0 ].Name = ::rtl::OUString::createFromAscii( "InputStream" ); aArgs[ 0 ].Value <<= xStream; - Reference< XPropertySet > xPropSet( xGraphicProvider->queryGraphicDescriptor( aArgs ) ); + uno::Reference< XPropertySet > xPropSet( xGraphicProvider->queryGraphicDescriptor( aArgs ) ); if ( xPropSet.is() ) { sal_Int16 nBitsPerPixel = 24; diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx index caf7ee237d67..c038b8e97b28 100644 --- a/vcl/source/helper/xconnection.cxx +++ b/vcl/source/helper/xconnection.cxx @@ -29,11 +29,18 @@ #include "precompiled_vcl.hxx" #include "svsys.h" +#include "rtl/ref.hxx" #include "vcl/xconnection.hxx" #include "vcl/svdata.hxx" #include "vcl/salinst.hxx" #include "vcl/svapp.hxx" +namespace { + +namespace css = com::sun::star; + +} + namespace vcl { class SolarMutexReleaser @@ -62,13 +69,9 @@ using namespace com::sun::star::awt; DisplayConnection::DisplayConnection() { - ImplSVData* pSVData = ImplGetSVData(); - pSVData->mpDefInst->SetEventCallback( this, dispatchEvent ); - pSVData->mpDefInst->SetErrorEventCallback( this, dispatchErrorEvent ); - SalInstance::ConnectionIdentifierType eType; int nBytes; - void* pBytes = pSVData->mpDefInst->GetConnectionIdentifier( eType, nBytes ); + void* pBytes = ImplGetSVData()->mpDefInst->GetConnectionIdentifier( eType, nBytes ); switch( eType ) { case SalInstance::AsciiCString: @@ -81,39 +84,54 @@ DisplayConnection::DisplayConnection() } DisplayConnection::~DisplayConnection() +{} + +void DisplayConnection::start() +{ + ImplSVData* pSVData = ImplGetSVData(); + pSVData->mpDefInst->SetEventCallback( this ); +} + +void DisplayConnection::terminate() { ImplSVData* pSVData = ImplGetSVData(); if( pSVData ) { - pSVData->mpDefInst->SetEventCallback( NULL, NULL ); - pSVData->mpDefInst->SetErrorEventCallback( NULL, NULL ); + pSVData->mpDefInst->SetEventCallback( NULL ); } -} + SolarMutexReleaser aRel; + + MutexGuard aGuard( m_aMutex ); + Any aEvent; + std::list< css::uno::Reference< XEventHandler > > aLocalList( m_aHandlers ); + for( ::std::list< css::uno::Reference< XEventHandler > >::const_iterator it = aLocalList.begin(); it != aLocalList.end(); ++it ) + (*it)->handleEvent( aEvent ); +} -void SAL_CALL DisplayConnection::addEventHandler( const Any& /*window*/, const Reference< XEventHandler >& handler, sal_Int32 /*eventMask*/ ) throw() +void SAL_CALL DisplayConnection::addEventHandler( const Any& /*window*/, const css::uno::Reference< XEventHandler >& handler, sal_Int32 /*eventMask*/ ) throw() { MutexGuard aGuard( m_aMutex ); m_aHandlers.push_back( handler ); } -void SAL_CALL DisplayConnection::removeEventHandler( const Any& /*window*/, const Reference< XEventHandler >& handler ) throw() +void SAL_CALL DisplayConnection::removeEventHandler( const Any& /*window*/, const css::uno::Reference< XEventHandler >& handler ) throw() { MutexGuard aGuard( m_aMutex ); m_aHandlers.remove( handler ); } -void SAL_CALL DisplayConnection::addErrorHandler( const Reference< XEventHandler >& handler ) throw() +void SAL_CALL DisplayConnection::addErrorHandler( const css::uno::Reference< XEventHandler >& handler ) throw() { MutexGuard aGuard( m_aMutex ); m_aErrorHandlers.push_back( handler ); } -void SAL_CALL DisplayConnection::removeErrorHandler( const Reference< XEventHandler >& handler ) throw() +void SAL_CALL DisplayConnection::removeErrorHandler( const css::uno::Reference< XEventHandler >& handler ) throw() { MutexGuard aGuard( m_aMutex ); @@ -125,52 +143,37 @@ Any SAL_CALL DisplayConnection::getIdentifier() throw() return m_aAny; } -void DisplayConnection::dispatchDowningEvent() -{ - SolarMutexReleaser aRel; - - MutexGuard aGuard( m_aMutex ); - Any aEvent; - std::list< Reference< XEventHandler > > aLocalList( m_aHandlers ); - for( ::std::list< Reference< XEventHandler > >::const_iterator it = aLocalList.begin(); it != aLocalList.end(); ++it ) - (*it)->handleEvent( aEvent ); -} - -bool DisplayConnection::dispatchEvent( void* pThis, void* pData, int nBytes ) +bool DisplayConnection::dispatchEvent( void* pData, int nBytes ) { SolarMutexReleaser aRel; - DisplayConnection* This = (DisplayConnection*)pThis; - Sequence< sal_Int8 > aSeq( (sal_Int8*)pData, nBytes ); Any aEvent; aEvent <<= aSeq; - ::std::list< Reference< XEventHandler > > handlers; + ::std::list< css::uno::Reference< XEventHandler > > handlers; { - MutexGuard aGuard( This->m_aMutex ); - handlers = This->m_aHandlers; + MutexGuard aGuard( m_aMutex ); + handlers = m_aHandlers; } - for( ::std::list< Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it ) + for( ::std::list< css::uno::Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it ) if( (*it)->handleEvent( aEvent ) ) return true; return false; } -bool DisplayConnection::dispatchErrorEvent( void* pThis, void* pData, int nBytes ) +bool DisplayConnection::dispatchErrorEvent( void* pData, int nBytes ) { SolarMutexReleaser aRel; - DisplayConnection* This = (DisplayConnection*)pThis; - Sequence< sal_Int8 > aSeq( (sal_Int8*)pData, nBytes ); Any aEvent; aEvent <<= aSeq; - ::std::list< Reference< XEventHandler > > handlers; + ::std::list< css::uno::Reference< XEventHandler > > handlers; { - MutexGuard aGuard( This->m_aMutex ); - handlers = This->m_aErrorHandlers; + MutexGuard aGuard( m_aMutex ); + handlers = m_aErrorHandlers; } - for( ::std::list< Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it ) + for( ::std::list< css::uno::Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it ) if( (*it)->handleEvent( aEvent ) ) return true; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index f6bedc1bfa25..1de1516e8c19 100755 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -4360,7 +4360,7 @@ Window::~Window() // Dispose of the canvas implementation (which, currently, has an // own wrapper window as a child to this one. - Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas ); + uno::Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas ); if( xCanvas.is() ) { uno::Reference < lang::XComponent > xCanvasComponent( xCanvas, @@ -4405,12 +4405,12 @@ Window::~Window() // deregister drop target listener if( mpWindowImpl->mpFrameData->mxDropTargetListener.is() ) { - Reference< XDragGestureRecognizer > xDragGestureRecognizer = - Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); + uno::Reference< XDragGestureRecognizer > xDragGestureRecognizer = + uno::Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); if( xDragGestureRecognizer.is() ) { xDragGestureRecognizer->removeDragGestureListener( - Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY)); + uno::Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY)); } mpWindowImpl->mpFrameData->mxDropTarget->removeDropTargetListener( mpWindowImpl->mpFrameData->mxDropTargetListener ); @@ -4418,7 +4418,7 @@ Window::~Window() } // shutdown drag and drop for this frame window - Reference< XComponent > xComponent( mpWindowImpl->mpFrameData->mxDropTarget, UNO_QUERY ); + uno::Reference< XComponent > xComponent( mpWindowImpl->mpFrameData->mxDropTarget, UNO_QUERY ); // DNDEventDispatcher does not hold a reference of the DropTarget, // so it's ok if it does not support XComponent @@ -8455,7 +8455,7 @@ void Window::ImplStartDnd() // ----------------------------------------------------------------------- -Reference< XDropTarget > Window::GetDropTarget() +uno::Reference< XDropTarget > Window::GetDropTarget() { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8468,7 +8468,7 @@ Reference< XDropTarget > Window::GetDropTarget() if( ! mpWindowImpl->mpFrameData->mxDropTarget.is() ) { // initialization is done in GetDragSource - Reference< XDragSource > xDragSource = GetDragSource(); + uno::Reference< XDragSource > xDragSource = GetDragSource(); } if( mpWindowImpl->mpFrameData->mxDropTarget.is() ) @@ -8484,13 +8484,13 @@ Reference< XDropTarget > Window::GetDropTarget() mpWindowImpl->mpFrameData->mxDropTarget->addDropTargetListener( mpWindowImpl->mpFrameData->mxDropTargetListener ); // register also as drag gesture listener if directly supported by drag source - Reference< XDragGestureRecognizer > xDragGestureRecognizer = - Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); + uno::Reference< XDragGestureRecognizer > xDragGestureRecognizer = + uno::Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); if( xDragGestureRecognizer.is() ) { xDragGestureRecognizer->addDragGestureListener( - Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY)); + uno::Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY)); } else mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = TRUE; @@ -8512,12 +8512,12 @@ Reference< XDropTarget > Window::GetDropTarget() } // this object is located in the same process, so there will be no runtime exception - return Reference< XDropTarget > ( mpWindowImpl->mxDNDListenerContainer, UNO_QUERY ); + return uno::Reference< XDropTarget > ( mpWindowImpl->mxDNDListenerContainer, UNO_QUERY ); } // ----------------------------------------------------------------------- -Reference< XDragSource > Window::GetDragSource() +uno::Reference< XDragSource > Window::GetDragSource() { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8527,7 +8527,7 @@ Reference< XDragSource > Window::GetDragSource() { try { - Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory(); + uno::Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory(); if ( xFactory.is() ) { const SystemEnvData * pEnvData = GetSystemData(); @@ -8561,10 +8561,10 @@ Reference< XDragSource > Window::GetDragSource() aDropTargetAL[ 2 ] = makeAny( vcl::createBmpConverter() ); #endif if( aDragSourceSN.getLength() ) - mpWindowImpl->mpFrameData->mxDragSource = Reference< XDragSource > ( xFactory->createInstanceWithArguments( aDragSourceSN, aDragSourceAL ), UNO_QUERY ); + mpWindowImpl->mpFrameData->mxDragSource = uno::Reference< XDragSource > ( xFactory->createInstanceWithArguments( aDragSourceSN, aDragSourceAL ), UNO_QUERY ); if( aDropTargetSN.getLength() ) - mpWindowImpl->mpFrameData->mxDropTarget = Reference< XDropTarget > ( xFactory->createInstanceWithArguments( aDropTargetSN, aDropTargetAL ), UNO_QUERY ); + mpWindowImpl->mpFrameData->mxDropTarget = uno::Reference< XDropTarget > ( xFactory->createInstanceWithArguments( aDropTargetSN, aDropTargetAL ), UNO_QUERY ); } } } @@ -8581,12 +8581,12 @@ Reference< XDragSource > Window::GetDragSource() return mpWindowImpl->mpFrameData->mxDragSource; } - return Reference< XDragSource > (); + return uno::Reference< XDragSource > (); } // ----------------------------------------------------------------------- -void Window::GetDragSourceDropTarget(Reference< XDragSource >& xDragSource, Reference< XDropTarget > &xDropTarget ) +void Window::GetDragSourceDropTarget(uno::Reference< XDragSource >& xDragSource, uno::Reference< XDropTarget > &xDropTarget ) // only for RVP transmission { if( mpWindowImpl->mpFrameData ) @@ -8604,14 +8604,14 @@ void Window::GetDragSourceDropTarget(Reference< XDragSource >& xDragSource, Refe // ----------------------------------------------------------------------- -Reference< XDragGestureRecognizer > Window::GetDragGestureRecognizer() +uno::Reference< XDragGestureRecognizer > Window::GetDragGestureRecognizer() { - return Reference< XDragGestureRecognizer > ( GetDropTarget(), UNO_QUERY ); + return uno::Reference< XDragGestureRecognizer > ( GetDropTarget(), UNO_QUERY ); } // ----------------------------------------------------------------------- -Reference< XClipboard > Window::GetClipboard() +uno::Reference< XClipboard > Window::GetClipboard() { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8621,19 +8621,19 @@ Reference< XClipboard > Window::GetClipboard() { try { - Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() ); + uno::Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() ); if( xFactory.is() ) { - mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboardExt" ) ), UNO_QUERY ); + mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboardExt" ) ), UNO_QUERY ); if( !mpWindowImpl->mpFrameData->mxClipboard.is() ) - mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ) ), UNO_QUERY ); + mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ) ), UNO_QUERY ); #if defined(UNX) && !defined(QUARTZ) // unix clipboard needs to be initialized if( mpWindowImpl->mpFrameData->mxClipboard.is() ) { - Reference< XInitialization > xInit = Reference< XInitialization >( mpWindowImpl->mpFrameData->mxClipboard, UNO_QUERY ); + uno::Reference< XInitialization > xInit = uno::Reference< XInitialization >( mpWindowImpl->mpFrameData->mxClipboard, UNO_QUERY ); if( xInit.is() ) { @@ -8665,7 +8665,7 @@ Reference< XClipboard > Window::GetClipboard() // ----------------------------------------------------------------------- -Reference< XClipboard > Window::GetPrimarySelection() +uno::Reference< XClipboard > Window::GetPrimarySelection() { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8675,7 +8675,7 @@ Reference< XClipboard > Window::GetPrimarySelection() { try { - Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() ); + uno::Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() ); if( xFactory.is() ) { @@ -8685,16 +8685,16 @@ Reference< XClipboard > Window::GetPrimarySelection() aArgumentList[ 1 ] = makeAny( OUString::createFromAscii( "PRIMARY" ) ); aArgumentList[ 2 ] = makeAny( vcl::createBmpConverter() ); - mpWindowImpl->mpFrameData->mxSelection = Reference< XClipboard >( xFactory->createInstanceWithArguments( + mpWindowImpl->mpFrameData->mxSelection = uno::Reference< XClipboard >( xFactory->createInstanceWithArguments( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ), aArgumentList ), UNO_QUERY ); # else - static Reference< XClipboard > s_xSelection; + static uno::Reference< XClipboard > s_xSelection; if ( !s_xSelection.is() ) - s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboardExt" ) ), UNO_QUERY ); + s_xSelection = uno::Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboardExt" ) ), UNO_QUERY ); if ( !s_xSelection.is() ) - s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboard" ) ), UNO_QUERY ); + s_xSelection = uno::Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboard" ) ), UNO_QUERY ); mpWindowImpl->mpFrameData->mxSelection = s_xSelection; # endif @@ -9519,7 +9519,7 @@ BOOL Window::IsTopWindow() const { // #113722#, cache result of expensive queryInterface call Window *pThisWin = (Window*)this; - Reference< XTopWindow > xTopWindow( pThisWin->GetComponentInterface(), UNO_QUERY ); + uno::Reference< XTopWindow > xTopWindow( pThisWin->GetComponentInterface(), UNO_QUERY ); pThisWin->mpWindowImpl->mpWinData->mnIsTopWindow = xTopWindow.is() ? 1 : 0; } return mpWindowImpl->mpWinData->mnIsTopWindow == 1 ? TRUE : FALSE; @@ -9655,12 +9655,12 @@ BOOL Window::IsNativeWidgetEnabled() const #include #endif -Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize, +uno::Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize, bool bFullscreen, bool bSpriteCanvas ) const { // try to retrieve hard reference from weak member - Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas ); + uno::Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas ); // canvas still valid? Then we're done. if( xCanvas.is() ) @@ -9699,17 +9699,17 @@ Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSi aArg[ 2 ] = makeAny( ::com::sun::star::awt::Rectangle( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ) ); aArg[ 3 ] = makeAny( mpWindowImpl->mbAlwaysOnTop ? sal_True : sal_False ); - aArg[ 4 ] = makeAny( Reference< awt::XWindow >( + aArg[ 4 ] = makeAny( uno::Reference< awt::XWindow >( const_cast(this)->GetComponentInterface(), uno::UNO_QUERY )); - Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory(); + uno::Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory(); // Create canvas instance with window handle // ========================================= if ( xFactory.is() ) { - static Reference xCanvasFactory( + static uno::Reference xCanvasFactory( xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star." @@ -9759,21 +9759,21 @@ Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSi return xCanvas; } -Reference< rendering::XCanvas > Window::GetCanvas() const +uno::Reference< rendering::XCanvas > Window::GetCanvas() const { return ImplGetCanvas( Size(), false, false ); } -Reference< rendering::XSpriteCanvas > Window::GetSpriteCanvas() const +uno::Reference< rendering::XSpriteCanvas > Window::GetSpriteCanvas() const { - Reference< rendering::XSpriteCanvas > xSpriteCanvas( + uno::Reference< rendering::XSpriteCanvas > xSpriteCanvas( ImplGetCanvas( Size(), false, true ), uno::UNO_QUERY ); return xSpriteCanvas; } -Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpriteCanvas( const Size& rFullscreenSize ) const +uno::Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpriteCanvas( const Size& rFullscreenSize ) const { - Reference< rendering::XSpriteCanvas > xSpriteCanvas( + uno::Reference< rendering::XSpriteCanvas > xSpriteCanvas( ImplGetCanvas( rFullscreenSize, true, true ), uno::UNO_QUERY ); return xSpriteCanvas; } diff --git a/vcl/unx/source/dtrans/X11_clipboard.hxx b/vcl/unx/source/dtrans/X11_clipboard.hxx index 21bf547a9cb7..2c0ee2d95c0d 100644 --- a/vcl/unx/source/dtrans/X11_clipboard.hxx +++ b/vcl/unx/source/dtrans/X11_clipboard.hxx @@ -54,12 +54,12 @@ namespace x11 { >, public SelectionAdaptor { - Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents; - Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner; + com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents; + com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner; SelectionManager& m_rSelectionManager; - Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager; - ::std::list< Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners; + com::sun::star::uno::Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager; + ::std::list< com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners; Atom m_aSelection; protected: @@ -100,12 +100,12 @@ namespace x11 { * XClipboard */ - virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents() + virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents() throw(RuntimeException); virtual void SAL_CALL setContents( - const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans, - const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner ) + const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans, + const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner ) throw(RuntimeException); virtual ::rtl::OUString SAL_CALL getName() @@ -122,27 +122,27 @@ namespace x11 { * XClipboardNotifier */ virtual void SAL_CALL addClipboardListener( - const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener ) + const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener ) throw(RuntimeException); virtual void SAL_CALL removeClipboardListener( - const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener ) + const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener ) throw(RuntimeException); /* * SelectionAdaptor */ - virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable(); + virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable(); virtual void clearTransferable(); virtual void fireContentsChanged(); - virtual Reference< XInterface > getReference() throw(); + virtual com::sun::star::uno::Reference< XInterface > getReference() throw(); }; // ------------------------------------------------------------------------ Sequence< ::rtl::OUString > SAL_CALL X11Clipboard_getSupportedServiceNames(); - Reference< XInterface > SAL_CALL X11Clipboard_createInstance( - const Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); + com::sun::star::uno::Reference< XInterface > SAL_CALL X11Clipboard_createInstance( + const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); // ------------------------------------------------------------------------ diff --git a/vcl/unx/source/dtrans/X11_dndcontext.hxx b/vcl/unx/source/dtrans/X11_dndcontext.hxx index 9b48d346f03b..d8ef87444a7a 100644 --- a/vcl/unx/source/dtrans/X11_dndcontext.hxx +++ b/vcl/unx/source/dtrans/X11_dndcontext.hxx @@ -51,7 +51,7 @@ namespace x11 { XLIB_Window m_aDropWindow; XLIB_Time m_nTimestamp; SelectionManager& m_rManager; - Reference< XInterface > m_xManagerRef; + com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: DropTargetDropContext( XLIB_Window, XLIB_Time, SelectionManager& ); virtual ~DropTargetDropContext(); @@ -70,7 +70,7 @@ namespace x11 { XLIB_Window m_aDropWindow; XLIB_Time m_nTimestamp; SelectionManager& m_rManager; - Reference< XInterface > m_xManagerRef; + com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: DropTargetDragContext( XLIB_Window, XLIB_Time, SelectionManager& ); virtual ~DropTargetDragContext(); @@ -88,7 +88,7 @@ namespace x11 { XLIB_Window m_aDropWindow; XLIB_Time m_nTimestamp; SelectionManager& m_rManager; - Reference< XInterface > m_xManagerRef; + com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: DragSourceContext( XLIB_Window, XLIB_Time, SelectionManager& ); virtual ~DragSourceContext(); diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx index 403ee9707a94..8188f2b1164a 100644 --- a/vcl/unx/source/dtrans/X11_selection.cxx +++ b/vcl/unx/source/dtrans/X11_selection.cxx @@ -80,6 +80,12 @@ EnterWindowMask |\ LeaveWindowMask +namespace { + +namespace css = com::sun::star; + +} + using namespace com::sun::star::datatransfer; using namespace com::sun::star::datatransfer::dnd; using namespace com::sun::star::lang; @@ -279,7 +285,8 @@ SelectionManager::SelectionManager() : m_nXdndActionMove( None ), m_nXdndActionLink( None ), m_nXdndActionAsk( None ), - m_nXdndActionPrivate( None ) + m_nXdndActionPrivate( None ), + m_bShutDown( false ) { m_aDropEnterEvent.data.l[0] = None; m_aDragRunning.reset(); @@ -632,7 +639,7 @@ OString SelectionManager::convertToCompound( const OUString& rText ) // ------------------------------------------------------------------------ bool SelectionManager::convertData( - const Reference< XTransferable >& xTransferable, + const css::uno::Reference< XTransferable >& xTransferable, Atom nType, Atom nSelection, int& rFormat, @@ -1527,7 +1534,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor, #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "trying bitmap conversion\n" ); #endif - Reference xBM( new BmpTransporter( aData ) ); + css::uno::Reference xBM( new BmpTransporter( aData ) ); Sequence aArgs(2), aOutArgs; Sequence aOutIndex; aArgs.getArray()[0] = makeAny( xBM ); @@ -1674,7 +1681,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest if( pAdaptor && XGetSelectionOwner( m_pDisplay, rRequest.selection ) == m_aWindow ) { - Reference< XTransferable > xTrans( pAdaptor->getTransferable() ); + css::uno::Reference< XTransferable > xTrans( pAdaptor->getTransferable() ); if( rRequest.target == m_nTARGETSAtom ) { // someone requests our types @@ -1843,7 +1850,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest dsde.DropAction = DNDConstants::ACTION_NONE; dsde.DropSuccess = sal_False; } - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener ); m_xDragSourceListener.clear(); aGuard.clear(); if( xListener.is() ) @@ -2364,7 +2371,7 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow, dsde.DragSource = static_cast< XDragSource* >(this); dsde.DropAction = getUserDragAction(); dsde.DropSuccess = bSuccess; - Reference< XDragSourceListener > xListener = m_xDragSourceListener; + css::uno::Reference< XDragSourceListener > xListener = m_xDragSourceListener; m_xDragSourceListener.clear(); aGuard.clear(); @@ -2448,7 +2455,7 @@ void SelectionManager::sendDragStatus( Atom nDropAction ) dsde.DropAction = m_nSourceActions; dsde.UserAction = getUserDragAction(); - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener ); // caution: do not change anything after this aGuard.clear(); if( xListener.is() ) @@ -2710,7 +2717,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) dsde.DragSource = static_cast< XDragSource* >(this); dsde.DropAction = m_nTargetAcceptAction; dsde.DropSuccess = m_bDropSuccess; - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener ); m_xDragSourceListener.clear(); aGuard.clear(); xListener->dragDropEnd( dsde ); @@ -2776,7 +2783,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) dsde.DragSource = static_cast< XDragSource* >(this); dsde.DropAction = DNDConstants::ACTION_NONE; dsde.DropSuccess = sal_False; - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener ); m_xDragSourceListener.clear(); aGuard.clear(); xListener->dragDropEnd( dsde ); @@ -2902,7 +2909,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) m_nDropTimeout = time( NULL ); // HACK :-) aGuard.clear(); - static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() ); + static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, css::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() ); aGuard.reset(); bCancel = false; } @@ -2917,7 +2924,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) dsde.DragSource = static_cast< XDragSource* >(this); dsde.DropAction = DNDConstants::ACTION_NONE; dsde.DropSuccess = sal_False; - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener ); m_xDragSourceListener.clear(); aGuard.clear(); xListener->dragDropEnd( dsde ); @@ -3071,7 +3078,7 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot ) { ResettableMutexGuard aGuard( m_aMutex ); - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener ); m_nLastDragX = nX; m_nLastDragY = nY; @@ -3231,8 +3238,8 @@ void SelectionManager::startDrag( sal_Int8 sourceActions, sal_Int32, sal_Int32, - const Reference< XTransferable >& transferable, - const Reference< XDragSourceListener >& listener + const css::uno::Reference< XTransferable >& transferable, + const css::uno::Reference< XDragSourceListener >& listener ) throw() { #if OSL_DEBUG_LEVEL > 1 @@ -3516,8 +3523,8 @@ void SelectionManager::dragDoDispatch() { ClearableMutexGuard aGuard(m_aMutex); - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); - Reference< XTransferable > xTransferable( m_xDragSourceTransferable ); + css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + css::uno::Reference< XTransferable > xTransferable( m_xDragSourceTransferable ); m_xDragSourceListener.clear(); m_xDragSourceTransferable.clear(); @@ -3787,10 +3794,10 @@ void SelectionManager::run( void* pThis ) timeval aLast; gettimeofday( &aLast, 0 ); - Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() ); + css::uno::Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() ); if( xFact.is() ) { - Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY ); + css::uno::Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY ); if( xDesktop.is() ) xDesktop->addTerminateListener(This); } @@ -3805,7 +3812,7 @@ void SelectionManager::run( void* pThis ) if( (aNow.tv_sec - aLast.tv_sec) > 0 ) { ClearableMutexGuard aGuard(This->m_aMutex); - std::list< std::pair< SelectionAdaptor*, Reference< XInterface > > > aChangeList; + std::list< std::pair< SelectionAdaptor*, css::uno::Reference< XInterface > > > aChangeList; for( std::hash_map< Atom, Selection* >::iterator it = This->m_aSelections.begin(); it != This->m_aSelections.end(); ++it ) { @@ -3815,7 +3822,7 @@ void SelectionManager::run( void* pThis ) if( aOwner != it->second->m_aLastOwner ) { it->second->m_aLastOwner = aOwner; - std::pair< SelectionAdaptor*, Reference< XInterface > > + std::pair< SelectionAdaptor*, css::uno::Reference< XInterface > > aKeep( it->second->m_pAdaptor, it->second->m_pAdaptor->getReference() ); aChangeList.push_back( aKeep ); } @@ -3838,6 +3845,11 @@ void SelectionManager::run( void* pThis ) void SelectionManager::shutdown() throw() { ResettableMutexGuard aGuard(m_aMutex); + if( m_bShutDown ) + { + return; + } + m_bShutDown = true; // stop dispatching if( m_aThread ) { @@ -3927,7 +3939,7 @@ void SAL_CALL SelectionManager::queryTermination( const ::com::sun::star::lang:: void SAL_CALL SelectionManager::notifyTermination( const ::com::sun::star::lang::EventObject& rEvent ) throw( ::com::sun::star::uno::RuntimeException ) { - Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY ); + css::uno::Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY ); if( xDesktop.is() == sal_True ) xDesktop->removeTerminateListener( this ); #if OSL_DEBUG_LEVEL > 1 @@ -4060,7 +4072,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow ) dsde.DragSource = static_cast< XDragSource* >(this); dsde.DropAction = DNDConstants::ACTION_NONE; dsde.DropSuccess = sal_False; - Reference< XDragSourceListener > xListener( m_xDragSourceListener ); + css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener ); m_xDragSourceListener.clear(); aGuard.clear(); xListener->dragDropEnd( dsde ); @@ -4071,7 +4083,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow ) * SelectionAdaptor */ -Reference< XTransferable > SelectionManager::getTransferable() throw() +css::uno::Reference< XTransferable > SelectionManager::getTransferable() throw() { return m_xDragSourceTransferable; } @@ -4091,9 +4103,9 @@ void SelectionManager::fireContentsChanged() throw() // ------------------------------------------------------------------------ -Reference< XInterface > SelectionManager::getReference() throw() +css::uno::Reference< XInterface > SelectionManager::getReference() throw() { - return Reference< XInterface >( static_cast(this) ); + return css::uno::Reference< XInterface >( static_cast(this) ); } // ------------------------------------------------------------------------ @@ -4124,7 +4136,7 @@ void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) thro if( arguments.getLength() > 0 ) { - Reference< XDisplayConnection > xConn; + css::uno::Reference< XDisplayConnection > xConn; arguments.getConstArray()[0] >>= xConn; if( xConn.is() ) { @@ -4159,8 +4171,8 @@ sal_Int32 SelectionManagerHolder::getDefaultCursor( sal_Int8 dragAction ) throw( void SelectionManagerHolder::startDrag( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, - const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, - const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener + const css::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, + const css::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener ) throw() { if( m_xRealDragSource.is() ) diff --git a/vcl/unx/source/dtrans/X11_selection.hxx b/vcl/unx/source/dtrans/X11_selection.hxx index 47baa1776d1a..34a50819bfed 100644 --- a/vcl/unx/source/dtrans/X11_selection.hxx +++ b/vcl/unx/source/dtrans/X11_selection.hxx @@ -66,10 +66,10 @@ namespace x11 { class SelectionAdaptor { public: - virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0; + virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0; virtual void clearTransferable() = 0; virtual void fireContentsChanged() = 0; - virtual Reference< XInterface > getReference() = 0; + virtual com::sun::star::uno::Reference< XInterface > getReference() = 0; // returns a reference that will keep the SelectionAdaptor alive until the // refernce is released }; @@ -87,9 +87,9 @@ namespace x11 { sal_Int8 m_nDefaultActions; XLIB_Window m_aTargetWindow; class SelectionManager* m_pSelectionManager; - Reference< ::com::sun::star::datatransfer::dnd::XDragSource > + com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > m_xSelectionManager; - ::std::list< Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > > + ::std::list< com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > > m_aListeners; DropTarget(); @@ -105,8 +105,8 @@ namespace x11 { virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( ::com::sun::star::uno::Exception ); // XDropTarget - virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(); - virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(); + virtual void SAL_CALL addDropTargetListener( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(); + virtual void SAL_CALL removeDropTargetListener( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(); virtual sal_Bool SAL_CALL isActive() throw(); virtual void SAL_CALL setActive( sal_Bool active ) throw(); virtual sal_Int8 SAL_CALL getDefaultActions() throw(); @@ -127,7 +127,7 @@ namespace x11 { > { ::osl::Mutex m_aMutex; - Reference< ::com::sun::star::datatransfer::dnd::XDragSource > + com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > m_xRealDragSource; public: SelectionManagerHolder(); @@ -148,8 +148,8 @@ namespace x11 { virtual void SAL_CALL startDrag( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, - const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, - const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener + const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, + const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener ) throw(); }; @@ -260,9 +260,9 @@ namespace x11 { oslThread m_aDragExecuteThread; ::osl::Condition m_aDragRunning; XLIB_Window m_aWindow; - Reference< ::com::sun::star::awt::XDisplayConnection > + com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayConnection > m_xDisplayConnection; - Reference< com::sun::star::script::XInvocation > + com::sun::star::uno::Reference< com::sun::star::script::XInvocation > m_xBitmapConverter; sal_Int32 m_nSelectionTimeout; XLIB_Time m_nSelectionTimestamp; @@ -285,7 +285,7 @@ namespace x11 { XLIB_Time m_nDropTime; sal_Int8 m_nLastDropAction; // XTransferable for Xdnd with foreign drag source - Reference< ::com::sun::star::datatransfer::XTransferable > + com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > m_xDropTransferable; int m_nLastX, m_nLastY; XLIB_Time m_nDropTimestamp; @@ -303,9 +303,9 @@ namespace x11 { XLIB_Window m_aDropProxy; XLIB_Window m_aDragSourceWindow; // XTransferable for Xdnd when we are drag source - Reference< ::com::sun::star::datatransfer::XTransferable > + com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > m_xDragSourceTransferable; - Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener > + com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener > m_xDragSourceListener; // root coordinates int m_nLastDragX, m_nLastDragY; @@ -383,6 +383,7 @@ namespace x11 { // since this leads to deadlocks in different Xlib implentations // (XFree as well as Xsun) use an own mutex instead ::osl::Mutex m_aMutex; + bool m_bShutDown; SelectionManager(); ~SelectionManager(); @@ -409,7 +410,7 @@ namespace x11 { bool getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData ); // returns true if conversion was successful - bool convertData( const Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable, + bool convertData( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable, Atom nType, Atom nSelection, int & rFormat, @@ -494,15 +495,15 @@ namespace x11 { virtual void SAL_CALL startDrag( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger, sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, - const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, - const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener + const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable, + const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener ) throw(); // SelectionAdaptor for XdndSelection Drag (we are drag source) - virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw(); + virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw(); virtual void clearTransferable() throw(); virtual void fireContentsChanged() throw(); - virtual Reference< XInterface > getReference() throw(); + virtual com::sun::star::uno::Reference< XInterface > getReference() throw(); // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException ); diff --git a/vcl/unx/source/dtrans/X11_service.cxx b/vcl/unx/source/dtrans/X11_service.cxx index e14d81643553..d15518c0b9ab 100644 --- a/vcl/unx/source/dtrans/X11_service.cxx +++ b/vcl/unx/source/dtrans/X11_service.cxx @@ -39,6 +39,12 @@ #include #include +namespace { + +namespace css = com::sun::star; + +} + using namespace rtl; using namespace cppu; using namespace com::sun::star::lang; @@ -69,9 +75,9 @@ Sequence< OUString > SAL_CALL x11::Xdnd_dropTarget_getSupportedServiceNames() // ------------------------------------------------------------------------ -Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments ) +css::uno::Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments ) { - static std::hash_map< OUString, ::std::hash_map< Atom, Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances; + static std::hash_map< OUString, ::std::hash_map< Atom, css::uno::Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances; OUString aDisplayName; Atom nSelection; @@ -80,7 +86,7 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& // by SelectionManager.initialize() if no display connection is given. if( arguments.getLength() > 0 ) { - Reference< XDisplayConnection > xConn; + css::uno::Reference< XDisplayConnection > xConn; arguments.getConstArray()[0] >>= xConn; if( xConn.is() ) @@ -107,8 +113,8 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& nSelection = rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) ); } - ::std::hash_map< Atom, Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] ); - ::std::hash_map< Atom, Reference< XClipboard > >::iterator it = rMap.find( nSelection ); + ::std::hash_map< Atom, css::uno::Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] ); + ::std::hash_map< Atom, css::uno::Reference< XClipboard > >::iterator it = rMap.find( nSelection ); if( it != rMap.end() ) return it->second; @@ -120,16 +126,16 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& // ------------------------------------------------------------------------ -Reference< XInterface > X11SalInstance::CreateDragSource() +css::uno::Reference< XInterface > X11SalInstance::CreateDragSource() { - return Reference < XInterface >( ( OWeakObject * ) new SelectionManagerHolder() ); + return css::uno::Reference < XInterface >( ( OWeakObject * ) new SelectionManagerHolder() ); } // ------------------------------------------------------------------------ -Reference< XInterface > X11SalInstance::CreateDropTarget() +css::uno::Reference< XInterface > X11SalInstance::CreateDropTarget() { - return Reference < XInterface >( ( OWeakObject * ) new DropTarget() ); + return css::uno::Reference < XInterface >( ( OWeakObject * ) new DropTarget() ); } diff --git a/vcl/unx/source/dtrans/X11_transferable.hxx b/vcl/unx/source/dtrans/X11_transferable.hxx index 57f0d6682cab..65f7d1fdc475 100644 --- a/vcl/unx/source/dtrans/X11_transferable.hxx +++ b/vcl/unx/source/dtrans/X11_transferable.hxx @@ -44,10 +44,10 @@ namespace x11 { ::osl::Mutex m_aMutex; SelectionManager& m_rManager; - Reference< XInterface > m_xCreator; + com::sun::star::uno::Reference< XInterface > m_xCreator; Atom m_aSelection; public: - X11Transferable( SelectionManager& rManager, const Reference< XInterface >& xCreator, Atom selection = None ); + X11Transferable( SelectionManager& rManager, const com::sun::star::uno::Reference< XInterface >& xCreator, Atom selection = None ); virtual ~X11Transferable(); /* diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx index 21183dc567ec..d72692b86a65 100644 --- a/vcl/unx/source/fontmanager/fontmanager.cxx +++ b/vcl/unx/source/fontmanager/fontmanager.cxx @@ -87,6 +87,12 @@ #define PRINTER_METRICDIR "fontmetric" +namespace { + +namespace css = com::sun::star; + +} + using namespace vcl; using namespace utl; using namespace psp; @@ -3942,10 +3948,10 @@ bool PrintFontManager::readOverrideMetrics() if( ! m_aOverrideFonts.empty() ) return false; - Reference< XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() ); + css::uno::Reference< XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() ); if( !xFact.is() ) return false; - Reference< XMaterialHolder > xMat( + css::uno::Reference< XMaterialHolder > xMat( xFact->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.psprint.CompatMetricOverride" ) ) ), UNO_QUERY ); if( !xMat.is() ) -- cgit From 89b5dccad85eb95058d127108734ae02ab27bc9a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 10:00:05 +0100 Subject: gridsort: removed setter methods from ITableModel - they're an aspect of concret implementations, if at all --- svtools/inc/svtools/table/tablemodel.hxx | 47 +++++------------------------- svtools/source/table/tablecontrol_impl.cxx | 40 ------------------------- 2 files changed, 8 insertions(+), 79 deletions(-) mode change 100644 => 100755 svtools/source/table/tablecontrol_impl.cxx diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 3da396d9d86c..f67bfe72b05b 100644 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -322,9 +322,6 @@ namespace svt { namespace table */ virtual TableSize getRowCount() const = 0; - SVT_DLLPRIVATE virtual void setColumnCount(TableSize _nColCount) = 0; - SVT_DLLPRIVATE virtual void setRowCount(TableSize _nRowCount) = 0; - /** determines whether the table has column headers If this method returns , the renderer returned by @@ -333,15 +330,6 @@ namespace svt { namespace table @see IColumnRenderer */ virtual bool hasColumnHeaders() const = 0; - /** sets whether the table should have row headers - @see IColumnRenderer - */ - SVT_DLLPRIVATE virtual void setRowHeaders( bool rowHeaders) = 0; - - /** sets whether the table should have column headers - @see IColumnRenderer - */ - SVT_DLLPRIVATE virtual void setColumnHeaders( bool columnHeaders) = 0; /** determines whether the table has row headers @@ -359,14 +347,6 @@ namespace svt { namespace table */ virtual bool isCellEditable( ColPos col, RowPos row ) const = 0; - /** adds the given listener to the list of ->ITableModelListener's - */ - SVT_DLLPRIVATE virtual void addTableModelListener( const PTableModelListener& listener ) = 0; - - /** revokes the given listener from the list of ->ITableModelListener's - */ - SVT_DLLPRIVATE virtual void removeTableModelListener( const PTableModelListener& listener ) = 0; - /** returns a model for a certain column @param column @@ -395,7 +375,7 @@ namespace svt { namespace table @return the renderer to use. Must not be */ - SVT_DLLPRIVATE virtual PTableRenderer getRenderer() const = 0; + virtual PTableRenderer getRenderer() const = 0; /** returns the component handling input in a view associated with the model */ @@ -407,9 +387,7 @@ namespace svt { namespace table the logical height of rows in the table, in 1/100 millimeters. The height must be greater 0. */ - SVT_DLLPRIVATE virtual TableMetrics getRowHeight() const = 0; - - SVT_DLLPRIVATE virtual void setRowHeight(TableMetrics _nRowHeight) = 0; + virtual TableMetrics getRowHeight() const = 0; /** determines the height of the column header row @@ -420,7 +398,7 @@ namespace svt { namespace table the logical height of the column header row, in 1/100 millimeters. Must be greater than 0. */ - SVT_DLLPRIVATE virtual TableMetrics getColumnHeaderHeight() const = 0; + virtual TableMetrics getColumnHeaderHeight() const = 0; /** determines the width of the row header column @@ -431,7 +409,7 @@ namespace svt { namespace table the logical width of the row header column, in 1/100 millimeters. Must be greater than 0. */ - SVT_DLLPRIVATE virtual TableMetrics getRowHeaderWidth() const = 0; + virtual TableMetrics getRowHeaderWidth() const = 0; /** determines the visibility of the vertical scrollbar of the table control @param overAllHeight the height of the table with all rows @@ -444,32 +422,23 @@ namespace svt { namespace table @param actWidth the given width of the table */ virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const = 0; - virtual bool hasVerticalScrollbar() =0; + + virtual bool hasVerticalScrollbar() = 0; virtual bool hasHorizontalScrollbar() = 0; - /** fills cells with content - */ - virtual void setCellContent(const std::vector< std::vector< ::com::sun::star::uno::Any > >& cellContent)=0; + /** gets the content of the cells */ virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent() = 0; - /**sets title of header rows - */ - SVT_DLLPRIVATE virtual void setRowHeaderName(const std::vector& cellColumnContent)=0; + /** gets title of header rows */ virtual std::vector& getRowHeaderName() = 0; SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getLineColor() = 0; - SVT_DLLPRIVATE virtual void setLineColor(::com::sun::star::util::Color _rColor) = 0; SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getHeaderBackgroundColor() = 0; - SVT_DLLPRIVATE virtual void setHeaderBackgroundColor(::com::sun::star::util::Color _rColor) = 0; SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getTextColor() = 0; - SVT_DLLPRIVATE virtual void setTextColor(::com::sun::star::util::Color _rColor) = 0; SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getOddRowBackgroundColor() = 0; - SVT_DLLPRIVATE virtual void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor) = 0; SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() = 0; - SVT_DLLPRIVATE virtual void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor) = 0; SVT_DLLPRIVATE virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() = 0; - SVT_DLLPRIVATE virtual void setVerticalAlign(::com::sun::star::style::VerticalAlignment _xAlign) = 0; /// destroys the table model instance virtual ~ITableModel() { } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx old mode 100644 new mode 100755 index 6c58cb530330..acb8f9e691a9 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -102,22 +102,6 @@ namespace svt { namespace table { return false; } - virtual void setRowHeaders(bool _bRowHeaders) - { - (void)_bRowHeaders; - } - virtual void setColumnHeaders(bool _bColumnHeaders) - { - (void)_bColumnHeaders; - } - void setColumnCount(TableSize _nColCount) - { - (void) _nColCount; - } - void setRowCount(TableSize _nRowCount) - { - (void)_nRowCount; - } virtual bool isCellEditable( ColPos col, RowPos row ) const { (void)col; @@ -186,58 +170,34 @@ namespace svt { namespace table { return false; } - virtual void setCellContent(const std::vector >& ) - { - } virtual ::com::sun::star::util::Color getLineColor() { return 0; } - virtual void setLineColor(::com::sun::star::util::Color ) - { - } virtual ::com::sun::star::util::Color getHeaderBackgroundColor() { return -1; } - virtual void setHeaderBackgroundColor(::com::sun::star::util::Color ) - { - } virtual ::com::sun::star::util::Color getTextColor() { return 0; } - virtual void setTextColor(::com::sun::star::util::Color ) - { - } virtual ::com::sun::star::util::Color getOddRowBackgroundColor() { return -1; } - virtual void setOddRowBackgroundColor(::com::sun::star::util::Color ) - { - } virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() { return com::sun::star::style::VerticalAlignment(0); } - virtual void setVerticalAlign(com::sun::star::style::VerticalAlignment ) - { - } virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() { return -1; } - virtual void setEvenRowBackgroundColor(::com::sun::star::util::Color ) - { - } virtual std::vector >& getCellContent() { return m_aCellContent; } - virtual void setRowHeaderName(const std::vector& ) - { - } virtual std::vector& getRowHeaderName() { aRowHeaderNames.clear(); -- cgit From 6531aff8404bb4a26f4dfeaf9c253c0147e3fa34 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 13:38:24 +0100 Subject: gridsort: more refactoring of the relationship (especially with respect to listeners) between the various table/grid classes. Now we're not as strict as before with respect to the construction order. Also, updating various aspects of a column model (e.g. inserting a new column) will work now even if there already is a control for the model. Still a long way to go to fix some more obvious problems, which make using the grid control API a PITA (you're lost if you do now know *exactly* which things to do in which order). --- svtools/inc/svtools/table/tablecontrol.hxx | 139 +++---- svtools/inc/svtools/table/tablemodel.hxx | 71 ++-- svtools/source/table/tablecontrol.cxx | 7 +- svtools/source/table/tablecontrol_impl.cxx | 402 ++++++++++++--------- svtools/source/table/tablecontrol_impl.hxx | 123 ++++--- svtools/source/uno/svtxgridcontrol.cxx | 182 ++++++---- svtools/source/uno/svtxgridcontrol.hxx | 11 +- svtools/source/uno/unocontroltablemodel.cxx | 214 ++++++----- svtools/source/uno/unocontroltablemodel.hxx | 109 +++--- .../controls/grid/defaultgridcolumnmodel.cxx | 6 + toolkit/source/controls/grid/gridcontrol.cxx | 4 +- 11 files changed, 724 insertions(+), 544 deletions(-) mode change 100644 => 100755 svtools/inc/svtools/table/tablemodel.hxx mode change 100644 => 100755 svtools/source/table/tablecontrol_impl.hxx diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index f3b7ed88b565..07384540261b 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -33,8 +33,10 @@ #include #include #include -#include #include + +#include + //........................................................................ namespace svt { namespace table @@ -69,17 +71,18 @@ namespace svt { namespace table class SVT_DLLPUBLIC TableControl : public Control, public IAccessibleTable { private: - DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* ); - DECL_DLLPRIVATE_LINK( ImplMouseButtonUpHdl, MouseEvent* ); + DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* ); + DECL_DLLPRIVATE_LINK( ImplMouseButtonUpHdl, MouseEvent* ); - DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); + DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); - TableControl_Impl* m_pImpl; + ::boost::shared_ptr< TableControl_Impl > m_pImpl; ::com::sun::star::uno::Sequence< sal_Int32 > m_nCols; ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aText; Link m_aSelectHdl; bool m_bSelectionChanged; bool m_bTooltip; + public: ::std::auto_ptr< AccessibleTableControl_Impl > m_pAccessTable; @@ -157,22 +160,25 @@ namespace svt { namespace table { return GoTo( GetCurrentColumn(), _nRow ); } - SVT_DLLPRIVATE virtual void Resize(); - virtual void Select(); - SVT_DLLPRIVATE void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; } - const Link& GetSelectHdl() const { return m_aSelectHdl; } - /**invalidates the table if table has been changed e.g. new row added - */ - void InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved); - /**gets the vector, which contains the selected rows - */ - std::vector& GetSelectedRows(); - /**after removing a row, updates the vector which contains the selected rows - if the row, which should be removed, is selected, it will be erased from the vector - */ - SelectionEngine* getSelEngine(); - TableDataWindow* getDataWindow(); + SVT_DLLPRIVATE virtual void Resize(); + virtual void Select(); + SVT_DLLPRIVATE void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; } + const Link& GetSelectHdl() const { return m_aSelectHdl; } + + /**invalidates the table if table has been changed e.g. new row added + */ + void InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved); + + /**gets the vector, which contains the selected rows + */ + std::vector& GetSelectedRows(); + + /**after removing a row, updates the vector which contains the selected rows + if the row, which should be removed, is selected, it will be erased from the vector + */ + SelectionEngine* getSelEngine(); + TableDataWindow* getDataWindow(); // Window overridables virtual void GetFocus(); @@ -180,55 +186,54 @@ namespace svt { namespace table virtual void KeyInput( const KeyEvent& rKEvt ); virtual void StateChanged( StateChangedType i_nStateChange ); - /** Creates and returns the accessible object of the whole GridControl. */ - SVT_DLLPRIVATE virtual XACC CreateAccessible(); - SVT_DLLPRIVATE virtual XACC CreateAccessibleControl( sal_Int32 _nIndex ); - SVT_DLLPRIVATE virtual ::rtl::OUString GetAccessibleObjectName(AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const; - SVT_DLLPRIVATE virtual sal_Bool GoToCell( sal_Int32 _nColumnPos, sal_Int32 _nRow ); - SVT_DLLPRIVATE virtual ::rtl::OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType, sal_Int32 _nPosition = -1) const; - virtual void FillAccessibleStateSet( - ::utl::AccessibleStateSetHelper& rStateSet, - AccessibleTableControlObjType eObjType ) const; - //// Window - virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const; - virtual void GrabFocus(); - virtual XACC GetAccessible( BOOL bCreate = TRUE ); - virtual Window* GetAccessibleParentWindow() const; - virtual Window* GetWindowInstance(); - virtual sal_Int32 GetAccessibleControlCount() const; - virtual sal_Bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint ); - virtual long GetRowCount() const; - virtual long GetColumnCount() const; - virtual sal_Bool HasRowHeader() const; - virtual sal_Int32 GetSelectedRowCount() const; - virtual bool IsRowSelected( long _nRow ) const; - virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ); - virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE ); - virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE ); - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex); - virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint); - virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const; - virtual ::rtl::OUString GetRowDescription( sal_Int32 _nRow ) const; - virtual ::rtl::OUString GetRowName(sal_Int32 _nIndex) const; - virtual ::rtl::OUString GetColumnDescription( sal_uInt16 _nColumnPos ) const; - virtual ::rtl::OUString GetColumnName( sal_Int32 _nIndex ) const; - virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const; - virtual sal_Bool HasRowHeader(); - virtual sal_Bool HasColHeader(); - virtual sal_Bool isAccessibleAlive( ) const; - virtual void commitGridControlEvent( sal_Int16 _nEventId, const com::sun::star::uno::Any& _rNewValue, const com::sun::star::uno::Any& _rOldValue ); - virtual void RemoveSelectedRow(RowPos _nRowPos); - virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; - ::com::sun::star::uno::Sequence< sal_Int32 >& getColumnsForTooltip(); - ::com::sun::star::uno::Sequence< ::rtl::OUString >& getTextForTooltip(); - void setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols); - void clearSelection(); - void selectionChanged(bool _bChanged); - bool isTooltip(); + /** Creates and returns the accessible object of the whole GridControl. */ + SVT_DLLPRIVATE virtual XACC CreateAccessible(); + SVT_DLLPRIVATE virtual XACC CreateAccessibleControl( sal_Int32 _nIndex ); + SVT_DLLPRIVATE virtual ::rtl::OUString GetAccessibleObjectName(AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const; + SVT_DLLPRIVATE virtual sal_Bool GoToCell( sal_Int32 _nColumnPos, sal_Int32 _nRow ); + SVT_DLLPRIVATE virtual ::rtl::OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType, sal_Int32 _nPosition = -1) const; + virtual void FillAccessibleStateSet( + ::utl::AccessibleStateSetHelper& rStateSet, + AccessibleTableControlObjType eObjType ) const; + //// Window + virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const; + virtual void GrabFocus(); + virtual XACC GetAccessible( BOOL bCreate = TRUE ); + virtual Window* GetAccessibleParentWindow() const; + virtual Window* GetWindowInstance(); + virtual sal_Int32 GetAccessibleControlCount() const; + virtual sal_Bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint ); + virtual long GetRowCount() const; + virtual long GetColumnCount() const; + virtual sal_Bool HasRowHeader() const; + virtual sal_Int32 GetSelectedRowCount() const; + virtual bool IsRowSelected( long _nRow ) const; + virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ); + virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE ); + virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE ); + virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex); + virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint); + virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const; + virtual ::rtl::OUString GetRowDescription( sal_Int32 _nRow ) const; + virtual ::rtl::OUString GetRowName(sal_Int32 _nIndex) const; + virtual ::rtl::OUString GetColumnDescription( sal_uInt16 _nColumnPos ) const; + virtual ::rtl::OUString GetColumnName( sal_Int32 _nIndex ) const; + virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const; + virtual sal_Bool HasRowHeader(); + virtual sal_Bool HasColHeader(); + virtual sal_Bool isAccessibleAlive( ) const; + virtual void commitGridControlEvent( sal_Int16 _nEventId, const com::sun::star::uno::Any& _rNewValue, const com::sun::star::uno::Any& _rOldValue ); + virtual void RemoveSelectedRow(RowPos _nRowPos); + virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; + ::com::sun::star::uno::Sequence< sal_Int32 >& getColumnsForTooltip(); + ::com::sun::star::uno::Sequence< ::rtl::OUString >& getTextForTooltip(); + void setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols); + void clearSelection(); + void selectionChanged(bool _bChanged); + bool isTooltip(); protected: - /// retrieves the XAccessible implementation associated with the GridControl instance - ::svt::IAccessibleFactory& getAccessibleFactory(); + ::svt::IAccessibleFactory& getAccessibleFactory(); private: TableControl(); // never implemented diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx old mode 100644 new mode 100755 index f67bfe72b05b..a9d6c7325e65 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -28,16 +28,20 @@ #define SVTOOLS_INC_TABLE_TABLEMODEL_HXX #include "svtools/svtdllapi.h" -#include -#include -#include -#include -#include +#include "svtools/table/tabletypes.hxx" +#include "svtools/table/tablerenderer.hxx" +#include "svtools/table/tableinputhandler.hxx" + #include -#include #include #include +#include +#include + +#include +#include + //........................................................................ namespace svt { namespace table { @@ -81,10 +85,9 @@ namespace svt { namespace table /** declares an interface to be implemented by components interested in changes in an ->ITableModel */ - class SAL_NO_VTABLE ITableModelListener + class SAL_NO_VTABLE ITableModelListener : public ::boost::enable_shared_from_this< ITableModelListener > { public: - //virtual void onTableModelChanged(PTableModel pTableModel) = 0; /** notifies the listener that one or more rows have been inserted into the table @@ -122,9 +125,9 @@ namespace svt { namespace table the table @param first - the old index of the first removed row + the old index of the first removed column @param last - the old index of the last removed row. Must not be smaller + the old index of the last removed column. Must not be smaller than ->first */ virtual void columnsRemoved( ColPos first, ColPos last ) = 0; @@ -355,21 +358,9 @@ namespace svt { namespace table @return the model of the column in question. Must not be - - @see getColumnModelByID */ virtual PColumnModel getColumnModel( ColPos column ) = 0; - /** finds a column model by ID - - @param id - the id of the column which is to be looked up - @return - the column model with the given ID, or if there is - no such column - */ - virtual PColumnModel getColumnModelByID( ColumnID id ) = 0; - /** returns a renderer which is able to paint the table represented by this table model @@ -423,22 +414,30 @@ namespace svt { namespace table */ virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const = 0; - virtual bool hasVerticalScrollbar() = 0; - virtual bool hasHorizontalScrollbar() = 0; + /** adds a listener to be notified of changes in the table model + */ + virtual void addTableModelListener( const PTableModelListener& i_listener ) = 0; - /** gets the content of the cells - */ - virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent() = 0; + /** remove a listener to be notified of changes in the table model + */ + virtual void removeTableModelListener( const PTableModelListener& i_listener ) = 0; - /** gets title of header rows - */ - virtual std::vector& getRowHeaderName() = 0; - SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getLineColor() = 0; - SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getHeaderBackgroundColor() = 0; - SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getTextColor() = 0; - SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getOddRowBackgroundColor() = 0; - SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() = 0; - SVT_DLLPRIVATE virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() = 0; + virtual bool hasVerticalScrollbar() = 0; + virtual bool hasHorizontalScrollbar() = 0; + + /** gets the content of the cells + */ + virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent() = 0; + + /** gets title of header rows + */ + virtual std::vector& getRowHeaderName() = 0; + virtual ::com::sun::star::util::Color getLineColor() = 0; + virtual ::com::sun::star::util::Color getHeaderBackgroundColor() = 0; + virtual ::com::sun::star::util::Color getTextColor() = 0; + virtual ::com::sun::star::util::Color getOddRowBackgroundColor() = 0; + virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() = 0; + virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() = 0; /// destroys the table model instance virtual ~ITableModel() { } diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 33c80e642118..cde198a92a6e 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -88,11 +88,12 @@ namespace svt { namespace table TableControl::~TableControl() { ImplCallEventListeners( VCLEVENT_OBJECT_DYING ); - DELETEZ( m_pImpl ); + + m_pImpl->setModel( PTableModel() ); + m_pImpl.reset(); + if ( m_pAccessTable->m_pAccessible ) - { m_pAccessTable->m_pAccessible->dispose(); - } } //-------------------------------------------------------------------- diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index acb8f9e691a9..46ebda453b10 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -30,19 +30,20 @@ #include "svtools/table/tablecontrol.hxx" #include "svtools/table/defaultinputhandler.hxx" #include "svtools/table/tablemodel.hxx" +#include "svtools/table/tabledatawindow.hxx" + #include "tablecontrol_impl.hxx" #include "tablegeometry.hxx" -#include "svtools/table/tabledatawindow.hxx" -#include + +#include + #include #include #include -#include #include -#include +#include #include -#include //........................................................................ namespace svt { namespace table @@ -108,28 +109,12 @@ namespace svt { namespace table (void)row; return false; } - virtual void addTableModelListener( const PTableModelListener& listener ) - { - (void)listener; - // ignore - } - virtual void removeTableModelListener( const PTableModelListener& listener ) - { - (void)listener; - // ignore - } virtual PColumnModel getColumnModel( ColPos column ) { DBG_ERROR( "EmptyTableModel::getColumnModel: invalid call!" ); (void)column; return PColumnModel(); } - virtual PColumnModel getColumnModelByID( ColumnID id ) - { - DBG_ERROR( "EmptyTableModel::getColumnModel: invalid call!" ); - (void)id; - return PColumnModel(); - } virtual PTableRenderer getRenderer() const { return PTableRenderer(); @@ -154,56 +139,64 @@ namespace svt { namespace table { return 0; } - virtual ScrollbarVisibility getVerticalScrollbarVisibility(int , int ) const + virtual ScrollbarVisibility getVerticalScrollbarVisibility(int , int ) const { - return ScrollbarShowNever; + return ScrollbarShowNever; } virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int , int ) const { - return ScrollbarShowNever; + return ScrollbarShowNever; + } + virtual void addTableModelListener( const PTableModelListener& i_listener ) + { + (void)i_listener; + } + virtual void removeTableModelListener( const PTableModelListener& i_listener ) + { + (void)i_listener; + } + virtual bool hasVerticalScrollbar() + { + return false; + } + virtual bool hasHorizontalScrollbar() + { + return false; + } + virtual ::com::sun::star::util::Color getLineColor() + { + return 0; + } + virtual ::com::sun::star::util::Color getHeaderBackgroundColor() + { + return -1; + } + virtual ::com::sun::star::util::Color getTextColor() + { + return 0; + } + virtual ::com::sun::star::util::Color getOddRowBackgroundColor() + { + return -1; + } + virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() + { + return com::sun::star::style::VerticalAlignment(0); + } + virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() + { + return -1; + } + virtual std::vector >& getCellContent() + { + return m_aCellContent; + } + virtual std::vector& getRowHeaderName() + { + aRowHeaderNames.clear(); + aRowHeaderNames.push_back(rtl::OUString::createFromAscii("")); + return aRowHeaderNames; } - virtual bool hasVerticalScrollbar() - { - return false; - } - virtual bool hasHorizontalScrollbar() - { - return false; - } - virtual ::com::sun::star::util::Color getLineColor() - { - return 0; - } - virtual ::com::sun::star::util::Color getHeaderBackgroundColor() - { - return -1; - } - virtual ::com::sun::star::util::Color getTextColor() - { - return 0; - } - virtual ::com::sun::star::util::Color getOddRowBackgroundColor() - { - return -1; - } - virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() - { - return com::sun::star::style::VerticalAlignment(0); - } - virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() - { - return -1; - } - virtual std::vector >& getCellContent() - { - return m_aCellContent; - } - virtual std::vector& getRowHeaderName() - { - aRowHeaderNames.clear(); - aRowHeaderNames.push_back(rtl::OUString::createFromAscii("")); - return aRowHeaderNames; - } private: std::vector aRowHeaderNames; std::vector > m_aCellContent; @@ -376,33 +369,33 @@ namespace svt { namespace table ,m_pModel ( new EmptyTableModel ) ,m_pInputHandler ( ) ,m_nRowHeightPixel ( 15 ) - ,m_nColHeaderHeightPixel( 0 ) + ,m_nColHeaderHeightPixel( 0 ) ,m_nRowHeaderWidthPixel ( 0 ) ,m_nColumnCount ( 0 ) ,m_nRowCount ( 0 ) ,m_nCurColumn ( COL_INVALID ) ,m_nCurRow ( ROW_INVALID ) ,m_nLeftColumn ( 0 ) - ,m_nTopRow ( 0 ) + ,m_nTopRow ( 0 ) ,m_nCursorHidden ( 1 ) ,m_pDataWindow ( new TableDataWindow( *this ) ) - ,m_pVScroll ( NULL ) + ,m_pVScroll ( NULL ) ,m_pHScroll ( NULL ) ,m_pScrollCorner ( NULL ) - ,m_pSelEngine ( ) - ,m_nRowSelected ( ) - ,m_pTableFunctionSet ( new TableFunctionSet(this ) ) - ,m_nAnchor (-1 ) - ,m_bResizing ( false ) - ,m_nResizingColumn ( 0 ) - ,m_bResizingGrid ( false ) + ,m_pSelEngine ( ) + ,m_nRowSelected ( ) + ,m_pTableFunctionSet ( new TableFunctionSet( this ) ) + ,m_nAnchor (-1 ) + ,m_bResizing ( false ) + ,m_nResizingColumn ( 0 ) + ,m_bResizingGrid ( false ) #if DBG_UTIL ,m_nRequiredInvariants ( INV_SCROLL_POSITION ) #endif { DBG_CTOR( TableControl_Impl, TableControl_Impl_checkInvariants ); - m_pSelEngine = new SelectionEngine(m_pDataWindow, m_pTableFunctionSet); - m_pSelEngine->SetSelectionMode(SINGLE_SELECTION); + m_pSelEngine = new SelectionEngine(m_pDataWindow, m_pTableFunctionSet); + m_pSelEngine->SetSelectionMode(SINGLE_SELECTION); m_pDataWindow->SetPosPixel( Point( 0, 0 ) ); m_pDataWindow->Show(); } @@ -437,15 +430,21 @@ namespace svt { namespace table TempHideCursor aHideCursor( *this ); + if ( !!m_pModel ) + m_pModel->removeTableModelListener( shared_from_this() ); + m_pModel = _pModel; if ( !m_pModel) m_pModel.reset( new EmptyTableModel ); + m_pModel->addTableModelListener( shared_from_this() ); + m_nCurRow = ROW_INVALID; m_nCurColumn = COL_INVALID; // recalc some model-dependent cached info impl_ni_updateCachedModelValues(); + impl_ni_updateScrollbars(); // completely invalidate m_rAntiImpl.Invalidate(); @@ -455,6 +454,60 @@ namespace svt { namespace table if ( m_nColumnCount ) m_nCurColumn = 0; } + //-------------------------------------------------------------------- + void TableControl_Impl::rowsInserted( RowPos first, RowPos last ) + { + OSL_ENSURE( false, "TableControl_Impl::rowsInserted: not implemented!" ); + // there's no known implementation (yet) which calls this method + OSL_UNUSED( first ); + OSL_UNUSED( last ); + } + + //-------------------------------------------------------------------- + void TableControl_Impl::rowsRemoved( RowPos first, RowPos last ) + { + OSL_ENSURE( false, "TableControl_Impl::rowsRemoved: not implemented!" ); + // there's no known implementation (yet) which calls this method + OSL_UNUSED( first ); + OSL_UNUSED( last ); + } + + //-------------------------------------------------------------------- + void TableControl_Impl::columnsInserted( ColPos first, ColPos last ) + { + impl_ni_updateColumnWidths(); + (void)first; + (void)last; + } + + //-------------------------------------------------------------------- + void TableControl_Impl::columnsRemoved( ColPos first, ColPos last ) + { + impl_ni_updateColumnWidths(); + (void)first; + (void)last; + } + + //-------------------------------------------------------------------- + void TableControl_Impl::columnMoved( ColPos oldIndex, ColPos newIndex ) + { + OSL_ENSURE( false, "TableControl_Impl::columnMoved: not implemented!" ); + // there's no known implementation (yet) which calls this method + OSL_UNUSED( oldIndex ); + OSL_UNUSED( newIndex ); + } + + //-------------------------------------------------------------------- + void TableControl_Impl::cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ) + { + OSL_ENSURE( false, "TableControl_Impl::cellsUpdated: not implemented!" ); + // there's no known implementation (yet) which calls this method + OSL_UNUSED( firstCol ); + OSL_UNUSED( lastCol ); + OSL_UNUSED( firstRow ); + OSL_UNUSED( lastRow ); + } + //-------------------------------------------------------------------- void TableControl_Impl::impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const { @@ -510,8 +563,8 @@ namespace svt { namespace table m_pInputHandler.reset(); m_nColumnCount = m_nRowCount = 0; - m_nRowHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getRowHeight() ), MAP_APPFONT ).Height(); - if ( m_pModel->hasColumnHeaders() ) + m_nRowHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getRowHeight() ), MAP_APPFONT ).Height(); + if ( m_pModel->hasColumnHeaders() ) m_nColHeaderHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getColumnHeaderHeight() ), MAP_APPFONT ).Height(); if ( m_pModel->hasRowHeaders() ) m_nRowHeaderWidthPixel = m_rAntiImpl.LogicToPixel( Size( m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT).Width(); @@ -535,114 +588,114 @@ namespace svt { namespace table return; TableSize colCount = m_pModel->getColumnCount(); + if ( colCount == 0 ) + return; m_aColumnWidthsPixel.reserve( colCount ); m_aAccColumnWidthsPixel.reserve( colCount ); - if(colCount>0) + + std::vector aPrePixelWidths(0); + long accumulatedPixelWidth = 0; + int lastResizableCol = -1; + double gridWidth = m_rAntiImpl.GetOutputSizePixel().Width(); + if(m_pModel->hasRowHeaders()) { - std::vector aPrePixelWidths(0); - long accumulatedPixelWidth = 0; - int lastResizableCol = -1; - double gridWidth = m_rAntiImpl.GetOutputSizePixel().Width(); - if(m_pModel->hasRowHeaders()) - { - TableMetrics rowHeaderWidth = m_pModel->getRowHeaderWidth(); - gridWidth-= m_rAntiImpl.LogicToPixel( Size( rowHeaderWidth, 0 ), MAP_APPFONT ).Width(); - } - if(m_pModel->hasVerticalScrollbar()) + TableMetrics rowHeaderWidth = m_pModel->getRowHeaderWidth(); + gridWidth-= m_rAntiImpl.LogicToPixel( Size( rowHeaderWidth, 0 ), MAP_APPFONT ).Width(); + } + if(m_pModel->hasVerticalScrollbar()) + { + sal_Int32 scrollbarWidth = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); + gridWidth-=scrollbarWidth; + } + double colWidthsSum = 0.0; + double colWithoutFixedWidthsSum = 0.0; + double minColWithoutFixedSum = 0.0; + for ( ColPos col = 0; col < colCount; ++col ) + { + PColumnModel pColumn = m_pModel->getColumnModel( col ); + DBG_ASSERT( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); + if ( !pColumn ) + continue; + TableMetrics colWidth = 0; + TableMetrics colPrefWidth = pColumn->getPreferredWidth(); + bool bResizable = pColumn->isResizable(); + if(pColumn->getMinWidth() == 0 && bResizable) { - sal_Int32 scrollbarWidth = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); - gridWidth-=scrollbarWidth; + pColumn->setMinWidth(1); + minColWithoutFixedSum+=m_rAntiImpl.PixelToLogic( Size( 1, 0 ), MAP_APPFONT ).Width(); } - double colWidthsSum = 0.0; - double colWithoutFixedWidthsSum = 0.0; - double minColWithoutFixedSum = 0.0; - for ( ColPos col = 0; col < colCount; ++col ) + if(pColumn->getMaxWidth() == 0 && bResizable) + pColumn->setMaxWidth(m_rAntiImpl.PixelToLogic( Size( (int)gridWidth, 0 ), MAP_APPFONT ).Width()); + if( colPrefWidth != 0) { - PColumnModel pColumn = m_pModel->getColumnModel( col ); - DBG_ASSERT( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); - if ( !pColumn ) - continue; - TableMetrics colWidth = 0; - TableMetrics colPrefWidth = pColumn->getPreferredWidth(); - bool bResizable = pColumn->isResizable(); - if(pColumn->getMinWidth() == 0 && bResizable) - { - pColumn->setMinWidth(1); - minColWithoutFixedSum+=m_rAntiImpl.PixelToLogic( Size( 1, 0 ), MAP_APPFONT ).Width(); - } - if(pColumn->getMaxWidth() == 0 && bResizable) - pColumn->setMaxWidth(m_rAntiImpl.PixelToLogic( Size( (int)gridWidth, 0 ), MAP_APPFONT ).Width()); - if( colPrefWidth != 0) + if(m_bResizingGrid) { - if(m_bResizingGrid) - { - colWidth = pColumn->getWidth(); - pColumn->setPreferredWidth(0); - } - else - { - colWidth = colPrefWidth; - pColumn->setWidth(colPrefWidth); - } + colWidth = pColumn->getWidth(); + pColumn->setPreferredWidth(0); } else - colWidth = pColumn->getWidth(); - long pixelWidth = m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width(); - if(bResizable && colPrefWidth == 0) { - colWithoutFixedWidthsSum+=pixelWidth; - lastResizableCol = col; + colWidth = colPrefWidth; + pColumn->setWidth(colPrefWidth); } - colWidthsSum+=pixelWidth; - aPrePixelWidths.push_back(pixelWidth); } - double gridWidthWithoutFixed = gridWidth - colWidthsSum + colWithoutFixedWidthsSum; - double scalingFactor = 1.0; - if(m_bResizingGrid) + else + colWidth = pColumn->getWidth(); + long pixelWidth = m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width(); + if(bResizable && colPrefWidth == 0) { - if(gridWidthWithoutFixed > (minColWithoutFixedSum+colWidthsSum - colWithoutFixedWidthsSum)) - scalingFactor = gridWidthWithoutFixed/colWithoutFixedWidthsSum; + colWithoutFixedWidthsSum+=pixelWidth; + lastResizableCol = col; } - else + colWidthsSum+=pixelWidth; + aPrePixelWidths.push_back(pixelWidth); + } + double gridWidthWithoutFixed = gridWidth - colWidthsSum + colWithoutFixedWidthsSum; + double scalingFactor = 1.0; + if(m_bResizingGrid) + { + if(gridWidthWithoutFixed > (minColWithoutFixedSum+colWidthsSum - colWithoutFixedWidthsSum)) + scalingFactor = gridWidthWithoutFixed/colWithoutFixedWidthsSum; + } + else + { + if(colWidthsSum < gridWidthWithoutFixed) { - if(colWidthsSum < gridWidthWithoutFixed) - { - if(colWithoutFixedWidthsSum>0) - scalingFactor = gridWidthWithoutFixed/colWithoutFixedWidthsSum; - } + if(colWithoutFixedWidthsSum>0) + scalingFactor = gridWidthWithoutFixed/colWithoutFixedWidthsSum; } - for ( ColPos i = 0; i < colCount; ++i ) + } + for ( ColPos i = 0; i < colCount; ++i ) + { + PColumnModel pColumn = m_pModel->getColumnModel( i ); + DBG_ASSERT( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); + if ( !pColumn ) + continue; + if(pColumn->isResizable() && pColumn->getPreferredWidth() == 0) { - PColumnModel pColumn = m_pModel->getColumnModel( i ); - DBG_ASSERT( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); - if ( !pColumn ) - continue; - if(pColumn->isResizable() && pColumn->getPreferredWidth() == 0) - { - aPrePixelWidths[i]*=scalingFactor; - TableMetrics logicColWidth = m_rAntiImpl.PixelToLogic( Size( aPrePixelWidths[i], 0 ), MAP_APPFONT ).Width(); - pColumn->setWidth(logicColWidth); - } - m_aColumnWidthsPixel.push_back( aPrePixelWidths[i] ); - m_aAccColumnWidthsPixel.push_back( accumulatedPixelWidth += aPrePixelWidths[i] ); + aPrePixelWidths[i]*=scalingFactor; + TableMetrics logicColWidth = m_rAntiImpl.PixelToLogic( Size( aPrePixelWidths[i], 0 ), MAP_APPFONT ).Width(); + pColumn->setWidth(logicColWidth); } - if(gridWidth > m_aAccColumnWidthsPixel[colCount-1]) + m_aColumnWidthsPixel.push_back( aPrePixelWidths[i] ); + m_aAccColumnWidthsPixel.push_back( accumulatedPixelWidth += aPrePixelWidths[i] ); + } + if(gridWidth > m_aAccColumnWidthsPixel[colCount-1]) + { + if(lastResizableCol >= 0) { - if(lastResizableCol >= 0) + PColumnModel pColumn = m_pModel->getColumnModel(lastResizableCol); + m_aColumnWidthsPixel[lastResizableCol]+=gridWidth-m_aAccColumnWidthsPixel[colCount-1]; + TableMetrics logicColWidth1 = m_rAntiImpl.PixelToLogic( Size( m_aColumnWidthsPixel[lastResizableCol], 0 ), MAP_APPFONT ).Width(); + pColumn->setWidth(logicColWidth1); + while(lastResizableCol < colCount) { - PColumnModel pColumn = m_pModel->getColumnModel(lastResizableCol); - m_aColumnWidthsPixel[lastResizableCol]+=gridWidth-m_aAccColumnWidthsPixel[colCount-1]; - TableMetrics logicColWidth1 = m_rAntiImpl.PixelToLogic( Size( m_aColumnWidthsPixel[lastResizableCol], 0 ), MAP_APPFONT ).Width(); - pColumn->setWidth(logicColWidth1); - while(lastResizableCol < colCount) - { - if(lastResizableCol == 0) - m_aAccColumnWidthsPixel[0] = m_aColumnWidthsPixel[lastResizableCol]; - else - m_aAccColumnWidthsPixel[lastResizableCol]=m_aAccColumnWidthsPixel[lastResizableCol-1]+m_aColumnWidthsPixel[lastResizableCol]; - ++lastResizableCol; - } + if(lastResizableCol == 0) + m_aAccColumnWidthsPixel[0] = m_aColumnWidthsPixel[lastResizableCol]; + else + m_aAccColumnWidthsPixel[lastResizableCol]=m_aAccColumnWidthsPixel[lastResizableCol-1]+m_aColumnWidthsPixel[lastResizableCol]; + ++lastResizableCol; } } } @@ -769,10 +822,10 @@ namespace svt { namespace table m_nRowCount = m_pModel->getRowCount(); m_nColumnCount = m_pModel->getColumnCount(); - if(m_aAccColumnWidthsPixel.empty()) - { + if ( m_aAccColumnWidthsPixel.empty() ) impl_ni_updateColumnWidths(); - } + OSL_ENSURE( m_aAccColumnWidthsPixel.size() == m_nColumnCount, "TableControl_Impl::impl_ni_updateScrollbars: inconsistency!" ); + const long nAllColumnsWidth = m_aAccColumnWidthsPixel.empty() ? 0 : m_aAccColumnWidthsPixel[ m_nColumnCount - 1 ]; // do we need a vertical scrollbar? bool bFirstRoundVScrollNeed = false; @@ -786,7 +839,7 @@ namespace svt { namespace table } // do we need a horizontal scrollbar? if ( lcl_determineScrollbarNeed( - m_pModel->getHorizontalScrollbarVisibility(aDataCellPlayground.GetWidth(), m_aAccColumnWidthsPixel[m_nColumnCount-1]), + m_pModel->getHorizontalScrollbarVisibility(aDataCellPlayground.GetWidth(), nAllColumnsWidth), lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ), m_nColumnCount ) ) { @@ -832,7 +885,7 @@ namespace svt { namespace table lcl_updateScrollbar( m_rAntiImpl, m_pHScroll, - m_pModel->getHorizontalScrollbarVisibility(aDataCellPlayground.GetWidth(), m_aAccColumnWidthsPixel[m_nColumnCount-1]), + m_pModel->getHorizontalScrollbarVisibility(aDataCellPlayground.GetWidth(), nAllColumnsWidth), lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ), // visible units m_nLeftColumn, // current position @@ -918,8 +971,7 @@ namespace svt { namespace table m_bResizingGrid = true; } } - if(m_nColumnCount != 0) - impl_ni_updateScrollbars(); + impl_ni_updateScrollbars(); } } @@ -931,7 +983,7 @@ namespace svt { namespace table if ( !getModel() ) return; PTableRenderer pRenderer = getModel()->getRenderer(); - DBG_ASSERT( !!pRenderer, "TableDataWindow::Paint: invalid renderer!" ); + DBG_ASSERT( !!pRenderer, "TableDataWindow::doPaintContent: invalid renderer!" ); if ( !pRenderer ) return; diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx old mode 100644 new mode 100755 index 053766d92841..b456cf248bed --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -27,18 +27,13 @@ #ifndef SVTOOLS_TABLECONTROL_IMPL_HXX #define SVTOOLS_TABLECONTROL_IMPL_HXX -#ifndef SVTOOLS_INC_TABLE_TABLEMODEL_HXX #include -#endif - -#ifndef SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX #include -#endif - #include -#include + #include +#include class ScrollBar; class ScrollBarBox; @@ -57,7 +52,8 @@ namespace svt { namespace table //==================================================================== //= TableControl_Impl //==================================================================== - class TableControl_Impl : public IAbstractTableControl + class TableControl_Impl :public IAbstractTableControl + ,public ITableModelListener { friend class TableGeometry; friend class TableRowGeometry; @@ -78,7 +74,7 @@ namespace svt { namespace table */ ArrayOfLong m_aAccColumnWidthsPixel; - ArrayOfLong m_aVisibleColumnWidthsPixel; + ArrayOfLong m_aVisibleColumnWidthsPixel; /// the height of a single row in the table, measured in pixels long m_nRowHeightPixel; /// the height of the column header row in the table, measured in pixels @@ -109,18 +105,18 @@ namespace svt { namespace table /// the horizontal scrollbar, if any ScrollBar* m_pHScroll; ScrollBarBox* m_pScrollCorner; - //selection engine - for determining selection range, e.g. single, multiple - SelectionEngine* m_pSelEngine; - //vector which contains the selected rows - std::vector m_nRowSelected; - //part of selection engine - TableFunctionSet* m_pTableFunctionSet; - //part of selection engine - RowPos m_nAnchor; - bool m_bResizing; - ColPos m_nResizingColumn; - bool m_bResizingGrid; - rtl::OUString m_aTooltipText; + //selection engine - for determining selection range, e.g. single, multiple + SelectionEngine* m_pSelEngine; + //vector which contains the selected rows + std::vector m_nRowSelected; + //part of selection engine + TableFunctionSet* m_pTableFunctionSet; + //part of selection engine + RowPos m_nAnchor; + bool m_bResizing; + ColPos m_nResizingColumn; + bool m_bResizingGrid; + rtl::OUString m_aTooltipText; #if DBG_UTIL #define INV_SCROLL_POSITION 1 @@ -185,44 +181,53 @@ namespace svt { namespace table if it's okay that the given cooordinate is only partially visible */ void ensureVisible( ColPos _nColumn, RowPos _nRow, bool _bAcceptPartialVisibility ); - /** returns the row, which contains the input point*/ - virtual RowPos getCurrentRow (const Point& rPoint); - - void setCursorAtCurrentCell(const Point& rPoint); - /** checks whether the vector with the selected rows contains the current row*/ - BOOL isRowSelected(const ::std::vector& selectedRows, RowPos current); - - bool isRowSelected(RowPos current); - /** returns the position of the current row in the selection vector */ - int getRowSelectedNumber(const ::std::vector& selectedRows, RowPos current); - /** _rCellRect contains the region, which should be invalidate after some action e.g. selecting row*/ - void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect ); - /** to be called when a new row is added to the control*/ - void invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect ); - /** returns the vector, which contains the selected rows*/ - std::vector& getSelectedRows(); - /** updates the vector, which contains the selected rows after removing the row nRowPos*/ - void removeSelectedRow(RowPos _nRowPos); - void invalidateRows(); - void clearSelection(); - // IAbstractTableControl - virtual void hideCursor(); - virtual void showCursor(); - virtual bool dispatchAction( TableControlAction _eAction ); - virtual SelectionEngine* getSelEngine(); - virtual bool isTooltipActive(); - virtual rtl::OUString& setTooltip(const Point& rPoint ); - virtual void resizeColumn(const Point& rPoint); - virtual bool startResizeColumn(const Point& rPoint); - virtual bool endResizeColumn(const Point& rPoint); - - TableDataWindow* getDataWindow(); - ScrollBar* getHorzScrollbar(); - ScrollBar* getVertScrollbar(); - - ::rtl::OUString convertToString(const ::com::sun::star::uno::Any& _value); - Rectangle calcHeaderRect(bool bColHeader); - Rectangle calcTableRect(); + /** returns the row, which contains the input point*/ + virtual RowPos getCurrentRow (const Point& rPoint); + + void setCursorAtCurrentCell(const Point& rPoint); + /** checks whether the vector with the selected rows contains the current row*/ + BOOL isRowSelected(const ::std::vector& selectedRows, RowPos current); + + bool isRowSelected(RowPos current); + /** returns the position of the current row in the selection vector */ + int getRowSelectedNumber(const ::std::vector& selectedRows, RowPos current); + /** _rCellRect contains the region, which should be invalidate after some action e.g. selecting row*/ + void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect ); + /** to be called when a new row is added to the control*/ + void invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect ); + /** returns the vector, which contains the selected rows*/ + std::vector& getSelectedRows(); + /** updates the vector, which contains the selected rows after removing the row nRowPos*/ + void removeSelectedRow(RowPos _nRowPos); + void invalidateRows(); + void clearSelection(); + // IAbstractTableControl + virtual void hideCursor(); + virtual void showCursor(); + virtual bool dispatchAction( TableControlAction _eAction ); + virtual SelectionEngine* getSelEngine(); + virtual bool isTooltipActive(); + virtual rtl::OUString& setTooltip(const Point& rPoint ); + virtual void resizeColumn(const Point& rPoint); + virtual bool startResizeColumn(const Point& rPoint); + virtual bool endResizeColumn(const Point& rPoint); + + TableDataWindow* getDataWindow(); + ScrollBar* getHorzScrollbar(); + ScrollBar* getVertScrollbar(); + + ::rtl::OUString convertToString(const ::com::sun::star::uno::Any& _value); + Rectangle calcHeaderRect(bool bColHeader); + Rectangle calcTableRect(); + + // ITableModelListener + virtual void rowsInserted( RowPos first, RowPos last ); + virtual void rowsRemoved( RowPos first, RowPos last ); + virtual void columnsInserted( ColPos first, ColPos last ); + virtual void columnsRemoved( ColPos first, ColPos last ); + virtual void columnMoved( ColPos oldIndex, ColPos newIndex ); + virtual void cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ); + private: /** toggles the cursor visibility diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 765a37e90495..050e938d2487 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -80,6 +80,18 @@ SVTXGridControl::~SVTXGridControl() { } +// --------------------------------------------------------------------------------------------------------------------- +void SVTXGridControl::SetWindow( Window* pWindow ) +{ + TableControl* pTable = dynamic_cast< TableControl* >( pWindow ); + ENSURE_OR_THROW( ( pTable != NULL ) || ( pWindow == NULL ), "SVTXGridControl::SetWindow: illegal window!" ); + + SVTXGridControl_Base::SetWindow( pWindow ); + + if ( pTable ) + pTable->SetModel( PTableModel( m_pTableModel ) ); +} + // --------------------------------------------------------------------------------------------------------------------- sal_Int32 SAL_CALL SVTXGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) { @@ -269,7 +281,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col ) { UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); - m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn); + m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); } m_xColumnModel->setDefaultColumns(rawRowData.getLength()); } @@ -302,36 +314,14 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_COLUMNMODEL: { + // remove all old columns + m_pTableModel->removeAllColumns(); + + // obtain new col model m_xColumnModel = Reference< XGridColumnModel >( aValue, UNO_QUERY_THROW ); - if(m_xColumnModel->getColumnCount() != 0) - { - Sequence > columns = m_xColumnModel->getColumns(); - std::vector > aNewColumns( - comphelper::sequenceToContainer > >(columns)); - sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height(); - if(m_xColumnModel->getColumnHeaderHeight() == 0) - { - m_pTableModel->setColumnHeaderHeight(fontHeight); - m_xColumnModel->setColumnHeaderHeight(fontHeight); - } - else - m_pTableModel->setColumnHeaderHeight(m_xColumnModel->getColumnHeaderHeight()); - for ( ::svt::table::ColPos col = 0; col < m_xColumnModel->getColumnCount(); ++col ) - { - UnoControlTableColumn* tableColumn = new UnoControlTableColumn(aNewColumns[col]); - Reference< XGridColumn > xGridColumn = m_xColumnModel->getColumn(col); - m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn); - tableColumn->setHorizontalAlign(xGridColumn->getHorizontalAlign()); - tableColumn->setWidth(xGridColumn->getColumnWidth()); - if(xGridColumn->getPreferredWidth() != 0) - tableColumn->setPreferredWidth(xGridColumn->getPreferredWidth()); - if(xGridColumn->getMaxWidth() != 0) - tableColumn->setMaxWidth(xGridColumn->getMaxWidth()); - if(xGridColumn->getMinWidth() != 0) - tableColumn->setMinWidth(xGridColumn->getMinWidth()); - tableColumn->setResizable(xGridColumn->getResizeable()); - } - } + + // remove new columns + impl_updateColumnsFromModel_nothrow(); break; } @@ -400,16 +390,6 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) ); VCLXWindow::ImplGetPropertyIds( rIds, true ); } -void SAL_CALL SVTXGridControl::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::RuntimeException) -{ - ::vos::OGuard aGuard( GetMutex() ); - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable != NULL, "SVTXGridControl::setVisible: no control (anymore)!" ); - - pTable->SetModel( PTableModel( m_pTableModel ) ); - // TODO: what's this SetModel call good for? Looks like a hack to me, to work around some other bug. - pTable->Show( bVisible ); -} void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { @@ -425,7 +405,7 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col ) { UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); - m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn); + m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); m_xColumnModel->getColumn(col)->addColumnListener(listener); } @@ -516,45 +496,59 @@ void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid: if(Event.valueName == rtl::OUString::createFromAscii("ColumnResize")) { - bool resizable = m_pTableModel->getColumnModel()[Event.index]->isResizable(); + bool resizable = m_pTableModel->getColumnModel( Event.index )->isResizable(); Event.newValue>>=resizable; - m_pTableModel->getColumnModel()[Event.index]->setResizable(resizable); + m_pTableModel->getColumnModel( Event.index )->setResizable(resizable); } else if(Event.valueName == rtl::OUString::createFromAscii("ColWidth")) { - sal_Int32 colWidth = m_pTableModel->getColumnModel()[Event.index]->getWidth(); + sal_Int32 colWidth = m_pTableModel->getColumnModel( Event.index )->getWidth(); Event.newValue>>=colWidth; - m_pTableModel->getColumnModel()[Event.index]->setWidth(colWidth); + m_pTableModel->getColumnModel( Event.index )->setWidth(colWidth); } else if(Event.valueName == rtl::OUString::createFromAscii("MaxWidth")) { - sal_Int32 maxWidth = m_pTableModel->getColumnModel()[Event.index]->getMaxWidth(); + sal_Int32 maxWidth = m_pTableModel->getColumnModel( Event.index )->getMaxWidth(); Event.newValue>>=maxWidth; - m_pTableModel->getColumnModel()[Event.index]->setMaxWidth(maxWidth); + m_pTableModel->getColumnModel( Event.index )->setMaxWidth(maxWidth); } else if(Event.valueName == rtl::OUString::createFromAscii("MinWidth")) { - sal_Int32 minWidth = m_pTableModel->getColumnModel()[Event.index]->getMinWidth(); + sal_Int32 minWidth = m_pTableModel->getColumnModel( Event.index )->getMinWidth(); Event.newValue>>=minWidth; - m_pTableModel->getColumnModel()[Event.index]->setMinWidth(minWidth); + m_pTableModel->getColumnModel( Event.index )->setMinWidth(minWidth); } else if(Event.valueName == rtl::OUString::createFromAscii("PrefWidth")) { - sal_Int32 prefWidth = m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth(); + sal_Int32 prefWidth = m_pTableModel->getColumnModel( Event.index )->getPreferredWidth(); Event.newValue>>=prefWidth; - m_pTableModel->getColumnModel()[Event.index]->setPreferredWidth(prefWidth); + m_pTableModel->getColumnModel( Event.index )->setPreferredWidth(prefWidth); } else if(Event.valueName == rtl::OUString::createFromAscii("HAlign")) { - ::com::sun::star::style::HorizontalAlignment hAlign = m_pTableModel->getColumnModel()[Event.index]->getHorizontalAlign(); + ::com::sun::star::style::HorizontalAlignment hAlign = m_pTableModel->getColumnModel( Event.index )->getHorizontalAlign(); Event.newValue>>=hAlign; - m_pTableModel->getColumnModel()[Event.index]->setHorizontalAlign(hAlign); + m_pTableModel->getColumnModel( Event.index )->setHorizontalAlign(hAlign); } else if(Event.valueName == rtl::OUString::createFromAscii("UpdateWidth")) { - if(m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth() != 0) - m_xColumnModel->getColumn(Event.index)->updateColumn(rtl::OUString::createFromAscii("PrefWidth"), m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth()); - m_xColumnModel->getColumn(Event.index)->updateColumn(rtl::OUString::createFromAscii("ColWidth"), m_pTableModel->getColumnModel()[Event.index]->getWidth()); + const PColumnModel pTableColumn( m_pTableModel->getColumnModel( Event.index ) ); + ENSURE_OR_RETURN_VOID( !!pTableColumn, "invalid table column!" ); + + Reference< XGridColumn > xColumn; + try + { + xColumn.set( m_xColumnModel->getColumn( Event.index ), UNO_SET_THROW ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + return; + } + + if ( pTableColumn->getPreferredWidth() != 0 ) + xColumn->updateColumn(rtl::OUString::createFromAscii("PrefWidth"), pTableColumn->getPreferredWidth()); + xColumn->updateColumn(rtl::OUString::createFromAscii("ColWidth"), pTableColumn->getWidth() ); } pTable->Invalidate(); } @@ -616,28 +610,29 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::G //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) { - (void)i_event; + const Reference< XGridColumn > xGridColumn( i_event.Element, UNO_QUERY ); + const PColumnModel tableColumn( new UnoControlTableColumn( xGridColumn ) ); + // will throw if this is not a valid grid column + m_pTableModel->appendColumn( tableColumn ); - // TODO: add as XGridColumnListener - // TODO: update our TableControl + impl_setColumnListening( Reference< XGridColumn >( i_event.Element, UNO_QUERY ), true ); } //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) { - (void)i_event; + impl_setColumnListening( Reference< XGridColumn >( i_event.Element, UNO_QUERY ), false ); - // TODO: remove as XGridColumnListener - // TODO: update our TableControl + // TODO: remove the respective column from our table model } //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException) { - (void)i_event; + impl_setColumnListening( Reference< XGridColumn >( i_event.ReplacedElement, UNO_QUERY ), false ); + impl_setColumnListening( Reference< XGridColumn >( i_event.Element, UNO_QUERY ), true ); - // TODO: add/remove as XGridColumnListener - // TODO: update our TableControl + // TODO: replace the respective column in our table model } @@ -946,3 +941,60 @@ void SVTXGridControl::ImplCallItemListeners() m_aSelectionListeners.selectionChanged( aEvent ); } } + +void SVTXGridControl::impl_updateColumnsFromModel_nothrow() +{ + ENSURE_OR_RETURN_VOID( m_xColumnModel.is(), "no model!" ); + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable != NULL, "no table!" ); + + try + { + if ( m_xColumnModel->getColumnCount() != 0 ) + { + if ( m_xColumnModel->getColumnHeaderHeight() == 0 ) + { + sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MAP_APPFONT ).Height(); + m_pTableModel->setColumnHeaderHeight( fontHeight ); + } + else + m_pTableModel->setColumnHeaderHeight( m_xColumnModel->getColumnHeaderHeight() ); + + const Sequence< Reference< XGridColumn > > columns = m_xColumnModel->getColumns(); + for ( const Reference< XGridColumn >* colRef = columns.getConstArray(); + colRef != columns.getConstArray() + columns.getLength(); + ++colRef + ) + { + ENSURE_OR_CONTINUE( colRef->is(), "illegal column!" ); + + impl_setColumnListening( *colRef, true ); + + UnoControlTableColumn* tableColumn = new UnoControlTableColumn( *colRef ); + m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); + + tableColumn->setHorizontalAlign( (*colRef)->getHorizontalAlign() ); + tableColumn->setWidth( (*colRef)->getColumnWidth() ); + tableColumn->setResizable( (*colRef)->getResizeable() ); + tableColumn->setPreferredWidth( (*colRef)->getPreferredWidth() ); + tableColumn->setMaxWidth( (*colRef)->getMaxWidth() ); + tableColumn->setMinWidth( (*colRef)->getMinWidth() ); + } + } + + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } +} + +void SVTXGridControl::impl_setColumnListening( const Reference< XGridColumn >& i_column, bool const i_start ) +{ + ENSURE_OR_RETURN_VOID( i_column.is(), "SVTXGridControl::impl_setColumnListening: illegal column!" ); + + if ( i_start ) + i_column->addColumnListener( this ); + else + i_column->removeColumnListener( this ); +} diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index 3197b4b8e23b..ef4dc7225bf5 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -113,11 +113,18 @@ public: void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); - void SAL_CALL setVisible(sal_Bool bVisible) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XComponent void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); - // XContainertListener +protected: + // VCLXWindow + virtual void SetWindow( Window* pWindow ); + +private: + void impl_removeAllColumns_nothrow(); + void impl_updateColumnsFromModel_nothrow(); + + void impl_setColumnListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn >& i_column, bool const i_start ); }; #endif // _SVT_GRIDCONTROL_HXX_ diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index d239ee3c740d..e8ebd029884c 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -38,6 +38,7 @@ #include #include #include +#include using ::rtl::OUString; using namespace ::svt::table; @@ -45,18 +46,31 @@ using namespace ::com::sun::star::uno; //-------------------------------------------------------------------- - UnoControlTableColumn::UnoControlTableColumn(Reference m_xGridColumn) + UnoControlTableColumn::UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ) :m_nID( 0 ) ,m_sName() ,m_bIsResizable( true ) ,m_nWidth( 4 ) ,m_nMinWidth( 0 ) ,m_nMaxWidth( 0 ) - ,m_nPrefWidth ( 0 ) - ,m_xHorizontalAlign(com::sun::star::style::HorizontalAlignment(0)) + ,m_nPrefWidth ( 0 ) + ,m_eHorizontalAlign( com::sun::star::style::HorizontalAlignment_LEFT ) { - m_sName = m_xGridColumn->getTitle(); + ENSURE_OR_THROW( i_gridColumn.is(), "illegal column" ); + m_sName = i_gridColumn->getTitle(); + + // don't do this here. The attribute getters at the XGridColumn implementation do some notifications, + // which is absolutely weird. Sadly, this also means that we can't call the getters while we're + // being constructed, and not yet inserted into the column model. +// m_eHorizontalAlign = i_gridColumn->getHorizontalAlign(); +// m_nWidth = i_gridColumn->getColumnWidth(); +// m_bIsResizable = i_gridColumn->getResizeable(); +// +// m_nPrefWidth = i_gridColumn->getPreferredWidth(); +// m_nMaxWidth = i_gridColumn->getMaxWidth(); +// m_nMinWidth = i_gridColumn->getMinWidth(); } + //-------------------------------------------------------------------- UnoControlTableColumn::UnoControlTableColumn() :m_nID( 0 ) @@ -65,8 +79,8 @@ using namespace ::com::sun::star::uno; ,m_nWidth( 4 ) ,m_nMinWidth( 0 ) ,m_nMaxWidth( 0 ) - ,m_nPrefWidth ( 0 ) - ,m_xHorizontalAlign(com::sun::star::style::HorizontalAlignment(0)) + ,m_nPrefWidth ( 0 ) + ,m_eHorizontalAlign(com::sun::star::style::HorizontalAlignment(0)) { } @@ -155,60 +169,62 @@ using namespace ::com::sun::star::uno; //-------------------------------------------------------------------- ::com::sun::star::style::HorizontalAlignment UnoControlTableColumn::getHorizontalAlign() { - return m_xHorizontalAlign; + return m_eHorizontalAlign; } //-------------------------------------------------------------------- void UnoControlTableColumn::setHorizontalAlign( com::sun::star::style::HorizontalAlignment _align ) { - m_xHorizontalAlign = _align; + m_eHorizontalAlign = _align; } //==================================================================== //= DefaultTableModel_Impl //==================================================================== + typedef ::std::vector< PTableModelListener > ModellListeners; struct UnoControlTableModel_Impl { - ::std::vector< PColumnModel > aColumns; - TableSize nRowCount; - bool bHasColumnHeaders; - bool bHasRowHeaders; - bool bVScroll; - bool bHScroll; - PTableRenderer pRenderer; - PTableInputHandler pInputHandler; - TableMetrics nRowHeight; - TableMetrics nColumnHeaderHeight; - TableMetrics nRowHeaderWidth; - std::vector aRowHeadersTitle; - std::vector > aCellContent; - ::com::sun::star::util::Color m_xLineColor; - ::com::sun::star::util::Color m_xHeaderColor; - ::com::sun::star::util::Color m_xTextColor; - ::com::sun::star::util::Color m_xRowColor1; - ::com::sun::star::util::Color m_xRowColor2; - ::com::sun::star::style::VerticalAlignment m_xVerticalAlign; + ::std::vector< PColumnModel > aColumns; + TableSize nRowCount; + bool bHasColumnHeaders; + bool bHasRowHeaders; + bool bVScroll; + bool bHScroll; + PTableRenderer pRenderer; + PTableInputHandler pInputHandler; + TableMetrics nRowHeight; + TableMetrics nColumnHeaderHeight; + TableMetrics nRowHeaderWidth; + ::std::vector aRowHeadersTitle; + ::std::vector > aCellContent; + ::com::sun::star::util::Color m_nLineColor; + ::com::sun::star::util::Color m_nHeaderColor; + ::com::sun::star::util::Color m_nTextColor; + ::com::sun::star::util::Color m_nRowColor1; + ::com::sun::star::util::Color m_nRowColor2; + ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; + ModellListeners m_aListeners; UnoControlTableModel_Impl() - :aColumns ( ) - ,nRowCount ( 0 ) - ,bHasColumnHeaders ( false ) - ,bHasRowHeaders ( false ) - ,bVScroll ( false ) - ,bHScroll ( false ) + :aColumns ( ) + ,nRowCount ( 0 ) + ,bHasColumnHeaders ( true ) + ,bHasRowHeaders ( true ) + ,bVScroll ( false ) + ,bHScroll ( false ) ,pRenderer ( ) ,pInputHandler ( ) - ,nRowHeight ( 0 ) - ,nColumnHeaderHeight( 0 ) + ,nRowHeight ( 10 ) + ,nColumnHeaderHeight( 10 ) ,nRowHeaderWidth ( 10 ) - ,aRowHeadersTitle ( ) - ,aCellContent ( ) - ,m_xLineColor ( 0xFFFFFF ) - ,m_xHeaderColor ( 0xFFFFFF ) - ,m_xTextColor ( 0 )//black as default - ,m_xRowColor1 ( 0xFFFFFF ) - ,m_xRowColor2 ( 0xFFFFFF ) - ,m_xVerticalAlign (com::sun::star::style::VerticalAlignment(0)) + ,aRowHeadersTitle ( ) + ,aCellContent ( ) + ,m_nLineColor ( 0xFFFFFF ) + ,m_nHeaderColor ( 0xFFFFFF ) + ,m_nTextColor ( 0 )//black as default + ,m_nRowColor1 ( 0xFFFFFF ) + ,m_nRowColor2 ( 0xFFFFFF ) + ,m_eVerticalAlign ( com::sun::star::style::VerticalAlignment_TOP ) { } }; @@ -220,8 +236,8 @@ using namespace ::com::sun::star::uno; UnoControlTableModel::UnoControlTableModel() :m_pImpl( new UnoControlTableModel_Impl ) { - m_pImpl->bHasColumnHeaders = false; - m_pImpl->bHasRowHeaders = false; + m_pImpl->bHasColumnHeaders = true; + m_pImpl->bHasRowHeaders = true; m_pImpl->pRenderer.reset( new GridTableRenderer( *this ) ); m_pImpl->pInputHandler.reset( new DefaultInputHandler ); } @@ -284,42 +300,51 @@ using namespace ::com::sun::star::uno; return false; } - //-------------------------------------------------------------------- - void UnoControlTableModel::addTableModelListener( const PTableModelListener& listener ) - { - (void) listener; - // TODO - DBG_ERROR( "DefaultTableModel::addTableModelListener: not yet implemented!" ); - } - - //-------------------------------------------------------------------- - void UnoControlTableModel::removeTableModelListener( const PTableModelListener& listener ) - { - (void)listener; - // TODO - DBG_ERROR( "DefaultTableModel::removeTableModelListener: not yet implemented!" ); - } - //-------------------------------------------------------------------- PColumnModel UnoControlTableModel::getColumnModel( ColPos column ) { - DBG_ASSERT( ( column >= 0 ) && ( column < getColumnCount() ), - "DefaultTableModel::getColumnModel: invalid index!" ); + ENSURE_OR_RETURN( ( column >= 0 ) && ( column < getColumnCount() ), + "DefaultTableModel::getColumnModel: invalid index!", PColumnModel() ); return m_pImpl->aColumns[ column ]; } //-------------------------------------------------------------------- - std::vector& UnoControlTableModel::getColumnModel() + void UnoControlTableModel::appendColumn( const PColumnModel& i_column ) { - return m_pImpl->aColumns; + ENSURE_OR_RETURN_VOID( !!i_column, "illegal column" ); + + const ColPos nInsertPosition = m_pImpl->aColumns.size(); + m_pImpl->aColumns.push_back( i_column ); + + // notify listeners + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->columnsInserted( nInsertPosition, nInsertPosition ); + } } + //-------------------------------------------------------------------- - PColumnModel UnoControlTableModel::getColumnModelByID( ColumnID id ) + void UnoControlTableModel::removeAllColumns() { - (void)id; - // TODO - DBG_ERROR( "DefaultTableModel::getColumnModelByID: not yet implemented!" ); - return PColumnModel(); + if ( m_pImpl->aColumns.empty() ) + return; + + const ColPos nLastIndex = m_pImpl->aColumns.size() - 1; + m_pImpl->aColumns.clear(); + + // notify listeners + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->columnsRemoved( 0, nLastIndex ); + } } //-------------------------------------------------------------------- @@ -403,6 +428,31 @@ using namespace ::com::sun::star::uno; else return ScrollbarShowAlways; } + + //-------------------------------------------------------------------- + void UnoControlTableModel::addTableModelListener( const PTableModelListener& i_listener ) + { + ENSURE_OR_RETURN_VOID( !!i_listener, "illegal NULL listener" ); + m_pImpl->m_aListeners.push_back( i_listener ); + } + + //-------------------------------------------------------------------- + void UnoControlTableModel::removeTableModelListener( const PTableModelListener& i_listener ) + { + for ( ModellListeners::iterator lookup = m_pImpl->m_aListeners.begin(); + lookup != m_pImpl->m_aListeners.end(); + ++lookup + ) + { + if ( *lookup == i_listener ) + { + m_pImpl->m_aListeners.erase( lookup ); + return; + } + } + OSL_ENSURE( false, "UnoControlTableModel::removeTableModelListener: listener is not registered - sure you're doing the right thing here?" ); + } + //-------------------------------------------------------------------- void UnoControlTableModel::setVerticalScrollbarVisibility(bool _bVScroll) const { @@ -447,67 +497,67 @@ using namespace ::com::sun::star::uno; //-------------------------------------------------------------------- ::com::sun::star::util::Color UnoControlTableModel::getLineColor() { - return m_pImpl->m_xLineColor; + return m_pImpl->m_nLineColor; } //-------------------------------------------------------------------- void UnoControlTableModel::setLineColor( ::com::sun::star::util::Color _rColor ) { - m_pImpl->m_xLineColor = _rColor; + m_pImpl->m_nLineColor = _rColor; } //-------------------------------------------------------------------- ::com::sun::star::util::Color UnoControlTableModel::getHeaderBackgroundColor() { - return m_pImpl->m_xHeaderColor; + return m_pImpl->m_nHeaderColor; } //-------------------------------------------------------------------- void UnoControlTableModel::setHeaderBackgroundColor( ::com::sun::star::util::Color _rColor ) { - m_pImpl->m_xHeaderColor = _rColor; + m_pImpl->m_nHeaderColor = _rColor; } //-------------------------------------------------------------------- ::com::sun::star::util::Color UnoControlTableModel::getTextColor() { - return m_pImpl->m_xTextColor; + return m_pImpl->m_nTextColor; } //-------------------------------------------------------------------- void UnoControlTableModel::setTextColor( ::com::sun::star::util::Color _rColor ) { - m_pImpl->m_xTextColor = _rColor; + m_pImpl->m_nTextColor = _rColor; } //-------------------------------------------------------------------- ::com::sun::star::util::Color UnoControlTableModel::getOddRowBackgroundColor() { - return m_pImpl->m_xRowColor1; + return m_pImpl->m_nRowColor1; } //-------------------------------------------------------------------- void UnoControlTableModel::setOddRowBackgroundColor( ::com::sun::star::util::Color _rColor ) { - m_pImpl->m_xRowColor1 = _rColor; + m_pImpl->m_nRowColor1 = _rColor; } //-------------------------------------------------------------------- ::com::sun::star::util::Color UnoControlTableModel::getEvenRowBackgroundColor() { - return m_pImpl->m_xRowColor2; + return m_pImpl->m_nRowColor2; } //-------------------------------------------------------------------- void UnoControlTableModel::setEvenRowBackgroundColor( ::com::sun::star::util::Color _rColor ) { - m_pImpl->m_xRowColor2 = _rColor; + m_pImpl->m_nRowColor2 = _rColor; } //-------------------------------------------------------------------- ::com::sun::star::style::VerticalAlignment UnoControlTableModel::getVerticalAlign() { - return m_pImpl->m_xVerticalAlign; + return m_pImpl->m_eVerticalAlign; } //-------------------------------------------------------------------- void UnoControlTableModel::setVerticalAlign( com::sun::star::style::VerticalAlignment _xAlign ) { - m_pImpl->m_xVerticalAlign = _xAlign; + m_pImpl->m_eVerticalAlign = _xAlign; } diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index c00642448f79..18f20043d1be 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -53,18 +53,18 @@ using namespace ::com::sun::star::awt::grid; class UnoControlTableColumn : public IColumnModel { private: - ColumnID m_nID; - String m_sName; - bool m_bIsResizable; - TableMetrics m_nWidth; - TableMetrics m_nMinWidth; - TableMetrics m_nMaxWidth; - TableMetrics m_nPrefWidth; - ::com::sun::star::style::HorizontalAlignment m_xHorizontalAlign; + ColumnID m_nID; + String m_sName; + bool m_bIsResizable; + TableMetrics m_nWidth; + TableMetrics m_nMinWidth; + TableMetrics m_nMaxWidth; + TableMetrics m_nPrefWidth; + ::com::sun::star::style::HorizontalAlignment m_eHorizontalAlign; public: - UnoControlTableColumn(Reference); - UnoControlTableColumn(); + UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ); + UnoControlTableColumn(); // IColumnModel overridables virtual ColumnID getID() const; @@ -79,10 +79,10 @@ class UnoControlTableColumn : public IColumnModel virtual void setMinWidth( TableMetrics _nMinWidth ); virtual TableMetrics getMaxWidth() const; virtual void setMaxWidth( TableMetrics _nMaxWidth ); - virtual TableMetrics getPreferredWidth() const; + virtual TableMetrics getPreferredWidth() const; virtual void setPreferredWidth( TableMetrics _nPrefWidth ); - virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign(); - virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign); + virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign(); + virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign); }; struct UnoControlTableModel_Impl; @@ -122,52 +122,55 @@ class UnoControlTableModel : public ITableModel public: // ITableModel overridables - virtual TableSize getColumnCount() const; - virtual TableSize getRowCount() const; - virtual void setColumnCount(TableSize _nColCount); - virtual void setRowCount(TableSize _nRowCount); - virtual bool hasColumnHeaders() const; - virtual bool hasRowHeaders() const; - virtual void setRowHeaders(bool _bRowHeaders); - virtual void setColumnHeaders(bool _bColumnHeaders); - virtual bool isCellEditable( ColPos col, RowPos row ) const; - virtual void addTableModelListener( const PTableModelListener& listener ); - virtual void removeTableModelListener( const PTableModelListener& listener ); - virtual PColumnModel getColumnModel( ColPos column ); - virtual std::vector& getColumnModel(); - virtual PColumnModel getColumnModelByID( ColumnID id ); - virtual PTableRenderer getRenderer() const; + virtual TableSize getColumnCount() const; + virtual TableSize getRowCount() const; + virtual bool hasColumnHeaders() const; + virtual bool hasRowHeaders() const; + virtual bool isCellEditable( ColPos col, RowPos row ) const; + virtual PColumnModel getColumnModel( ColPos column ); + virtual PTableRenderer getRenderer() const; virtual PTableInputHandler getInputHandler() const; - virtual TableMetrics getRowHeight() const; - virtual TableMetrics getColumnHeaderHeight() const; - virtual TableMetrics getRowHeaderWidth() const; - virtual ScrollbarVisibility getVerticalScrollbarVisibility(int overAllHeight, int actHeight) const; + virtual TableMetrics getRowHeight() const; + virtual TableMetrics getColumnHeaderHeight() const; + virtual TableMetrics getRowHeaderWidth() const; + virtual ScrollbarVisibility getVerticalScrollbarVisibility(int overAllHeight,int actHeight) const; virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const; - virtual void setVerticalScrollbarVisibility(bool _bVScroll) const; - virtual void setHorizontalScrollbarVisibility(bool _bHScroll) const; - virtual void setCellContent(const std::vector >& cellContent); - virtual std::vector >& getCellContent(); - virtual void setRowHeaderName(const std::vector& cellColumnContent); - virtual std::vector& getRowHeaderName(); - virtual ::com::sun::star::util::Color getLineColor(); - virtual void setLineColor(::com::sun::star::util::Color _rColor); - virtual ::com::sun::star::util::Color getHeaderBackgroundColor(); - virtual void setHeaderBackgroundColor(::com::sun::star::util::Color _rColor); - virtual ::com::sun::star::util::Color getTextColor(); - virtual void setTextColor(::com::sun::star::util::Color _rColor); - virtual ::com::sun::star::util::Color getOddRowBackgroundColor(); - virtual void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor); - virtual ::com::sun::star::util::Color getEvenRowBackgroundColor(); - virtual void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor); - virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign(); - virtual void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); - virtual bool hasVerticalScrollbar(); - virtual bool hasHorizontalScrollbar(); + virtual void addTableModelListener( const PTableModelListener& i_listener ); + virtual void removeTableModelListener( const PTableModelListener& i_listener ); + virtual bool hasVerticalScrollbar(); + virtual bool hasHorizontalScrollbar(); + virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent(); + virtual std::vector& getRowHeaderName(); + virtual ::com::sun::star::util::Color getLineColor(); + virtual ::com::sun::star::util::Color getHeaderBackgroundColor(); + virtual ::com::sun::star::util::Color getTextColor(); + virtual ::com::sun::star::util::Color getOddRowBackgroundColor(); + virtual ::com::sun::star::util::Color getEvenRowBackgroundColor(); + virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign(); + + + // other operations + void setRowCount(TableSize _nRowCount); + void setRowHeaderName(const std::vector& cellColumnContent); + void setVerticalScrollbarVisibility(bool _bVScroll) const; + void setHorizontalScrollbarVisibility(bool _bHScroll) const; + void setCellContent(const std::vector >& cellContent); + void setColumnCount(TableSize _nColCount); + void setRowHeaders(bool _bRowHeaders); + void setColumnHeaders(bool _bColumnHeaders); + void setLineColor(::com::sun::star::util::Color _rColor); + void setHeaderBackgroundColor(::com::sun::star::util::Color _rColor); + void setTextColor(::com::sun::star::util::Color _rColor); + void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor); + void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor); + void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); + void appendColumn( const PColumnModel& i_column ); + void removeAllColumns(); }; inline void UnoControlTableModel::SetColumnWidth( ColPos _nColumn, TableMetrics _nWidth100thMM ) { - getColumnModel( _nColumn )->setWidth( _nWidth100thMM ); + getColumnModel( _nColumn )->setWidth( _nWidth100thMM ); } inline TableMetrics UnoControlTableModel::GetColumnWidth( ColPos _nColumn ) diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index a48f75966bde..2a5b5683efad 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -36,6 +36,7 @@ #include #include +#include #include //...................................................................................................................... @@ -156,6 +157,11 @@ namespace toolkit for ( sal_Int32 i=0; i xColumn( m_aContext.createComponent( "com.sun.star.awt.grid.GridColumn" ), UNO_QUERY_THROW ); + ::rtl::OUStringBuffer colTitle; + colTitle.appendAscii( "Column " ); + colTitle.append( i ); + xColumn->setTitle( colTitle.makeStringAndClear() ); + xColumn->setPreferredWidth( 80 /* APPFONT */ ); ContainerEvent aEvent; aEvent.Source = *this; diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 57b5086e2272..cc16d1f2c355 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -127,9 +127,9 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_GRID_SELECTIONMODE: return uno::makeAny( SelectionType(1) ); case BASEPROPERTY_GRID_SHOWROWHEADER: - return uno::makeAny( (sal_Bool)sal_False ); + return uno::makeAny( (sal_Bool)sal_True ); case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: - return uno::makeAny( (sal_Bool)sal_False ); + return uno::makeAny( (sal_Bool)sal_True ); case BASEPROPERTY_GRID_DATAMODEL: return uno::makeAny( Reference ()); case BASEPROPERTY_GRID_COLUMNMODEL: -- cgit From caa7780d3aae5624cf930c0794c63114564d8781 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:07:29 +0100 Subject: gridsort: removed XGridColumn::updateColumn The implementation of this column was only a wrapper around what setColumnWidth/setPreferredWidth would have done. Also, the mechanism how this method was used was really weird, effectively propagating the (preferred) width from the ITableColumn implementation of the grid peer to the XGridColumn implementation of the grid column model. This was done each time the (preferred) width was access for reading - not really a clever solution. Now, the ITableColumn knows its respective XGridColumn, and simply forwards the (preferred) width as needed. --- svtools/source/uno/svtxgridcontrol.cxx | 27 --------- svtools/source/uno/unocontroltablemodel.cxx | 41 +++++++++----- svtools/source/uno/unocontroltablemodel.hxx | 9 +-- toolkit/source/controls/grid/gridcolumn.cxx | 87 ++++++++++++++++------------- toolkit/source/controls/grid/gridcolumn.hxx | 11 ++-- 5 files changed, 88 insertions(+), 87 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 050e938d2487..512eb347f577 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -530,26 +530,6 @@ void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid: Event.newValue>>=hAlign; m_pTableModel->getColumnModel( Event.index )->setHorizontalAlign(hAlign); } - else if(Event.valueName == rtl::OUString::createFromAscii("UpdateWidth")) - { - const PColumnModel pTableColumn( m_pTableModel->getColumnModel( Event.index ) ); - ENSURE_OR_RETURN_VOID( !!pTableColumn, "invalid table column!" ); - - Reference< XGridColumn > xColumn; - try - { - xColumn.set( m_xColumnModel->getColumn( Event.index ), UNO_SET_THROW ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - return; - } - - if ( pTableColumn->getPreferredWidth() != 0 ) - xColumn->updateColumn(rtl::OUString::createFromAscii("PrefWidth"), pTableColumn->getPreferredWidth()); - xColumn->updateColumn(rtl::OUString::createFromAscii("ColWidth"), pTableColumn->getWidth() ); - } pTable->Invalidate(); } void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) @@ -972,13 +952,6 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow() UnoControlTableColumn* tableColumn = new UnoControlTableColumn( *colRef ); m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); - - tableColumn->setHorizontalAlign( (*colRef)->getHorizontalAlign() ); - tableColumn->setWidth( (*colRef)->getColumnWidth() ); - tableColumn->setResizable( (*colRef)->getResizeable() ); - tableColumn->setPreferredWidth( (*colRef)->getPreferredWidth() ); - tableColumn->setMaxWidth( (*colRef)->getMaxWidth() ); - tableColumn->setMinWidth( (*colRef)->getMinWidth() ); } } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index e8ebd029884c..ff246be0c3ae 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -43,7 +43,7 @@ using ::rtl::OUString; using namespace ::svt::table; using namespace ::com::sun::star::uno; - +using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- UnoControlTableColumn::UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ) @@ -55,20 +55,17 @@ using namespace ::com::sun::star::uno; ,m_nMaxWidth( 0 ) ,m_nPrefWidth ( 0 ) ,m_eHorizontalAlign( com::sun::star::style::HorizontalAlignment_LEFT ) + ,m_xGridColumn( i_gridColumn ) { - ENSURE_OR_THROW( i_gridColumn.is(), "illegal column" ); - m_sName = i_gridColumn->getTitle(); + m_sName = m_xGridColumn->getTitle(); + + m_eHorizontalAlign = m_xGridColumn->getHorizontalAlign(); + m_nWidth = m_xGridColumn->getColumnWidth(); + m_bIsResizable = m_xGridColumn->getResizeable(); - // don't do this here. The attribute getters at the XGridColumn implementation do some notifications, - // which is absolutely weird. Sadly, this also means that we can't call the getters while we're - // being constructed, and not yet inserted into the column model. -// m_eHorizontalAlign = i_gridColumn->getHorizontalAlign(); -// m_nWidth = i_gridColumn->getColumnWidth(); -// m_bIsResizable = i_gridColumn->getResizeable(); -// -// m_nPrefWidth = i_gridColumn->getPreferredWidth(); -// m_nMaxWidth = i_gridColumn->getMaxWidth(); -// m_nMinWidth = i_gridColumn->getMinWidth(); + m_nPrefWidth = m_xGridColumn->getPreferredWidth(); + m_nMaxWidth = m_xGridColumn->getMaxWidth(); + m_nMinWidth = m_xGridColumn->getMinWidth(); } //-------------------------------------------------------------------- @@ -130,6 +127,15 @@ using namespace ::com::sun::star::uno; void UnoControlTableColumn::setWidth( TableMetrics _nWidth ) { m_nWidth = _nWidth; + try + { + if ( m_xGridColumn.is() ) + m_xGridColumn->setColumnWidth( getWidth() ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } //-------------------------------------------------------------------- @@ -165,6 +171,15 @@ using namespace ::com::sun::star::uno; void UnoControlTableColumn::setPreferredWidth( TableMetrics _nPrefWidth ) { m_nPrefWidth = _nPrefWidth; + try + { + if ( m_xGridColumn.is() ) + m_xGridColumn->setPreferredWidth( getPreferredWidth() ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } //-------------------------------------------------------------------- ::com::sun::star::style::HorizontalAlignment UnoControlTableColumn::getHorizontalAlign() diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 18f20043d1be..fc6e90f16f6a 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -47,8 +47,6 @@ using namespace ::svt::table; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt::grid; class UnoControlTableColumn : public IColumnModel { @@ -62,8 +60,11 @@ class UnoControlTableColumn : public IColumnModel TableMetrics m_nPrefWidth; ::com::sun::star::style::HorizontalAlignment m_eHorizontalAlign; + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > + m_xGridColumn; + public: - UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ); + UnoControlTableColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn >& i_gridColumn ); UnoControlTableColumn(); // IColumnModel overridables @@ -154,7 +155,7 @@ class UnoControlTableModel : public ITableModel void setRowHeaderName(const std::vector& cellColumnContent); void setVerticalScrollbarVisibility(bool _bVScroll) const; void setHorizontalScrollbarVisibility(bool _bHScroll) const; - void setCellContent(const std::vector >& cellContent); + void setCellContent(const std::vector >& cellContent); void setColumnCount(TableSize _nColCount); void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 4094f4433538..0503c69b0493 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -38,7 +38,6 @@ #define HALIGN ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HAlign" )) #define TITLE ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )) #define COLRESIZE ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColumnResize" )) -#define UPDATE ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UpdateWidth" )) namespace toolkit { @@ -71,43 +70,22 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void GridColumn::broadcast( broadcast_column_type eType, const GridColumnEvent& aEvent ) - { - ::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( XGridColumnListener::static_type() ); - if( pIter ) - { - ::cppu::OInterfaceIteratorHelper aListIter(*pIter); - while(aListIter.hasMoreElements()) - { - XGridColumnListener* pListener = static_cast(aListIter.next()); - switch( eType ) - { - case column_attribute_changed: pListener->columnChanged(aEvent); break; - } - } - } - } - - //------------------------------------------------------------------------------------------------------------------ - void GridColumn::broadcast_changed(::rtl::OUString name, Any oldValue, Any newValue) + void GridColumn::broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue, ::osl::ClearableMutexGuard& i_Guard ) { Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); GridColumnEvent aEvent( xSource, name, oldValue, newValue, m_nIndex); - broadcast( column_attribute_changed, aEvent); - } - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridColumn::updateColumn(const ::rtl::OUString& name, sal_Int32 width) throw (::com::sun::star::uno::RuntimeException) - { - if(PREFWIDTH == name) - m_nPreferredWidth = width; - else if (COLWIDTH == name) - m_nColumnWidth = width; + ::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( XGridColumnListener::static_type() ); + + i_Guard.clear(); + if( pIter ) + pIter->notifyEach( &XGridColumnListener::columnChanged, aEvent ); } //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::uno::Any SAL_CALL GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); return m_aIdentifier; } @@ -120,94 +98,127 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException) { - broadcast_changed(UPDATE, Any(m_nColumnWidth), Any()); + ::osl::MutexGuard aGuard( m_aMutex ); return m_nColumnWidth; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setColumnWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) { + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( m_nColumnWidth == value ) + return; + m_nColumnWidth = value; - broadcast_changed(COLWIDTH, Any(m_nColumnWidth),Any(value)); + broadcast_changed( COLWIDTH, Any( m_nColumnWidth ), Any( value ), aGuard ); } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getPreferredWidth() throw (::com::sun::star::uno::RuntimeException) { - broadcast_changed(UPDATE, Any(m_nPreferredWidth), Any()); + ::osl::MutexGuard aGuard( m_aMutex ); return m_nPreferredWidth; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setPreferredWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) { + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( m_nPreferredWidth == value ) + return; + m_nPreferredWidth = value; - broadcast_changed(PREFWIDTH, Any(m_nPreferredWidth),Any(value)); + broadcast_changed( PREFWIDTH, Any( m_nPreferredWidth ), Any( value ), aGuard ); } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getMaxWidth() throw (::com::sun::star::uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); return m_nMaxWidth; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setMaxWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) { + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( m_nMaxWidth == value ) + return; + m_nMaxWidth = value; - broadcast_changed(MAXWIDTH, Any(m_nMaxWidth),Any(value)); + broadcast_changed( MAXWIDTH, Any( m_nMaxWidth ), Any( value ), aGuard ); } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getMinWidth() throw (::com::sun::star::uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); return m_nMinWidth; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setMinWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) { + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( m_nMinWidth == value ) + return; + m_nMinWidth = value; - broadcast_changed(MINWIDTH, Any(m_nMinWidth),Any(value)); + broadcast_changed( MINWIDTH, Any( m_nMinWidth ), Any( value ), aGuard ); } //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); return m_sTitle; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException) { + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( m_sTitle == value ) + return; + m_sTitle = value; - broadcast_changed(TITLE, Any(m_sTitle),Any(value)); + broadcast_changed( TITLE, Any( m_sTitle ), Any( value ), aGuard ); } //------------------------------------------------------------------------------------------------------------------ sal_Bool SAL_CALL GridColumn::getResizeable() throw (::com::sun::star::uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); return m_bResizeable; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setResizeable(sal_Bool value) throw (::com::sun::star::uno::RuntimeException) { + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( m_bResizeable == value ) + return; + m_bResizeable = value; - broadcast_changed(COLRESIZE, Any(m_bResizeable),Any(value)); + broadcast_changed( COLRESIZE, Any( m_bResizeable ), Any( value ), aGuard ); } //------------------------------------------------------------------------------------------------------------------ HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); return m_eHorizontalAlign; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setHorizontalAlign(HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException) { + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( m_eHorizontalAlign == align ) + return; + m_eHorizontalAlign = align; - broadcast_changed(HALIGN, Any(m_eHorizontalAlign),Any(align)); + broadcast_changed( HALIGN, Any( m_eHorizontalAlign ), Any( align ), aGuard ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index 4a47f44ce674..51f9ccf8e4b2 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -43,8 +43,6 @@ namespace toolkit { -enum broadcast_column_type { column_attribute_changed}; - typedef ::cppu::WeakComponentImplHelper2 < ::com::sun::star::awt::grid::XGridColumn , ::com::sun::star::lang::XServiceInfo > GridColumn_Base; @@ -74,7 +72,6 @@ public: virtual void SAL_CALL setHorizontalAlign(::com::sun::star::style::HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateColumn( const ::rtl::OUString& name, ::sal_Int32 width ) throw (::com::sun::star::uno::RuntimeException); // XComponent (base of XGridColumn) virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); @@ -88,8 +85,12 @@ public: virtual void SAL_CALL setIndex(sal_Int32 _nIndex)throw (::com::sun::star::uno::RuntimeException); private: - void broadcast( broadcast_column_type eType, const ::com::sun::star::awt::grid::GridColumnEvent& aEvent ); - void broadcast_changed( ::rtl::OUString name, ::com::sun::star::uno::Any oldValue, ::com::sun::star::uno::Any newValue); + void broadcast_changed( + ::rtl::OUString name, + ::com::sun::star::uno::Any oldValue, + ::com::sun::star::uno::Any newValue, + ::osl::ClearableMutexGuard& i_Guard + ); ::com::sun::star::uno::Any m_aIdentifier; sal_Int32 m_nIndex; -- cgit From 70fe9267fa93d11d7e63d9ed95e9b39ac693784f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:07:29 +0100 Subject: gridsort: removed XGridColumn::updateColumn The implementation of this column was only a wrapper around what setColumnWidth/setPreferredWidth would have done. Also, the mechanism how this method was used was really weird, effectively propagating the (preferred) width from the ITableColumn implementation of the grid peer to the XGridColumn implementation of the grid column model. This was done each time the (preferred) width was access for reading - not really a clever solution. Now, the ITableColumn knows its respective XGridColumn, and simply forwards the (preferred) width as needed. --- offapi/com/sun/star/awt/grid/XGridColumn.idl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index 59cfaa727167..a3d2715b5601 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -88,13 +88,6 @@ interface XGridColumn : com::sun::star::lang::XComponent */ [oneway] void removeColumnListener( [in] XGridColumnListener listener); - /**Updates changed column widths, when column widths are being resized. - @param name - can be PrefWidth or ColWidth, depending on which was changed - @param width - the new column width - */ - void updateColumn( [in] string name, [in] long width); /**Sets column index @param index index, which is the index of the column in the column array of the column model -- cgit From e8dce783c66d41bbd29d01079bdfac7b5fbf0f1d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:16:47 +0100 Subject: gridsort: let XGridColumnModel::getColumn throw an IndexOutOfBoundsException when appropriate --- toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 11 +++++------ toolkit/source/controls/grid/defaultgridcolumnmodel.hxx | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 2a5b5683efad..16e0c8a0a0bc 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -58,6 +58,7 @@ namespace toolkit using ::com::sun::star::container::XContainerListener; using ::com::sun::star::container::ContainerEvent; using ::com::sun::star::uno::Exception; + using ::com::sun::star::lang::IndexOutOfBoundsException; /** === end UNO using === **/ //================================================================================================================== @@ -104,16 +105,14 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (RuntimeException) + Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + if ( index >=0 && index < ((sal_Int32)m_aColumns.size())) - { return m_aColumns[index]; - } - else - // TODO: exception - return Reference< XGridColumn >(); + + throw IndexOutOfBoundsException(); } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index 964d604c8ab1..4b4382048566 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -61,7 +61,7 @@ public: virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL getColumns() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setColumnHeaderHeight( sal_Int32 _value) throw (com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getColumnHeaderHeight() throw (com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException); -- cgit From 2c98acf5d0d2d1af2c95c3880972c561571eadf8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:16:47 +0100 Subject: gridsort: let XGridColumnModel::getColumn throw an IndexOutOfBoundsException when appropriate --- offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index a9023db0a5fe..39896714789c 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -32,6 +32,7 @@ #include #include +#include //============================================================================= @@ -96,7 +97,8 @@ interface XGridColumnModel @returns the requested column. */ - XGridColumn getColumn( [in] long index); + XGridColumn getColumn( [in] long index) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** Fills the model with the given number of default columns -- cgit From 40b70c5f947f72a5776f114372cb5cc3a6ca7973 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:25:50 +0100 Subject: gridsort: renamed XGridColumn::add/removeColumnListener to add/removeGridColumnListener - this consistency with the actual listener type name will make introspection work --- svtools/source/uno/svtxgridcontrol.cxx | 5 ++--- toolkit/source/controls/grid/gridcolumn.cxx | 4 ++-- toolkit/source/controls/grid/gridcolumn.hxx | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 512eb347f577..594289b6a8b8 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -406,7 +406,6 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD { UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); - m_xColumnModel->getColumn(col)->addColumnListener(listener); } } @@ -967,7 +966,7 @@ void SVTXGridControl::impl_setColumnListening( const Reference< XGridColumn >& i ENSURE_OR_RETURN_VOID( i_column.is(), "SVTXGridControl::impl_setColumnListening: illegal column!" ); if ( i_start ) - i_column->addColumnListener( this ); + i_column->addGridColumnListener( this ); else - i_column->removeColumnListener( this ); + i_column->removeGridColumnListener( this ); } diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 0503c69b0493..d966e6656661 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -222,13 +222,13 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridColumn::addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) + void SAL_CALL GridColumn::addGridColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) { rBHelper.addListener( XGridColumnListener::static_type(), xListener ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridColumn::removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) + void SAL_CALL GridColumn::removeGridColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException) { rBHelper.removeListener( XGridColumnListener::static_type(), xListener ); } diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index 51f9ccf8e4b2..f621f68c9d88 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -70,8 +70,8 @@ public: virtual void SAL_CALL setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::style::HorizontalAlignment SAL_CALL getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setHorizontalAlign(::com::sun::star::style::HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addGridColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeGridColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); // XComponent (base of XGridColumn) virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); -- cgit From c3941b3759db290caae117ac104cb88abff6a966 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:25:50 +0100 Subject: gridsort: renamed XGridColumn::add/removeColumnListener to add/removeGridColumnListener - this consistency with the actual listener type name will make introspection work --- offapi/com/sun/star/awt/grid/XGridColumn.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index a3d2715b5601..07a082ada023 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -78,7 +78,7 @@ interface XGridColumn : com::sun::star::lang::XComponent @param Listener the listener to add. */ - [oneway] void addColumnListener( [in] XGridColumnListener listener); + [oneway] void addGridColumnListener( [in] XGridColumnListener listener); //------------------------------------------------------------------------- @@ -86,7 +86,7 @@ interface XGridColumn : com::sun::star::lang::XComponent @param Listener the listener to remove. */ - [oneway] void removeColumnListener( [in] XGridColumnListener listener); + [oneway] void removeGridColumnListener( [in] XGridColumnListener listener); /**Sets column index @param index -- cgit From 7fe193a7f64b61b8b1fb565c469e5c3decdbc8ef Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:32:31 +0100 Subject: gridsort: renamed XGridDataModel::add/removeDataListener to add/removeGridDataListener - this consistency with the actual listener type name will make introspection work --- toolkit/source/controls/grid/defaultgriddatamodel.cxx | 4 ++-- toolkit/source/controls/grid/defaultgriddatamodel.hxx | 4 ++-- toolkit/source/controls/grid/gridcontrol.cxx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 7ffafdf0ddb6..bf6eb5ed501c 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -225,14 +225,14 @@ void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::s //--------------------------------------------------------------------- -void SAL_CALL DefaultGridDataModel::addDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) +void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) { BrdcstHelper.addListener( XGridDataListener::static_type(), xListener ); } //--------------------------------------------------------------------- -void SAL_CALL DefaultGridDataModel::removeDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) +void SAL_CALL DefaultGridDataModel::removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) { BrdcstHelper.removeListener( XGridDataListener::static_type(), xListener ); } diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index ea11a8a9a00a..b30bd758147c 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -68,8 +68,8 @@ public: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< Any > > SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & data) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); - virtual void SAL_CALL removeDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); + virtual void SAL_CALL removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); virtual void SAL_CALL removeAll() throw (RuntimeException); virtual void SAL_CALL setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getRowHeaderWidth() throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index cc16d1f2c355..8a109b667176 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -234,9 +234,9 @@ namespace UNO_QUERY_THROW ); if ( i_add ) - xDataModel->addDataListener( i_listener.get() ); + xDataModel->addGridDataListener( i_listener.get() ); else - xDataModel->removeDataListener( i_listener.get() ); + xDataModel->removeGridDataListener( i_listener.get() ); } catch( const Exception& ) { -- cgit From a8a6c71eca379a51c4336fcedac37ec18840cd59 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:32:31 +0100 Subject: gridsort: renamed XGridDataModel::add/removeDataListener to add/removeGridDataListener - this consistency with the actual listener type name will make introspection work --- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index 5cc4085807e1..fb7533467581 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -115,15 +115,15 @@ interface XGridDataModel: ::com::sun::star::lang::XComponent @param Listener the listener to add. */ - [oneway] void addDataListener( [in] XGridDataListener listener); + [oneway] void addGridDataListener( [in] XGridDataListener listener); //------------------------------------------------------------------------- - /** Removes a listener previously added with addDataListener(). + /** Removes a listener previously added with addGridDataListener(). @param Listener the listener to remove. */ - [oneway] void removeDataListener( [in] XGridDataListener listener); + [oneway] void removeGridDataListener( [in] XGridDataListener listener); }; -- cgit From d1b2c8cc1df5eadb8d8cc150bf515817fdabff30 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:41:50 +0100 Subject: gridsort: properly react on elementInserted notifications --- svtools/source/uno/svtxgridcontrol.cxx | 8 +++++--- svtools/source/uno/unocontroltablemodel.cxx | 12 +++++++++--- svtools/source/uno/unocontroltablemodel.hxx | 1 + 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 594289b6a8b8..2dee47478120 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -589,10 +589,12 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::G //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) { - const Reference< XGridColumn > xGridColumn( i_event.Element, UNO_QUERY ); + const Reference< XGridColumn > xGridColumn( i_event.Element, UNO_QUERY_THROW ); + sal_Int32 nIndex( m_pTableModel->getColumnCount() ); + OSL_VERIFY( i_event.Accessor >>= nIndex ); + const PColumnModel tableColumn( new UnoControlTableColumn( xGridColumn ) ); - // will throw if this is not a valid grid column - m_pTableModel->appendColumn( tableColumn ); + m_pTableModel->insertColumn( nIndex, tableColumn ); impl_setColumnListening( Reference< XGridColumn >( i_event.Element, UNO_QUERY ), true ); } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index ff246be0c3ae..8ee40f925591 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -326,10 +326,16 @@ using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- void UnoControlTableModel::appendColumn( const PColumnModel& i_column ) { + insertColumn( m_pImpl->aColumns.size(), i_column ); + } + + //-------------------------------------------------------------------- + void UnoControlTableModel::insertColumn( ColPos const i_position, const PColumnModel& i_column ) + { + ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( i_position <= m_pImpl->aColumns.size() ), "illegal position!" ); ENSURE_OR_RETURN_VOID( !!i_column, "illegal column" ); - const ColPos nInsertPosition = m_pImpl->aColumns.size(); - m_pImpl->aColumns.push_back( i_column ); + m_pImpl->aColumns.insert( m_pImpl->aColumns.begin(), i_column ); // notify listeners ModellListeners aListeners( m_pImpl->m_aListeners ); @@ -338,7 +344,7 @@ using namespace ::com::sun::star::awt::grid; ++loop ) { - (*loop)->columnsInserted( nInsertPosition, nInsertPosition ); + (*loop)->columnsInserted( i_position, i_position ); } } diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index fc6e90f16f6a..f81c0bf88433 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -166,6 +166,7 @@ class UnoControlTableModel : public ITableModel void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor); void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); void appendColumn( const PColumnModel& i_column ); + void insertColumn( ColPos const i_position, const PColumnModel& i_column ); void removeAllColumns(); }; -- cgit From 0f5aec2c8ebe08415daa95867a5abfd376148c04 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 14:46:40 +0100 Subject: gridsort: UnoTreeControl should use the base classes ctor taking a factory --- toolkit/source/controls/tree/treecontrol.cxx | 9 +++++---- toolkit/source/controls/tree/treecontrol.hxx | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index 5dd1e60a7c29..1dae4a3456d7 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -141,8 +141,9 @@ Reference< XPropertySetInfo > UnoTreeModel::getPropertySetInfo( ) throw(Runtime // ---------------------------------------------------- // class UnoTreeControl // ---------------------------------------------------- -UnoTreeControl::UnoTreeControl() -: maSelectionListeners( *this ) +UnoTreeControl::UnoTreeControl( const Reference< XMultiServiceFactory >& i_factory ) +: UnoTreeControl_Base( i_factory ) +, maSelectionListeners( *this ) , maTreeExpansionListeners( *this ) , maTreeEditListeners( *this ) { @@ -453,9 +454,9 @@ void UnoTreeControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolk } -Reference< XInterface > SAL_CALL TreeControl_CreateInstance( const Reference< XMultiServiceFactory >& ) +Reference< XInterface > SAL_CALL TreeControl_CreateInstance( const Reference< XMultiServiceFactory >& i_factory ) { - return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeControl ); + return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeControl( i_factory ) ); } Reference< XInterface > SAL_CALL TreeControlModel_CreateInstance( const Reference< XMultiServiceFactory >& i_factory ) diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx index 2b36bd4e53e9..ff5ddb4e348c 100644 --- a/toolkit/source/controls/tree/treecontrol.hxx +++ b/toolkit/source/controls/tree/treecontrol.hxx @@ -73,10 +73,11 @@ public: // =================================================================== // = UnoTreeControl // =================================================================== -class UnoTreeControl : public ::cppu::ImplInheritanceHelper1< UnoControlBase, ::com::sun::star::awt::tree::XTreeControl > +typedef ::cppu::ImplInheritanceHelper1< UnoControlBase, ::com::sun::star::awt::tree::XTreeControl > UnoTreeControl_Base; +class UnoTreeControl : public UnoTreeControl_Base { public: - UnoTreeControl(); + UnoTreeControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); // ::com::sun::star::lang::XComponent -- cgit From 7eaf01c7332179229dab928fec6aff5369c6b9d7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 15:29:15 +0100 Subject: gridsort: no need for the param-less UnoControlTableColumn anymore - the recently introduced notifications will always create an instance with the correct XGridColumn delegator --- svtools/source/uno/svtxgridcontrol.cxx | 13 +-- svtools/source/uno/unocontroltablemodel.cxx | 121 +++++++++++++++------------- svtools/source/uno/unocontroltablemodel.hxx | 11 +-- 3 files changed, 68 insertions(+), 77 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 2dee47478120..1a6ce6ff88e5 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -278,12 +278,8 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An //check whether the data row vector length matches with the column count if(m_xColumnModel->getColumnCount() == 0) { - for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col ) - { - UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); - m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); - } m_xColumnModel->setDefaultColumns(rawRowData.getLength()); + // this will trigger notifications, which in turn will let us update our m_pTableModel } else if((unsigned int)rawRowData.getLength()!=(unsigned)m_pTableModel->getColumnCount()) @@ -400,13 +396,8 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD int colCount = m_xColumnModel->getColumnCount(); if(colCount == 0) { - Reference listener(*this,UNO_QUERY_THROW); m_xColumnModel->setDefaultColumns(rawRowData.getLength()); - for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col ) - { - UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); - m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); - } + // this will trigger notifications, which in turn will let us update our m_pTableModel } else if((unsigned int)rawRowData.getLength()!=(unsigned)colCount) diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 8ee40f925591..4ed310aa8b28 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -46,38 +46,42 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- - UnoControlTableColumn::UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ) - :m_nID( 0 ) - ,m_sName() - ,m_bIsResizable( true ) - ,m_nWidth( 4 ) - ,m_nMinWidth( 0 ) - ,m_nMaxWidth( 0 ) - ,m_nPrefWidth ( 0 ) - ,m_eHorizontalAlign( com::sun::star::style::HorizontalAlignment_LEFT ) - ,m_xGridColumn( i_gridColumn ) + namespace { - m_sName = m_xGridColumn->getTitle(); - - m_eHorizontalAlign = m_xGridColumn->getHorizontalAlign(); - m_nWidth = m_xGridColumn->getColumnWidth(); - m_bIsResizable = m_xGridColumn->getResizeable(); + template< class ATTRIBUTE_TYPE > + void lcl_set( Reference< XGridColumn > const & i_column, void ( SAL_CALL XGridColumn::*i_setter )( ATTRIBUTE_TYPE ), + ATTRIBUTE_TYPE i_value ) + { + try + { + (i_column.get()->*i_setter) ( i_value ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } - m_nPrefWidth = m_xGridColumn->getPreferredWidth(); - m_nMaxWidth = m_xGridColumn->getMaxWidth(); - m_nMinWidth = m_xGridColumn->getMinWidth(); + template< class ATTRIBUTE_TYPE > + ATTRIBUTE_TYPE lcl_get( Reference< XGridColumn > const & i_column, ATTRIBUTE_TYPE ( SAL_CALL XGridColumn::*i_getter )() ) + { + ATTRIBUTE_TYPE value = ATTRIBUTE_TYPE(); + try + { + value = (i_column.get()->*i_getter)(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return value; + } } //-------------------------------------------------------------------- - UnoControlTableColumn::UnoControlTableColumn() + UnoControlTableColumn::UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ) :m_nID( 0 ) - ,m_sName() - ,m_bIsResizable( true ) - ,m_nWidth( 4 ) - ,m_nMinWidth( 0 ) - ,m_nMaxWidth( 0 ) - ,m_nPrefWidth ( 0 ) - ,m_eHorizontalAlign(com::sun::star::style::HorizontalAlignment(0)) + ,m_xGridColumn( i_gridColumn, UNO_SET_THROW ) { } @@ -97,100 +101,101 @@ using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- String UnoControlTableColumn::getName() const { - return m_sName; + ::rtl::OUString sName; + try + { + sName = m_xGridColumn->getTitle(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return sName; } //-------------------------------------------------------------------- void UnoControlTableColumn::setName( const String& _rName ) { - m_sName = _rName; + try + { + m_xGridColumn->setTitle( _rName ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } + //-------------------------------------------------------------------- bool UnoControlTableColumn::isResizable() const { - return m_bIsResizable; + return lcl_get( m_xGridColumn, &XGridColumn::getResizeable ); } //-------------------------------------------------------------------- void UnoControlTableColumn::setResizable( bool _bResizable ) { - m_bIsResizable = _bResizable; + return lcl_set( m_xGridColumn, &XGridColumn::setResizeable, sal_Bool( _bResizable ) ); } //-------------------------------------------------------------------- TableMetrics UnoControlTableColumn::getWidth() const { - return m_nWidth; + return lcl_get( m_xGridColumn, &XGridColumn::getColumnWidth ); } //-------------------------------------------------------------------- void UnoControlTableColumn::setWidth( TableMetrics _nWidth ) { - m_nWidth = _nWidth; - try - { - if ( m_xGridColumn.is() ) - m_xGridColumn->setColumnWidth( getWidth() ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } + lcl_set( m_xGridColumn, &XGridColumn::setColumnWidth, _nWidth ); } //-------------------------------------------------------------------- TableMetrics UnoControlTableColumn::getMinWidth() const { - return m_nMinWidth; + return lcl_get( m_xGridColumn, &XGridColumn::getMinWidth ); } //-------------------------------------------------------------------- void UnoControlTableColumn::setMinWidth( TableMetrics _nMinWidth ) { - m_nMinWidth = _nMinWidth; + lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMinWidth ); } //-------------------------------------------------------------------- TableMetrics UnoControlTableColumn::getMaxWidth() const { - return m_nMaxWidth; + return lcl_get( m_xGridColumn, &XGridColumn::getMaxWidth ); } //-------------------------------------------------------------------- void UnoControlTableColumn::setMaxWidth( TableMetrics _nMaxWidth ) { - m_nMaxWidth = _nMaxWidth; + lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMaxWidth ); } + //-------------------------------------------------------------------- TableMetrics UnoControlTableColumn::getPreferredWidth() const { - return m_nPrefWidth; + return lcl_get( m_xGridColumn, &XGridColumn::getPreferredWidth ); } //-------------------------------------------------------------------- void UnoControlTableColumn::setPreferredWidth( TableMetrics _nPrefWidth ) { - m_nPrefWidth = _nPrefWidth; - try - { - if ( m_xGridColumn.is() ) - m_xGridColumn->setPreferredWidth( getPreferredWidth() ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } + lcl_set( m_xGridColumn, &XGridColumn::setPreferredWidth, _nPrefWidth ); } + //-------------------------------------------------------------------- ::com::sun::star::style::HorizontalAlignment UnoControlTableColumn::getHorizontalAlign() { - return m_eHorizontalAlign; + return lcl_get( m_xGridColumn, &XGridColumn::getHorizontalAlign ); } //-------------------------------------------------------------------- void UnoControlTableColumn::setHorizontalAlign( com::sun::star::style::HorizontalAlignment _align ) { - m_eHorizontalAlign = _align; + lcl_set( m_xGridColumn, &XGridColumn::setHorizontalAlign, _align ); } //==================================================================== diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index f81c0bf88433..2a627358554f 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -52,20 +52,12 @@ class UnoControlTableColumn : public IColumnModel { private: ColumnID m_nID; - String m_sName; - bool m_bIsResizable; - TableMetrics m_nWidth; - TableMetrics m_nMinWidth; - TableMetrics m_nMaxWidth; - TableMetrics m_nPrefWidth; - ::com::sun::star::style::HorizontalAlignment m_eHorizontalAlign; const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > m_xGridColumn; public: UnoControlTableColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn >& i_gridColumn ); - UnoControlTableColumn(); // IColumnModel overridables virtual ColumnID getID() const; @@ -84,6 +76,9 @@ class UnoControlTableColumn : public IColumnModel virtual void setPreferredWidth( TableMetrics _nPrefWidth ); virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign(); virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign); + + private: + UnoControlTableColumn(); // not implemented }; struct UnoControlTableModel_Impl; -- cgit From 6f7105ef88fcb3e8979617cbbac3a8503e4766ea Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 23 Dec 2010 15:48:53 +0100 Subject: gridsort: re-factoring the column-resizing thingie, step 1 In the current implementation, this is rather complex, and hardly maintainable. Also, it all happens in TableControl_Impl and TableDataWindow, while in the original design, the InputHandler was intended to care for this kind of tasks (one class - one responsibility). --- svtools/inc/svtools/table/abstracttablecontrol.hxx | 23 +- svtools/inc/svtools/table/tablecontrol.hxx | 3 +- svtools/inc/svtools/table/tablemodel.hxx | 2 +- svtools/source/table/defaultinputhandler.cxx | 70 +- svtools/source/table/tablecontrol.cxx | 28 +- svtools/source/table/tablecontrol_impl.cxx | 795 ++++++++++++--------- svtools/source/table/tablecontrol_impl.hxx | 120 +++- svtools/source/table/tabledatawindow.cxx | 15 +- svtools/source/table/tablegeometry.cxx | 85 ++- svtools/source/table/tablegeometry.hxx | 6 + svtools/source/uno/svtxgridcontrol.cxx | 3 +- svtools/source/uno/unocontroltablemodel.cxx | 6 +- toolkit/source/controls/grid/gridcontrol.cxx | 2 +- 13 files changed, 691 insertions(+), 467 deletions(-) diff --git a/svtools/inc/svtools/table/abstracttablecontrol.hxx b/svtools/inc/svtools/table/abstracttablecontrol.hxx index 9206f20ecbcb..ac91006e42f5 100644 --- a/svtools/inc/svtools/table/abstracttablecontrol.hxx +++ b/svtools/inc/svtools/table/abstracttablecontrol.hxx @@ -73,7 +73,6 @@ namespace svt { namespace table /// selects the row, from the actual cursor till bottom cursorSelectRowAreaBottom, - /// invalid and final enumeration value, not to be actually used invalidTableControlAction }; @@ -113,16 +112,18 @@ namespace svt { namespace table @see TableControlAction */ virtual bool dispatchAction( TableControlAction _eAction ) = 0; - /** returns selection engine*/ - virtual SelectionEngine* getSelEngine() = 0; - virtual void setCursorAtCurrentCell(const Point& rPoint) = 0; - virtual bool isTooltipActive() = 0; - virtual rtl::OUString& setTooltip(const Point& rPoint ) = 0; - virtual RowPos getCurrentRow(const Point& rPoint ) = 0; - virtual void resizeColumn(const Point& rPoint ) = 0; - virtual bool startResizeColumn(const Point& rPoint) = 0; - virtual bool endResizeColumn(const Point& rPoint) = 0; - virtual bool isRowSelected(RowPos _nRow) = 0; + + /** returns selection engine*/ + virtual SelectionEngine* getSelEngine() = 0; + virtual void activateCellAt( const Point& rPoint ) = 0; + virtual bool isTooltipActive() = 0; + virtual rtl::OUString& setTooltip(const Point& rPoint ) = 0; + virtual RowPos getRowAtPoint( const Point& rPoint ) = 0; + virtual ColPos getColAtPoint( const Point& rPoint ) = 0; + virtual void resizeColumn(const Point& rPoint ) = 0; + virtual bool checkResizeColumn(const Point& rPoint) = 0; + virtual bool endResizeColumn(const Point& rPoint) = 0; + virtual bool isRowSelected(RowPos _nRow) = 0; virtual ~IAbstractTableControl() {}; }; diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 07384540261b..b75ebe0dcc88 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -111,8 +111,7 @@ namespace svt { namespace table sal_Int32 GetCurrentRow() const; /** returns the row, which contains the input point*/ - - ColPos GetCurrentRow (const Point& rPoint); + ColPos GetRowAtPoint( const Point& rPoint ); /** retrieves the current column diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index a9d6c7325e65..99cd0e2792d6 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -232,7 +232,7 @@ namespace svt { namespace table If there is more than one column with width COLWIDTH_FIT_TO_VIEW in a model, they're all layouted equal-width. - If the columns with a read width (i.e. other than COLWIDTH_FIT_TO_VIEW) are, + If the columns with a real width (i.e. other than COLWIDTH_FIT_TO_VIEW) are, in sum, wider than the view, then the view is free to choose a real width for any columns which return COLWIDTH_FIT_TO_VIEW here. diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index f6a58ad17efe..9f170c929eba 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -64,9 +64,9 @@ namespace svt { namespace table bool DefaultInputHandler::MouseMove( IAbstractTableControl& _rControl, const MouseEvent& _rMEvt ) { Point aPoint = _rMEvt.GetPosPixel(); - if(m_bResize) + if ( m_bResize ) { - _rControl.resizeColumn(aPoint); + _rControl.resizeColumn( aPoint ); return true; } return false; @@ -77,25 +77,35 @@ namespace svt { namespace table { bool bHandled = false; Point aPoint = _rMEvt.GetPosPixel(); - RowPos nRow = _rControl.getCurrentRow(aPoint); - if(nRow == -1) + RowPos nRow = _rControl.getRowAtPoint( aPoint ); + if ( nRow == ROW_COL_HEADERS ) { - m_bResize = _rControl.startResizeColumn(aPoint); + m_bResize = _rControl.checkResizeColumn(aPoint); bHandled = true; } else if(nRow >= 0) { - if(_rControl.getSelEngine()->GetSelectionMode() == NO_SELECTION) + bool bSetCursor = false; + if ( _rControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) { - _rControl.setCursorAtCurrentCell(aPoint); - bHandled = true; + bSetCursor = true; } else { - if(!_rControl.isRowSelected(nRow)) - bHandled = _rControl.getSelEngine()->SelMouseButtonDown(_rMEvt); + if ( !_rControl.isRowSelected( nRow ) ) + { + bHandled = _rControl.getSelEngine()->SelMouseButtonDown( _rMEvt ); + } else - bHandled = true; + { + bSetCursor = true; + } + } + + if ( bSetCursor ) + { + _rControl.activateCellAt( aPoint ); + bHandled = true; } } return bHandled; @@ -104,29 +114,22 @@ namespace svt { namespace table bool DefaultInputHandler::MouseButtonUp( IAbstractTableControl& _rControl, const MouseEvent& _rMEvt ) { bool bHandled = false; - Point aPoint = _rMEvt.GetPosPixel(); - if(_rControl.getCurrentRow(aPoint) >= 0) + const Point aPoint = _rMEvt.GetPosPixel(); + + if ( m_bResize ) { - if(m_bResize) - { - m_bResize = _rControl.endResizeColumn(aPoint); - bHandled = true; - } - else if(_rControl.getSelEngine()->GetSelectionMode() == NO_SELECTION) + m_bResize = _rControl.endResizeColumn( aPoint ); + bHandled = true; + } + else if ( _rControl.getRowAtPoint( aPoint ) >= 0 ) + { + if ( _rControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) { bHandled = true; } else { - bHandled = _rControl.getSelEngine()->SelMouseButtonUp(_rMEvt); - } - } - else - { - if(m_bResize) - { - m_bResize = _rControl.endResizeColumn(aPoint); - bHandled = true; + bHandled = _rControl.getSelEngine()->SelMouseButtonUp( _rMEvt ); } } return bHandled; @@ -158,11 +161,11 @@ namespace svt { namespace table { KEY_PAGEDOWN, KEY_MOD1, cursorToLastLine }, { KEY_HOME, KEY_MOD1, cursorTopLeft }, { KEY_END, KEY_MOD1, cursorBottomRight }, - { KEY_SPACE, KEY_MOD1, cursorSelectRow }, - { KEY_UP, KEY_SHIFT, cursorSelectRowUp }, - { KEY_DOWN, KEY_SHIFT, cursorSelectRowDown }, - { KEY_END, KEY_SHIFT, cursorSelectRowAreaBottom }, - { KEY_HOME, KEY_SHIFT, cursorSelectRowAreaTop }, + { KEY_SPACE, KEY_MOD1, cursorSelectRow }, + { KEY_UP, KEY_SHIFT, cursorSelectRowUp }, + { KEY_DOWN, KEY_SHIFT, cursorSelectRowDown }, + { KEY_END, KEY_SHIFT, cursorSelectRowAreaBottom }, + { KEY_HOME, KEY_SHIFT, cursorSelectRowAreaTop }, { 0, 0, invalidTableControlAction } }; @@ -173,7 +176,6 @@ namespace svt { namespace table if ( ( pActions->nKeyCode == nKeyCode ) && ( pActions->nKeyModifier == rKeyCode.GetAllModifier() ) ) { bHandled = _rControl.dispatchAction( pActions->eAction ); - bHandled = true; // always handled issue #i114340 break; } } diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index cde198a92a6e..24486d024091 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -100,10 +100,7 @@ namespace svt { namespace table void TableControl::GetFocus() { if ( !m_pImpl->getInputHandler()->GetFocus( *m_pImpl ) ) - { Control::GetFocus(); - Control::GrabFocus(); - } } //-------------------------------------------------------------------- @@ -246,23 +243,26 @@ namespace svt { namespace table { m_pImpl->removeSelectedRow(_nRowPos); } - //-------------------------------------------------------------------- - RowPos TableControl::GetCurrentRow(const Point& rPoint) + //-------------------------------------------------------------------- + RowPos TableControl::GetRowAtPoint( const Point& rPoint ) { - return m_pImpl->getCurrentRow( rPoint ); + return m_pImpl->getRowAtPoint( rPoint ); } + //-------------------------------------------------------------------- SelectionEngine* TableControl::getSelEngine() { return m_pImpl->getSelEngine(); } + //-------------------------------------------------------------------- TableDataWindow* TableControl::getDataWindow() { return m_pImpl->getDataWindow(); } + //-------------------------------------------------------------------- Reference< XAccessible > TableControl::CreateAccessible() { Window* pParent = GetAccessibleParentWindow(); @@ -494,10 +494,10 @@ sal_Int32 TableControl::GetAccessibleControlCount() const } sal_Bool TableControl::ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint ) { - sal_Int32 nRow = m_pImpl->getCurrentRow(_rPoint); - sal_Int32 nCol = GetCurrentColumn(); + sal_Int32 nRow = m_pImpl->getRowAtPoint( _rPoint ); + sal_Int32 nCol = m_pImpl->getColAtPoint( _rPoint ); _rnIndex = nRow * GetColumnCount() + nCol; - return nRow>=0 ? sal_True : sal_False; + return nRow >= 0 ? sal_True : sal_False; } long TableControl::GetRowCount() const @@ -523,9 +523,9 @@ bool TableControl::IsRowSelected( long _nRow ) const } sal_Bool TableControl::ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) { - _rnRow = m_pImpl->getCurrentRow(_rPoint); - _rnColPos = GetCurrentColumn(); - return _rnRow>=0 ? sal_True : sal_False; + _rnRow = m_pImpl->getRowAtPoint( _rPoint ); + _rnColPos = m_pImpl->getColAtPoint( _rPoint ); + return _rnRow >= 0 ? sal_True : sal_False; } void TableControl::FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const { @@ -612,12 +612,12 @@ IMPL_LINK( TableControl, ImplSelectHdl, void*, EMPTYARG ) IMPL_LINK( TableControl, ImplMouseButtonDownHdl, MouseEvent*, pData ) { CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pData ); - return 1; + return 1; } IMPL_LINK( TableControl, ImplMouseButtonUpHdl, MouseEvent*, pData ) { CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, pData ); - return 1; + return 1; } // ----------------------------------------------------------------------- void TableControl::Select() diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 46ebda453b10..09ac0412c615 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -280,12 +280,9 @@ namespace svt { namespace table if ( m_pModel->getRowCount() != m_nRowCount ) return "row counts are inconsistent!"; - if ( ( m_nCurColumn != COL_INVALID ) && !m_aColumnWidthsPixel.empty() && ( m_nCurColumn < 0 ) || ( m_nCurColumn >= (ColPos)m_aColumnWidthsPixel.size() ) ) + if ( ( m_nCurColumn != COL_INVALID ) && !m_aColumnWidths.empty() && ( m_nCurColumn < 0 ) || ( m_nCurColumn >= (ColPos)m_aColumnWidths.size() ) ) return "current column is invalid!"; - if ( m_aColumnWidthsPixel.size() != m_aAccColumnWidthsPixel.size() ) - return "columnd width caches are inconsistent!"; - if ( !lcl_checkLimitsExclusive_OrDefault_OrFallback( m_nTopRow, (RowPos)-1, m_nRowCount, getModel(), (RowPos)0 ) ) return "invalid top row value!"; @@ -326,7 +323,11 @@ namespace svt { namespace table return "row header widths are inconsistent!"; } - // TODO: check m_aColumnWidthsPixel and m_aAccColumnWidthsPixel + // TODO: check m_aColumnWidths + // - for each element, getStart <= getEnd() + // - for each i: col[ i ].getEnd() == col[ i+1 ].getStart() + // - col[ m_nLeftColumn ].getStart == m_nRowHeaderWidthPixel + if ( m_nCursorHidden < 0 ) return "invalid hidden count for the cursor!"; @@ -335,6 +336,8 @@ namespace svt { namespace table DBG_SUSPEND_INV( INV_SCROLL_POSITION ); // prevent infinite recursion + if ( m_nLeftColumn < 0 ) + return "invalid left-most column index"; if ( m_pVScroll->GetThumbPos() != m_nTopRow ) return "vertical scroll bar |position| is incorrect!"; if ( m_pVScroll->GetRange().Max() != m_nRowCount ) @@ -386,7 +389,7 @@ namespace svt { namespace table ,m_nRowSelected ( ) ,m_pTableFunctionSet ( new TableFunctionSet( this ) ) ,m_nAnchor (-1 ) - ,m_bResizing ( false ) + ,m_bResizingColumn ( false ) ,m_nResizingColumn ( 0 ) ,m_bResizingGrid ( false ) #if DBG_UTIL @@ -519,19 +522,20 @@ namespace svt { namespace table // determine the right-most border of the last column which is // at least partially visible _rCellArea.Right() = m_nRowHeaderWidthPixel; - if ( !m_aAccColumnWidthsPixel.empty() ) + if ( !m_aColumnWidths.empty() ) { - // the number of pixels which are scroll out of the left hand + // the number of pixels which are scrolled out of the left hand // side of the window - long nScrolledOutLeft = m_nLeftColumn == 0 ? 0 : m_aAccColumnWidthsPixel[ m_nLeftColumn - 1 ]; + const long nScrolledOutLeft = m_nLeftColumn == 0 ? 0 : m_aColumnWidths[ m_nLeftColumn - 1 ].getEnd(); - ArrayOfLong::const_reverse_iterator loop = m_aAccColumnWidthsPixel.rbegin(); + ColumnPositions::const_reverse_iterator loop = m_aColumnWidths.rbegin(); do { - _rCellArea.Right() = *loop++ - nScrolledOutLeft + m_nRowHeaderWidthPixel; + _rCellArea.Right() = loop->getEnd() - nScrolledOutLeft + m_nRowHeaderWidthPixel; + ++loop; } - while ( ( loop != m_aAccColumnWidthsPixel.rend() ) - && ( *loop - nScrolledOutLeft >= _rCellArea.Right() ) + while ( ( loop != m_aColumnWidths.rend() ) + && ( loop->getEnd() - nScrolledOutLeft >= _rCellArea.Right() ) ); } // so far, _rCellArea.Right() denotes the first pixel *after* the cell area @@ -582,54 +586,54 @@ namespace svt { namespace table //-------------------------------------------------------------------- void TableControl_Impl::impl_ni_updateColumnWidths() { - m_aColumnWidthsPixel.resize( 0 ); - m_aAccColumnWidthsPixel.resize( 0 ); + m_aColumnWidths.resize( 0 ); if ( !m_pModel ) return; - TableSize colCount = m_pModel->getColumnCount(); + const TableSize colCount = m_pModel->getColumnCount(); if ( colCount == 0 ) return; - m_aColumnWidthsPixel.reserve( colCount ); - m_aAccColumnWidthsPixel.reserve( colCount ); + m_aColumnWidths.reserve( colCount ); std::vector aPrePixelWidths(0); long accumulatedPixelWidth = 0; - int lastResizableCol = -1; + int lastResizableCol = COL_INVALID; double gridWidth = m_rAntiImpl.GetOutputSizePixel().Width(); - if(m_pModel->hasRowHeaders()) + if ( m_pModel->hasRowHeaders() && ( gridWidth != 0 ) ) { - TableMetrics rowHeaderWidth = m_pModel->getRowHeaderWidth(); - gridWidth-= m_rAntiImpl.LogicToPixel( Size( rowHeaderWidth, 0 ), MAP_APPFONT ).Width(); +#if OSL_DEBUG_LEVEL > 0 + const TableMetrics rowHeaderWidth = m_pModel->getRowHeaderWidth(); + const long rowHeaderWidthPixel = m_rAntiImpl.LogicToPixel( Size( rowHeaderWidth, 0 ), MAP_APPFONT ).Width(); + OSL_ENSURE( rowHeaderWidthPixel == m_nRowHeaderWidthPixel, + "TableControl_Impl::impl_ni_updateColumnWidths: cached row header width is not correct anymore!" ); +#endif + accumulatedPixelWidth += m_nRowHeaderWidthPixel; + gridWidth -= m_nRowHeaderWidthPixel; } - if(m_pModel->hasVerticalScrollbar()) + + if ( m_pModel->hasVerticalScrollbar() && ( gridWidth != 0 ) ) { sal_Int32 scrollbarWidth = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); gridWidth-=scrollbarWidth; } + double colWidthsSum = 0.0; double colWithoutFixedWidthsSum = 0.0; double minColWithoutFixedSum = 0.0; + for ( ColPos col = 0; col < colCount; ++col ) { - PColumnModel pColumn = m_pModel->getColumnModel( col ); - DBG_ASSERT( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); - if ( !pColumn ) - continue; + const PColumnModel pColumn = m_pModel->getColumnModel( col ); + ENSURE_OR_CONTINUE( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); + TableMetrics colWidth = 0; - TableMetrics colPrefWidth = pColumn->getPreferredWidth(); - bool bResizable = pColumn->isResizable(); - if(pColumn->getMinWidth() == 0 && bResizable) - { - pColumn->setMinWidth(1); - minColWithoutFixedSum+=m_rAntiImpl.PixelToLogic( Size( 1, 0 ), MAP_APPFONT ).Width(); - } - if(pColumn->getMaxWidth() == 0 && bResizable) - pColumn->setMaxWidth(m_rAntiImpl.PixelToLogic( Size( (int)gridWidth, 0 ), MAP_APPFONT ).Width()); - if( colPrefWidth != 0) + const TableMetrics colPrefWidth = pColumn->getPreferredWidth(); + const bool bResizable = pColumn->isResizable(); + + if ( colPrefWidth != 0) { - if(m_bResizingGrid) + if ( m_bResizingGrid ) { colWidth = pColumn->getWidth(); pColumn->setPreferredWidth(0); @@ -637,66 +641,88 @@ namespace svt { namespace table else { colWidth = colPrefWidth; - pColumn->setWidth(colPrefWidth); + pColumn->setWidth( colPrefWidth ); } } else colWidth = pColumn->getWidth(); - long pixelWidth = m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width(); - if(bResizable && colPrefWidth == 0) + + const long pixelWidth = m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width(); + if ( bResizable && colPrefWidth == 0 ) { - colWithoutFixedWidthsSum+=pixelWidth; + colWithoutFixedWidthsSum += pixelWidth; lastResizableCol = col; } - colWidthsSum+=pixelWidth; - aPrePixelWidths.push_back(pixelWidth); + colWidthsSum += pixelWidth; + aPrePixelWidths.push_back( pixelWidth ); } + double gridWidthWithoutFixed = gridWidth - colWidthsSum + colWithoutFixedWidthsSum; double scalingFactor = 1.0; - if(m_bResizingGrid) + if ( m_bResizingGrid ) { - if(gridWidthWithoutFixed > (minColWithoutFixedSum+colWidthsSum - colWithoutFixedWidthsSum)) - scalingFactor = gridWidthWithoutFixed/colWithoutFixedWidthsSum; + if ( gridWidthWithoutFixed > ( minColWithoutFixedSum + colWidthsSum - colWithoutFixedWidthsSum ) ) + scalingFactor = gridWidthWithoutFixed / colWithoutFixedWidthsSum; } else { - if(colWidthsSum < gridWidthWithoutFixed) + if ( colWidthsSum < gridWidthWithoutFixed ) { - if(colWithoutFixedWidthsSum>0) - scalingFactor = gridWidthWithoutFixed/colWithoutFixedWidthsSum; + if ( colWithoutFixedWidthsSum > 0 ) + scalingFactor = gridWidthWithoutFixed / colWithoutFixedWidthsSum; } } for ( ColPos i = 0; i < colCount; ++i ) { - PColumnModel pColumn = m_pModel->getColumnModel( i ); - DBG_ASSERT( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); - if ( !pColumn ) - continue; - if(pColumn->isResizable() && pColumn->getPreferredWidth() == 0) + const PColumnModel pColumn = m_pModel->getColumnModel( i ); + ENSURE_OR_CONTINUE( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); + + if ( pColumn->isResizable() && ( pColumn->getPreferredWidth() == 0 ) ) { - aPrePixelWidths[i]*=scalingFactor; - TableMetrics logicColWidth = m_rAntiImpl.PixelToLogic( Size( aPrePixelWidths[i], 0 ), MAP_APPFONT ).Width(); - pColumn->setWidth(logicColWidth); + aPrePixelWidths[i] *= scalingFactor; + const TableMetrics logicColWidth = m_rAntiImpl.PixelToLogic( Size( aPrePixelWidths[i], 0 ), MAP_APPFONT ).Width(); + pColumn->setWidth( logicColWidth ); } - m_aColumnWidthsPixel.push_back( aPrePixelWidths[i] ); - m_aAccColumnWidthsPixel.push_back( accumulatedPixelWidth += aPrePixelWidths[i] ); + + const long columnStart = accumulatedPixelWidth; + const long columnEnd = columnStart + aPrePixelWidths[i]; + m_aColumnWidths.push_back( ColumnWidthInfo( columnStart, columnEnd ) ); + accumulatedPixelWidth = columnEnd; } - if(gridWidth > m_aAccColumnWidthsPixel[colCount-1]) + + // care for the horizontal scroll position (as indicated by m_nLeftColumn) + if ( m_nLeftColumn > 0 ) { - if(lastResizableCol >= 0) + const long offsetPixel = m_aColumnWidths[ 0 ].getStart() - m_aColumnWidths[ m_nLeftColumn ].getStart(); + for ( ColumnPositions::iterator colPos = m_aColumnWidths.begin(); + colPos != m_aColumnWidths.end(); + ++colPos + ) { - PColumnModel pColumn = m_pModel->getColumnModel(lastResizableCol); - m_aColumnWidthsPixel[lastResizableCol]+=gridWidth-m_aAccColumnWidthsPixel[colCount-1]; - TableMetrics logicColWidth1 = m_rAntiImpl.PixelToLogic( Size( m_aColumnWidthsPixel[lastResizableCol], 0 ), MAP_APPFONT ).Width(); - pColumn->setWidth(logicColWidth1); - while(lastResizableCol < colCount) - { - if(lastResizableCol == 0) - m_aAccColumnWidthsPixel[0] = m_aColumnWidthsPixel[lastResizableCol]; - else - m_aAccColumnWidthsPixel[lastResizableCol]=m_aAccColumnWidthsPixel[lastResizableCol-1]+m_aColumnWidthsPixel[lastResizableCol]; - ++lastResizableCol; - } + colPos->move( offsetPixel ); + } + } + + const long freeSpaceRight = gridWidth - m_aColumnWidths[ colCount-1 ].getEnd(); + if ( ( freeSpaceRight > 0 ) + && ( lastResizableCol != COL_INVALID ) + && ( lastResizableCol >= m_nLeftColumn ) + ) + { + // make the last resizable column wider + ColumnWidthInfo& rResizeColInfo( m_aColumnWidths[ lastResizableCol ] ); + rResizeColInfo.setEnd( rResizeColInfo.getEnd() + freeSpaceRight ); + + // update the column model + const TableMetrics logicColWidth = m_rAntiImpl.PixelToLogic( Size( rResizeColInfo.getWidth(), 0 ), MAP_APPFONT ).Width(); + const PColumnModel pColumn = m_pModel->getColumnModel( lastResizableCol ); + pColumn->setWidth( logicColWidth ); + + // update all other columns after the resized one + ColPos adjustColumn = lastResizableCol; + while ( ++adjustColumn < colCount ) + { + m_aColumnWidths[ adjustColumn ].move( freeSpaceRight ); } } } @@ -707,8 +733,10 @@ namespace svt { namespace table //................................................................ /// determines whether a scrollbar is needed for the given values bool lcl_determineScrollbarNeed( ScrollbarVisibility _eVisibility, - long _nVisibleUnits, long _nRange ) + long _nVisibleUnits, long _nRange, long const i_nPosition ) { + if ( i_nPosition > 0 ) + return true; if ( _eVisibility == ScrollbarShowNever ) return false; if ( _eVisibility == ScrollbarShowAlways ) @@ -735,7 +763,7 @@ namespace svt { namespace table bool _bHorizontal, const Link& _rScrollHandler ) { // do we need the scrollbar? - bool bNeedBar = lcl_determineScrollbarNeed( _eVisibility, _nVisibleUnits, _nRange ); + bool bNeedBar = lcl_determineScrollbarNeed( _eVisibility, _nVisibleUnits, _nRange, _nPosition ); // do we currently have the scrollbar? bool bHaveBar = _rpBar != NULL; @@ -743,6 +771,8 @@ namespace svt { namespace table // do we need to correct the scrollbar visibility? if ( bHaveBar && !bNeedBar ) { + if ( _rpBar->IsTracking() ) + _rpBar->EndTracking(); DELETEZ( _rpBar ); } else if ( !bHaveBar && bNeedBar ) @@ -822,26 +852,30 @@ namespace svt { namespace table m_nRowCount = m_pModel->getRowCount(); m_nColumnCount = m_pModel->getColumnCount(); - if ( m_aAccColumnWidthsPixel.empty() ) + if ( m_aColumnWidths.empty() ) impl_ni_updateColumnWidths(); - OSL_ENSURE( m_aAccColumnWidthsPixel.size() == m_nColumnCount, "TableControl_Impl::impl_ni_updateScrollbars: inconsistency!" ); - const long nAllColumnsWidth = m_aAccColumnWidthsPixel.empty() ? 0 : m_aAccColumnWidthsPixel[ m_nColumnCount - 1 ]; + OSL_ENSURE( m_aColumnWidths.size() == m_nColumnCount, "TableControl_Impl::impl_ni_updateScrollbars: inconsistency!" ); + const long nAllColumnsWidth = m_aColumnWidths.empty() + ? 0 + : m_aColumnWidths[ m_nColumnCount - 1 ].getEnd() - m_aColumnWidths[ 0 ].getStart(); // do we need a vertical scrollbar? bool bFirstRoundVScrollNeed = false; if ( lcl_determineScrollbarNeed( m_pModel->getVerticalScrollbarVisibility(aDataCellPlayground.GetHeight(), m_nRowHeightPixel*m_nRowCount), lcl_getRowsFittingInto( aDataCellPlayground.GetHeight(), m_nRowHeightPixel ), - m_nRowCount ) ) + m_nRowCount, + m_nTopRow ) ) { aDataCellPlayground.Right() -= nScrollbarMetrics; bFirstRoundVScrollNeed = true; } // do we need a horizontal scrollbar? if ( lcl_determineScrollbarNeed( - m_pModel->getHorizontalScrollbarVisibility(aDataCellPlayground.GetWidth(), nAllColumnsWidth), + m_pModel->getHorizontalScrollbarVisibility( aDataCellPlayground.GetWidth(), nAllColumnsWidth ), lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ), - m_nColumnCount ) ) + m_nColumnCount, + m_nLeftColumn ) ) { aDataCellPlayground.Bottom() -= nScrollbarMetrics; @@ -852,7 +886,8 @@ namespace svt { namespace table if ( !bFirstRoundVScrollNeed && lcl_determineScrollbarNeed( m_pModel->getVerticalScrollbarVisibility(aDataCellPlayground.GetHeight(),m_nRowHeightPixel*m_nRowCount), lcl_getRowsFittingInto( aDataCellPlayground.GetHeight(), m_nRowHeightPixel ), - m_nRowCount ) ) + m_nRowCount, + m_nTopRow ) ) { aDataCellPlayground.Right() -= nScrollbarMetrics; } @@ -901,7 +936,7 @@ namespace svt { namespace table int nRange = m_nColumnCount; if( m_nLeftColumn + nVisibleUnits == nRange-1) { - if(m_aAccColumnWidthsPixel[nRange-2] - m_aAccColumnWidthsPixel[m_nLeftColumn] + m_aColumnWidthsPixel[nRange-1]>aDataCellPlayground.GetWidth()) + if ( m_aColumnWidths[ nRange-2 ].getEnd() - m_aColumnWidths[ m_nLeftColumn ].getEnd() + m_aColumnWidths[ nRange-1 ].getWidth() > aDataCellPlayground.GetWidth() ) { m_pHScroll->SetVisibleSize( nVisibleUnits -1 ); m_pHScroll->SetPageSize(nVisibleUnits -1); @@ -946,11 +981,11 @@ namespace svt { namespace table void TableControl_Impl::onResize() { DBG_CHECK_ME(); - if(m_nRowCount != 0) + if ( m_nRowCount != 0 ) { - if(m_nColumnCount != 0) + if ( m_nColumnCount != 0 ) { - if(m_bResizingGrid) + if ( m_bResizingGrid ) impl_ni_updateColumnWidths(); invalidateRows(); m_bResizingGrid = true; @@ -960,13 +995,13 @@ namespace svt { namespace table { //In the case that column headers are defined but data hasn't yet been set, //only column headers will be shown - if(m_pModel->hasColumnHeaders()) + if ( m_pModel->hasColumnHeaders() ) { - if(m_nColHeaderHeightPixel>1) + if ( m_nColHeaderHeightPixel > 1 ) { - m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel()); - if(m_bResizingGrid) - //update column widths to fit in grid + m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel() ); + if ( m_bResizingGrid ) + //update column widths to fit in grid impl_ni_updateColumnWidths(); m_bResizingGrid = true; } @@ -1006,8 +1041,8 @@ namespace svt { namespace table TableRowGeometry aHeaderRow( *this, Rectangle( Point( 0, 0 ), aAllCellsWithHeaders.BottomRight() ), ROW_COL_HEADERS ); Rectangle aColRect(aHeaderRow.getRect()); - //to avoid double lines when scrolling horizontally - if(m_nLeftColumn != 0) + // to avoid double lines when scrolling horizontally + if ( m_nLeftColumn != 0 ) --aColRect.Left(); pRenderer->PaintHeaderArea( *m_pDataWindow, aColRect, true, false, rStyle @@ -1094,19 +1129,21 @@ namespace svt { namespace table } } Rectangle aRect = aRowIterator.getRect().GetIntersection( aAllDataCellsArea ); - //to avoid double lines - if( aRowIterator.getRow() != 0 ) + // to avoid double lines + if ( aRowIterator.getRow() != 0 ) --aRect.Top(); - if(m_nLeftColumn != 0) + if ( m_nLeftColumn != 0 ) --aRect.Left(); else { - if(m_pModel->hasRowHeaders()) + if ( m_pModel->hasRowHeaders( )) --aRect.Left(); } // give the redenderer a chance to prepare the row - pRenderer->PrepareRow( aRowIterator.getRow(), isActiveRow, isSelectedRow, - *m_pDataWindow, aRect, rStyle ); + pRenderer->PrepareRow( + aRowIterator.getRow(), isActiveRow, isSelectedRow, + *m_pDataWindow, aRect, rStyle + ); // paint the row header if ( m_pModel->hasRowHeaders() ) @@ -1580,55 +1617,64 @@ namespace svt { namespace table _rCellRect.Top()--;_rCellRect.Left()--; } //------------------------------------------------------------------------------- - RowPos TableControl_Impl::getCurrentRow(const Point& rPoint) + RowPos TableControl_Impl::getRowAtPoint( const Point& rPoint ) { DBG_CHECK_ME(); - Rectangle rCellRect; - RowPos newRowPos = -2;//-1 is HeaderRow - ColPos newColPos = 0; - for(int i=-1;i= 0 ) && ( rPoint.Y() < m_nColHeaderHeightPixel ) ) + return ROW_COL_HEADERS; + + Rectangle aAllCellsArea; + impl_getAllVisibleCellsArea( aAllCellsArea ); + + TableRowGeometry aHitTest( *this, aAllCellsArea, ROW_COL_HEADERS ); + while ( aHitTest.isValid() ) { - for(int j=-1;j= rCellRect.Left() && rPoint.X() <= rCellRect.Right()) && rPoint.Y() >= rCellRect.Top() && rPoint.Y() <= rCellRect.Bottom()) - { - newRowPos = i; - newColPos = j; - if(newColPos != -1) - m_nCurColumn = newColPos; - return newRowPos; - } - } + if ( aHitTest.getRect().IsInside( rPoint ) ) + return aHitTest.getRow(); + aHitTest.moveDown(); } - return newRowPos; + return ROW_INVALID; } + //------------------------------------------------------------------------------- - void TableControl_Impl::setCursorAtCurrentCell(const Point& rPoint) + ColPos TableControl_Impl::getColAtPoint( const Point& rPoint ) { DBG_CHECK_ME(); - hideCursor(); - Rectangle rCellRect; - RowPos newRowPos = -2;//-1 is HeaderRow - ColPos newColPos = 0; - for(int i=0;i= 0 ) && ( rPoint.X() < m_nRowHeaderWidthPixel ) ) + return COL_ROW_HEADERS; + + Rectangle aAllCellsArea; + impl_getAllVisibleCellsArea( aAllCellsArea ); + + TableColumnGeometry aHitTest( *this, aAllCellsArea, COL_ROW_HEADERS ); + while ( aHitTest.isValid() ) { - for(int j=-1;j= rCellRect.Left() && rPoint.X() <= rCellRect.Right()) && rPoint.Y() >= rCellRect.Top() && rPoint.Y() <= rCellRect.Bottom()) - { - newRowPos = i; - m_nCurRow = newRowPos; - newColPos = j; - if(newColPos == -1) - m_nCurColumn = 0; - else - m_nCurColumn = newColPos; - } - } + if ( aHitTest.getRect().IsInside( rPoint ) ) + return aHitTest.getCol(); + aHitTest.moveRight(); + } + + return COL_INVALID; + } + + //------------------------------------------------------------------------------- + void TableControl_Impl::activateCellAt(const Point& rPoint) + { + DBG_CHECK_ME(); + + TempHideCursor aHideCursor( *this ); + + const RowPos newRowPos = getRowAtPoint( rPoint ); + const ColPos newColPos = getColAtPoint( rPoint ); + + if ( ( newRowPos != ROW_INVALID ) && ( newColPos != COL_INVALID ) ) + { + m_nCurColumn = newColPos; + m_nCurRow = newRowPos; + ensureVisible( m_nCurColumn, m_nCurRow, true ); } - showCursor(); } //------------------------------------------------------------------------------- void TableControl_Impl::invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect) @@ -1639,29 +1685,31 @@ namespace svt { namespace table impl_getAllVisibleCellsArea( aAllCells ); _rCellRect.Left() = aAllCells.Left(); _rCellRect.Right() = aAllCells.Right(); - Rectangle rCells; //if only one row is selected if(_nPrevRow == _nCurRow) { - impl_getCellRect(m_nCurColumn,_nCurRow,rCells); - _rCellRect.Top()=--rCells.Top(); - _rCellRect.Bottom()=rCells.Bottom(); + Rectangle aCellRect; + impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); + _rCellRect.Top() = --aCellRect.Top(); + _rCellRect.Bottom() = aCellRect.Bottom(); } //if the region is above the current row else if(_nPrevRow < _nCurRow ) { - impl_getCellRect(m_nCurColumn,_nPrevRow,rCells); - _rCellRect.Top()= --rCells.Top(); - impl_getCellRect(m_nCurColumn,_nCurRow,rCells); - _rCellRect.Bottom()=rCells.Bottom(); + Rectangle aCellRect; + impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect ); + _rCellRect.Top() = --aCellRect.Top(); + impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); + _rCellRect.Bottom() = aCellRect.Bottom(); } //if the region is beneath the current row else { - impl_getCellRect(m_nCurColumn,_nCurRow,rCells); - _rCellRect.Top()= --rCells.Top(); - impl_getCellRect(m_nCurColumn,_nPrevRow,rCells); - _rCellRect.Bottom()=rCells.Bottom(); + Rectangle aCellRect; + impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); + _rCellRect.Top() = --aCellRect.Top(); + impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect ); + _rCellRect.Bottom() = aCellRect.Bottom(); } m_pDataWindow->Invalidate(_rCellRect); } @@ -1722,14 +1770,28 @@ namespace svt { namespace table impl_ni_updateScrollbars(); TableSize nVisibleRows = impl_getVisibleRows(true); TableSize nVisibleCols = impl_getVisibleColumns(true); - if(m_nTopRow+nVisibleRows>m_nRowCount && m_nRowCount>=nVisibleRows) - m_nTopRow--; + if ( ( m_nTopRow + nVisibleRows > m_nRowCount ) + && ( m_nRowCount >= nVisibleRows ) + ) + { + --m_nTopRow; + } else + { m_nTopRow = 0; - if(m_nLeftColumn+nVisibleCols>m_nColumnCount && m_nColumnCount>=nVisibleCols) - m_nLeftColumn--; + } + + if ( ( m_nLeftColumn + nVisibleCols > m_nColumnCount ) + && ( m_nColumnCount >= nVisibleCols ) + ) + { + --m_nLeftColumn; + } else + { m_nLeftColumn = 0; + } + m_pDataWindow->Invalidate(); } @@ -1794,25 +1856,25 @@ namespace svt { namespace table TempHideCursor aHideCursor( *this ); if ( _nColumn < m_nLeftColumn ) - impl_ni_ScrollColumns( _nColumn - m_nLeftColumn ); + impl_scrollColumns( _nColumn - m_nLeftColumn ); else { TableSize nVisibleColumns = impl_getVisibleColumns( _bAcceptPartialVisibility ); if ( _nColumn > m_nLeftColumn + nVisibleColumns - 1 ) { - impl_ni_ScrollColumns( _nColumn - ( m_nLeftColumn + nVisibleColumns - 1 ) ); + impl_scrollColumns( _nColumn - ( m_nLeftColumn + nVisibleColumns - 1 ) ); // TODO: since not all columns have the same width, this might in theory result // in the column still not being visible. } } if ( _nRow < m_nTopRow ) - impl_ni_ScrollRows( _nRow - m_nTopRow ); + impl_scrollRows( _nRow - m_nTopRow ); else { TableSize nVisibleRows = impl_getVisibleRows( _bAcceptPartialVisibility ); if ( _nRow > m_nTopRow + nVisibleRows - 1 ) - impl_ni_ScrollRows( _nRow - ( m_nTopRow + nVisibleRows - 1 ) ); + impl_scrollRows( _nRow - ( m_nTopRow + nVisibleRows - 1 ) ); } } @@ -1830,7 +1892,7 @@ namespace svt { namespace table m_nTopRow = nNewTopRow; // if updates are enabled currently, scroll the viewport - if ( m_rAntiImpl.IsUpdateMode() && ( m_nTopRow != nOldTopRow ) ) + if ( m_nTopRow != nOldTopRow ) { DBG_SUSPEND_INV( INV_SCROLL_POSITION ); TempHideCursor aHideCursor( *this ); @@ -1856,24 +1918,37 @@ namespace svt { namespace table m_pVScroll->SetThumbPos( m_nTopRow ); } + // The scroll bar availaility might change when we scrolled. This is because we do not hide + // the scrollbar when it is, in theory, unnecessary, but currently at a position > 0. In this case, it will + // be auto-hidden when it's scrolled back to pos 0. + if ( m_nTopRow == 0 ) + m_rAntiImpl.PostUserEvent( LINK( this, TableControl_Impl, OnUpdateScrollbars ) ); + return (TableSize)( m_nTopRow - nOldTopRow ); } + //-------------------------------------------------------------------- + TableSize TableControl_Impl::impl_scrollRows( TableSize const i_rowDelta ) + { + DBG_CHECK_ME(); + return impl_ni_ScrollRows( i_rowDelta ); + } + //-------------------------------------------------------------------- TableSize TableControl_Impl::impl_ni_ScrollColumns( TableSize _nColumnDelta ) { // compute new left column - ColPos nNewLeftColumn = + const ColPos nNewLeftColumn = ::std::max( ::std::min( (ColPos)( m_nLeftColumn + _nColumnDelta ), (ColPos)( m_nColumnCount - 1 ) ), (ColPos)0 ); - ColPos nOldLeftColumn = m_nLeftColumn; + const ColPos nOldLeftColumn = m_nLeftColumn; m_nLeftColumn = nNewLeftColumn; // if updates are enabled currently, scroll the viewport - if ( m_rAntiImpl.IsUpdateMode() && ( m_nLeftColumn != nOldLeftColumn ) ) + if ( m_nLeftColumn != nOldLeftColumn ) { DBG_SUSPEND_INV( INV_SCROLL_POSITION ); TempHideCursor aHideCursor( *this ); @@ -1882,17 +1957,29 @@ namespace svt { namespace table // Same for onEndScroll // scroll the view port, if possible - Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() ); + const Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() ); long nPixelDelta = - ( m_nLeftColumn > 0 ? m_aAccColumnWidthsPixel[ m_nLeftColumn - 1 ] : 0 ) - - ( nOldLeftColumn > 0 ? m_aAccColumnWidthsPixel[ nOldLeftColumn - 1 ] : 0 ); + m_aColumnWidths[ nOldLeftColumn ].getStart() + - m_aColumnWidths[ m_nLeftColumn ].getStart(); + + // update our column positions + // Do this *before* scrolling, as SCROLL_UPDATE will trigger a paint, which already needs the correct + // information in m_aColumnWidths + for ( ColumnPositions::iterator colPos = m_aColumnWidths.begin(); + colPos != m_aColumnWidths.end(); + ++colPos + ) + { + colPos->move( nPixelDelta ); + } + // scroll the window content (if supported and possible), or invalidate the complete window if ( m_pDataWindow->GetBackground().IsScrollable() && abs( nPixelDelta ) < aDataArea.GetWidth() ) { - m_pDataWindow->Scroll( (long)-nPixelDelta, 0, aDataArea, SCROLL_CLIP | SCROLL_UPDATE ); + m_pDataWindow->Scroll( nPixelDelta, 0, aDataArea, SCROLL_CLIP | SCROLL_UPDATE ); } else m_pDataWindow->Invalidate( INVALIDATE_UPDATE ); @@ -1901,8 +1988,22 @@ namespace svt { namespace table m_pHScroll->SetThumbPos( m_nLeftColumn ); } + // The scroll bar availaility might change when we scrolled. This is because we do not hide + // the scrollbar when it is, in theory, unnecessary, but currently at a position > 0. In this case, it will + // be auto-hidden when it's scrolled back to pos 0. + if ( m_nLeftColumn == 0 ) + m_rAntiImpl.PostUserEvent( LINK( this, TableControl_Impl, OnUpdateScrollbars ) ); + return (TableSize)( m_nLeftColumn - nOldLeftColumn ); } + + //------------------------------------------------------------------------------- + TableSize TableControl_Impl::impl_scrollColumns( TableSize const i_columnDelta ) + { + DBG_CHECK_ME(); + return impl_ni_ScrollColumns( i_columnDelta ); + } + //------------------------------------------------------------------------------- SelectionEngine* TableControl_Impl::getSelEngine() { @@ -1952,12 +2053,13 @@ namespace svt { namespace table ::rtl::OUString& TableControl_Impl::setTooltip(const Point& rPoint ) { ::rtl::OUString aTooltipText; - RowPos current = getCurrentRow(rPoint); + const RowPos hitRow = getRowAtPoint( rPoint ); + const ColPos hitCol = getColAtPoint( rPoint ); com::sun::star::uno::Sequence< sal_Int32 > cols = m_rAntiImpl.getColumnsForTooltip(); com::sun::star::uno::Sequence< ::rtl::OUString > text = m_rAntiImpl.getTextForTooltip(); if(text.getLength()==0 && cols.getLength()==0) { - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][m_nCurColumn]; + ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][hitCol]; aTooltipText = convertToString(content); } else if(text.getLength() == 0) @@ -1966,13 +2068,13 @@ namespace svt { namespace table { if(i==0) { - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]]; + ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][cols[i]]; aTooltipText = convertToString(content); } else { aTooltipText+= ::rtl::OUString::createFromAscii("\n"); - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]]; + ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][cols[i]]; aTooltipText += convertToString(content); } } @@ -2002,7 +2104,7 @@ namespace svt { namespace table { if(i==0) { - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]]; + ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][cols[i]]; aTooltipText = text[i] + convertToString(content); } else @@ -2011,7 +2113,7 @@ namespace svt { namespace table aTooltipText+= text[i]; if(nCols > i) { - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]]; + ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][cols[i]]; ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >xGraphic; aTooltipText += convertToString(content); } @@ -2020,168 +2122,196 @@ namespace svt { namespace table } return m_aTooltipText = aTooltipText; } + + //-------------------------------------------------------------------- + ColPos TableControl_Impl::impl_getColumnForOrdinate( long const i_ordinate ) const + { + DBG_CHECK_ME(); + + if ( m_aColumnWidths.empty() ) + return COL_INVALID; + + ColumnPositions::const_iterator lowerBound = ::std::lower_bound( + m_aColumnWidths.begin(), + m_aColumnWidths.end(), + i_ordinate + 1, + ColumnInfoPositionLess() + ); + if ( lowerBound == m_aColumnWidths.end() ) + { + // point is *behind* the start of the last column ... + if ( i_ordinate < m_aColumnWidths.rbegin()->getEnd() ) + // ... but still before its end + return m_nColumnCount - 1; + return COL_INVALID; + } + return lowerBound - m_aColumnWidths.begin(); + } + //-------------------------------------------------------------------- - void TableControl_Impl::resizeColumn(const Point& rPoint) - { - Pointer aNewPointer(POINTER_ARROW); - int headerRowWidth = 0; - if(m_pModel->hasRowHeaders()) - headerRowWidth = m_rAntiImpl.LogicToPixel( Size(m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width(); - int resizingColumn=m_nCurColumn-m_nLeftColumn; - PColumnModel pColumn = m_pModel->getColumnModel(m_nCurColumn); - impl_ni_getAccVisibleColWidths(); - int newColWidth = m_aColumnWidthsPixel[m_nCurColumn]; - //make resize area for the separator wider - int nLeft = m_aVisibleColumnWidthsPixel[resizingColumn]-4; - //subtract 1 from m_aAccColumnWidthPixel because right border should be part of the current cell - int nRight = m_aVisibleColumnWidthsPixel[resizingColumn]-1; - if( rPoint.X()> nLeft && rPoint.X()isResizable()) - aNewPointer = Pointer( POINTER_HSPLIT ); - //MouseButton was pressed but not yet released, mouse is moving - if(m_bResizing) - { - if(rPoint.X() > m_pDataWindow->GetOutputSizePixel().Width() || rPoint.X() < m_aVisibleColumnWidthsPixel[resizingColumn]-newColWidth) - aNewPointer = Pointer( POINTER_NOTALLOWED); + void TableControl_Impl::resizeColumn( const Point& rPoint ) + { + Pointer aNewPointer( POINTER_ARROW ); + const ColPos hitColumn = impl_getColumnForOrdinate( rPoint.X() ); + if ( m_bResizingColumn ) + { + const ColumnWidthInfo& rColInfo( m_aColumnWidths[ m_nResizingColumn ] ); + if ( ( rPoint.X() > m_pDataWindow->GetOutputSizePixel().Width() ) + || ( rPoint.X() < rColInfo.getStart() ) + ) + { + aNewPointer = Pointer( POINTER_NOTALLOWED ); + } else + { aNewPointer = Pointer( POINTER_HSPLIT ); + } m_pDataWindow->HideTracking(); - int lineHeight = 0; - if(m_pModel->hasColumnHeaders()) - lineHeight+= m_nColHeaderHeightPixel; - lineHeight+=m_nRowHeightPixel*m_nRowCount; - int gridHeight = m_pDataWindow->GetOutputSizePixel().Height(); - if(lineHeight >= gridHeight) + + int lineHeight = m_nColHeaderHeightPixel; + lineHeight += m_nRowHeightPixel * m_nRowCount; + const int gridHeight = m_pDataWindow->GetOutputSizePixel().Height(); + if ( lineHeight >= gridHeight ) lineHeight = gridHeight; - m_pDataWindow->ShowTracking(Rectangle(Point(rPoint.X(),0), Size(1, lineHeight )), - SHOWTRACK_SPLIT | SHOWTRACK_WINDOW); + + m_pDataWindow->ShowTracking( + Rectangle( + Point( rPoint.X(), 0 ), + Size( 1, lineHeight ) + ), + SHOWTRACK_SPLIT | SHOWTRACK_WINDOW + ); } - m_pDataWindow->SetPointer(aNewPointer); + else if ( hitColumn != COL_INVALID ) + { + // hit test for the column separator + const PColumnModel pColumn = m_pModel->getColumnModel( hitColumn ); + const ColumnWidthInfo& rColInfo( m_aColumnWidths[ hitColumn ] ); + if ( ( rColInfo.getEnd() - 2 <= rPoint.X() ) + && ( rColInfo.getEnd() + 2 > rPoint.X() ) + && pColumn->isResizable() + ) + aNewPointer = Pointer( POINTER_HSPLIT ); + } + + m_pDataWindow->SetPointer( aNewPointer ); } + //-------------------------------------------------------------------- - bool TableControl_Impl::startResizeColumn(const Point& rPoint) + bool TableControl_Impl::checkResizeColumn( const Point& rPoint ) { m_bResizingGrid = false; - m_nResizingColumn = m_nCurColumn; - PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn); - //make resize area for the separator wider - int nLeft = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-4; - int nRight = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1; - if(rPoint.X()> nLeft && rPoint.X()isResizable()) + + if ( m_bResizingColumn ) + return true; + + const ColPos hitColumn = impl_getColumnForOrdinate( rPoint.X() ); + if ( hitColumn == COL_INVALID ) + return false; + + const PColumnModel pColumn = m_pModel->getColumnModel( hitColumn ); + const ColumnWidthInfo& rColInfo( m_aColumnWidths[ hitColumn ] ); + + // hit test for the column separator + if ( ( rColInfo.getEnd() - 2 <= rPoint.X() ) + && ( rColInfo.getEnd() + 2 > rPoint.X() ) + && pColumn->isResizable() + ) { + m_nResizingColumn = hitColumn; m_pDataWindow->CaptureMouse(); - m_bResizing = true; + m_bResizingColumn = true; } - return m_bResizing; + return m_bResizingColumn; } //-------------------------------------------------------------------- - bool TableControl_Impl::endResizeColumn(const Point& rPoint) + bool TableControl_Impl::endResizeColumn( const Point& rPoint ) { - if(m_bResizing) + DBG_CHECK_ME(); + ENSURE_OR_RETURN_FALSE( m_bResizingColumn, "TableControl_Impl::endResizeColumn: not resizing currently!" ); + + m_pDataWindow->HideTracking(); + const PColumnModel pColumn = m_pModel->getColumnModel( m_nResizingColumn ); + const long maxWidthLogical = pColumn->getMaxWidth(); + const long minWidthLogical = pColumn->getMinWidth(); + + // new position of mouse + const long requestedEnd = rPoint.X(); + + // old position of right border + const long oldEnd = m_aColumnWidths[ m_nResizingColumn ].getEnd(); + + // position of left border if cursor in the to-be-resized column + const long columnStart = m_aColumnWidths[ m_nResizingColumn ].getStart(); + const long requestedWidth = requestedEnd - columnStart; + // TODO: this is not correct, strictly: It assumes that the mouse was pressed exactly on the "end" pos, + // but for a while now, we have relaxed this, and allow clicking a few pixels aside, too + + if ( requestedEnd >= columnStart ) { - m_pDataWindow->HideTracking(); - PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn); - int maxWidth = m_rAntiImpl.LogicToPixel( Size( pColumn->getMaxWidth(), 0 ), MAP_APPFONT ).Width(); - int minWidth = m_rAntiImpl.LogicToPixel( Size( pColumn->getMinWidth(), 0 ), MAP_APPFONT ).Width(); - int resizeCol = m_nResizingColumn-m_nLeftColumn; - //new position of mouse - int actX = rPoint.X(); - //old position of right border - int oldX = m_aVisibleColumnWidthsPixel[resizeCol]; - //position of left border if cursor in the first cell - int leftX = 0; - if(m_nResizingColumn > m_nLeftColumn) - leftX = m_aVisibleColumnWidthsPixel[resizeCol-1]; - else if(m_nResizingColumn == m_nLeftColumn && m_pModel->hasRowHeaders()) - leftX = m_rAntiImpl.LogicToPixel( Size( m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width(); - int actWidth = actX - leftX; - int newActWidth = 0; - //minimize the column width - if(oldX > actX && actX >= leftX) + long requestedWidthLogical = m_rAntiImpl.PixelToLogic( Size( requestedWidth, 0 ), MAP_APPFONT ).Width(); + // respect column width limits + if ( oldEnd > requestedEnd ) { - if(minWidth < actWidth) - { - newActWidth = m_rAntiImpl.PixelToLogic( Size( actWidth, 0 ), MAP_APPFONT ).Width(); - pColumn->setPreferredWidth(newActWidth); - } - else - pColumn->setPreferredWidth(pColumn->getMinWidth()); - if(m_nLeftColumn != 0) - impl_updateLeftColumn(); - } - else if(oldX < actX) - { - if(actWidth < maxWidth) + // column has become smaller, check against minimum width + if ( ( minWidthLogical != 0 ) && ( requestedWidthLogical < minWidthLogical ) ) + requestedWidthLogical = minWidthLogical; + + // impl_updateLeftColumn(); + // does this make sense here? We didn't call impl_ni_updateColumnWidths, yet, so m_aColumnWidths + // still contains the old values + } + else if ( oldEnd < requestedEnd ) { - newActWidth = m_rAntiImpl.PixelToLogic( Size( actWidth, 0 ), MAP_APPFONT ).Width(); - pColumn->setPreferredWidth(newActWidth); + // column has become larger, check against max width + if ( ( maxWidthLogical != 0 ) && ( requestedWidthLogical >= maxWidthLogical ) ) + requestedWidthLogical = maxWidthLogical; } - else - pColumn->setPreferredWidth(pColumn->getMaxWidth()); + pColumn->setPreferredWidth( requestedWidthLogical ); } - m_nCurColumn = m_nResizingColumn; + impl_ni_updateColumnWidths(); impl_ni_updateScrollbars(); - m_pDataWindow->Invalidate(INVALIDATE_UPDATE); - m_pDataWindow->SetPointer(Pointer()); - m_bResizing = false; + m_pDataWindow->Invalidate( INVALIDATE_UPDATE ); + m_pDataWindow->SetPointer( Pointer() ); + m_bResizingColumn = false; m_bResizingGrid = true; + + m_pDataWindow->ReleaseMouse(); + return m_bResizingColumn; } - m_pDataWindow->ReleaseMouse(); - return m_bResizing; - } + //------------------------------------------------------------------------------- - void TableControl_Impl::impl_ni_getAccVisibleColWidths() + void TableControl_Impl::impl_updateLeftColumn() { - TableSize nVisCols = impl_getVisibleColumns(true); - int widthsPixel = 0; - m_aVisibleColumnWidthsPixel.resize(0); - m_aVisibleColumnWidthsPixel.reserve(nVisCols); - int headerRowWidth = 0; - if(m_pModel->hasRowHeaders()) - { - headerRowWidth = m_rAntiImpl.LogicToPixel( Size(m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width(); - widthsPixel+=headerRowWidth; - } - int col = m_nLeftColumn; - while(nVisCols) + DBG_CHECK_ME(); + if ( m_nLeftColumn == 0 ) + return; + + // the right end of the last column + const long lastColumnEnd = m_aColumnWidths[ m_nColumnCount - 1 ].getEnd(); + + // free space at the right of the last column + const long freeSpace = m_pDataWindow->GetOutputSizePixel().Width() - lastColumnEnd; + + // if the columnd left of the currently-left-most column would fit into the free + // space, then implicitly scroll + const long leftNeighbourWidth = m_aColumnWidths[ m_nLeftColumn - 1 ].getWidth(); + if ( leftNeighbourWidth < freeSpace ) { - m_aVisibleColumnWidthsPixel.push_back(widthsPixel+=m_aColumnWidthsPixel[col]); - col++; - nVisCols--; + for ( ColumnPositions::iterator colPos = m_aColumnWidths.begin(); + colPos != m_aColumnWidths.end(); + ++colPos + ) + { + colPos->move( leftNeighbourWidth ); + } + + --m_nLeftColumn; + // TODO: wouldn't this require updating the scrollbar? } - } - //------------------------------------------------------------------------------- - void TableControl_Impl::impl_updateLeftColumn() - { - int nVisCols = m_aVisibleColumnWidthsPixel.size(); - int headerRowWidth = 0; - //sum of currently visible columns - int widthsPixel = 0; - //header pixel should be added, because header doesn't vanish when scrolling - if(m_pModel->hasRowHeaders()) - { - headerRowWidth = m_rAntiImpl.LogicToPixel( Size(m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width(); - widthsPixel+=headerRowWidth; - } - int col = m_nLeftColumn; - //add column width of the neighbour of the left column - widthsPixel+=m_aColumnWidthsPixel[col-1]; - //compute the sum of the new column widths - while(nVisCols) - { - PColumnModel pColumn = m_pModel->getColumnModel(col); - int colWidth = pColumn->getWidth(); - int colPrefWidth = pColumn->getPreferredWidth(); - if(colPrefWidth!=0) - colWidth = colPrefWidth; - widthsPixel += m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width(); - col++; - nVisCols--; - } - //when the sum of all visible columns and the next to the left column is smaller than - //window width, then update m_nLeftColumn - if(widthsPixelGetOutputSizePixel().Width()) - m_nLeftColumn--; + + // TODO: isnt' it that this might be done repeatedly? } //-------------------------------------------------------------------- rtl::OUString TableControl_Impl::convertToString(const ::com::sun::star::uno::Any& value) @@ -2220,6 +2350,14 @@ namespace svt { namespace table return aRect; } + //-------------------------------------------------------------------- + IMPL_LINK( TableControl_Impl, OnUpdateScrollbars, void*, /**/ ) + { + DBG_CHECK_ME(); + impl_ni_updateScrollbars(); + return 1L; + } + //-------------------------------------------------------------------- IMPL_LINK( TableControl_Impl, OnScroll, ScrollBar*, _pScrollbar ) { @@ -2261,26 +2399,27 @@ namespace svt { namespace table BOOL TableFunctionSet::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor) { BOOL bHandled = FALSE; - Rectangle rCells; - //curRow is the row where the mouse click happened, m_nCurRow is the last selected row, before the mouse click - RowPos curRow = m_pTableControl->getCurrentRow(rPoint); - if(curRow == -2) + // newRow is the row which includes the point, m_nCurRow is the last selected row, before the mouse click + const RowPos newRow = m_pTableControl->getRowAtPoint( rPoint ); + const ColPos newCol = m_pTableControl->getColAtPoint( rPoint ); + if ( ( newRow == ROW_INVALID ) || ( newCol == COL_INVALID ) ) return FALSE; - if( bDontSelectAtCursor ) + + if ( bDontSelectAtCursor ) { - if(m_pTableControl->m_nRowSelected.size()>1) + if ( m_pTableControl->m_nRowSelected.size()>1 ) m_pTableControl->m_pSelEngine->AddAlways(TRUE); bHandled = TRUE; } - else if(m_pTableControl->m_nAnchor == m_pTableControl->m_nCurRow) + else if ( m_pTableControl->m_nAnchor == m_pTableControl->m_nCurRow ) { //selecting region, - int diff = m_pTableControl->m_nCurRow - curRow; + int diff = m_pTableControl->m_nCurRow - newRow; //selected region lies above the last selection if( diff >= 0) { //put selected rows in vector - while(m_pTableControl->m_nAnchor>=curRow) + while ( m_pTableControl->m_nAnchor >= newRow ) { bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, m_pTableControl->m_nAnchor); //if row isn't selected, put it in vector, otherwise don't put it there, because it will be twice there @@ -2294,7 +2433,7 @@ namespace svt { namespace table //selected region lies beneath the last selected row else { - while(m_pTableControl->m_nAnchor<=curRow) + while ( m_pTableControl->m_nAnchor <= newRow ) { bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, m_pTableControl->m_nAnchor); if(!isAlreadySelected) @@ -2304,35 +2443,39 @@ namespace svt { namespace table } m_pTableControl->m_nAnchor--; } - m_pTableControl->invalidateSelectedRegion(m_pTableControl->m_nCurRow, curRow, rCells); + Rectangle aCellRect; + m_pTableControl->invalidateSelectedRegion( m_pTableControl->m_nCurRow, newRow, aCellRect ); bHandled = TRUE; } //no region selected else { if(m_pTableControl->m_nRowSelected.empty()) - m_pTableControl->m_nRowSelected.push_back(curRow); + m_pTableControl->m_nRowSelected.push_back( newRow ); else { if(m_pTableControl->m_pSelEngine->GetSelectionMode()==SINGLE_SELECTION) { DeselectAll(); - m_pTableControl->m_nRowSelected.push_back(curRow); + m_pTableControl->m_nRowSelected.push_back( newRow ); } else { - bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, curRow); - if(!isAlreadySelected) - m_pTableControl->m_nRowSelected.push_back(curRow); + bool isAlreadySelected = m_pTableControl->isRowSelected( m_pTableControl->m_nRowSelected, newRow ); + if ( !isAlreadySelected ) + m_pTableControl->m_nRowSelected.push_back( newRow ); } } if(m_pTableControl->m_nRowSelected.size()>1 && m_pTableControl->m_pSelEngine->GetSelectionMode()!=SINGLE_SELECTION) m_pTableControl->m_pSelEngine->AddAlways(TRUE); - m_pTableControl->invalidateSelectedRegion(curRow, curRow, rCells); + + Rectangle aCellRect; + m_pTableControl->invalidateSelectedRegion( newRow, newRow, aCellRect ); bHandled = TRUE; } - m_pTableControl->m_nCurRow = curRow; - m_pTableControl->ensureVisible(m_pTableControl->m_nCurColumn,m_pTableControl->m_nCurRow,false); + m_pTableControl->m_nCurRow = newRow; + m_pTableControl->m_nCurColumn = newCol; + m_pTableControl->ensureVisible( newCol, newRow, true ); return bHandled; } //------------------------------------------------------------------------------- @@ -2343,7 +2486,7 @@ namespace svt { namespace table return FALSE; else { - RowPos curRow = m_pTableControl->getCurrentRow(rPoint); + RowPos curRow = m_pTableControl->getRowAtPoint( rPoint ); m_pTableControl->m_nAnchor = -1; bool selected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, curRow); m_nCurrentRow = curRow; diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index b456cf248bed..91a57752fca2 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -43,7 +43,53 @@ namespace svt { namespace table { //........................................................................ - typedef ::std::vector< long > ArrayOfLong; + struct ColumnWidthInfo + { + ColumnWidthInfo() + :nStartPixel( 0 ) + ,nEndPixel( 0 ) + { + } + + ColumnWidthInfo( long const i_startPixel, long const i_endPixel ) + :nStartPixel( i_startPixel ) + ,nEndPixel( i_endPixel ) + { + } + + long getStart() const { return nStartPixel; } + long getEnd() const { return nEndPixel; } + + void setEnd( long const i_end ) { nEndPixel = i_end; } + void move( long const i_offset ) { nStartPixel += i_offset; nEndPixel += i_offset; } + + long getWidth() const { return nEndPixel - nStartPixel; } + + private: + /** the start of the column, in pixels. Might be negative, in case the column is scrolled out of the visible + area. + */ + long nStartPixel; + + /** the end of the column, in pixels, plus 1. Effectively, this is the accumulated width of a all columns + up to the current one. + */ + long nEndPixel; + }; + + struct ColumnInfoPositionLess + { + bool operator()( ColumnWidthInfo const& i_colInfo, long const i_position ) + { + return i_colInfo.getEnd() < i_position; + } + bool operator()( long const i_position, ColumnWidthInfo const& i_colInfo ) + { + return i_position < i_colInfo.getStart(); + } + }; + + typedef ::std::vector< ColumnWidthInfo > ColumnPositions; class TableControl; class TableDataWindow; @@ -59,7 +105,8 @@ namespace svt { namespace table friend class TableRowGeometry; friend class TableColumnGeometry; friend class SuspendInvariants; - friend class TableFunctionSet; + friend class TableFunctionSet; + private: /// the control whose impl-instance we implemnt TableControl& m_rAntiImpl; @@ -67,14 +114,9 @@ namespace svt { namespace table PTableModel m_pModel; /// the input handler to use, usually the input handler as provided by ->m_pModel PTableInputHandler m_pInputHandler; - /// the widths of the single columns, measured in pixel - ArrayOfLong m_aColumnWidthsPixel; - /** the accumulated widths of the single columns, i.e. their exclusive right borders, - counting the space for a possible row header column - */ - ArrayOfLong m_aAccColumnWidthsPixel; + /// info about the widths of our columns + ColumnPositions m_aColumnWidths; - ArrayOfLong m_aVisibleColumnWidthsPixel; /// the height of a single row in the table, measured in pixels long m_nRowHeightPixel; /// the height of the column header row in the table, measured in pixels @@ -103,7 +145,7 @@ namespace svt { namespace table /// the vertical scrollbar, if any ScrollBar* m_pVScroll; /// the horizontal scrollbar, if any - ScrollBar* m_pHScroll; + ScrollBar* m_pHScroll; ScrollBarBox* m_pScrollCorner; //selection engine - for determining selection range, e.g. single, multiple SelectionEngine* m_pSelEngine; @@ -112,11 +154,11 @@ namespace svt { namespace table //part of selection engine TableFunctionSet* m_pTableFunctionSet; //part of selection engine - RowPos m_nAnchor; - bool m_bResizing; - ColPos m_nResizingColumn; - bool m_bResizingGrid; - rtl::OUString m_aTooltipText; + RowPos m_nAnchor; + bool m_bResizingColumn; + ColPos m_nResizingColumn; + bool m_bResizingGrid; + rtl::OUString m_aTooltipText; #if DBG_UTIL #define INV_SCROLL_POSITION 1 @@ -143,8 +185,6 @@ namespace svt { namespace table inline long getRowCount() const { return m_nRowCount; } inline long getColumnCount() const { return m_nColumnCount; } - inline long getColHeaderHightPixel() const { return m_nColHeaderHeightPixel; } - inline const TableControl& getAntiImpl() const { return m_rAntiImpl; } inline TableControl& getAntiImpl() { return m_rAntiImpl; } @@ -181,10 +221,7 @@ namespace svt { namespace table if it's okay that the given cooordinate is only partially visible */ void ensureVisible( ColPos _nColumn, RowPos _nRow, bool _bAcceptPartialVisibility ); - /** returns the row, which contains the input point*/ - virtual RowPos getCurrentRow (const Point& rPoint); - void setCursorAtCurrentCell(const Point& rPoint); /** checks whether the vector with the selected rows contains the current row*/ BOOL isRowSelected(const ::std::vector& selectedRows, RowPos current); @@ -201,16 +238,19 @@ namespace svt { namespace table void removeSelectedRow(RowPos _nRowPos); void invalidateRows(); void clearSelection(); - // IAbstractTableControl - virtual void hideCursor(); - virtual void showCursor(); - virtual bool dispatchAction( TableControlAction _eAction ); - virtual SelectionEngine* getSelEngine(); - virtual bool isTooltipActive(); - virtual rtl::OUString& setTooltip(const Point& rPoint ); - virtual void resizeColumn(const Point& rPoint); - virtual bool startResizeColumn(const Point& rPoint); - virtual bool endResizeColumn(const Point& rPoint); + // IAbstractTableControl + virtual void hideCursor(); + virtual void showCursor(); + virtual bool dispatchAction( TableControlAction _eAction ); + virtual SelectionEngine* getSelEngine(); + virtual void activateCellAt( const Point& rPoint ); + virtual bool isTooltipActive(); + virtual rtl::OUString& setTooltip(const Point& rPoint ); + virtual RowPos getRowAtPoint( const Point& rPoint ); + virtual ColPos getColAtPoint( const Point& rPoint ); + virtual void resizeColumn(const Point& rPoint); + virtual bool checkResizeColumn(const Point& rPoint); + virtual bool endResizeColumn(const Point& rPoint); TableDataWindow* getDataWindow(); ScrollBar* getHorzScrollbar(); @@ -301,6 +341,10 @@ namespace svt { namespace table */ TableSize impl_ni_ScrollRows( TableSize _nRowDelta ); + /** equivalent to impl_ni_ScrollRows, but checks the instances invariants beforehand (in a non-product build only) + */ + TableSize impl_scrollRows( TableSize const i_rowDelta ); + /** scrolls the view by the given number of columns The method is not bound to the classes public invariants, as it's used in @@ -311,8 +355,13 @@ namespace svt { namespace table from the given numbers to scroll in case the begin or the end of the column range were reached. */ - TableSize impl_ni_ScrollColumns( TableSize _nRowDelta ); - /** retrieves the area occupied by the totality of (at least partially) visible cells + TableSize impl_ni_ScrollColumns( TableSize _nColumnDelta ); + + /** equivalent to impl_ni_ScrollColumns, but checks the instances invariants beforehand (in a non-product build only) + */ + TableSize impl_scrollColumns( TableSize const i_columnDelta ); + + /** retrieves the area occupied by the totality of (at least partially) visible cells The returned area includes row and column headers. Also, it takes into account the the fact that there might be less columns than would normally @@ -330,11 +379,16 @@ namespace svt { namespace table */ void impl_getAllVisibleDataCellArea( Rectangle& _rCellArea ) const; - void impl_ni_getAccVisibleColWidths(); + /** retrieves the column which covers the given ordinate + */ + ColPos impl_getColumnForOrdinate( long const i_ordinate ) const; + void impl_updateLeftColumn(); DECL_LINK( OnScroll, ScrollBar* ); + DECL_LINK( OnUpdateScrollbars, void* ); }; + //see seleng.hxx, seleng.cxx, FunctionSet overridables, part of selection engine class TableFunctionSet : public FunctionSet { diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index bbd7f6829369..41bd851e6b82 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -83,14 +83,14 @@ namespace svt { namespace table Point aPoint = rMEvt.GetPosPixel(); if ( !m_rTableControl.getInputHandler()->MouseMove( m_rTableControl, rMEvt ) ) { - if(m_rTableControl.getCurrentRow(aPoint)>=0 && m_rTableControl.isTooltipActive() ) + if ( m_rTableControl.isTooltipActive() && m_rTableControl.getRowAtPoint( aPoint ) >= 0 ) { SetPointer(POINTER_ARROW); - rtl::OUString& rHelpText = m_rTableControl.setTooltip(aPoint); + const ::rtl::OUString& rHelpText = m_rTableControl.setTooltip(aPoint); Help::EnableBalloonHelp(); - Window::SetHelpText( rHelpText.getStr()); + Window::SetHelpText( rHelpText ); } - else if(m_rTableControl.getCurrentRow(aPoint) == -1) + else if ( m_rTableControl.getRowAtPoint( aPoint ) == ROW_COL_HEADERS ) { if(Help::IsBalloonHelpEnabled()) Help::DisableBalloonHelp(); @@ -107,8 +107,8 @@ namespace svt { namespace table //-------------------------------------------------------------------- void TableDataWindow::MouseButtonDown( const MouseEvent& rMEvt ) { - Point aPoint = rMEvt.GetPosPixel(); - RowPos nCurRow = m_rTableControl.getCurrentRow(aPoint); + const Point aPoint = rMEvt.GetPosPixel(); + const RowPos nCurRow = m_rTableControl.getRowAtPoint( aPoint ); std::vector selectedRows(m_rTableControl.getSelectedRows()); if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) ) Window::MouseButtonDown( rMEvt ); @@ -125,7 +125,6 @@ namespace svt { namespace table } } m_aMouseButtonDownHdl.Call((MouseEvent*) &rMEvt); - m_rTableControl.getAntiImpl().LoseFocus(); } //-------------------------------------------------------------------- void TableDataWindow::MouseButtonUp( const MouseEvent& rMEvt ) @@ -133,7 +132,7 @@ namespace svt { namespace table if ( !m_rTableControl.getInputHandler()->MouseButtonUp( m_rTableControl, rMEvt ) ) Window::MouseButtonUp( rMEvt ); m_aMouseButtonUpHdl.Call((MouseEvent*) &rMEvt); - m_rTableControl.getAntiImpl().GetFocus(); + m_rTableControl.getAntiImpl().GrabFocus(); } //-------------------------------------------------------------------- void TableDataWindow::SetPointer( const Pointer& rPointer ) diff --git a/svtools/source/table/tablegeometry.cxx b/svtools/source/table/tablegeometry.cxx index d60de9e6438f..01425f3bb292 100644 --- a/svtools/source/table/tablegeometry.cxx +++ b/svtools/source/table/tablegeometry.cxx @@ -49,30 +49,42 @@ namespace svt { namespace table { if ( m_nRowPos == ROW_COL_HEADERS ) { - //DBG_ASSERT( m_rControl.m_pModel->hasColumnHeaders(), - // "TableRowGeometry::TableRowGeometry: why asking for the geoemtry of the non-existent column header row?" ); m_aRect.Top() = 0; m_aRect.Bottom() = m_rControl.m_nColHeaderHeightPixel - 1; } else { - if ( ( m_nRowPos >= m_rControl.m_nTopRow ) && ( m_nRowPos < m_rControl.m_pModel->getRowCount() ) ) - { - m_aRect.Top() = m_rControl.m_nColHeaderHeightPixel + ( m_nRowPos - m_rControl.m_nTopRow ) * m_rControl.m_nRowHeightPixel; - m_aRect.Bottom() = m_aRect.Top() + m_rControl.m_nRowHeightPixel - 1; - } - else - m_aRect.SetEmpty(); + impl_initRect(); } } //-------------------------------------------------------------------- - bool TableRowGeometry::moveDown() + void TableRowGeometry::impl_initRect() { - if ( ++m_nRowPos < m_rControl.m_pModel->getRowCount() ) - m_aRect.Move( 0, m_rControl.m_nRowHeightPixel ); + if ( ( m_nRowPos >= m_rControl.m_nTopRow ) && ( m_nRowPos < m_rControl.m_pModel->getRowCount() ) ) + { + m_aRect.Top() = m_rControl.m_nColHeaderHeightPixel + ( m_nRowPos - m_rControl.m_nTopRow ) * m_rControl.m_nRowHeightPixel; + m_aRect.Bottom() = m_aRect.Top() + m_rControl.m_nRowHeightPixel - 1; + } else m_aRect.SetEmpty(); + } + + //-------------------------------------------------------------------- + bool TableRowGeometry::moveDown() + { + if ( m_nRowPos == ROW_COL_HEADERS ) + { + m_nRowPos = m_rControl.m_nTopRow; + impl_initRect(); + } + else + { + if ( ++m_nRowPos < m_rControl.m_pModel->getRowCount() ) + m_aRect.Move( 0, m_rControl.m_nRowHeightPixel ); + else + m_aRect.SetEmpty(); + } return isValid(); } @@ -87,41 +99,50 @@ namespace svt { namespace table { if ( m_nColPos == COL_ROW_HEADERS ) { -/* DBG_ASSERT( m_rControl.m_pModel->hasRowHeaders(), - "TableColumnGeometry::TableColumnGeometry: why asking for the geoemtry of the non-existent row header column?" )*/; m_aRect.Left() = 0; m_aRect.Right() = m_rControl.m_nRowHeaderWidthPixel - 1; } else { - ColPos nLeftColumn = m_rControl.m_nLeftColumn; - if ( ( m_nColPos >= nLeftColumn ) && ( m_nColPos < (ColPos)m_rControl.m_aColumnWidthsPixel.size() ) ) - { - m_aRect.Left() = m_rControl.m_nRowHeaderWidthPixel; - // TODO: take into account any possibly frozen columns + impl_initRect(); + } + } - for ( ColPos col = nLeftColumn; col < m_nColPos; ++col ) - m_aRect.Left() += m_rControl.m_aColumnWidthsPixel[ col ]; - m_aRect.Right() = m_aRect.Left() + m_rControl.m_aColumnWidthsPixel[ m_nColPos ] - 1; - } - else - m_aRect.SetEmpty(); + //-------------------------------------------------------------------- + void TableColumnGeometry::impl_initRect() + { + ColPos nLeftColumn = m_rControl.m_nLeftColumn; + if ( ( m_nColPos >= nLeftColumn ) && ( m_nColPos < (ColPos)m_rControl.m_aColumnWidths.size() ) ) + { + m_aRect.Left() = m_rControl.m_nRowHeaderWidthPixel; + // TODO: take into account any possibly frozen columns + + for ( ColPos col = nLeftColumn; col < m_nColPos; ++col ) + m_aRect.Left() += m_rControl.m_aColumnWidths[ col ].getWidth(); + m_aRect.Right() = m_aRect.Left() + m_rControl.m_aColumnWidths[ m_nColPos ].getWidth() - 1; } + else + m_aRect.SetEmpty(); } //-------------------------------------------------------------------- bool TableColumnGeometry::moveRight() { - DBG_ASSERT( m_nColPos != COL_ROW_HEADERS, "TableColumnGeometry::moveRight: cannot move the row header column!" ); - // what would be COL_ROW_HEADERS + 1? - - if ( ++m_nColPos < (ColPos)m_rControl.m_aColumnWidthsPixel.size() ) + if ( m_nColPos == COL_ROW_HEADERS ) { - m_aRect.Left() = m_aRect.Right() + 1; - m_aRect.Right() += m_rControl.m_aColumnWidthsPixel[ m_nColPos ]; + m_nColPos = m_rControl.m_nLeftColumn; + impl_initRect(); } else - m_aRect.SetEmpty(); + { + if ( ++m_nColPos < (ColPos)m_rControl.m_aColumnWidths.size() ) + { + m_aRect.Left() = m_aRect.Right() + 1; + m_aRect.Right() += m_rControl.m_aColumnWidths[ m_nColPos ].getWidth(); + } + else + m_aRect.SetEmpty(); + } return isValid(); } diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx index 3ddde0c98c64..7bfc2527d5fc 100644 --- a/svtools/source/table/tablegeometry.hxx +++ b/svtools/source/table/tablegeometry.hxx @@ -91,6 +91,9 @@ namespace svt { namespace table RowPos getRow() const { return m_nRowPos; } // operations bool moveDown(); + + private: + void impl_initRect(); }; //==================================================================== @@ -112,6 +115,9 @@ namespace svt { namespace table ColPos getCol() const { return m_nColPos; } // operations bool moveRight(); + + private: + void impl_initRect(); }; //==================================================================== diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 1a6ce6ff88e5..8d4a20be3c43 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -99,7 +99,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getItemIndexAtPoint: no control (anymore)!", -1 ); - return pTable->GetCurrentRow( Point(x,y) ); + return pTable->GetRowAtPoint( Point( x, y ) ); } // --------------------------------------------------------------------------------------------------------------------- @@ -398,7 +398,6 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD { m_xColumnModel->setDefaultColumns(rawRowData.getLength()); // this will trigger notifications, which in turn will let us update our m_pTableModel - } else if((unsigned int)rawRowData.getLength()!=(unsigned)colCount) throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), *this ); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 4ed310aa8b28..a4c4b4f0a29c 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -229,7 +229,7 @@ using namespace ::com::sun::star::awt::grid; :aColumns ( ) ,nRowCount ( 0 ) ,bHasColumnHeaders ( true ) - ,bHasRowHeaders ( true ) + ,bHasRowHeaders ( false ) ,bVScroll ( false ) ,bHScroll ( false ) ,pRenderer ( ) @@ -257,7 +257,7 @@ using namespace ::com::sun::star::awt::grid; :m_pImpl( new UnoControlTableModel_Impl ) { m_pImpl->bHasColumnHeaders = true; - m_pImpl->bHasRowHeaders = true; + m_pImpl->bHasRowHeaders = false; m_pImpl->pRenderer.reset( new GridTableRenderer( *this ) ); m_pImpl->pInputHandler.reset( new DefaultInputHandler ); } @@ -340,7 +340,7 @@ using namespace ::com::sun::star::awt::grid; ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( i_position <= m_pImpl->aColumns.size() ), "illegal position!" ); ENSURE_OR_RETURN_VOID( !!i_column, "illegal column" ); - m_pImpl->aColumns.insert( m_pImpl->aColumns.begin(), i_column ); + m_pImpl->aColumns.insert( m_pImpl->aColumns.begin() + i_position, i_column ); // notify listeners ModellListeners aListeners( m_pImpl->m_aListeners ); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 8a109b667176..df301f9a57bd 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -127,7 +127,7 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_GRID_SELECTIONMODE: return uno::makeAny( SelectionType(1) ); case BASEPROPERTY_GRID_SHOWROWHEADER: - return uno::makeAny( (sal_Bool)sal_True ); + return uno::makeAny( (sal_Bool)sal_False ); case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: return uno::makeAny( (sal_Bool)sal_True ); case BASEPROPERTY_GRID_DATAMODEL: -- cgit From dd42af8c16804d848b1358ea46811fae64088f9f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 23 Dec 2010 15:48:53 +0100 Subject: gridsort: re-factoring the column-resizing thingie, step 1 In the current implementation, this is rather complex, and hardly maintainable. Also, it all happens in TableControl_Impl and TableDataWindow, while in the original design, the InputHandler was intended to care for this kind of tasks (one class - one responsibility). --- automation/source/server/statemnt.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index a288c3d4d3a7..353796a4c594 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -6207,7 +6207,7 @@ protected: Point aPos( aSize.Width() / 2, aSize.Height() / 2 ); long nStep = aSize.Height() / 4; ::svt::table::RowPos nLastPos; - while ( ( nLastPos = pTC->GetCurrentRow( aPos ) ) != nNr1-1 && nStep > 0 ) + while ( ( nLastPos = pTC->GetRowAtPoint( aPos ) ) != nNr1-1 && nStep > 0 ) { if ( nLastPos > nNr1-1 || nLastPos == ROW_INVALID ) aPos.Y() -= nStep; @@ -6215,7 +6215,7 @@ protected: aPos.Y() += nStep; nStep /= 2; } - if ( pTC->GetCurrentRow( aPos ) == nNr1-1 ) + if ( pTC->GetRowAtPoint( aPos ) == nNr1-1 ) { MouseEvent aMEvnt(aPos,1,MOUSE_SIMPLECLICK|MOUSE_SELECT,MOUSE_LEFT,KEY_MOD1); pTC->getSelEngine()->SelMouseButtonDown( aMEvnt ); -- cgit From 1d52df1454476ab4ca2d0e297746719c7a9212f1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 23 Dec 2010 15:49:18 +0100 Subject: gridsort: simplified the scrollbar handling --- svtools/inc/svtools/table/tablemodel.hxx | 28 ++--------- svtools/source/table/tablecontrol_impl.cxx | 78 ++++++++++++----------------- svtools/source/uno/svtxgridcontrol.cxx | 4 +- svtools/source/uno/unocontroltablemodel.cxx | 40 +++++---------- svtools/source/uno/unocontroltablemodel.hxx | 10 ++-- 5 files changed, 53 insertions(+), 107 deletions(-) diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 99cd0e2792d6..72438bd0e357 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -48,19 +48,6 @@ namespace svt { namespace table //........................................................................ - //==================================================================== - //= cell data - //==================================================================== - struct TableContentType - { - ::rtl::OUString sContent; - Image* pImage; - TableContentType() : - sContent(), - pImage( ) - { - } - }; //==================================================================== //= ScrollbarVisibility //==================================================================== @@ -402,17 +389,13 @@ namespace svt { namespace table */ virtual TableMetrics getRowHeaderWidth() const = 0; - /** determines the visibility of the vertical scrollbar of the table control - @param overAllHeight the height of the table with all rows - @param actHeight the given height of the table + /** returns the visibilit mode of the vertical scrollbar */ - virtual ScrollbarVisibility getVerticalScrollbarVisibility(int overAllHeight,int actHeight) const = 0; + virtual ScrollbarVisibility getVerticalScrollbarVisibility() const = 0; - /** determines the visibility of the horizontal scrollbar of the table control - @param overAllWidth the width of the table with all columns - @param actWidth the given width of the table + /** returns the visibilit mode of the horizontal scrollbar */ - virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const = 0; + virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const = 0; /** adds a listener to be notified of changes in the table model */ @@ -422,9 +405,6 @@ namespace svt { namespace table */ virtual void removeTableModelListener( const PTableModelListener& i_listener ) = 0; - virtual bool hasVerticalScrollbar() = 0; - virtual bool hasHorizontalScrollbar() = 0; - /** gets the content of the cells */ virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent() = 0; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 09ac0412c615..fbc5e29d1a02 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -139,11 +139,11 @@ namespace svt { namespace table { return 0; } - virtual ScrollbarVisibility getVerticalScrollbarVisibility(int , int ) const + virtual ScrollbarVisibility getVerticalScrollbarVisibility() const { return ScrollbarShowNever; } - virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int , int ) const + virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const { return ScrollbarShowNever; } @@ -155,14 +155,6 @@ namespace svt { namespace table { (void)i_listener; } - virtual bool hasVerticalScrollbar() - { - return false; - } - virtual bool hasHorizontalScrollbar() - { - return false; - } virtual ::com::sun::star::util::Color getLineColor() { return 0; @@ -612,12 +604,6 @@ namespace svt { namespace table gridWidth -= m_nRowHeaderWidthPixel; } - if ( m_pModel->hasVerticalScrollbar() && ( gridWidth != 0 ) ) - { - sal_Int32 scrollbarWidth = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); - gridWidth-=scrollbarWidth; - } - double colWidthsSum = 0.0; double colWithoutFixedWidthsSum = 0.0; double minColWithoutFixedSum = 0.0; @@ -732,16 +718,18 @@ namespace svt { namespace table { //................................................................ /// determines whether a scrollbar is needed for the given values - bool lcl_determineScrollbarNeed( ScrollbarVisibility _eVisibility, - long _nVisibleUnits, long _nRange, long const i_nPosition ) + bool lcl_determineScrollbarNeed( long const i_position, ScrollbarVisibility const i_visibility, + long const i_availableSpace, long const i_neededSpace ) { - if ( i_nPosition > 0 ) - return true; - if ( _eVisibility == ScrollbarShowNever ) + if ( i_visibility == ScrollbarShowNever ) return false; - if ( _eVisibility == ScrollbarShowAlways ) + if ( i_visibility == ScrollbarShowAlways ) + return true; + if ( i_position > 0 ) return true; - return _nVisibleUnits > _nRange; + if ( i_availableSpace >= i_neededSpace ) + return false; + return true; } //................................................................ @@ -758,24 +746,21 @@ namespace svt { namespace table //................................................................ void lcl_updateScrollbar( Window& _rParent, ScrollBar*& _rpBar, - ScrollbarVisibility _eVisibility, long _nVisibleUnits, + bool const i_needBar, long _nVisibleUnits, long _nPosition, long _nLineSize, long _nRange, bool _bHorizontal, const Link& _rScrollHandler ) { - // do we need the scrollbar? - bool bNeedBar = lcl_determineScrollbarNeed( _eVisibility, _nVisibleUnits, _nRange, _nPosition ); - // do we currently have the scrollbar? bool bHaveBar = _rpBar != NULL; // do we need to correct the scrollbar visibility? - if ( bHaveBar && !bNeedBar ) + if ( bHaveBar && !i_needBar ) { if ( _rpBar->IsTracking() ) _rpBar->EndTracking(); DELETEZ( _rpBar ); } - else if ( !bHaveBar && bNeedBar ) + else if ( !bHaveBar && i_needBar ) { _rpBar = new ScrollBar( &_rParent, @@ -859,23 +844,21 @@ namespace svt { namespace table ? 0 : m_aColumnWidths[ m_nColumnCount - 1 ].getEnd() - m_aColumnWidths[ 0 ].getStart(); + const ScrollbarVisibility eVertScrollbar = m_pModel->getVerticalScrollbarVisibility(); + const ScrollbarVisibility eHorzScrollbar = m_pModel->getHorizontalScrollbarVisibility(); + // do we need a vertical scrollbar? + bool bNeedVerticalScrollbar = lcl_determineScrollbarNeed( + m_nTopRow, eVertScrollbar, aDataCellPlayground.GetHeight(), m_nRowHeightPixel * m_nRowCount ); bool bFirstRoundVScrollNeed = false; - if ( lcl_determineScrollbarNeed( - m_pModel->getVerticalScrollbarVisibility(aDataCellPlayground.GetHeight(), m_nRowHeightPixel*m_nRowCount), - lcl_getRowsFittingInto( aDataCellPlayground.GetHeight(), m_nRowHeightPixel ), - m_nRowCount, - m_nTopRow ) ) + if ( bNeedVerticalScrollbar ) { aDataCellPlayground.Right() -= nScrollbarMetrics; bFirstRoundVScrollNeed = true; } // do we need a horizontal scrollbar? - if ( lcl_determineScrollbarNeed( - m_pModel->getHorizontalScrollbarVisibility( aDataCellPlayground.GetWidth(), nAllColumnsWidth ), - lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ), - m_nColumnCount, - m_nLeftColumn ) ) + const bool bNeedHorizontalScrollbar = lcl_determineScrollbarNeed( m_nLeftColumn, eHorzScrollbar, aDataCellPlayground.GetWidth(), nAllColumnsWidth ); + if ( bNeedHorizontalScrollbar ) { aDataCellPlayground.Bottom() -= nScrollbarMetrics; @@ -883,20 +866,21 @@ namespace svt { namespace table // the need for a vertical one may have changed, since the horizontal // SB might just occupy enough space so that not all rows do fit // anymore - if ( !bFirstRoundVScrollNeed && lcl_determineScrollbarNeed( - m_pModel->getVerticalScrollbarVisibility(aDataCellPlayground.GetHeight(),m_nRowHeightPixel*m_nRowCount), - lcl_getRowsFittingInto( aDataCellPlayground.GetHeight(), m_nRowHeightPixel ), - m_nRowCount, - m_nTopRow ) ) + if ( !bFirstRoundVScrollNeed ) { - aDataCellPlayground.Right() -= nScrollbarMetrics; + bNeedVerticalScrollbar = lcl_determineScrollbarNeed( + m_nTopRow, eVertScrollbar, aDataCellPlayground.GetHeight(), m_nRowHeightPixel * m_nRowCount ); + if ( bNeedVerticalScrollbar ) + { + aDataCellPlayground.Right() -= nScrollbarMetrics; + } } } // create or destroy the vertical scrollbar, as needed lcl_updateScrollbar( m_rAntiImpl, m_pVScroll, - m_pModel->getVerticalScrollbarVisibility(aDataCellPlayground.GetHeight(),m_nRowHeightPixel*m_nRowCount), + bNeedVerticalScrollbar, lcl_getRowsFittingInto( aDataCellPlayground.GetHeight(), m_nRowHeightPixel ), // visible units m_nTopRow, // current position @@ -920,7 +904,7 @@ namespace svt { namespace table lcl_updateScrollbar( m_rAntiImpl, m_pHScroll, - m_pModel->getHorizontalScrollbarVisibility(aDataCellPlayground.GetWidth(), nAllColumnsWidth), + bNeedHorizontalScrollbar, lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ), // visible units m_nLeftColumn, // current position diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 8d4a20be3c43..12b10f755318 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -167,7 +167,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An if( aValue >>= bHScroll ) { m_bHScroll = bHScroll; - m_pTableModel->setHorizontalScrollbarVisibility(bHScroll); + m_pTableModel->setHorizontalScrollbarVisibility( bHScroll ? ScrollbarShowAlways : ScrollbarShowSmart ); } break; } @@ -177,7 +177,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An if( aValue >>= bVScroll ) { m_bVScroll = bVScroll; - m_pTableModel->setVerticalScrollbarVisibility(bVScroll); + m_pTableModel->setVerticalScrollbarVisibility( bVScroll ? ScrollbarShowAlways : ScrollbarShowSmart ); } break; } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index a4c4b4f0a29c..aa00f799dfd0 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -208,8 +208,8 @@ using namespace ::com::sun::star::awt::grid; TableSize nRowCount; bool bHasColumnHeaders; bool bHasRowHeaders; - bool bVScroll; - bool bHScroll; + ScrollbarVisibility eVScrollMode; + ScrollbarVisibility eHScrollMode; PTableRenderer pRenderer; PTableInputHandler pInputHandler; TableMetrics nRowHeight; @@ -230,8 +230,8 @@ using namespace ::com::sun::star::awt::grid; ,nRowCount ( 0 ) ,bHasColumnHeaders ( true ) ,bHasRowHeaders ( false ) - ,bVScroll ( false ) - ,bHScroll ( false ) + ,eVScrollMode ( ScrollbarShowNever ) + ,eHScrollMode ( ScrollbarShowNever ) ,pRenderer ( ) ,pInputHandler ( ) ,nRowHeight ( 10 ) @@ -438,21 +438,15 @@ using namespace ::com::sun::star::awt::grid; } //-------------------------------------------------------------------- - ScrollbarVisibility UnoControlTableModel::getVerticalScrollbarVisibility(int overAllHeight, int actHeight) const + ScrollbarVisibility UnoControlTableModel::getVerticalScrollbarVisibility() const { - if(overAllHeight>=actHeight && !m_pImpl->bVScroll) - return ScrollbarShowNever; - else - return ScrollbarShowAlways; + return m_pImpl->eVScrollMode; } //-------------------------------------------------------------------- - ScrollbarVisibility UnoControlTableModel::getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const + ScrollbarVisibility UnoControlTableModel::getHorizontalScrollbarVisibility() const { - if(overAllWidth>=actWidth && !m_pImpl->bHScroll) - return ScrollbarShowNever; - else - return ScrollbarShowAlways; + return m_pImpl->eHScrollMode; } //-------------------------------------------------------------------- @@ -480,25 +474,15 @@ using namespace ::com::sun::star::awt::grid; } //-------------------------------------------------------------------- - void UnoControlTableModel::setVerticalScrollbarVisibility(bool _bVScroll) const + void UnoControlTableModel::setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const { - m_pImpl->bVScroll = _bVScroll; + m_pImpl->eVScrollMode = i_visibility; } //-------------------------------------------------------------------- - void UnoControlTableModel::setHorizontalScrollbarVisibility(bool _bHScroll) const + void UnoControlTableModel::setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const { - m_pImpl->bHScroll = _bHScroll; - } - //-------------------------------------------------------------------- - bool UnoControlTableModel::hasVerticalScrollbar() - { - return m_pImpl->bVScroll; - } - //-------------------------------------------------------------------- - bool UnoControlTableModel::hasHorizontalScrollbar() - { - return m_pImpl->bHScroll; + m_pImpl->eHScrollMode = i_visibility; } //-------------------------------------------------------------------- void UnoControlTableModel::setCellContent(const std::vector >& cellContent) diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 2a627358554f..ac943200b77a 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -129,12 +129,10 @@ class UnoControlTableModel : public ITableModel virtual TableMetrics getRowHeight() const; virtual TableMetrics getColumnHeaderHeight() const; virtual TableMetrics getRowHeaderWidth() const; - virtual ScrollbarVisibility getVerticalScrollbarVisibility(int overAllHeight,int actHeight) const; - virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const; + virtual ScrollbarVisibility getVerticalScrollbarVisibility() const; + virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const; virtual void addTableModelListener( const PTableModelListener& i_listener ); virtual void removeTableModelListener( const PTableModelListener& i_listener ); - virtual bool hasVerticalScrollbar(); - virtual bool hasHorizontalScrollbar(); virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent(); virtual std::vector& getRowHeaderName(); virtual ::com::sun::star::util::Color getLineColor(); @@ -148,8 +146,8 @@ class UnoControlTableModel : public ITableModel // other operations void setRowCount(TableSize _nRowCount); void setRowHeaderName(const std::vector& cellColumnContent); - void setVerticalScrollbarVisibility(bool _bVScroll) const; - void setHorizontalScrollbarVisibility(bool _bHScroll) const; + void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; + void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setCellContent(const std::vector >& cellContent); void setColumnCount(TableSize _nColCount); void setRowHeaders(bool _bRowHeaders); -- cgit From 73731f92fd4ff6546616589cf86ae5325f72e8cb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 23 Dec 2010 16:10:02 +0100 Subject: gridsort: do not allow NULL/VOID for a grid's columnd/data model - nothing would work then. (Both are already default-initited to some empty model in the grid model's ctor, for quite a few revisions) --- toolkit/source/controls/grid/gridcontrol.cxx | 64 +++++++++++++++++++++------- toolkit/source/controls/grid/gridcontrol.hxx | 6 +++ toolkit/source/helper/property.cxx | 4 +- 3 files changed, 57 insertions(+), 17 deletions(-) diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index df301f9a57bd..79b8ae8a6c61 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -76,8 +76,8 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: ImplRegisterProperty( BASEPROPERTY_TABSTOP ); ImplRegisterProperty( BASEPROPERTY_GRID_SHOWROWHEADER ); ImplRegisterProperty( BASEPROPERTY_GRID_SHOWCOLUMNHEADER ); - ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL ); - ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL ); + ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) ); + ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) ); ImplRegisterProperty( BASEPROPERTY_GRID_SELECTIONMODE ); ImplRegisterProperty( BASEPROPERTY_FONTRELIEF ); ImplRegisterProperty( BASEPROPERTY_FONTEMPHASISMARK ); @@ -88,15 +88,6 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_BACKGROUND ); ImplRegisterProperty( BASEPROPERTY_GRID_LINE_COLOR ); ImplRegisterProperty( BASEPROPERTY_GRID_ROW_BACKGROUND ); - - osl_incrementInterlockedCount( &m_refCount ); - { - setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL, - makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) ); - setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL, - makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) ); - } - osl_decrementInterlockedCount( &m_refCount ); } //---------------------------------------------------------------------------------------------------------------------- @@ -111,6 +102,53 @@ UnoControlModel* UnoGridModel::Clone() const return new UnoGridModel( *this ); } +//---------------------------------------------------------------------------------------------------------------------- +namespace +{ + void lcl_dispose_nothrow( const Any& i_component ) + { + try + { + const Reference< XComponent > xComponent( i_component, UNO_QUERY_THROW ); + xComponent->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } +} + +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoGridModel::dispose( ) throw(RuntimeException) +{ + lcl_dispose_nothrow( getFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL ) ); + lcl_dispose_nothrow( getFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL ) ); + + UnoControlModel::dispose(); +} + +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoGridModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception) +{ + Any aOldSubModel; + if ( ( nHandle == BASEPROPERTY_GRID_COLUMNMODEL ) || ( nHandle == BASEPROPERTY_GRID_DATAMODEL ) ) + { + aOldSubModel = getFastPropertyValue( nHandle ); + if ( aOldSubModel == rValue ) + { + OSL_ENSURE( false, "UnoGridModel::setFastPropertyValue_NoBroadcast: setting the same value, again!" ); + // shouldn't this have been caught by convertFastPropertyValue? + aOldSubModel.clear(); + } + } + + UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue ); + + if ( aOldSubModel.hasValue() ) + lcl_dispose_nothrow( aOldSubModel ); +} + //---------------------------------------------------------------------------------------------------------------------- OUString UnoGridModel::getServiceName() throw(RuntimeException) { @@ -130,10 +168,6 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const return uno::makeAny( (sal_Bool)sal_False ); case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: return uno::makeAny( (sal_Bool)sal_True ); - case BASEPROPERTY_GRID_DATAMODEL: - return uno::makeAny( Reference ()); - case BASEPROPERTY_GRID_COLUMNMODEL: - return uno::makeAny(Reference() ); case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: return uno::makeAny( com::sun::star::util::Color(0xFFFFFF) ); case BASEPROPERTY_GRID_HEADER_BACKGROUND: diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index d5c76f4a07f6..ce651a4061a9 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -60,12 +60,18 @@ public: UnoControlModel* Clone() const; + // ::com::sun::star::lang::XComponent + void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + // ::com::sun::star::beans::XMultiPropertySet ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::io::XPersistObject ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + // OPropertySetHelper + void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); + // XServiceInfo DECLIMPL_SERVICEINFO_DERIVED( UnoGridModel, UnoControlModel, szServiceName_GridControlModel ) }; diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 3a83465a3218..b57170a4071e 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -279,8 +279,8 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ), DECL_PROP_2 ( "ShowRowHeader", GRID_SHOWROWHEADER, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ShowColumnHeader", GRID_SHOWCOLUMNHEADER, sal_Bool, BOUND, MAYBEDEFAULT ), - DECL_PROP_3 ( "GridDataModel", GRID_DATAMODEL, Reference< ::com::sun::star::awt::grid::XGridDataModel >, BOUND, MAYBEDEFAULT, MAYBEVOID ), - DECL_PROP_3 ( "ColumnModel", GRID_COLUMNMODEL, Reference< ::com::sun::star::awt::grid::XGridColumnModel >, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_1 ( "GridDataModel", GRID_DATAMODEL, Reference< ::com::sun::star::awt::grid::XGridDataModel >, BOUND ), + DECL_PROP_1 ( "ColumnModel", GRID_COLUMNMODEL, Reference< ::com::sun::star::awt::grid::XGridColumnModel >, BOUND ), DECL_PROP_3 ( "SelectionModel", GRID_SELECTIONMODE, ::com::sun::star::view::SelectionType, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "ReferenceDevice", REFERENCE_DEVICE, Reference< XDevice >,BOUND, MAYBEDEFAULT, TRANSIENT ), -- cgit From 1007b2c08548f0e8445492cffd9b760dc3376c9f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 23 Dec 2010 16:10:02 +0100 Subject: gridsort: do not allow NULL/VOID for a grid's columnd/data model - nothing would work then. (Both are already default-initited to some empty model in the grid model's ctor, for quite a few revisions) --- offapi/com/sun/star/awt/grid/UnoControlGridModel.idl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl index 631b224470b0..d27e31162d7f 100644 --- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl +++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl @@ -65,6 +65,9 @@ service UnoControlGridModel

          You can implement your own instance of XGridColumnModel or use the DefaultGridColumnModel. + +

          The column model is in the ownership of the grid model: When you set a new column model, or dispose + the grid model, then the (old) column model is disposed, too.

          */ [property] XGridColumnModel ColumnModel; @@ -72,6 +75,9 @@ service UnoControlGridModel

          You can implement your own instance of XGridDataModel or use the DefaultGridDataModel. + +

          The data model is in the ownership of the grid model: When you set a new data model, or dispose + the grid model, then the (old) data model is disposed, too.

          */ [property] XGridDataModel GridDataModel; -- cgit From cb2f6f86c9de551b806f20e68c50e4037ec51590 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 3 Jan 2011 16:01:14 +0100 Subject: gridsort: removed methods from ITableModel which exposed implementation details of the UnoControlTableModel. Also, instead of exposing those implementation details in UnoControlTableModel, added atomar operations for stuff like adding / clearing of rows, and the like. --- svtools/inc/svtools/table/gridtablerenderer.hxx | 7 +- svtools/inc/svtools/table/tablemodel.hxx | 9 +- svtools/inc/svtools/table/tablerenderer.hxx | 6 +- svtools/source/table/gridtablerenderer.cxx | 6 +- svtools/source/table/tablecontrol.cxx | 16 +- svtools/source/table/tablecontrol_impl.cxx | 67 +++++---- svtools/source/table/tablecontrol_impl.hxx | 10 ++ svtools/source/uno/svtxgridcontrol.cxx | 160 ++++++++++---------- svtools/source/uno/unocontroltablemodel.cxx | 161 ++++++++++++++++----- svtools/source/uno/unocontroltablemodel.hxx | 23 ++- .../source/controls/grid/defaultgriddatamodel.cxx | 19 +-- 11 files changed, 303 insertions(+), 181 deletions(-) diff --git a/svtools/inc/svtools/table/gridtablerenderer.hxx b/svtools/inc/svtools/table/gridtablerenderer.hxx index e474306c0423..01a2e308f3c0 100644 --- a/svtools/inc/svtools/table/gridtablerenderer.hxx +++ b/svtools/inc/svtools/table/gridtablerenderer.hxx @@ -87,17 +87,18 @@ namespace svt { namespace table OutputDevice& _rDevice, const Rectangle& _rRowArea, const StyleSettings& _rStyle ); virtual void PaintRowHeader( + RowPos const i_rowPos, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, - const StyleSettings& _rStyle, rtl::OUString& _rText ); + const StyleSettings& _rStyle ); virtual void PaintCellImage( ColPos _nColumn, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle, Image* _pCellData ); - virtual void PaintCellString( ColPos _nColumn, + virtual void PaintCellString( ColPos _nColumn, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, - const StyleSettings& _rStyle, rtl::OUString& _rText ); + const StyleSettings& _rStyle, rtl::OUString& _rText ); virtual void ShowCellCursor( Window& _rView, const Rectangle& _rCursorRect); virtual void HideCellCursor( Window& _rView, const Rectangle& _rCursorRect); }; diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 72438bd0e357..273ed003d7aa 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -405,13 +405,14 @@ namespace svt { namespace table */ virtual void removeTableModelListener( const PTableModelListener& i_listener ) = 0; - /** gets the content of the cells + /** retrieves the content of the given cell */ - virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent() = 0; + virtual void getCellContent( RowPos const i_row, ColPos const i_col, ::com::sun::star::uno::Any& o_cellContent ) = 0; - /** gets title of header rows + /** retrieves title of a given row */ - virtual std::vector& getRowHeaderName() = 0; + virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const = 0; + virtual ::com::sun::star::util::Color getLineColor() = 0; virtual ::com::sun::star::util::Color getHeaderBackgroundColor() = 0; virtual ::com::sun::star::util::Color getTextColor() = 0; diff --git a/svtools/inc/svtools/table/tablerenderer.hxx b/svtools/inc/svtools/table/tablerenderer.hxx index f81771dd22e6..a0c54f7a9538 100644 --- a/svtools/inc/svtools/table/tablerenderer.hxx +++ b/svtools/inc/svtools/table/tablerenderer.hxx @@ -175,12 +175,10 @@ namespace svt { namespace table the are into which the row header should be painted @param _rStyle the style to be used for drawing - @param _rText - the title of the header row */ - virtual void PaintRowHeader( bool _bActive, bool _bSelected, + virtual void PaintRowHeader( RowPos const i_rowPos, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, - const StyleSettings& _rStyle, rtl::OUString& _rText ) = 0; + const StyleSettings& _rStyle ) = 0; /** paints a certain cell diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 8e5bd181a583..869c6c0a6fca 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -197,8 +197,8 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - void GridTableRenderer::PaintRowHeader( bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, - const StyleSettings& _rStyle, rtl::OUString& _rText ) + void GridTableRenderer::PaintRowHeader( RowPos const i_rowPos, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, + const StyleSettings& _rStyle ) { _rDevice.Push( PUSH_LINECOLOR); _rDevice.SetLineColor(_rStyle.GetSeparatorColor()); @@ -220,7 +220,7 @@ namespace svt { namespace table Rectangle aRect(_rArea); aRect.Left()+=4; aRect.Right()-=4; aRect.Bottom()-=2; - _rDevice.DrawText( aRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); + _rDevice.DrawText( aRect, m_pImpl->rModel.getRowHeader( i_rowPos ), nHorFlag | nVerFlag | TEXT_DRAW_CLIP); // TODO: active? selected? (void)_bActive; (void)_bSelected; diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 24486d024091..94932fdcdd01 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -363,7 +363,7 @@ namespace svt { namespace table ::rtl::OUString TableControl::GetRowName( sal_Int32 _nIndex) const { - return GetModel()->getRowHeaderName()[_nIndex]; + return GetModel()->getRowHeader( _nIndex ); } // ----------------------------------------------------------------------------- @@ -381,20 +381,18 @@ namespace svt { namespace table // ----------------------------------------------------------------------------- -::com::sun::star::uno::Any TableControl::GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const +::com::sun::star::uno::Any TableControl::GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos ) const { - ::com::sun::star::uno::Any cellContent(::com::sun::star::uno::Any(::rtl::OUString::createFromAscii(""))); - std::vector >& aTableContent = GetModel()->getCellContent(); - if(&aTableContent) - cellContent = aTableContent[_nRowPos][_nColPos]; - return cellContent; + Any aCellContent; + GetModel()->getCellContent( _nRowPos, _nColPos, aCellContent ); + return aCellContent; } + // ----------------------------------------------------------------------------- ::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) const { - const ::com::sun::star::uno::Any cellContent = GetCellContent(_nRowPos, _nColPos); - return m_pImpl->convertToString(cellContent); + return m_pImpl->getCellContentAsString( _nRowPos, _nColPos ); } // ----------------------------------------------------------------------------- diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index fbc5e29d1a02..81d188745f69 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -50,6 +50,12 @@ namespace svt { namespace table { //........................................................................ + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::graphic::XGraphic; + using ::com::sun::star::uno::Any; + /** === end UNO using === **/ + //==================================================================== //= TempHideCursor //==================================================================== @@ -179,19 +185,17 @@ namespace svt { namespace table { return -1; } - virtual std::vector >& getCellContent() + virtual void getCellContent( RowPos const i_row, ColPos const i_col, ::com::sun::star::uno::Any& o_cellContent ) { - return m_aCellContent; + (void)i_row; + (void)i_col; + o_cellContent.clear(); } - virtual std::vector& getRowHeaderName() + virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const { - aRowHeaderNames.clear(); - aRowHeaderNames.push_back(rtl::OUString::createFromAscii("")); - return aRowHeaderNames; + (void)i_rowPos; + return ::rtl::OUString(); } - private: - std::vector aRowHeaderNames; - std::vector > m_aCellContent; }; @@ -1094,7 +1098,6 @@ namespace svt { namespace table // paint all rows Rectangle aAllDataCellsArea; impl_getAllVisibleDataCellArea( aAllDataCellsArea ); - ::std::vector< std::vector< ::com::sun::star::uno::Any > >& aCellContent = m_pModel->getCellContent(); for ( TableRowGeometry aRowIterator( *this, aAllCellsWithHeaders, getTopRow() ); aRowIterator.isValid(); aRowIterator.moveDown() ) @@ -1132,10 +1135,9 @@ namespace svt { namespace table // paint the row header if ( m_pModel->hasRowHeaders() ) { - Rectangle aCurrentRowHeader( aRowHeaderArea.GetIntersection( aRowIterator.getRect() ) ); - rtl::OUString rowHeaderName = m_pModel->getRowHeaderName()[aRowIterator.getRow()]; - pRenderer->PaintRowHeader( isActiveRow, isSelectedRow, *m_pDataWindow, aCurrentRowHeader, - rStyle, rowHeaderName ); + const Rectangle aCurrentRowHeader( aRowHeaderArea.GetIntersection( aRowIterator.getRect() ) ); + pRenderer->PaintRowHeader( aRowIterator.getRow(), isActiveRow, isSelectedRow, *m_pDataWindow, aCurrentRowHeader, + rStyle ); } if ( !colCount ) continue; @@ -1146,9 +1148,12 @@ namespace svt { namespace table ) { bool isSelectedColumn = false; - ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >xGraphic; - ::com::sun::star::uno::Any rCellData = aCellContent[aRowIterator.getRow()][aCell.getColumn()]; - if(rCellData>>=xGraphic) + + Any aCellContent; + m_pModel->getCellContent( aRowIterator.getRow(), aCell.getColumn(), aCellContent ); + + Reference< XGraphic > xGraphic; + if ( aCellContent >>= xGraphic ) { Image* pImage = new Image(xGraphic); if(pImage!=NULL) @@ -1157,7 +1162,7 @@ namespace svt { namespace table } else { - ::rtl::OUString sContent = convertToString(rCellData); + ::rtl::OUString sContent = convertToString( aCellContent ); pRenderer->PaintCellString( aCell.getColumn(), isSelectedRow || isSelectedColumn, isActiveRow, *m_pDataWindow, aCell.getRect(), rStyle, sContent ); } @@ -1862,6 +1867,14 @@ namespace svt { namespace table } } + //-------------------------------------------------------------------- + ::rtl::OUString TableControl_Impl::getCellContentAsString( RowPos const i_row, ColPos const i_col ) + { + ::com::sun::star::uno::Any content; + m_pModel->getCellContent( i_row, i_col, content ); + return convertToString( content ); + } + //-------------------------------------------------------------------- TableSize TableControl_Impl::impl_ni_ScrollRows( TableSize _nRowDelta ) { @@ -2043,8 +2056,7 @@ namespace svt { namespace table com::sun::star::uno::Sequence< ::rtl::OUString > text = m_rAntiImpl.getTextForTooltip(); if(text.getLength()==0 && cols.getLength()==0) { - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][hitCol]; - aTooltipText = convertToString(content); + aTooltipText = getCellContentAsString( hitRow, hitCol ); } else if(text.getLength() == 0) { @@ -2052,14 +2064,12 @@ namespace svt { namespace table { if(i==0) { - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][cols[i]]; - aTooltipText = convertToString(content); + aTooltipText = getCellContentAsString( hitRow, cols[i] ); } else { - aTooltipText+= ::rtl::OUString::createFromAscii("\n"); - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][cols[i]]; - aTooltipText += convertToString(content); + aTooltipText += ::rtl::OUString::createFromAscii("\n"); + aTooltipText += getCellContentAsString( hitRow, cols[i] ); } } } @@ -2088,8 +2098,7 @@ namespace svt { namespace table { if(i==0) { - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][cols[i]]; - aTooltipText = text[i] + convertToString(content); + aTooltipText = text[i] + getCellContentAsString( hitRow, cols[i] ); } else { @@ -2097,9 +2106,7 @@ namespace svt { namespace table aTooltipText+= text[i]; if(nCols > i) { - ::com::sun::star::uno::Any content = m_pModel->getCellContent()[hitRow][cols[i]]; - ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >xGraphic; - aTooltipText += convertToString(content); + aTooltipText += getCellContentAsString( hitRow, cols[i] ); } } } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 91a57752fca2..9276f8ab95c7 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -222,22 +222,32 @@ namespace svt { namespace table */ void ensureVisible( ColPos _nColumn, RowPos _nRow, bool _bAcceptPartialVisibility ); + /** retrieves the content of the given cell, converted to a string + */ + ::rtl::OUString getCellContentAsString( RowPos const i_row, ColPos const i_col ); + /** checks whether the vector with the selected rows contains the current row*/ BOOL isRowSelected(const ::std::vector& selectedRows, RowPos current); bool isRowSelected(RowPos current); + /** returns the position of the current row in the selection vector */ int getRowSelectedNumber(const ::std::vector& selectedRows, RowPos current); + /** _rCellRect contains the region, which should be invalidate after some action e.g. selecting row*/ void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect ); + /** to be called when a new row is added to the control*/ void invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect ); + /** returns the vector, which contains the selected rows*/ std::vector& getSelectedRows(); + /** updates the vector, which contains the selected rows after removing the row nRowPos*/ void removeSelectedRow(RowPos _nRowPos); void invalidateRows(); void clearSelection(); + // IAbstractTableControl virtual void hideCursor(); virtual void showCursor(); diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 12b10f755318..5f3dce2668a7 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -271,32 +271,44 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An Sequence< Sequence< Any > > cellData = m_xDataModel->getData(); if ( cellData.getLength() != 0 ) { - for (int i = 0; i < cellData.getLength(); i++) + const sal_Int32 nDataRowCount = cellData.getLength(); + + const Sequence< ::rtl::OUString > rowHeaders = m_xDataModel->getRowHeaders(); + const sal_Int32 nRowHeaderCount = rowHeaders.getLength(); + + if ( ( nRowHeaderCount != 0 ) && ( nRowHeaderCount != nDataRowCount ) ) + throw GridInvalidDataException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "row header / content data inconsistency" ) ), *this ); + + // check data consistency + sal_Int32 nDataColumnCount = 0; + for ( sal_Int32 i=0; i newRow; - Sequence< Any > rawRowData = cellData[i]; - //check whether the data row vector length matches with the column count - if(m_xColumnModel->getColumnCount() == 0) - { - m_xColumnModel->setDefaultColumns(rawRowData.getLength()); - // this will trigger notifications, which in turn will let us update our m_pTableModel - } - else - if((unsigned int)rawRowData.getLength()!=(unsigned)m_pTableModel->getColumnCount()) - throw GridInvalidDataException(rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), m_xDataModel); - - for ( int k = 0; k < rawRowData.getLength(); k++) - { - newRow.push_back(rawRowData[k]); - } - m_pTableModel->getCellContent().push_back(newRow); + const Sequence< Any >& rRawRowData = cellData[i]; + if ( ( i > 0 ) && ( rRawRowData.getLength() != nDataColumnCount ) ) + throw GridInvalidDataException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "inconsistent column counts in the row data" ) ), *this ); + nDataColumnCount = rRawRowData.getLength(); } - Sequence< ::rtl::OUString > rowHeaders = m_xDataModel->getRowHeaders(); - std::vector< rtl::OUString > newRow( - comphelper::sequenceToContainer< std::vector >(rowHeaders)); - m_pTableModel->setRowCount(m_xDataModel->getRowCount()); - m_pTableModel->setRowHeaderName(newRow); + // ensure default columns exist, if they have not previously been added + if ( ( nDataColumnCount > 0 ) && ( m_xColumnModel->getColumnCount() == 0 ) ) + m_xColumnModel->setDefaultColumns( nDataColumnCount ); + // this will trigger notifications, which in turn will let us update our m_pTableModel + + // ensure the row data has as much columns as indicate by our model + if ( nDataColumnCount != m_pTableModel->getColumnCount() ) + throw GridInvalidDataException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Grid model's column count doesn't match the row data's column count." ) ), + *this ); + + // finally add the rows + // TODO: suspend the model's notifications for the single rows, do one notification after all + // rows have been inserted + for ( TableSize i = 0; i < nDataRowCount; ++i ) + { + m_pTableModel->appendRow( cellData[i], rowHeaders[i] ); + } } sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height(); @@ -391,29 +403,23 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD { ::vos::OGuard aGuard( GetMutex() ); - std::vector< Any > newRow; - Sequence< Any > rawRowData = Event.rowData; - int colCount = m_xColumnModel->getColumnCount(); - if(colCount == 0) + const TableSize rowDataLength = (TableSize)Event.rowData.getLength(); + const TableSize colCount = m_xColumnModel->getColumnCount(); + if ( colCount == 0 ) { - m_xColumnModel->setDefaultColumns(rawRowData.getLength()); + m_xColumnModel->setDefaultColumns( rowDataLength ); // this will trigger notifications, which in turn will let us update our m_pTableModel } - else if((unsigned int)rawRowData.getLength()!=(unsigned)colCount) + if ( rowDataLength != colCount ) throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), *this ); - for ( int k = 0; k < rawRowData.getLength(); k++) - newRow.push_back(rawRowData[k]); - m_pTableModel->getCellContent().push_back(newRow); - if(m_pTableModel->hasRowHeaders()) - m_pTableModel->getRowHeaderName().push_back(Event.headerName); - m_pTableModel->setRowCount(m_pTableModel->getCellContent().size()); + m_pTableModel->appendRow( Event.rowData, Event.headerName ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowAdded: no control (anymore)!" ); - pTable->InvalidateDataWindow(m_pTableModel->getCellContent().size()-1, 0, false); - if(pTable->isAccessibleAlive()) + pTable->InvalidateDataWindow( m_pTableModel->getRowCount() - 1, 0, false ); + if ( pTable->isAccessibleAlive() ) { pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, makeAny( AccessibleTableModelChange(INSERT, m_pTableModel->getRowCount()-1, m_pTableModel->getRowCount(), 0, m_pTableModel->getColumnCount())), @@ -440,33 +446,30 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri if(Event.index == -1) { - if(!isSelectionEmpty()) + if ( !isSelectionEmpty() ) deselectAllRows(); - if(m_pTableModel->hasRowHeaders()) - m_pTableModel->getRowHeaderName().clear(); + + m_pTableModel->clearAllRows(); + pTable->clearSelection(); - m_pTableModel->getCellContent().clear(); - if(pTable->isAccessibleAlive()) + + if ( pTable->isAccessibleAlive() ) { pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, makeAny( AccessibleTableModelChange(DELETE, 0, m_pTableModel->getColumnCount(), 0, m_pTableModel->getColumnCount())), Any()); } } - else if(Event.index >= 0 && Event.index < m_pTableModel->getRowCount()) + else if ( Event.index >= 0 && Event.index < m_pTableModel->getRowCount() ) { - if(isSelectedIndex(Event.index)) + if ( isSelectedIndex( Event.index ) ) { - Sequence selected(1); + Sequence< sal_Int32 > selected(1); selected[0]=Event.index; - deselectRows(selected); + deselectRows( selected ); } - if(m_pTableModel->hasRowHeaders()) - m_pTableModel->getRowHeaderName().erase(m_pTableModel->getRowHeaderName().begin()+Event.index); - std::vector >::iterator rowPos =m_pTableModel->getCellContent().begin() + Event.index; - m_pTableModel->getCellContent().erase( rowPos ); + m_pTableModel->removeRow( Event.index ); } - m_pTableModel->setRowCount(m_pTableModel->getCellContent().size()); pTable->InvalidateDataWindow(Event.index, Event.index, true); if(pTable->isAccessibleAlive()) { @@ -521,58 +524,63 @@ void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid: } pTable->Invalidate(); } -void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) + +void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" ); - if(Event.valueName == rtl::OUString::createFromAscii("RowHeight")) + if ( Event.valueName.equalsAscii( "RowHeight" ) ) { sal_Int32 rowHeight = m_pTableModel->getRowHeight(); Event.newValue>>=rowHeight; m_pTableModel->setRowHeight(rowHeight); pTable->Invalidate(); } - else if(Event.valueName == rtl::OUString::createFromAscii("RowHeaderWidth")) + else if ( Event.valueName.equalsAscii( "RowHeaderWidth" ) ) { sal_Int32 rowHeaderWidth = m_pTableModel->getRowHeaderWidth(); Event.newValue>>=rowHeaderWidth; m_pTableModel->setRowHeaderWidth(rowHeaderWidth); pTable->Invalidate(); } - else if(Event.valueName == rtl::OUString::createFromAscii("RowHeaders")) + else if ( Event.valueName.equalsAscii( "RowHeaders" ) ) { - Sequence< rtl::OUString > headers(0); - Event.newValue>>=headers; - std::vector< rtl::OUString > headerNames( comphelper::sequenceToContainer >(headers) ); - m_pTableModel->setRowHeaderName(headerNames); + Sequence< rtl::OUString > rowHeaders; + OSL_VERIFY( Event.newValue >>= rowHeaders ); + m_pTableModel->setRowHeaderNames( rowHeaders ); pTable->Invalidate(); } - else if(Event.valueName == rtl::OUString::createFromAscii("CellUpdated")) + else if ( Event.valueName.equalsAscii( "CellUpdated" ) ) { - std::vector< std::vector< Any > >& rowContent = m_pTableModel->getCellContent(); sal_Int32 col = -1; - Event.oldValue>>=col; - rowContent[Event.index][col] = Event.newValue; - pTable->InvalidateDataWindow(Event.index, Event.index, false); + OSL_VERIFY( Event.oldValue >>= col ); + + m_pTableModel->updateCellContent( Event.index, col, Event.newValue ); + pTable->InvalidateDataWindow( Event.index, Event.index, false ); } - else if(Event.valueName == rtl::OUString::createFromAscii("RowUpdated")) + else if ( Event.valueName.equalsAscii( "RowUpdated" ) ) { - std::vector >& rowContent = m_pTableModel->getCellContent(); - Sequence< sal_Int32 > cols(0); - Sequence< Any > values(0); - Event.oldValue>>=cols; - Event.newValue>>=values; - for(int i = 0; i< cols.getLength(); i++) + Sequence< sal_Int32 > cols; + OSL_VERIFY( Event.oldValue >>= cols ); + + Sequence< Any > values; + OSL_VERIFY( Event.newValue >>= values ); + + ENSURE_OR_RETURN_VOID( cols.getLength() == values.getLength(), "SVTXGridControl::dataChanged: inconsistent array lengths!" ); + + const TableSize columnCount = m_pTableModel->getColumnCount(); + // TODO: suspend listener notification, so that the table model doesn't notify |cols.size()| different events. + // Instead, only one event should be broadcasted. + for ( ColPos i = 0; i< cols.getLength(); ++i ) { - if(cols[i]>=0 && cols[i]getColumnCount()) - rowContent[Event.index][cols[i]]=values[i]; - else - break; + ENSURE_OR_CONTINUE( ( cols[i] >= 0 ) && ( cols[i] < columnCount ), "illegal column index" ); + m_pTableModel->updateCellContent( Event.index, cols[i], values[i] ); } - pTable->InvalidateDataWindow(Event.index, Event.index, false); + + pTable->InvalidateDataWindow( Event.index, Event.index, false ); } } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index aa00f799dfd0..ed297b42dcf8 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -27,17 +27,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "unocontroltablemodel.hxx" -#include -#include "svtools/table/gridtablerenderer.hxx" #include "svtools/table/defaultinputhandler.hxx" +#include "svtools/table/gridtablerenderer.hxx" #include "svtools/table/tablecontrol.hxx" +#include "unocontroltablemodel.hxx" + +#include +#include +#include + #include +#include #include -#include #include -#include -#include +#include #include using ::rtl::OUString; @@ -204,26 +207,26 @@ using namespace ::com::sun::star::awt::grid; typedef ::std::vector< PTableModelListener > ModellListeners; struct UnoControlTableModel_Impl { - ::std::vector< PColumnModel > aColumns; - TableSize nRowCount; - bool bHasColumnHeaders; - bool bHasRowHeaders; - ScrollbarVisibility eVScrollMode; - ScrollbarVisibility eHScrollMode; - PTableRenderer pRenderer; - PTableInputHandler pInputHandler; - TableMetrics nRowHeight; - TableMetrics nColumnHeaderHeight; - TableMetrics nRowHeaderWidth; - ::std::vector aRowHeadersTitle; - ::std::vector > aCellContent; - ::com::sun::star::util::Color m_nLineColor; - ::com::sun::star::util::Color m_nHeaderColor; - ::com::sun::star::util::Color m_nTextColor; - ::com::sun::star::util::Color m_nRowColor1; - ::com::sun::star::util::Color m_nRowColor2; + ::std::vector< PColumnModel > aColumns; + TableSize nRowCount; + bool bHasColumnHeaders; + bool bHasRowHeaders; + ScrollbarVisibility eVScrollMode; + ScrollbarVisibility eHScrollMode; + PTableRenderer pRenderer; + PTableInputHandler pInputHandler; + TableMetrics nRowHeight; + TableMetrics nColumnHeaderHeight; + TableMetrics nRowHeaderWidth; + ::std::vector< ::rtl::OUString > aRowHeadersTitle; + ::std::vector< ::std::vector< Any > > aCellContent; + ::com::sun::star::util::Color m_nLineColor; + ::com::sun::star::util::Color m_nHeaderColor; + ::com::sun::star::util::Color m_nTextColor; + ::com::sun::star::util::Color m_nRowColor1; + ::com::sun::star::util::Color m_nRowColor2; ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; - ModellListeners m_aListeners; + ModellListeners m_aListeners; UnoControlTableModel_Impl() :aColumns ( ) @@ -308,11 +311,6 @@ using namespace ::com::sun::star::awt::grid; m_pImpl->aColumns.resize( _nColCount); } //-------------------------------------------------------------------- - void UnoControlTableModel::setRowCount(TableSize _nRowCount) - { - m_pImpl->nRowCount = _nRowCount; - } - //-------------------------------------------------------------------- bool UnoControlTableModel::isCellEditable( ColPos col, RowPos row ) const { (void)col; @@ -490,20 +488,111 @@ using namespace ::com::sun::star::awt::grid; m_pImpl->aCellContent = cellContent; } - std::vector >& UnoControlTableModel::getCellContent() + //-------------------------------------------------------------------- + void UnoControlTableModel::getCellContent( RowPos const i_row, ColPos const i_col, Any& o_cellContent ) + { + ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( i_row < m_pImpl->aCellContent.size() ), + "UnoControlTableModel::getCellContent: illegal row index!" ); + ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); + ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( i_col < rRowContent.size() ), + "UnoControlTableModel::getCellContent: illegal column index" ); + o_cellContent = rRowContent[ i_col ]; + } + + //-------------------------------------------------------------------- + void UnoControlTableModel::updateCellContent( RowPos const i_row, ColPos const i_col, Any const & i_cellContent ) + { + ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( i_row < m_pImpl->aCellContent.size() ), + "UnoControlTableModel::getCellContent: illegal row index!" ); + ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); + ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( i_col < rRowContent.size() ), + "UnoControlTableModel::getCellContent: illegal column index" ); + rRowContent[ i_col ] = i_cellContent; + + // TODO: listener notification + } + + //-------------------------------------------------------------------- + void UnoControlTableModel::setRowHeaderNames( const Sequence< ::rtl::OUString >& i_rowHeaders ) + { + ENSURE_OR_RETURN_VOID( size_t( i_rowHeaders.getLength() ) == m_pImpl->aRowHeadersTitle.size(), + "UnoControlTableModel::setRowHeaderNames: illegal number of row headers!" ); + // this method is not intended to set a new row count, but only to modify the existing row headers + + ::std::copy( + ::comphelper::stl_begin( i_rowHeaders ), + ::comphelper::stl_end( i_rowHeaders ), + m_pImpl->aRowHeadersTitle.begin() + ); + + // TODO: listener notification + } + + //-------------------------------------------------------------------- + ::rtl::OUString UnoControlTableModel::getRowHeader( RowPos const i_rowPos ) const { - return m_pImpl->aCellContent; + ENSURE_OR_RETURN( ( i_rowPos >= 0 ) && ( i_rowPos < m_pImpl->aRowHeadersTitle.size() ), + "UnoControlTableModel::getRowHeader: illegal row position!", ::rtl::OUString() ); + return m_pImpl->aRowHeadersTitle[ i_rowPos ]; } + //-------------------------------------------------------------------- - void UnoControlTableModel::setRowHeaderName(const std::vector& cellColumnContent) + void UnoControlTableModel::appendRow( Sequence< Any > const & i_rowData, ::rtl::OUString const & i_rowHeader ) { - m_pImpl->aRowHeadersTitle = cellColumnContent; + ENSURE_OR_RETURN_VOID( i_rowData.getLength() == getColumnCount(), "UnoControlTableModel::appendRow: invalid row data!" ); + + // add row data + ::std::vector< Any > newRow( i_rowData.getLength() ); + if ( !newRow.empty() ) + ::std::copy( + ::comphelper::stl_begin( i_rowData ), + ::comphelper::stl_end( i_rowData ), + newRow.begin() + ); + + m_pImpl->aCellContent.push_back( newRow ); + + if ( hasRowHeaders() ) + m_pImpl->aRowHeadersTitle.push_back( i_rowHeader ); + + ++m_pImpl->nRowCount; + + // TODO: listener notification } - std::vector& UnoControlTableModel::getRowHeaderName() + //-------------------------------------------------------------------- + void UnoControlTableModel::removeRow( RowPos const i_rowPos ) { - return m_pImpl->aRowHeadersTitle; + ENSURE_OR_RETURN_VOID( ( i_rowPos >= 0 ) && ( i_rowPos < getRowCount() ), "UnoControlTableModel::removeRow: illegal row position!" ); + + if ( hasRowHeaders() ) + m_pImpl->aRowHeadersTitle.erase( m_pImpl->aRowHeadersTitle.begin() + i_rowPos ); + + const ::std::vector< ::std::vector< Any > >::iterator contentPos = m_pImpl->aCellContent.begin() + i_rowPos; + m_pImpl->aCellContent.erase( contentPos ); + + --m_pImpl->nRowCount; + + // TODO: listener notification } + + //-------------------------------------------------------------------- + void UnoControlTableModel::clearAllRows() + { + if ( hasRowHeaders() ) + { + ::std::vector< ::rtl::OUString > aEmpty; + m_pImpl->aRowHeadersTitle.swap( aEmpty ); + } + + ::std::vector< ::std::vector< Any > > aEmptyContent; + m_pImpl->aCellContent.swap( aEmptyContent ); + + m_pImpl->nRowCount = 0; + + // TODO: listener notification + } + //-------------------------------------------------------------------- ::com::sun::star::util::Color UnoControlTableModel::getLineColor() { diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index ac943200b77a..d7192cbd7a9b 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -133,8 +133,8 @@ class UnoControlTableModel : public ITableModel virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const; virtual void addTableModelListener( const PTableModelListener& i_listener ); virtual void removeTableModelListener( const PTableModelListener& i_listener ); - virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent(); - virtual std::vector& getRowHeaderName(); + virtual void getCellContent( RowPos const i_row, ColPos const i_col, ::com::sun::star::uno::Any& o_cellContent ); + virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const; virtual ::com::sun::star::util::Color getLineColor(); virtual ::com::sun::star::util::Color getHeaderBackgroundColor(); virtual ::com::sun::star::util::Color getTextColor(); @@ -143,9 +143,21 @@ class UnoControlTableModel : public ITableModel virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign(); + // column write access + void appendColumn( const PColumnModel& i_column ); + void insertColumn( ColPos const i_position, const PColumnModel& i_column ); + void removeAllColumns(); + + // row write access + void setRowHeaderNames( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_rowHeaders ); + void appendRow( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > const & i_rowData, ::rtl::OUString const & i_rowHeader ); + void removeRow( RowPos const i_rowPos ); + void clearAllRows(); + + // cell data write access + void updateCellContent( RowPos const i_rowPos, ColPos const i_colPos, ::com::sun::star::uno::Any const & i_cellContent ); + // other operations - void setRowCount(TableSize _nRowCount); - void setRowHeaderName(const std::vector& cellColumnContent); void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setCellContent(const std::vector >& cellContent); @@ -158,9 +170,6 @@ class UnoControlTableModel : public ITableModel void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor); void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor); void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); - void appendColumn( const PColumnModel& i_column ); - void insertColumn( ColPos const i_position, const PColumnModel& i_column ); - void removeAllColumns(); }; inline void UnoControlTableModel::SetColumnWidth( ColPos _nColumn, TableMetrics _nWidth100thMM ) diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index bf6eb5ed501c..6adf7b994035 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -149,24 +149,25 @@ void SAL_CALL DefaultGridDataModel::setRowHeight(::sal_Int32 value) throw (::com //--------------------------------------------------------------------- -void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & i_rowHeaders ) throw (::com::sun::star::uno::RuntimeException) { - ::com::sun::star::uno::Sequence< ::rtl::OUString > oldValue( comphelper::containerToSequence(rowHeaders) ); + ::com::sun::star::uno::Sequence< ::rtl::OUString > oldValue( comphelper::containerToSequence( rowHeaders ) ); - std::vector< rtl::OUString>::iterator iterator; - int i = 0; - int sequenceSize = value.getLength(); + const sal_Int32 sequenceSize = i_rowHeaders.getLength(); - for(iterator = rowHeaders.begin(); iterator != rowHeaders.end(); iterator++) + sal_Int32 i = 0; + for ( std::vector< rtl::OUString >::iterator iterator = rowHeaders.begin(); + iterator != rowHeaders.end(); + ++iterator, ++i + ) { if ( sequenceSize > i ) - *iterator = value[i]; + *iterator = i_rowHeaders[i]; else *iterator = ::rtl::OUString(); - i++; } - broadcast_changed( ROWHEADERS, 0, Any(oldValue), Any(comphelper::containerToSequence(rowHeaders)) ); + broadcast_changed( ROWHEADERS, 0, Any( oldValue ), Any( comphelper::containerToSequence( rowHeaders ) ) ); } //--------------------------------------------------------------------- -- cgit From b83e7371c47c0cf5373ec6e99efe05f9a4da09f5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 3 Jan 2011 23:14:55 +0100 Subject: gridsort: allow cloning grid columns, and the (default) grid data/column model --- svtools/source/uno/unocontroltablemodel.cxx | 2 +- .../controls/grid/defaultgridcolumnmodel.cxx | 49 ++- .../controls/grid/defaultgridcolumnmodel.hxx | 7 +- .../source/controls/grid/defaultgriddatamodel.cxx | 472 +++++++++++---------- .../source/controls/grid/defaultgriddatamodel.hxx | 15 +- toolkit/source/controls/grid/gridcolumn.cxx | 24 +- toolkit/source/controls/grid/gridcolumn.hxx | 4 + toolkit/source/controls/grid/gridcontrol.cxx | 32 +- 8 files changed, 355 insertions(+), 250 deletions(-) diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index ed297b42dcf8..88776e6dc0f9 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -84,7 +84,7 @@ using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- UnoControlTableColumn::UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ) :m_nID( 0 ) - ,m_xGridColumn( i_gridColumn, UNO_SET_THROW ) + ,m_xGridColumn( i_gridColumn, UNO_QUERY_THROW ) { } diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 16e0c8a0a0bc..c1cafd568326 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -59,6 +59,7 @@ namespace toolkit using ::com::sun::star::container::ContainerEvent; using ::com::sun::star::uno::Exception; using ::com::sun::star::lang::IndexOutOfBoundsException; + using ::com::sun::star::util::XCloneable; /** === end UNO using === **/ //================================================================================================================== @@ -74,6 +75,35 @@ namespace toolkit { } + //------------------------------------------------------------------------------------------------------------------ + DefaultGridColumnModel::DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource ) + :DefaultGridColumnModel_Base( m_aMutex ) + ,m_aContext( i_copySource.m_aContext ) + ,m_aContainerListeners( m_aMutex ) + ,m_aColumns() + ,m_nColumnHeaderHeight( i_copySource.m_nColumnHeaderHeight ) + { + Columns aColumns; + aColumns.reserve( i_copySource.m_aColumns.size() ); + try + { + for ( Columns::const_iterator col = i_copySource.m_aColumns.begin(); + col != i_copySource.m_aColumns.end(); + ++col + ) + { + const Reference< XCloneable > xCloneable( *col, UNO_QUERY_THROW ); + aColumns.push_back( Reference< XGridColumn >( xCloneable->createClone(), UNO_QUERY_THROW ) ); + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + if ( aColumns.size() == i_copySource.m_aColumns.size() ) + m_aColumns.swap( aColumns ); + } + //------------------------------------------------------------------------------------------------------------------ DefaultGridColumnModel::~DefaultGridColumnModel() { @@ -210,18 +240,9 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::copyColumn(const Reference< XGridColumn > & column) throw (RuntimeException) + Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::copyColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException) { - Reference< XGridColumn > xColumn( m_aContext.createComponent( "com.sun.star.awt.grid.GridColumn" ), UNO_QUERY_THROW ); - xColumn->setColumnWidth(column->getColumnWidth()); - xColumn->setPreferredWidth(column->getPreferredWidth()); - xColumn->setMaxWidth(column->getMaxWidth()); - xColumn->setMinWidth(column->getMinWidth()); - xColumn->setPreferredWidth(column->getPreferredWidth()); - xColumn->setResizeable(column->getResizeable()); - xColumn->setTitle(column->getTitle()); - xColumn->setHorizontalAlign(column->getHorizontalAlign()); - return xColumn; + return Reference< XGridColumn >( i_column->createClone(), UNO_QUERY_THROW ); } //------------------------------------------------------------------------------------------------------------------ @@ -293,6 +314,12 @@ namespace toolkit } } + //------------------------------------------------------------------------------------------------------------------ + Reference< XCloneable > SAL_CALL DefaultGridColumnModel::createClone( ) throw (RuntimeException) + { + return new DefaultGridColumnModel( *this ); + } + //...................................................................................................................... } // namespace toolkit //...................................................................................................................... diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index 4b4382048566..dbd89df57b7d 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -28,7 +28,6 @@ /** === begin UNO includes === **/ #include #include -//#include #include #include #include @@ -54,7 +53,8 @@ class DefaultGridColumnModel :public ::cppu::BaseMutex ,public DefaultGridColumnModel_Base { public: - DefaultGridColumnModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory); + DefaultGridColumnModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); + DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource ); virtual ~DefaultGridColumnModel(); // XGridColumnModel @@ -76,6 +76,9 @@ public: virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + // XCloneable + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); + // OComponentHelper virtual void SAL_CALL disposing(); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 6adf7b994035..eb6f777c3b41 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -45,301 +45,315 @@ using namespace ::com::sun::star::lang; #define ROWUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowUpdated" )) #define ROWHEADERWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaderWidth" )) +//...................................................................................................................... namespace toolkit +//...................................................................................................................... { + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::lang::XComponent; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::util::XCloneable; + /** === end UNO using === **/ + + //================================================================================================================== + //= DefaultGridDataModel + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + DefaultGridDataModel::DefaultGridDataModel() + :m_nRowHeight(0) + ,m_aRowHeaders() + ,m_nRowHeaderWidth(10) + { + } -/////////////////////////////////////////////////////////////////////// -// class DefaultGridDataModel -/////////////////////////////////////////////////////////////////////// - -DefaultGridDataModel::DefaultGridDataModel() -: rowHeight(0), - rowHeaders(std::vector< ::rtl::OUString >()), - m_nRowHeaderWidth(10) -{ -} - -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + DefaultGridDataModel::DefaultGridDataModel( DefaultGridDataModel const & i_copySource ) + :m_nRowHeight( i_copySource.m_nRowHeight ) + ,m_aData( i_copySource.m_aData ) + ,m_aRowHeaders( i_copySource.m_aRowHeaders ) + ,m_nRowHeaderWidth( i_copySource.m_nRowHeaderWidth ) + { + } -DefaultGridDataModel::~DefaultGridDataModel() -{ -} + //------------------------------------------------------------------------------------------------------------------ + DefaultGridDataModel::~DefaultGridDataModel() + { + } -void DefaultGridDataModel::broadcast( broadcast_type eType, const GridDataEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException) -{ - ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridDataListener::static_type() ); - if( pIter ) + //------------------------------------------------------------------------------------------------------------------ + void DefaultGridDataModel::broadcast( broadcast_type eType, const GridDataEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException) { - ::cppu::OInterfaceIteratorHelper aListIter(*pIter); - while(aListIter.hasMoreElements()) + ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridDataListener::static_type() ); + if( pIter ) { - XGridDataListener* pListener = static_cast(aListIter.next()); - switch( eType ) + ::cppu::OInterfaceIteratorHelper aListIter(*pIter); + while(aListIter.hasMoreElements()) { - case row_added: pListener->rowAdded(aEvent); break; - case row_removed: pListener->rowRemoved(aEvent); break; - case data_changed: pListener->dataChanged(aEvent); break; + XGridDataListener* pListener = static_cast(aListIter.next()); + switch( eType ) + { + case row_added: pListener->rowAdded(aEvent); break; + case row_removed: pListener->rowRemoved(aEvent); break; + case data_changed: pListener->dataChanged(aEvent); break; + } } } } -} -//--------------------------------------------------------------------- - -void DefaultGridDataModel::broadcast_changed( ::rtl::OUString name, sal_Int32 index, Any oldValue, Any newValue) throw (::com::sun::star::uno::RuntimeException) -{ - Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridDataEvent aEvent( xSource, name, oldValue, newValue, index, ::rtl::OUString(), Sequence< Any >()); - broadcast( data_changed, aEvent); -} + //------------------------------------------------------------------------------------------------------------------ + void DefaultGridDataModel::broadcast_changed( ::rtl::OUString name, sal_Int32 index, Any oldValue, Any newValue) throw (::com::sun::star::uno::RuntimeException) + { + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridDataEvent aEvent( xSource, name, oldValue, newValue, index, ::rtl::OUString(), Sequence< Any >()); + broadcast( data_changed, aEvent); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void DefaultGridDataModel::broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, + ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException) + { + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, (const ::com::sun::star::uno::Sequence< Any >&)rowData ); + broadcast( row_added, aEvent); + } -void DefaultGridDataModel::broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, - ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException) -{ - Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, (const ::com::sun::star::uno::Sequence< Any >&)rowData ); - broadcast( row_added, aEvent); -} + //------------------------------------------------------------------------------------------------------------------ + void DefaultGridDataModel::broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, + ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException) + { + Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, rowData ); + broadcast( row_removed, aEvent); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeight() throw (::com::sun::star::uno::RuntimeException) + { + return m_nRowHeight; + } -void DefaultGridDataModel::broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, - ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException) -{ - Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, rowData ); - broadcast( row_removed, aEvent); -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::setRowHeight(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) + { + sal_Int32 oldValue = m_nRowHeight; + m_nRowHeight = value; -//--------------------------------------------------------------------- + broadcast_changed( ROWHEIGHT, 0, Any(oldValue), Any(value)); + } -//--------------------------------------------------------------------- -// XDefaultGridDataModel -//--------------------------------------------------------------------- -::sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeight() throw (::com::sun::star::uno::RuntimeException) -{ - return rowHeight; -} + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException) + { + return m_aData.size(); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getRowHeaders() throw (::com::sun::star::uno::RuntimeException) + { + return comphelper::containerToSequence(m_aRowHeaders); + } -void SAL_CALL DefaultGridDataModel::setRowHeight(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) -{ - sal_Int32 oldValue = rowHeight; - rowHeight = value; + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & i_rowHeaders ) throw (::com::sun::star::uno::RuntimeException) + { + ::com::sun::star::uno::Sequence< ::rtl::OUString > oldValue( comphelper::containerToSequence( m_aRowHeaders ) ); - broadcast_changed( ROWHEIGHT, 0, Any(oldValue), Any(value)); -} + const sal_Int32 sequenceSize = i_rowHeaders.getLength(); -//--------------------------------------------------------------------- + sal_Int32 i = 0; + for ( std::vector< rtl::OUString >::iterator iterator = m_aRowHeaders.begin(); + iterator != m_aRowHeaders.end(); + ++iterator, ++i + ) + { + if ( sequenceSize > i ) + *iterator = i_rowHeaders[i]; + else + *iterator = ::rtl::OUString(); + } -::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException) -{ - return data.size(); -} + broadcast_changed( ROWHEADERS, 0, Any( oldValue ), Any( comphelper::containerToSequence( m_aRowHeaders ) ) ); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & rRowdata) throw (::com::sun::star::uno::RuntimeException) + { + // store header name + m_aRowHeaders.push_back(headername); -::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getRowHeaders() throw (::com::sun::star::uno::RuntimeException) -{ - return comphelper::containerToSequence(rowHeaders); -} + // store row m_aData + std::vector< Any > newRow; + for ( int i = 0; i < rRowdata.getLength();i++) + { + newRow.push_back(rRowdata[i]); + } -//--------------------------------------------------------------------- + m_aData.push_back( newRow ); -void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & i_rowHeaders ) throw (::com::sun::star::uno::RuntimeException) -{ - ::com::sun::star::uno::Sequence< ::rtl::OUString > oldValue( comphelper::containerToSequence( rowHeaders ) ); + broadcast_add( m_aData.size()-1, headername, comphelper::containerToSequence(newRow)); - const sal_Int32 sequenceSize = i_rowHeaders.getLength(); + } - sal_Int32 i = 0; - for ( std::vector< rtl::OUString >::iterator iterator = rowHeaders.begin(); - iterator != rowHeaders.end(); - ++iterator, ++i - ) + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) { - if ( sequenceSize > i ) - *iterator = i_rowHeaders[i]; + if ( index >= 0 && index <= getRowCount()-1) + { + ::rtl::OUString headerName( (::rtl::OUString) m_aRowHeaders[index] ); + m_aRowHeaders.erase(m_aRowHeaders.begin() + index); + + Sequence< Any >& rowData ( (Sequence< Any >&)m_aData[index] ); + m_aData.erase(m_aData.begin() + index); + broadcast_remove( index, headerName, rowData); + } else - *iterator = ::rtl::OUString(); + return; } - broadcast_changed( ROWHEADERS, 0, Any( oldValue ), Any( comphelper::containerToSequence( rowHeaders ) ) ); -} - -//--------------------------------------------------------------------- - -void SAL_CALL DefaultGridDataModel::addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & rRowdata) throw (::com::sun::star::uno::RuntimeException) -{ - // store header name - rowHeaders.push_back(headername); - - // store row data - std::vector< Any > newRow; - for ( int i = 0; i < rRowdata.getLength();i++) + //------------------------------------------------------------------------------------------------------------------ + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< Any > > SAL_CALL DefaultGridDataModel::getData() throw (::com::sun::star::uno::RuntimeException) { - newRow.push_back(rRowdata[i]); - } - data.push_back( newRow ); + std::vector< std::vector< Any > >::iterator iterator; + std::vector< Sequence< Any > > dummyContainer(0); - broadcast_add( data.size()-1, headername, comphelper::containerToSequence(newRow)); -} + for(iterator = m_aData.begin(); iterator != m_aData.end(); iterator++) + { + Sequence< Any > cols(comphelper::containerToSequence(*iterator)); + dummyContainer.push_back( cols ); + } + Sequence< Sequence< Any > > dataSequence(comphelper::containerToSequence(dummyContainer)); -//--------------------------------------------------------------------- + return dataSequence; + } -void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) -{ - if ( index >= 0 && index <= getRowCount()-1) + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) { - ::rtl::OUString headerName( (::rtl::OUString) rowHeaders[index] ); - rowHeaders.erase(rowHeaders.begin() + index); - - Sequence< Any >& rowData ( (Sequence< Any >&)data[index] ); - data.erase(data.begin() + index); - broadcast_remove( index, headerName, rowData); + BrdcstHelper.addListener( XGridDataListener::static_type(), xListener ); } - else - return; -} -//--------------------------------------------------------------------- -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< Any > > SAL_CALL DefaultGridDataModel::getData() throw (::com::sun::star::uno::RuntimeException) -{ - - std::vector< std::vector< Any > >::iterator iterator; - std::vector< Sequence< Any > > dummyContainer(0); - - for(iterator = data.begin(); iterator != data.end(); iterator++) + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) { - Sequence< Any > cols(comphelper::containerToSequence(*iterator)); - dummyContainer.push_back( cols ); + BrdcstHelper.removeListener( XGridDataListener::static_type(), xListener ); } - Sequence< Sequence< Any > > dataSequence(comphelper::containerToSequence(dummyContainer)); - - return dataSequence; -} -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::removeAll() throw (RuntimeException) + { + m_aRowHeaders.clear(); + m_aData.clear(); + broadcast_remove( -1, ::rtl::OUString(), 0); + } -void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.addListener( XGridDataListener::static_type(), xListener ); -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException) + { + sal_Int32 oldValue = m_nRowHeaderWidth; + m_nRowHeaderWidth = _value; + broadcast_changed( ROWHEADERWIDTH, 0, Any(oldValue), Any(_value) ); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeaderWidth() throw (::com::sun::star::uno::RuntimeException) + { + return m_nRowHeaderWidth; + } -void SAL_CALL DefaultGridDataModel::removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.removeListener( XGridDataListener::static_type(), xListener ); -} -//--------------------------------------------------------------------- -void SAL_CALL DefaultGridDataModel::removeAll() throw (RuntimeException) -{ - rowHeaders.clear(); - data.clear(); - broadcast_remove( -1, ::rtl::OUString(), 0); -} -//--------------------------------------------------------------------- -void SAL_CALL DefaultGridDataModel::setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException) -{ - sal_Int32 oldValue = m_nRowHeaderWidth; - m_nRowHeaderWidth = _value; - broadcast_changed( ROWHEADERWIDTH, 0, Any(oldValue), Any(_value) ); -} -//--------------------------------------------------------------------- -sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeaderWidth() throw (::com::sun::star::uno::RuntimeException) -{ - return m_nRowHeaderWidth; -} -//--------------------------------------------------------------------- -void SAL_CALL DefaultGridDataModel::updateCell(::sal_Int32 row, ::sal_Int32 column, const Any& value) throw (::com::sun::star::uno::RuntimeException) -{ - if(row >= 0 && row < (signed)data.size()) + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::updateCell(::sal_Int32 row, ::sal_Int32 column, const Any& value) throw (::com::sun::star::uno::RuntimeException) { - if(column >= 0 && column < (signed)data[0].size()) + if(row >= 0 && row < (signed)m_aData.size()) { - data[row][column] = value; - Sequence< Any >dataSeq(comphelper::containerToSequence(data[row])); - broadcast_changed( CELLUPDATED, row, Any(column), value ); + if(column >= 0 && column < (signed)m_aData[0].size()) + { + m_aData[row][column] = value; + Sequence< Any >dataSeq(comphelper::containerToSequence(m_aData[row])); + broadcast_changed( CELLUPDATED, row, Any(column), value ); + } } } -} -//--------------------------------------------------------------------- -void SAL_CALL DefaultGridDataModel::updateRow(::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 > & columns, const ::com::sun::star::uno::Sequence< Any > & values) throw (::com::sun::star::uno::RuntimeException) -{ - if(row >= 0 && row < (signed)data.size()) + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::updateRow(::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 > & columns, const ::com::sun::star::uno::Sequence< Any > & values) throw (::com::sun::star::uno::RuntimeException) { - if(columns.getLength() == values.getLength()) + if(row >= 0 && row < (signed)m_aData.size()) { - for(int i = 0; i < columns.getLength(); i++) - data[row][i] = values[i]; - Sequence< Any >dataSeq(comphelper::containerToSequence(data[row])); - broadcast_changed( ROWUPDATED, row, Any(columns), Any(values) ); + if(columns.getLength() == values.getLength()) + { + for(int i = 0; i < columns.getLength(); i++) + m_aData[row][i] = values[i]; + Sequence< Any >dataSeq(comphelper::containerToSequence(m_aData[row])); + broadcast_changed( ROWUPDATED, row, Any(columns), Any(values) ); + } } } -} -//--------------------------------------------------------------------- -// XComponent -//--------------------------------------------------------------------- - -void SAL_CALL DefaultGridDataModel::dispose() throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - ::com::sun::star::lang::EventObject aEvent; - aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); - BrdcstHelper.aLC.disposeAndClear( aEvent ); - -} - -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::dispose() throw (RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); -void SAL_CALL DefaultGridDataModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.addListener( XEventListener::static_type(), xListener ); -} + ::com::sun::star::lang::EventObject aEvent; + aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); + BrdcstHelper.aLC.disposeAndClear( aEvent ); -//--------------------------------------------------------------------- + } -void SAL_CALL DefaultGridDataModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) -{ - BrdcstHelper.removeListener( XEventListener::static_type(), xListener ); -} -//--------------------------------------------------------------------- -// XServiceInfo -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) + { + BrdcstHelper.addListener( XEventListener::static_type(), xListener ); + } -::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) ); - return aImplName; -} + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) + { + BrdcstHelper.removeListener( XEventListener::static_type(), xListener ); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) ); + return aImplName; + } -sal_Bool SAL_CALL DefaultGridDataModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - return ServiceName.equalsAscii( szServiceName_DefaultGridDataModel ); -} + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL DefaultGridDataModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + return ServiceName.equalsAscii( szServiceName_DefaultGridDataModel ); + } -//--------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException) + { + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridDataModel ) ); + static const Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; + } -::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException) -{ - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridDataModel ) ); - static const Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; -} + //------------------------------------------------------------------------------------------------------------------ + Reference< XCloneable > SAL_CALL DefaultGridDataModel::createClone( ) throw (RuntimeException) + { + return new DefaultGridDataModel( *this ); + } -} +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... Reference< XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const Reference< XMultiServiceFactory >& ) { diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index b30bd758147c..242c8ba514ab 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -57,6 +57,7 @@ class DefaultGridDataModel : public ::cppu::WeakImplHelper2< XGridDataModel, XSe { public: DefaultGridDataModel(); + DefaultGridDataModel( DefaultGridDataModel const & i_copySource ); virtual ~DefaultGridDataModel(); // XGridDataModel @@ -66,7 +67,7 @@ public: virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowHeaders() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< Any > > SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & data) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & m_aData) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); virtual void SAL_CALL removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); @@ -75,11 +76,15 @@ public: virtual sal_Int32 SAL_CALL getRowHeaderWidth() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCell( ::sal_Int32 row, ::sal_Int32 column, const ::com::sun::star::uno::Any& value ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRow( ::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& values ) throw (::com::sun::star::uno::RuntimeException); + // XComponent virtual void SAL_CALL dispose( ) throw (RuntimeException); virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException); virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException); + // XCloneable + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); + // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException); virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException); @@ -92,10 +97,10 @@ private: void broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException); void broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException); - sal_Int32 rowHeight; - std::vector< std::vector < Any > > data; - std::vector< ::rtl::OUString > rowHeaders; - sal_Int32 m_nRowHeaderWidth; + sal_Int32 m_nRowHeight; + std::vector< std::vector < Any > > m_aData; + std::vector< ::rtl::OUString > m_aRowHeaders; + sal_Int32 m_nRowHeaderWidth; }; } diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index d966e6656661..576871fc677a 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -46,11 +46,13 @@ namespace toolkit using namespace ::com::sun::star::awt; using namespace ::com::sun::star::awt::grid; using namespace ::com::sun::star::lang; + using namespace ::com::sun::star::util; using namespace ::com::sun::star::style; //================================================================================================================== //= DefaultGridColumnModel //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ GridColumn::GridColumn() :GridColumn_Base( m_aMutex ) ,m_aIdentifier() @@ -60,7 +62,21 @@ namespace toolkit ,m_nMaxWidth(0) ,m_nMinWidth(0) ,m_bResizeable(true) - ,m_eHorizontalAlign(HorizontalAlignment(0)) + ,m_eHorizontalAlign( HorizontalAlignment_LEFT ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + GridColumn::GridColumn( GridColumn const & i_copySource ) + :GridColumn_Base( m_aMutex ) + ,m_aIdentifier( i_copySource.m_aIdentifier ) + ,m_nIndex( i_copySource.m_nIndex ) + ,m_nColumnWidth( i_copySource.m_nColumnWidth ) + ,m_nPreferredWidth( i_copySource.m_nPreferredWidth ) + ,m_nMaxWidth( i_copySource.m_nMaxWidth ) + ,m_nMinWidth( i_copySource.m_nMinWidth ) + ,m_bResizeable( i_copySource.m_bResizeable ) + ,m_eHorizontalAlign( i_copySource.m_eHorizontalAlign ) { } @@ -283,6 +299,12 @@ namespace toolkit const Sequence< ::rtl::OUString > aSeq( &aServiceName, 1 ); return aSeq; } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XCloneable > SAL_CALL GridColumn::createClone( ) throw (RuntimeException) + { + return new GridColumn( *this ); + } } ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index f621f68c9d88..b8d70551032a 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -51,6 +51,7 @@ class GridColumn :public ::cppu::BaseMutex { public: GridColumn(); + GridColumn( GridColumn const & i_copySource ); virtual ~GridColumn(); // ::com::sun::star::awt::grid::XGridColumn @@ -78,6 +79,9 @@ public: virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + // XCloneable (base of XGridColumn) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); + // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 79b8ae8a6c61..8b323648a887 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -92,8 +92,38 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: //---------------------------------------------------------------------------------------------------------------------- UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) -: UnoControlModel( rModel ) + :UnoControlModel( rModel ) { + // clone the data model + const Reference< XFastPropertySet > xCloneSource( &const_cast< UnoGridModel& >( rModel ) ); + bool success = false; + try + { + const Reference< XCloneable > xCloneable( xCloneSource->getFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL ), UNO_QUERY_THROW ); + setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL, makeAny( xCloneable->createClone() ) ); + success = true; + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + if ( !success ) + setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) ); + + // clone the column model + success = false; + try + { + const Reference< XCloneable > xCloneable( xCloneSource->getFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL ), UNO_QUERY_THROW ); + setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( xCloneable->createClone() ) ); + success = true; + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + if ( !success ) + setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) ); } //---------------------------------------------------------------------------------------------------------------------- -- cgit From 078fd62ab2f2269dbfe9aa0e1e7ed8c8dc487bdc Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 3 Jan 2011 23:14:55 +0100 Subject: gridsort: allow cloning grid columns, and the (default) grid data/column model --- offapi/com/sun/star/awt/grid/XGridColumn.idl | 12 ++++++++++-- offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 5 +++++ offapi/com/sun/star/awt/grid/XGridDataModel.idl | 12 ++++++++++-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index 07a082ada023..0b7ae843ffaa 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -30,7 +30,7 @@ #include #include #include - +#include //============================================================================= @@ -41,8 +41,16 @@ module com { module sun { module star { module awt { module grid { /** The XGridColumn defines the properties and behavior of a column in a grid control @since OOo 3.3.0 */ -interface XGridColumn : com::sun::star::lang::XComponent +interface XGridColumn { + /** implements life time control for the component + */ + interface ::com::sun::star::lang::XComponent; + + /** allows cloning the complete grid column + */ + interface ::com::sun::star::util::XCloneable; + /** Specifies the an idendifier of the colomn.**/ [attribute] any Identifier; diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index 39896714789c..da3f2d6aaf62 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -57,6 +58,10 @@ interface XGridColumnModel */ interface ::com::sun::star::container::XContainer; + /** allows cloning the complete column model + */ + interface ::com::sun::star::util::XCloneable; + /**Specifies the height of column header. */ [attribute] long ColumnHeaderHeight; diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index fb7533467581..e4abd1664349 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -30,9 +30,9 @@ #include +#include #include - //============================================================================= module com { module sun { module star { module awt { module grid { @@ -45,8 +45,16 @@ module com { module sun { module star { module awt { module grid { @since OOo 3.3.0 */ -interface XGridDataModel: ::com::sun::star::lang::XComponent +interface XGridDataModel { + /** implements life time control for the component + */ + interface ::com::sun::star::lang::XComponent; + + /** allows cloning the complete column model + */ + interface ::com::sun::star::util::XCloneable; + /** Specifies the height of each row. */ [attribute] long RowHeight; -- cgit From d48dfdc09b7880b1d22e8fe44f70c81209bd1f19 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 3 Jan 2011 23:18:47 +0100 Subject: gridsort: IColumnModel: make the ID attribute an css.uno.Any, so it can be exchanged with XGridColumn's identifier --- svtools/inc/svtools/table/tablemodel.hxx | 5 +++-- svtools/inc/svtools/table/tabletypes.hxx | 3 --- svtools/source/uno/unocontroltablemodel.cxx | 28 +++++++++++++++++++++------- svtools/source/uno/unocontroltablemodel.hxx | 9 ++++----- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 273ed003d7aa..a9137eab28a2 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -162,7 +162,8 @@ namespace svt { namespace table @see setID */ - virtual ColumnID getID() const = 0; + virtual ::com::sun::star::uno::Any + getID() const = 0; /** sets a new column ID @@ -173,7 +174,7 @@ namespace svt { namespace table @see getID */ - virtual bool setID( const ColumnID _nID ) = 0; + virtual void setID( const ::com::sun::star::uno::Any& _nID ) = 0; /** returns the name of the column diff --git a/svtools/inc/svtools/table/tabletypes.hxx b/svtools/inc/svtools/table/tabletypes.hxx index 645120e30d4b..0d285d420323 100644 --- a/svtools/inc/svtools/table/tabletypes.hxx +++ b/svtools/inc/svtools/table/tabletypes.hxx @@ -49,9 +49,6 @@ namespace svt { namespace table */ typedef sal_Int32 AnyPos; - /// the ID of a column in a table - typedef sal_Int32 ColumnID; - typedef sal_Int32 TableMetrics; /** special column width value which indicates that the column should be automatically resized to fit the view diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 88776e6dc0f9..dfbde6cb4058 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -83,22 +83,36 @@ using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- UnoControlTableColumn::UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ) - :m_nID( 0 ) - ,m_xGridColumn( i_gridColumn, UNO_QUERY_THROW ) + :m_xGridColumn( i_gridColumn, UNO_QUERY_THROW ) { } //-------------------------------------------------------------------- - ColumnID UnoControlTableColumn::getID() const + Any UnoControlTableColumn::getID() const { - return m_nID; + Any aID; + try + { + aID = m_xGridColumn->getIdentifier(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return aID; } //-------------------------------------------------------------------- - bool UnoControlTableColumn::setID( const ColumnID _nID ) + void UnoControlTableColumn::setID( const Any& i_ID ) { - m_nID = _nID; - return true; + try + { + m_xGridColumn->setIdentifier( i_ID ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } //-------------------------------------------------------------------- diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index d7192cbd7a9b..9eaa202f8cd0 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -51,17 +51,16 @@ using namespace ::svt::table; class UnoControlTableColumn : public IColumnModel { private: - ColumnID m_nID; - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > - m_xGridColumn; + m_xGridColumn; public: UnoControlTableColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn >& i_gridColumn ); // IColumnModel overridables - virtual ColumnID getID() const; - virtual bool setID( const ColumnID _nID ); + virtual ::com::sun::star::uno::Any + getID() const; + virtual void setID( const ::com::sun::star::uno::Any& i_ID ); virtual String getName() const; virtual void setName( const String& _rName ); virtual bool isResizable() const; -- cgit From 891179797b83156811f4a0607c64ad14cf5c90ff Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 4 Jan 2011 10:26:14 +0100 Subject: gridsort: don't decide in the TableControl whether a cell content is a image or a string-convertible - this is the renderer's task in the original design. --- svtools/inc/svtools/table/gridtablerenderer.hxx | 28 ++- svtools/inc/svtools/table/tablerenderer.hxx | 39 +-- svtools/source/table/cellvalueconversion.cxx | 73 ++++++ svtools/source/table/cellvalueconversion.hxx | 52 ++++ svtools/source/table/gridtablerenderer.cxx | 309 ++++++++++++++---------- svtools/source/table/makefile.mk | 3 +- svtools/source/table/tablecontrol_impl.cxx | 52 +--- svtools/source/table/tablecontrol_impl.hxx | 1 - toolkit/source/controls/grid/gridcontrol.cxx | 9 +- 9 files changed, 343 insertions(+), 223 deletions(-) create mode 100755 svtools/source/table/cellvalueconversion.cxx create mode 100755 svtools/source/table/cellvalueconversion.hxx diff --git a/svtools/inc/svtools/table/gridtablerenderer.hxx b/svtools/inc/svtools/table/gridtablerenderer.hxx index 01a2e308f3c0..01492ae26fc4 100644 --- a/svtools/inc/svtools/table/gridtablerenderer.hxx +++ b/svtools/inc/svtools/table/gridtablerenderer.hxx @@ -43,9 +43,6 @@ namespace svt { namespace table This class is able to paint a table grid, table headers, and cell backgrounds according to the selected/active state of cells. - - TODO update the documentation when it's decided whether this renderer - also does value handling */ class GridTableRenderer : public ITableRenderer { @@ -74,7 +71,7 @@ namespace svt { namespace table */ RowPos getCurrentRow(); - protected: + public: // ITableRenderer overridables virtual void PaintHeaderArea( OutputDevice& _rDevice, const Rectangle& _rArea, @@ -91,16 +88,27 @@ namespace svt { namespace table bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ); - virtual void PaintCellImage( ColPos _nColumn, - bool _bActive, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, - const StyleSettings& _rStyle, Image* _pCellData ); - virtual void PaintCellString( ColPos _nColumn, + virtual void PaintCell( ColPos const i_col, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, - const StyleSettings& _rStyle, rtl::OUString& _rText ); + const StyleSettings& _rStyle ); virtual void ShowCellCursor( Window& _rView, const Rectangle& _rCursorRect); virtual void HideCellCursor( Window& _rView, const Rectangle& _rCursorRect); + + private: + struct CellRenderContext; + + void impl_paintCellContent( + CellRenderContext const & i_context + ); + void impl_paintCellImage( + CellRenderContext const & i_context, + Image const & i_image + ); + void impl_paintCellText( + CellRenderContext const & i_context, + ::rtl::OUString const & i_text + ); }; //........................................................................ } } // namespace svt::table diff --git a/svtools/inc/svtools/table/tablerenderer.hxx b/svtools/inc/svtools/table/tablerenderer.hxx index a0c54f7a9538..4477f7065001 100644 --- a/svtools/inc/svtools/table/tablerenderer.hxx +++ b/svtools/inc/svtools/table/tablerenderer.hxx @@ -205,46 +205,11 @@ namespace svt { namespace table the are into which the cell should be painted @param _rStyle the style to be used for drawing - @param _pCellData - the content of the cell */ - virtual void PaintCellImage( ColPos _nColumn, + virtual void PaintCell( ColPos const i_col, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, - const StyleSettings& _rStyle, Image* _pCellData ) = 0; - - /** paints a certain cell - - The row to be painted is denoted by the most recent call to - ->PrepareRow. - - @param _bSelected - if and only if the cell to be painted is - selected currently. This is the case if either - the row or the column of the cell is currently selected. -
          - Note that this flag is equal to the respective flag in the - previous ->PrepareRow call, it's passed here for convinience - only. - @param _bActive - if the cell is currently active. -
          - Note that this flag is equal to the respective flag in the - previous ->PrepareRow call, it's passed here for convinience - only. - @param _rDevice - denotes the device to paint onto - @param _rArea - the are into which the cell should be painted - @param _rStyle - the style to be used for drawing - @param _rText - the content of the cell - */ - virtual void PaintCellString( ColPos _nColumn, - bool _bActive, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, - const StyleSettings& _rStyle, rtl::OUString& _rText ) = 0; + const StyleSettings& _rStyle ) = 0; /** draws a cell cursor in the given rectangle diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx new file mode 100755 index 000000000000..9b36ad095203 --- /dev/null +++ b/svtools/source/table/cellvalueconversion.cxx @@ -0,0 +1,73 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svtools.hxx" + +#include "cellvalueconversion.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace svt +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Any; + /** === end UNO using === **/ + + //================================================================================================================== + //= CellValueConversion + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString CellValueConversion::convertToString( const Any& i_value ) + { + // TODO: use css.script.XTypeConverter? + + sal_Int32 nInt = 0; + sal_Bool bBool = false; + double fDouble = 0; + ::rtl::OUString sConvertString; + + ::rtl::OUString sStringValue; + if ( i_value >>= sConvertString ) + sStringValue = sConvertString; + else if ( i_value >>= nInt ) + sStringValue = sConvertString.valueOf( nInt ); + else if ( i_value >>= bBool ) + sStringValue = sConvertString.valueOf( bBool ); + else if ( i_value >>= fDouble ) + sStringValue = sConvertString.valueOf( fDouble ); + else + OSL_ENSURE( !i_value.hasValue(), "CellValueConversion::convertToString: cannot handle the given cell content type!" ); + + return sStringValue; + } + +//...................................................................................................................... +} // namespace svt +//...................................................................................................................... diff --git a/svtools/source/table/cellvalueconversion.hxx b/svtools/source/table/cellvalueconversion.hxx new file mode 100755 index 000000000000..4d6b8c8d6aac --- /dev/null +++ b/svtools/source/table/cellvalueconversion.hxx @@ -0,0 +1,52 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_CELLVALUECONVERSION_HXX +#define SVTOOLS_CELLVALUECONVERSION_HXX + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace svt +{ +//...................................................................................................................... + + //================================================================================================================== + //= CellValueConversion + //================================================================================================================== + class CellValueConversion + { + public: + static ::rtl::OUString convertToString( const ::com::sun::star::uno::Any& i_cellValue ); + }; + +//...................................................................................................................... +} // namespace svt +//...................................................................................................................... + +#endif // SVTOOLS_CELLVALUECONVERSION_HXX diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 869c6c0a6fca..8eec7b8d437e 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -27,8 +27,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" +#include "cellvalueconversion.hxx" #include "svtools/table/gridtablerenderer.hxx" +#include + #include #include #include @@ -38,6 +41,19 @@ namespace svt { namespace table { //........................................................................ + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::graphic::XGraphic; + using ::com::sun::star::style::HorizontalAlignment; + using ::com::sun::star::style::HorizontalAlignment_LEFT; + using ::com::sun::star::style::HorizontalAlignment_CENTER; + using ::com::sun::star::style::HorizontalAlignment_RIGHT; + using ::com::sun::star::style::VerticalAlignment; + using ::com::sun::star::style::VerticalAlignment_TOP; + using ::com::sun::star::style::VerticalAlignment_MIDDLE; + using ::com::sun::star::style::VerticalAlignment_BOTTOM; + struct GridTableRenderer_Impl { ITableModel& rModel; @@ -81,11 +97,11 @@ namespace svt { namespace table _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR); Color background = m_pImpl->rModel.getHeaderBackgroundColor(); - if( background != 0xFFFFFF) - _rDevice.SetFillColor(background); + if ( background != COL_TRANSPARENT ) + _rDevice.SetFillColor( background ); else - _rDevice.SetFillColor(_rStyle.GetDialogColor()); - _rDevice.SetLineColor(_rStyle.GetSeparatorColor()); + _rDevice.SetFillColor( _rStyle.GetDialogColor() ); + _rDevice.SetLineColor( _rStyle.GetSeparatorColor() ); _rDevice.DrawRect( _rArea ); // delimiter lines at bottom/right _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); @@ -147,44 +163,44 @@ namespace svt { namespace table _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR); Color aRowBackground = m_pImpl->rModel.getOddRowBackgroundColor(); - Color line = m_pImpl->rModel.getLineColor(); + const Color lineColor = m_pImpl->rModel.getLineColor(); Color aRowBackground2 = m_pImpl->rModel.getEvenRowBackgroundColor(); - Color fieldColor = _rStyle.GetFieldColor(); - if(aRowBackground == 0xFFFFFF) + const Color fieldColor = _rStyle.GetFieldColor(); + if ( aRowBackground == COL_TRANSPARENT ) aRowBackground = fieldColor; - if(aRowBackground2 == 0xFFFFFF) + if ( aRowBackground2 == COL_TRANSPARENT ) aRowBackground2 = fieldColor; //if row is selected background color becomes blue, and lines should be also blue //if they aren't user defined - if(_bSelected) + if ( _bSelected ) { - Color aSelected(_rStyle.GetHighlightColor()); + const Color aSelected( _rStyle.GetHighlightColor() ); aRowBackground = aSelected; - if(line == 0xFFFFFF) - _rDevice.SetLineColor(aRowBackground); + if ( lineColor == COL_TRANSPARENT ) + _rDevice.SetLineColor( aRowBackground ); else - _rDevice.SetLineColor(line); + _rDevice.SetLineColor( lineColor ); } - //if row not selected, check the cases whether user defined backgrounds are set - //and set line color to be the same + // if row not selected, check the cases whether user defined backgrounds are set + // and set line color to be the same else { - if(aRowBackground2 != fieldColor && _nRow%2) + if ( ( aRowBackground2 != fieldColor ) && ( _nRow % 2 ) ) { aRowBackground = aRowBackground2; - if(line == 0xFFFFFF) - _rDevice.SetLineColor(aRowBackground); + if ( lineColor == COL_TRANSPARENT ) + _rDevice.SetLineColor( aRowBackground ); else - _rDevice.SetLineColor(line); + _rDevice.SetLineColor( lineColor ); } //fill the rows with alternating background colors if second background color is specified - else if(aRowBackground != fieldColor && line == 0xFFFFFF) - _rDevice.SetLineColor(aRowBackground); + else if ( aRowBackground != fieldColor && lineColor == COL_TRANSPARENT ) + _rDevice.SetLineColor( aRowBackground ); else { //if Line color is set, then it was user defined and should be visible //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible - _rDevice.SetLineColor(line); + _rDevice.SetLineColor( lineColor ); } } _rDevice.SetFillColor( aRowBackground ); @@ -200,96 +216,102 @@ namespace svt { namespace table void GridTableRenderer::PaintRowHeader( RowPos const i_rowPos, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) { - _rDevice.Push( PUSH_LINECOLOR); - _rDevice.SetLineColor(_rStyle.GetSeparatorColor()); + _rDevice.Push( PUSH_LINECOLOR | PUSH_TEXTCOLOR ); + + _rDevice.SetLineColor( _rStyle.GetSeparatorColor() ); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); - if(m_pImpl->rModel.getTextColor() != 0x000000) - _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + + if ( m_pImpl->rModel.getTextColor() != 0x000000 ) + _rDevice.SetTextColor( m_pImpl->rModel.getTextColor() ); else - _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); + _rDevice.SetTextColor( _rStyle.GetFieldTextColor() ); + ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; - if(m_pImpl->rModel.getVerticalAlign() == 1) + if ( m_pImpl->rModel.getVerticalAlign() == 1 ) nVerFlag = TEXT_DRAW_VCENTER; - else if(m_pImpl->rModel.getVerticalAlign() == 2) + else if ( m_pImpl->rModel.getVerticalAlign() == 2 ) nVerFlag = TEXT_DRAW_BOTTOM; - if(m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 1) + if ( m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 1 ) nHorFlag = TEXT_DRAW_CENTER; - else if(m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 2) + else if ( m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 2 ) nHorFlag = TEXT_DRAW_RIGHT; - Rectangle aRect(_rArea); + + Rectangle aRect( _rArea ); aRect.Left()+=4; aRect.Right()-=4; aRect.Bottom()-=2; - _rDevice.DrawText( aRect, m_pImpl->rModel.getRowHeader( i_rowPos ), nHorFlag | nVerFlag | TEXT_DRAW_CLIP); + _rDevice.DrawText( aRect, m_pImpl->rModel.getRowHeader( i_rowPos ), nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); + // TODO: active? selected? (void)_bActive; (void)_bSelected; - //at the moment no special paint for selected row header _rDevice.Pop(); } //-------------------------------------------------------------------- - void GridTableRenderer::PaintCellImage( ColPos _nColumn, bool _bSelected, bool _bActive, - OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle, Image* _pCellData ) + struct GridTableRenderer::CellRenderContext + { + OutputDevice& rDevice; + Rectangle const aContentArea; + StyleSettings const & rStyle; + ColPos const nColumn; + bool const bSelected; + + CellRenderContext( OutputDevice& i_device, Rectangle const & i_contentArea, + StyleSettings const & i_style, ColPos const i_column, bool const i_selected ) + :rDevice( i_device ) + ,aContentArea( i_contentArea ) + ,rStyle( i_style ) + ,nColumn( i_column ) + ,bSelected( i_selected ) + { + } + }; + + //-------------------------------------------------------------------- + void GridTableRenderer::PaintCell( ColPos const i_column, bool _bSelected, bool _bActive, + OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) { - _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR); + _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); Color background1 = m_pImpl->rModel.getOddRowBackgroundColor(); Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor(); - Color line = m_pImpl->rModel.getLineColor(); - //if row is selected and line color isn't user specified, set it blue - if(_bSelected) + Color lineColor = m_pImpl->rModel.getLineColor(); + + // if row is selected and line color isn't user specified, use the settings' color + if ( _bSelected ) { - if(line == 0xFFFFFF) - _rDevice.SetLineColor(_rStyle.GetHighlightColor()); + if ( lineColor == COL_TRANSPARENT ) + _rDevice.SetLineColor( _rStyle.GetHighlightColor() ); else - _rDevice.SetLineColor(line); + _rDevice.SetLineColor( lineColor ); } - //else set line color to the color of row background + // else set line color to the color of row background else { - if(background2 != 0xFFFFFF && m_pImpl->nCurrentRow%2) + if ( ( background2 != COL_TRANSPARENT ) && ( m_pImpl->nCurrentRow % 2 ) ) { - if(line == 0xFFFFFF) - _rDevice.SetLineColor(background2); + if ( lineColor == COL_TRANSPARENT ) + _rDevice.SetLineColor( background2 ); else - _rDevice.SetLineColor(line); + _rDevice.SetLineColor( lineColor ); } - else if(background1 != 0xFFFFFF && line == 0xFFFFFF) - _rDevice.SetLineColor(background1); + else if ( ( background1 != COL_TRANSPARENT ) && ( lineColor == COL_TRANSPARENT ) ) + _rDevice.SetLineColor( background1 ); else { //if line color is set, then it was user defined and should be visible //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible - _rDevice.SetLineColor(line); + _rDevice.SetLineColor( lineColor ); } } _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); Rectangle aRect( _rArea ); ++aRect.Left(); --aRect.Right(); - aRect.Top(); aRect.Bottom(); - Point imagePos(Point(aRect.Left(), aRect.Top())); - Size imageSize = _pCellData->GetSizePixel(); - if(aRect.GetWidth() > imageSize.Width()) - { - if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 1) - imagePos.X() = aRect.Left()+((double)(aRect.GetWidth() - imageSize.Width()))/2; - else if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 2) - imagePos.X() = aRect.Right() - imageSize.Width(); - } - else - imageSize.Width() = aRect.GetWidth(); - if(aRect.GetHeight() > imageSize.Height()) - { - if(m_pImpl->rModel.getVerticalAlign() == 1) - imagePos.Y() = aRect.Top()+((double)(aRect.GetHeight() - imageSize.Height()))/2; - else if(m_pImpl->rModel.getVerticalAlign() == 2) - imagePos.Y() = aRect.Bottom() - imageSize.Height(); - } - else - imageSize.Height() = aRect.GetHeight()-1; - Image& image (*_pCellData); - _rDevice.DrawImage(imagePos, imageSize, image, 0); + + const CellRenderContext aRenderContext( _rDevice, aRect, _rStyle, i_column, _bSelected ); + impl_paintCellContent( aRenderContext ); + _rDevice.Pop(); (void)_bActive; @@ -297,69 +319,104 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - void GridTableRenderer::PaintCellString( ColPos _nColumn, bool _bSelected, bool _bActive, - OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle, rtl::OUString& _rText ) - { - _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); - Color background1 = m_pImpl->rModel.getOddRowBackgroundColor(); - Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor(); - Color line = m_pImpl->rModel.getLineColor(); - //if row is selected and line color isn't user specified, set it blue - if(_bSelected) + void GridTableRenderer::impl_paintCellImage( CellRenderContext const & i_context, Image const & i_image ) + { + Point imagePos( Point( i_context.aContentArea.Left(), i_context.aContentArea.Top() ) ); + Size imageSize = i_image.GetSizePixel(); + if ( i_context.aContentArea.GetWidth() > imageSize.Width() ) { - if(line == 0xFFFFFF) - _rDevice.SetLineColor(_rStyle.GetHighlightColor()); - else - _rDevice.SetLineColor(line); + const HorizontalAlignment eHorzAlign = m_pImpl->rModel.getColumnModel( i_context.nColumn )->getHorizontalAlign(); + switch ( eHorzAlign ) + { + case HorizontalAlignment_CENTER: + imagePos.X() += ( i_context.aContentArea.GetWidth() - imageSize.Width() ) / 2; + break; + case HorizontalAlignment_RIGHT: + imagePos.X() = i_context.aContentArea.Right() - imageSize.Width(); + break; + default: + break; + } + } - //else set line color to the color of row background else + imageSize.Width() = i_context.aContentArea.GetWidth(); + + if ( i_context.aContentArea.GetHeight() > imageSize.Height() ) { - if(background2 != 0xFFFFFF && m_pImpl->nCurrentRow%2) + const VerticalAlignment eVertAlign = m_pImpl->rModel.getVerticalAlign(); + switch ( eVertAlign ) { - if(line == 0xFFFFFF) - _rDevice.SetLineColor(background2); - else - _rDevice.SetLineColor(line); - } - else if(background1 != 0xFFFFFF && line == 0xFFFFFF) - _rDevice.SetLineColor(background1); - else - { - //if Line color is set, then it was user defined and should be visible - //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible - _rDevice.SetLineColor(line); + case VerticalAlignment_MIDDLE: + imagePos.Y() += ( i_context.aContentArea.GetHeight() - imageSize.Height() ) / 2; + break; + case VerticalAlignment_BOTTOM: + imagePos.Y() = i_context.aContentArea.Bottom() - imageSize.Height(); + break; + default: + break; } } - _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); + else + imageSize.Height() = i_context.aContentArea.GetHeight() - 1; - Rectangle aRect( _rArea ); - ++aRect.Left(); --aRect.Right(); - aRect.Top(); aRect.Bottom(); - if(_bSelected) - _rDevice.SetTextColor(_rStyle.GetHighlightTextColor()); - else if(m_pImpl->rModel.getTextColor() != 0x000000) - _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + i_context.rDevice.DrawImage( imagePos, imageSize, i_image, 0 ); + } + + //-------------------------------------------------------------------- + void GridTableRenderer::impl_paintCellContent( CellRenderContext const & i_context ) + { + Any aCellContent; + m_pImpl->rModel.getCellContent( m_pImpl->nCurrentRow, i_context.nColumn, aCellContent ); + + const Reference< XGraphic > xGraphic( aCellContent, UNO_QUERY ); + if ( xGraphic.is() ) + { + const Image aImage( xGraphic ); + impl_paintCellImage( i_context, aImage ); + return; + } + + const ::rtl::OUString sText( CellValueConversion::convertToString( aCellContent ) ); + impl_paintCellText( i_context, sText ); + } + + //-------------------------------------------------------------------- + void GridTableRenderer::impl_paintCellText( CellRenderContext const & i_context, ::rtl::OUString const & i_text ) + { + if ( i_context.bSelected ) + i_context.rDevice.SetTextColor( i_context.rStyle.GetHighlightTextColor() ); + else if ( m_pImpl->rModel.getTextColor() != 0x000000 ) + i_context.rDevice.SetTextColor( m_pImpl->rModel.getTextColor() ); else - _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); - ULONG nHorFlag = TEXT_DRAW_LEFT; + i_context.rDevice.SetTextColor( i_context.rStyle.GetFieldTextColor() ); + + ULONG nVerFlag = TEXT_DRAW_TOP; - if(m_pImpl->rModel.getVerticalAlign() == 1) - nVerFlag = TEXT_DRAW_VCENTER; - else if(m_pImpl->rModel.getVerticalAlign() == 2) - nVerFlag = TEXT_DRAW_BOTTOM; - if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 1) - nHorFlag = TEXT_DRAW_CENTER; - else if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 2) - nHorFlag = TEXT_DRAW_RIGHT; - Rectangle textRect(_rArea); - textRect.Left()+=4; textRect.Right()-=4; - textRect.Bottom()-=2; - _rDevice.DrawText( textRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); + const VerticalAlignment eVertAlign = m_pImpl->rModel.getVerticalAlign(); + switch ( eVertAlign ) + { + case VerticalAlignment_MIDDLE: nVerFlag = TEXT_DRAW_VCENTER; break; + case VerticalAlignment_BOTTOM: nVerFlag = TEXT_DRAW_BOTTOM; break; + default: + break; + } - _rDevice.Pop(); - (void)_bActive; - // no special painting for the active cell at the moment + ULONG nHorFlag = TEXT_DRAW_LEFT; + const HorizontalAlignment eHorzAlign = m_pImpl->rModel.getColumnModel( i_context.nColumn )->getHorizontalAlign(); + switch ( eHorzAlign ) + { + case HorizontalAlignment_CENTER: nHorFlag = TEXT_DRAW_CENTER; break; + case HorizontalAlignment_RIGHT: nHorFlag = TEXT_DRAW_RIGHT; break; + default: + break; + } + + Rectangle textRect( i_context.aContentArea ); + textRect.Left() += 2; textRect.Right() -= 2; + ++textRect.Top(); --textRect.Bottom(); + + i_context.rDevice.DrawText( textRect, i_text, nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); } //-------------------------------------------------------------------- diff --git a/svtools/source/table/makefile.mk b/svtools/source/table/makefile.mk index cf1adc76fe92..7fa1b00d1740 100644 --- a/svtools/source/table/makefile.mk +++ b/svtools/source/table/makefile.mk @@ -45,7 +45,8 @@ SLOFILES=\ $(SLO)$/gridtablerenderer.obj \ $(SLO)$/tablegeometry.obj \ $(SLO)$/defaultinputhandler.obj \ - $(SLO)$/tabledatawindow.obj + $(SLO)$/tabledatawindow.obj \ + $(SLO)$/cellvalueconversion.obj #LIB1TARGET= $(SLB)$/$(TARGET).lib #LIB1OBJFILES= $(SLOFILES) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 81d188745f69..d8a743d98c9e 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -34,8 +34,7 @@ #include "tablecontrol_impl.hxx" #include "tablegeometry.hxx" - -#include +#include "cellvalueconversion.hxx" #include #include @@ -50,12 +49,6 @@ namespace svt { namespace table { //........................................................................ - /** === begin UNO using === **/ - using ::com::sun::star::uno::Reference; - using ::com::sun::star::graphic::XGraphic; - using ::com::sun::star::uno::Any; - /** === end UNO using === **/ - //==================================================================== //= TempHideCursor //==================================================================== @@ -1141,6 +1134,7 @@ namespace svt { namespace table } if ( !colCount ) continue; + // paint all cells in this row for ( TableCellGeometry aCell( aRowIterator, m_nLeftColumn ); aCell.isValid(); @@ -1148,24 +1142,8 @@ namespace svt { namespace table ) { bool isSelectedColumn = false; - - Any aCellContent; - m_pModel->getCellContent( aRowIterator.getRow(), aCell.getColumn(), aCellContent ); - - Reference< XGraphic > xGraphic; - if ( aCellContent >>= xGraphic ) - { - Image* pImage = new Image(xGraphic); - if(pImage!=NULL) - pRenderer->PaintCellImage( aCell.getColumn(), isSelectedRow || isSelectedColumn, isActiveRow, - *m_pDataWindow, aCell.getRect(), rStyle, pImage ); - } - else - { - ::rtl::OUString sContent = convertToString( aCellContent ); - pRenderer->PaintCellString( aCell.getColumn(), isSelectedRow || isSelectedColumn, isActiveRow, - *m_pDataWindow, aCell.getRect(), rStyle, sContent ); - } + pRenderer->PaintCell( aCell.getColumn(), isSelectedRow || isSelectedColumn, isActiveRow, + *m_pDataWindow, aCell.getRect(), rStyle ); } } } @@ -1872,7 +1850,7 @@ namespace svt { namespace table { ::com::sun::star::uno::Any content; m_pModel->getCellContent( i_row, i_col, content ); - return convertToString( content ); + return CellValueConversion::convertToString( content ); } //-------------------------------------------------------------------- @@ -2304,24 +2282,8 @@ namespace svt { namespace table // TODO: isnt' it that this might be done repeatedly? } + //-------------------------------------------------------------------- - rtl::OUString TableControl_Impl::convertToString(const ::com::sun::star::uno::Any& value) - { - sal_Int32 nInt = 0; - sal_Bool bBool = false; - double fDouble = 0; - ::rtl::OUString sNewString; - ::rtl::OUString sConvertString; - if(value >>= sConvertString) - sNewString = sConvertString; - else if(value >>= nInt) - sNewString = sConvertString.valueOf(nInt); - else if(value >>= bBool) - sNewString = sConvertString.valueOf(bBool); - else if(value >>= fDouble) - sNewString = sConvertString.valueOf(fDouble); - return sNewString; - } Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader) { Rectangle aRectTable, aRectTableWithHeaders; @@ -2334,6 +2296,8 @@ namespace svt { namespace table else return Rectangle(aRectTableWithHeaders.TopLeft(),Size(aSizeTableWithHeaders.Width(), aSizeTableWithHeaders.Height()-aSizeTable.Height())); } + + //-------------------------------------------------------------------- Rectangle TableControl_Impl::calcTableRect() { Rectangle aRect; diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 9276f8ab95c7..024e6915f367 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -266,7 +266,6 @@ namespace svt { namespace table ScrollBar* getHorzScrollbar(); ScrollBar* getVertScrollbar(); - ::rtl::OUString convertToString(const ::com::sun::star::uno::Any& _value); Rectangle calcHeaderRect(bool bColHeader); Rectangle calcTableRect(); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 8b323648a887..668044ba6b40 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -41,6 +41,7 @@ #include #include #include +#include using ::rtl::OUString; using namespace ::com::sun::star; @@ -199,13 +200,13 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: return uno::makeAny( (sal_Bool)sal_True ); case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: - return uno::makeAny( com::sun::star::util::Color(0xFFFFFF) ); + return uno::makeAny( com::sun::star::util::Color( COL_TRANSPARENT ) ); case BASEPROPERTY_GRID_HEADER_BACKGROUND: - return uno::makeAny( com::sun::star::util::Color(0xFFFFFF) ); + return uno::makeAny( com::sun::star::util::Color( COL_TRANSPARENT ) ); case BASEPROPERTY_GRID_LINE_COLOR: - return uno::makeAny( com::sun::star::util::Color(0xFFFFFF) ); + return uno::makeAny( com::sun::star::util::Color( COL_TRANSPARENT ) ); case BASEPROPERTY_GRID_ROW_BACKGROUND: - return uno::makeAny(com::sun::star::util::Color(0xFFFFFF) ); + return uno::makeAny(com::sun::star::util::Color( COL_TRANSPARENT ) ); default: return UnoControlModel::ImplGetDefaultValue( nPropId ); } -- cgit From 5d1ef9978feb9479746f9039f2d6ca17f9e2052e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 4 Jan 2011 10:37:54 +0100 Subject: gridsort: getCellContent: (col,row) instead of (row,col) parameters --- svtools/inc/svtools/table/tablemodel.hxx | 2 +- svtools/source/table/gridtablerenderer.cxx | 2 +- svtools/source/table/tablecontrol.cxx | 2 +- svtools/source/table/tablecontrol_impl.cxx | 4 ++-- svtools/source/uno/unocontroltablemodel.cxx | 6 +++--- svtools/source/uno/unocontroltablemodel.hxx | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index a9137eab28a2..cdbc1be6a3cd 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -408,7 +408,7 @@ namespace svt { namespace table /** retrieves the content of the given cell */ - virtual void getCellContent( RowPos const i_row, ColPos const i_col, ::com::sun::star::uno::Any& o_cellContent ) = 0; + virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ) = 0; /** retrieves title of a given row */ diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 8eec7b8d437e..9e7a5213c098 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -367,7 +367,7 @@ namespace svt { namespace table void GridTableRenderer::impl_paintCellContent( CellRenderContext const & i_context ) { Any aCellContent; - m_pImpl->rModel.getCellContent( m_pImpl->nCurrentRow, i_context.nColumn, aCellContent ); + m_pImpl->rModel.getCellContent( i_context.nColumn, m_pImpl->nCurrentRow, aCellContent ); const Reference< XGraphic > xGraphic( aCellContent, UNO_QUERY ); if ( xGraphic.is() ) diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 94932fdcdd01..08227b9abd91 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -384,7 +384,7 @@ namespace svt { namespace table ::com::sun::star::uno::Any TableControl::GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos ) const { Any aCellContent; - GetModel()->getCellContent( _nRowPos, _nColPos, aCellContent ); + GetModel()->getCellContent( _nColPos, _nRowPos, aCellContent ); return aCellContent; } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index d8a743d98c9e..c2f9465bfdd8 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -178,7 +178,7 @@ namespace svt { namespace table { return -1; } - virtual void getCellContent( RowPos const i_row, ColPos const i_col, ::com::sun::star::uno::Any& o_cellContent ) + virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ) { (void)i_row; (void)i_col; @@ -1849,7 +1849,7 @@ namespace svt { namespace table ::rtl::OUString TableControl_Impl::getCellContentAsString( RowPos const i_row, ColPos const i_col ) { ::com::sun::star::uno::Any content; - m_pModel->getCellContent( i_row, i_col, content ); + m_pModel->getCellContent( i_col, i_row, content ); return CellValueConversion::convertToString( content ); } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index dfbde6cb4058..36532222dfe4 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -503,7 +503,7 @@ using namespace ::com::sun::star::awt::grid; } //-------------------------------------------------------------------- - void UnoControlTableModel::getCellContent( RowPos const i_row, ColPos const i_col, Any& o_cellContent ) + void UnoControlTableModel::getCellContent( ColPos const i_col, RowPos const i_row, Any& o_cellContent ) { ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( i_row < m_pImpl->aCellContent.size() ), "UnoControlTableModel::getCellContent: illegal row index!" ); @@ -517,10 +517,10 @@ using namespace ::com::sun::star::awt::grid; void UnoControlTableModel::updateCellContent( RowPos const i_row, ColPos const i_col, Any const & i_cellContent ) { ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( i_row < m_pImpl->aCellContent.size() ), - "UnoControlTableModel::getCellContent: illegal row index!" ); + "UnoControlTableModel::updateCellContent: illegal row index!" ); ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( i_col < rRowContent.size() ), - "UnoControlTableModel::getCellContent: illegal column index" ); + "UnoControlTableModel::updateCellContent: illegal column index" ); rRowContent[ i_col ] = i_cellContent; // TODO: listener notification diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 9eaa202f8cd0..1f13b776a49f 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -132,7 +132,7 @@ class UnoControlTableModel : public ITableModel virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const; virtual void addTableModelListener( const PTableModelListener& i_listener ); virtual void removeTableModelListener( const PTableModelListener& i_listener ); - virtual void getCellContent( RowPos const i_row, ColPos const i_col, ::com::sun::star::uno::Any& o_cellContent ); + virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ); virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const; virtual ::com::sun::star::util::Color getLineColor(); virtual ::com::sun::star::util::Color getHeaderBackgroundColor(); -- cgit From 9b34df43b9a054b0eea74f65f68b11ddd93ae5eb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 4 Jan 2011 10:37:54 +0100 Subject: gridsort: getCellContent: (col,row) instead of (row,col) parameters --- automation/source/server/statemnt.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 353796a4c594..3e086f485826 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -6112,7 +6112,8 @@ protected: ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() )) { ::svt::table::PTableModel pModel = pTC->GetModel(); - Any aCell = pModel->getCellContent()[nNr2-1][nNr1-1]; + Any aCell; + pModel->getCellContent( nNr1-1, nNr2-1, aCell ); pRet->GenReturn ( RET_Value, aUId, String( aCell.getValueTypeName() )); } } @@ -6123,7 +6124,8 @@ protected: ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() )) { ::svt::table::PTableModel pModel = pTC->GetModel(); - Any aCell = pModel->getCellContent()[nNr2-1][nNr1-1]; + Any aCell; + pModel->getCellContent( nNr1-1, nNr2-1, aCell ); /* doesn't work ATM since it gets casted to SbxDATE in VCLTestTool unfortunately SbxVariableRef xRes = new SbxVariable( SbxVARIANT ); unoToSbxValue( xRes, aCell ); -- cgit From d3dcce24340e342fb1ab6c7071a0f645130e1ba3 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 4 Jan 2011 15:09:05 +0100 Subject: gridsort: make build on unxlngi6 --- svtools/source/table/tablecontrol_impl.cxx | 2 +- svtools/source/uno/unocontroltablemodel.cxx | 12 ++++++------ toolkit/prj/build.lst | 2 +- toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 3 ++- toolkit/source/controls/grid/defaultgriddatamodel.cxx | 8 ++++++-- toolkit/source/controls/grid/defaultgriddatamodel.hxx | 3 ++- toolkit/source/controls/grid/gridcolumn.cxx | 3 ++- toolkit/source/controls/grid/grideventforwarder.cxx | 4 ++-- toolkit/source/controls/grid/grideventforwarder.hxx | 4 ++-- 9 files changed, 24 insertions(+), 17 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index c2f9465bfdd8..dab7df674ed2 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -836,7 +836,7 @@ namespace svt { namespace table if ( m_aColumnWidths.empty() ) impl_ni_updateColumnWidths(); - OSL_ENSURE( m_aColumnWidths.size() == m_nColumnCount, "TableControl_Impl::impl_ni_updateScrollbars: inconsistency!" ); + OSL_ENSURE( m_aColumnWidths.size() == size_t( m_nColumnCount ), "TableControl_Impl::impl_ni_updateScrollbars: inconsistency!" ); const long nAllColumnsWidth = m_aColumnWidths.empty() ? 0 : m_aColumnWidths[ m_nColumnCount - 1 ].getEnd() - m_aColumnWidths[ 0 ].getStart(); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 36532222dfe4..fd40501dce2d 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -349,7 +349,7 @@ using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- void UnoControlTableModel::insertColumn( ColPos const i_position, const PColumnModel& i_column ) { - ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( i_position <= m_pImpl->aColumns.size() ), "illegal position!" ); + ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ), "illegal position!" ); ENSURE_OR_RETURN_VOID( !!i_column, "illegal column" ); m_pImpl->aColumns.insert( m_pImpl->aColumns.begin() + i_position, i_column ); @@ -505,10 +505,10 @@ using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- void UnoControlTableModel::getCellContent( ColPos const i_col, RowPos const i_row, Any& o_cellContent ) { - ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( i_row < m_pImpl->aCellContent.size() ), + ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( size_t( i_row ) < m_pImpl->aCellContent.size() ), "UnoControlTableModel::getCellContent: illegal row index!" ); ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); - ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( i_col < rRowContent.size() ), + ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( size_t( i_col ) < rRowContent.size() ), "UnoControlTableModel::getCellContent: illegal column index" ); o_cellContent = rRowContent[ i_col ]; } @@ -516,10 +516,10 @@ using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- void UnoControlTableModel::updateCellContent( RowPos const i_row, ColPos const i_col, Any const & i_cellContent ) { - ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( i_row < m_pImpl->aCellContent.size() ), + ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( size_t( i_row ) < m_pImpl->aCellContent.size() ), "UnoControlTableModel::updateCellContent: illegal row index!" ); ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); - ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( i_col < rRowContent.size() ), + ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( size_t( i_col ) < rRowContent.size() ), "UnoControlTableModel::updateCellContent: illegal column index" ); rRowContent[ i_col ] = i_cellContent; @@ -545,7 +545,7 @@ using namespace ::com::sun::star::awt::grid; //-------------------------------------------------------------------- ::rtl::OUString UnoControlTableModel::getRowHeader( RowPos const i_rowPos ) const { - ENSURE_OR_RETURN( ( i_rowPos >= 0 ) && ( i_rowPos < m_pImpl->aRowHeadersTitle.size() ), + ENSURE_OR_RETURN( ( i_rowPos >= 0 ) && ( size_t( i_rowPos ) < m_pImpl->aRowHeadersTitle.size() ), "UnoControlTableModel::getRowHeader: illegal row position!", ::rtl::OUString() ); return m_pImpl->aRowHeadersTitle[ i_rowPos ]; } diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index d7e4b24c8b02..753f25a55666 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -1,4 +1,4 @@ -ti toolkit : vcl NULL +ti toolkit : vcl test NULL ti toolkit usr1 - all ti_mkout NULL ti toolkit\prj get - all ti_prj NULL ti toolkit\inc nmake - all ti_inc NULL diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index c1cafd568326..8537a03321aa 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -77,7 +77,8 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ DefaultGridColumnModel::DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource ) - :DefaultGridColumnModel_Base( m_aMutex ) + :cppu::BaseMutex() + ,DefaultGridColumnModel_Base( m_aMutex ) ,m_aContext( i_copySource.m_aContext ) ,m_aContainerListeners( m_aMutex ) ,m_aColumns() diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index eb6f777c3b41..be3dd303a566 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -67,7 +67,9 @@ namespace toolkit //================================================================================================================== //------------------------------------------------------------------------------------------------------------------ DefaultGridDataModel::DefaultGridDataModel() - :m_nRowHeight(0) + :DefaultGridDataModel_Base() + ,MutexAndBroadcastHelper() + ,m_nRowHeight(0) ,m_aRowHeaders() ,m_nRowHeaderWidth(10) { @@ -75,7 +77,9 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ DefaultGridDataModel::DefaultGridDataModel( DefaultGridDataModel const & i_copySource ) - :m_nRowHeight( i_copySource.m_nRowHeight ) + :DefaultGridDataModel_Base() + ,MutexAndBroadcastHelper() + ,m_nRowHeight( i_copySource.m_nRowHeight ) ,m_aData( i_copySource.m_aData ) ,m_aRowHeaders( i_copySource.m_aRowHeaders ) ,m_nRowHeaderWidth( i_copySource.m_nRowHeaderWidth ) diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 242c8ba514ab..bfb67c7fea2a 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -52,7 +52,8 @@ namespace toolkit enum broadcast_type { row_added, row_removed, data_changed}; -class DefaultGridDataModel : public ::cppu::WeakImplHelper2< XGridDataModel, XServiceInfo >, +typedef ::cppu::WeakImplHelper2< XGridDataModel, XServiceInfo > DefaultGridDataModel_Base; +class DefaultGridDataModel : public DefaultGridDataModel_Base, public MutexAndBroadcastHelper { public: diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 576871fc677a..d681a3101b12 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -68,7 +68,8 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ GridColumn::GridColumn( GridColumn const & i_copySource ) - :GridColumn_Base( m_aMutex ) + :cppu::BaseMutex() + ,GridColumn_Base( m_aMutex ) ,m_aIdentifier( i_copySource.m_aIdentifier ) ,m_nIndex( i_copySource.m_nIndex ) ,m_nColumnWidth( i_copySource.m_nColumnWidth ) diff --git a/toolkit/source/controls/grid/grideventforwarder.cxx b/toolkit/source/controls/grid/grideventforwarder.cxx index 2c3d740af04e..2c99acb86959 100755 --- a/toolkit/source/controls/grid/grideventforwarder.cxx +++ b/toolkit/source/controls/grid/grideventforwarder.cxx @@ -69,13 +69,13 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridEventForwarder::acquire() + void SAL_CALL GridEventForwarder::acquire() throw() { m_parent.acquire(); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridEventForwarder::release() + void SAL_CALL GridEventForwarder::release() throw() { m_parent.release(); } diff --git a/toolkit/source/controls/grid/grideventforwarder.hxx b/toolkit/source/controls/grid/grideventforwarder.hxx index 3066ead79c94..93905b06f492 100755 --- a/toolkit/source/controls/grid/grideventforwarder.hxx +++ b/toolkit/source/controls/grid/grideventforwarder.hxx @@ -57,8 +57,8 @@ namespace toolkit public: // XInterface - virtual void SAL_CALL acquire(); - virtual void SAL_CALL release(); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); // XGridDataListener virtual void SAL_CALL rowAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); -- cgit From b198150a3cdb7f1f3838bf39853f2ea680bcaf6c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 4 Jan 2011 22:23:17 +0100 Subject: gridsort: don't let the SVTXGridControl listen for XGridColumn changes. Instead, the non-UNO wrapper around the XGridColumn (UnoControlTableColumn, implementing IColumnModel) should do this, and then multiplex the changes to the TableControl(_Impl) instance. This way, other IColumnModel implementations also properly trigger control updates, provided they simply properly notify their changes. --- svtools/inc/svtools/table/tablemodel.hxx | 22 ++ svtools/source/table/tablecontrol_impl.cxx | 35 +++ svtools/source/table/tablecontrol_impl.hxx | 2 + svtools/source/uno/makefile.mk | 1 + svtools/source/uno/svtxgridcontrol.cxx | 78 +---- svtools/source/uno/svtxgridcontrol.hxx | 10 +- svtools/source/uno/unocontroltablemodel.cxx | 469 +++++++++++++--------------- svtools/source/uno/unocontroltablemodel.hxx | 98 +++--- svtools/source/uno/unogridcolumnfacade.cxx | 362 +++++++++++++++++++++ svtools/source/uno/unogridcolumnfacade.hxx | 104 ++++++ 10 files changed, 792 insertions(+), 389 deletions(-) create mode 100755 svtools/source/uno/unogridcolumnfacade.cxx create mode 100755 svtools/source/uno/unogridcolumnfacade.hxx diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index cdbc1be6a3cd..dc25788bc491 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -66,6 +66,18 @@ namespace svt { namespace table ScrollbarShowAlways }; + //==================================================================== + //= ITableModelListener + //==================================================================== + typedef sal_Int32 ColumnAttributeGroup; + #define COL_ATTRS_NONE (0x00000000) + /// denotes column attributes related to the width of the column + #define COL_ATTRS_WIDTH (0x00000001) + /// denotes column attributes related to the appearance of the column, i.e. those relevant for rendering + #define COL_ATTRS_APPEARANCE (0x00000002) + /// denotes the entirety of column attributes + #define COL_ATTRS_ALL (0xFFFFFFFF) + //==================================================================== //= ITableModelListener //==================================================================== @@ -137,6 +149,16 @@ namespace svt { namespace table */ virtual void cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ) = 0; + /** notifies the listener that attributes of a given column changed + + @param i_column + the position of the column whose attributes changed + @param i_attributeGroup + a combination of one or more COL_ATTRS_* flags, denoting the attribute group(s) + in which changes occurred. + */ + virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ) = 0; + /// deletes the listener instance virtual ~ITableModelListener(){}; }; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index dab7df674ed2..dc6dfc352137 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -36,6 +36,7 @@ #include "tablegeometry.hxx" #include "cellvalueconversion.hxx" +#include #include #include #include @@ -381,6 +382,7 @@ namespace svt { namespace table ,m_bResizingColumn ( false ) ,m_nResizingColumn ( 0 ) ,m_bResizingGrid ( false ) + ,m_bUpdatingColWidths ( false ) #if DBG_UTIL ,m_nRequiredInvariants ( INV_SCROLL_POSITION ) #endif @@ -500,6 +502,34 @@ namespace svt { namespace table OSL_UNUSED( lastRow ); } + //-------------------------------------------------------------------- + void TableControl_Impl::columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ) + { + ColumnAttributeGroup nGroup( i_attributeGroup ); + if ( nGroup & COL_ATTRS_APPEARANCE ) + { + Rectangle aAllCellsArea; + impl_getAllVisibleCellsArea( aAllCellsArea ); + + const TableColumnGeometry aColumn( *this, aAllCellsArea, i_column ); + if ( aColumn.isValid() ) + m_rAntiImpl.Invalidate( aColumn.getRect() ); + + nGroup &= ~COL_ATTRS_APPEARANCE; + } + + if ( nGroup & COL_ATTRS_WIDTH ) + { + if ( !m_bUpdatingColWidths ) + impl_ni_updateColumnWidths(); + + nGroup &= ~COL_ATTRS_WIDTH; + } + + OSL_ENSURE( ( nGroup == COL_ATTRS_NONE ) || ( i_attributeGroup == COL_ATTRS_ALL ), + "TableControl_Impl::columnChanged: don't know how to handle this change!" ); + } + //-------------------------------------------------------------------- void TableControl_Impl::impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const { @@ -575,6 +605,8 @@ namespace svt { namespace table //-------------------------------------------------------------------- void TableControl_Impl::impl_ni_updateColumnWidths() { + ENSURE_OR_RETURN_VOID( !m_bUpdatingColWidths, "TableControl_Impl::impl_ni_updateColumnWidths: recursive call detected!" ); + m_aColumnWidths.resize( 0 ); if ( !m_pModel ) return; @@ -583,6 +615,9 @@ namespace svt { namespace table if ( colCount == 0 ) return; + m_bUpdatingColWidths = true; + const ::comphelper::FlagGuard aWidthUpdateFlag( m_bUpdatingColWidths ); + m_aColumnWidths.reserve( colCount ); std::vector aPrePixelWidths(0); diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 024e6915f367..4c5038de2cc0 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -158,6 +158,7 @@ namespace svt { namespace table bool m_bResizingColumn; ColPos m_nResizingColumn; bool m_bResizingGrid; + bool m_bUpdatingColWidths; rtl::OUString m_aTooltipText; #if DBG_UTIL @@ -276,6 +277,7 @@ namespace svt { namespace table virtual void columnsRemoved( ColPos first, ColPos last ); virtual void columnMoved( ColPos oldIndex, ColPos newIndex ); virtual void cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ); + virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ); private: /** toggles the cursor visibility diff --git a/svtools/source/uno/makefile.mk b/svtools/source/uno/makefile.mk index 7c1c44006047..e04ea6a9d416 100644 --- a/svtools/source/uno/makefile.mk +++ b/svtools/source/uno/makefile.mk @@ -49,6 +49,7 @@ SLOFILES= \ $(SLO)$/toolboxcontroller.obj \ $(SLO)$/treecontrolpeer.obj \ $(SLO)$/unocontroltablemodel.obj \ + $(SLO)$/unogridcolumnfacade.obj \ $(SLO)$/unoevent.obj \ $(SLO)$/unoiface.obj \ $(SLO)$/unoimap.obj \ diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 5f3dce2668a7..9ba2e8cd6745 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -193,7 +193,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_HEADER_BACKGROUND: { - sal_Int32 colorHeader = 0xFFFFFF; + sal_Int32 colorHeader = COL_TRANSPARENT; if( aValue >>= colorHeader ) { m_pTableModel->setHeaderBackgroundColor(colorHeader); @@ -202,7 +202,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_LINE_COLOR: { - sal_Int32 colorLine = 0xFFFFFF; + sal_Int32 colorLine = COL_TRANSPARENT; if( aValue >>= colorLine ) { m_pTableModel->setLineColor(colorLine); @@ -211,7 +211,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: { - sal_Int32 colorEvenRow = 0xFFFFFF; + sal_Int32 colorEvenRow = COL_TRANSPARENT; if( aValue >>= colorEvenRow ) { m_pTableModel->setEvenRowBackgroundColor(colorEvenRow); @@ -220,7 +220,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_ROW_BACKGROUND: { - sal_Int32 colorBackground = 0xFFFFFF; + sal_Int32 colorBackground = COL_TRANSPARENT; if( aValue >>= colorBackground ) { m_pTableModel->setOddRowBackgroundColor(colorBackground); @@ -479,52 +479,6 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri } } -void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent& Event ) throw (::com::sun::star::uno::RuntimeException) -{ - ::vos::OGuard aGuard( GetMutex() ); - - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::columnChanged: no control (anymore)!" ); - - if(Event.valueName == rtl::OUString::createFromAscii("ColumnResize")) - { - bool resizable = m_pTableModel->getColumnModel( Event.index )->isResizable(); - Event.newValue>>=resizable; - m_pTableModel->getColumnModel( Event.index )->setResizable(resizable); - } - else if(Event.valueName == rtl::OUString::createFromAscii("ColWidth")) - { - sal_Int32 colWidth = m_pTableModel->getColumnModel( Event.index )->getWidth(); - Event.newValue>>=colWidth; - m_pTableModel->getColumnModel( Event.index )->setWidth(colWidth); - } - else if(Event.valueName == rtl::OUString::createFromAscii("MaxWidth")) - { - sal_Int32 maxWidth = m_pTableModel->getColumnModel( Event.index )->getMaxWidth(); - Event.newValue>>=maxWidth; - m_pTableModel->getColumnModel( Event.index )->setMaxWidth(maxWidth); - } - else if(Event.valueName == rtl::OUString::createFromAscii("MinWidth")) - { - sal_Int32 minWidth = m_pTableModel->getColumnModel( Event.index )->getMinWidth(); - Event.newValue>>=minWidth; - m_pTableModel->getColumnModel( Event.index )->setMinWidth(minWidth); - } - else if(Event.valueName == rtl::OUString::createFromAscii("PrefWidth")) - { - sal_Int32 prefWidth = m_pTableModel->getColumnModel( Event.index )->getPreferredWidth(); - Event.newValue>>=prefWidth; - m_pTableModel->getColumnModel( Event.index )->setPreferredWidth(prefWidth); - } - else if(Event.valueName == rtl::OUString::createFromAscii("HAlign")) - { - ::com::sun::star::style::HorizontalAlignment hAlign = m_pTableModel->getColumnModel( Event.index )->getHorizontalAlign(); - Event.newValue>>=hAlign; - m_pTableModel->getColumnModel( Event.index )->setHorizontalAlign(hAlign); - } - pTable->Invalidate(); -} - void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -591,26 +545,18 @@ void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) sal_Int32 nIndex( m_pTableModel->getColumnCount() ); OSL_VERIFY( i_event.Accessor >>= nIndex ); - const PColumnModel tableColumn( new UnoControlTableColumn( xGridColumn ) ); - m_pTableModel->insertColumn( nIndex, tableColumn ); - - impl_setColumnListening( Reference< XGridColumn >( i_event.Element, UNO_QUERY ), true ); + m_pTableModel->insertColumn( nIndex, xGridColumn ); } //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) { - impl_setColumnListening( Reference< XGridColumn >( i_event.Element, UNO_QUERY ), false ); - // TODO: remove the respective column from our table model } //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException) { - impl_setColumnListening( Reference< XGridColumn >( i_event.ReplacedElement, UNO_QUERY ), false ); - impl_setColumnListening( Reference< XGridColumn >( i_event.Element, UNO_QUERY ), true ); - // TODO: replace the respective column in our table model } @@ -947,10 +893,7 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow() { ENSURE_OR_CONTINUE( colRef->is(), "illegal column!" ); - impl_setColumnListening( *colRef, true ); - - UnoControlTableColumn* tableColumn = new UnoControlTableColumn( *colRef ); - m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); + m_pTableModel->appendColumn( *colRef ); } } @@ -961,12 +904,3 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow() } } -void SVTXGridControl::impl_setColumnListening( const Reference< XGridColumn >& i_column, bool const i_start ) -{ - ENSURE_OR_RETURN_VOID( i_column.is(), "SVTXGridControl::impl_setColumnListening: illegal column!" ); - - if ( i_start ) - i_column->addGridColumnListener( this ); - else - i_column->removeGridColumnListener( this ); -} diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index ef4dc7225bf5..ce1b7edd0b09 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -48,10 +47,9 @@ using namespace ::svt::table; -typedef ::cppu::ImplInheritanceHelper4 < VCLXWindow +typedef ::cppu::ImplInheritanceHelper3 < VCLXWindow , ::com::sun::star::awt::grid::XGridControl , ::com::sun::star::awt::grid::XGridDataListener - , ::com::sun::star::awt::grid::XGridColumnListener , ::com::sun::star::container::XContainerListener > SVTXGridControl_Base; class SVTXGridControl : public SVTXGridControl_Base @@ -86,9 +84,6 @@ public: virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - //XGridColumnListener overridables - virtual void SAL_CALL columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent & Event) throw (::com::sun::star::uno::RuntimeException); - // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); @@ -122,9 +117,6 @@ protected: virtual void SetWindow( Window* pWindow ); private: - void impl_removeAllColumns_nothrow(); void impl_updateColumnsFromModel_nothrow(); - - void impl_setColumnListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn >& i_column, bool const i_start ); }; #endif // _SVT_GRIDCONTROL_HXX_ diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index fd40501dce2d..8bfc1d1400f2 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -27,201 +27,55 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" +#include "unocontroltablemodel.hxx" +#include "unogridcolumnfacade.hxx" + #include "svtools/table/defaultinputhandler.hxx" #include "svtools/table/gridtablerenderer.hxx" #include "svtools/table/tablecontrol.hxx" -#include "unocontroltablemodel.hxx" +/** === begin UNO includes === **/ #include #include -#include +#include +/** === end UNO includes === **/ -#include #include -#include -#include #include #include - -using ::rtl::OUString; -using namespace ::svt::table; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt::grid; - - //-------------------------------------------------------------------- - namespace - { - template< class ATTRIBUTE_TYPE > - void lcl_set( Reference< XGridColumn > const & i_column, void ( SAL_CALL XGridColumn::*i_setter )( ATTRIBUTE_TYPE ), - ATTRIBUTE_TYPE i_value ) - { - try - { - (i_column.get()->*i_setter) ( i_value ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - } - - template< class ATTRIBUTE_TYPE > - ATTRIBUTE_TYPE lcl_get( Reference< XGridColumn > const & i_column, ATTRIBUTE_TYPE ( SAL_CALL XGridColumn::*i_getter )() ) - { - ATTRIBUTE_TYPE value = ATTRIBUTE_TYPE(); - try - { - value = (i_column.get()->*i_getter)(); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - return value; - } - } - - //-------------------------------------------------------------------- - UnoControlTableColumn::UnoControlTableColumn( const Reference< XGridColumn >& i_gridColumn ) - :m_xGridColumn( i_gridColumn, UNO_QUERY_THROW ) - { - } - - //-------------------------------------------------------------------- - Any UnoControlTableColumn::getID() const - { - Any aID; - try - { - aID = m_xGridColumn->getIdentifier(); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - return aID; - } - - //-------------------------------------------------------------------- - void UnoControlTableColumn::setID( const Any& i_ID ) - { - try - { - m_xGridColumn->setIdentifier( i_ID ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - } - - //-------------------------------------------------------------------- - String UnoControlTableColumn::getName() const - { - ::rtl::OUString sName; - try - { - sName = m_xGridColumn->getTitle(); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - return sName; - } - - //-------------------------------------------------------------------- - void UnoControlTableColumn::setName( const String& _rName ) - { - try - { - m_xGridColumn->setTitle( _rName ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - } - - //-------------------------------------------------------------------- - bool UnoControlTableColumn::isResizable() const - { - return lcl_get( m_xGridColumn, &XGridColumn::getResizeable ); - } - - //-------------------------------------------------------------------- - void UnoControlTableColumn::setResizable( bool _bResizable ) - { - return lcl_set( m_xGridColumn, &XGridColumn::setResizeable, sal_Bool( _bResizable ) ); - } - - //-------------------------------------------------------------------- - TableMetrics UnoControlTableColumn::getWidth() const - { - return lcl_get( m_xGridColumn, &XGridColumn::getColumnWidth ); - } - - //-------------------------------------------------------------------- - void UnoControlTableColumn::setWidth( TableMetrics _nWidth ) - { - lcl_set( m_xGridColumn, &XGridColumn::setColumnWidth, _nWidth ); - } - - //-------------------------------------------------------------------- - TableMetrics UnoControlTableColumn::getMinWidth() const - { - return lcl_get( m_xGridColumn, &XGridColumn::getMinWidth ); - } - - //-------------------------------------------------------------------- - void UnoControlTableColumn::setMinWidth( TableMetrics _nMinWidth ) - { - lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMinWidth ); - } - - //-------------------------------------------------------------------- - TableMetrics UnoControlTableColumn::getMaxWidth() const - { - return lcl_get( m_xGridColumn, &XGridColumn::getMaxWidth ); - } - - //-------------------------------------------------------------------- - void UnoControlTableColumn::setMaxWidth( TableMetrics _nMaxWidth ) - { - lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMaxWidth ); - } - - //-------------------------------------------------------------------- - TableMetrics UnoControlTableColumn::getPreferredWidth() const - { - return lcl_get( m_xGridColumn, &XGridColumn::getPreferredWidth ); - } - - //-------------------------------------------------------------------- - void UnoControlTableColumn::setPreferredWidth( TableMetrics _nPrefWidth ) - { - lcl_set( m_xGridColumn, &XGridColumn::setPreferredWidth, _nPrefWidth ); - } - - //-------------------------------------------------------------------- - ::com::sun::star::style::HorizontalAlignment UnoControlTableColumn::getHorizontalAlign() - { - return lcl_get( m_xGridColumn, &XGridColumn::getHorizontalAlign ); - } - - //-------------------------------------------------------------------- - void UnoControlTableColumn::setHorizontalAlign( com::sun::star::style::HorizontalAlignment _align ) - { - lcl_set( m_xGridColumn, &XGridColumn::setHorizontalAlign, _align ); - } - - //==================================================================== - //= DefaultTableModel_Impl - //==================================================================== +#include +#include + +// ..................................................................................................................... +namespace svt { namespace table +{ +// ..................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::awt::grid::XGridColumn; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::awt::grid::XGridColumnListener; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::awt::grid::GridColumnEvent; + using ::com::sun::star::uno::Any; + using ::com::sun::star::style::HorizontalAlignment_LEFT; + using ::com::sun::star::style::HorizontalAlignment; + /** === end UNO using === **/ + + //================================================================================================================== + //= UnoControlTableModel_Impl + //================================================================================================================== typedef ::std::vector< PTableModelListener > ModellListeners; + typedef ::std::vector< PColumnModel > ColumnModels; struct UnoControlTableModel_Impl { - ::std::vector< PColumnModel > aColumns; + ColumnModels aColumns; TableSize nRowCount; bool bHasColumnHeaders; bool bHasRowHeaders; @@ -256,103 +110,135 @@ using namespace ::com::sun::star::awt::grid; ,nRowHeaderWidth ( 10 ) ,aRowHeadersTitle ( ) ,aCellContent ( ) - ,m_nLineColor ( 0xFFFFFF ) - ,m_nHeaderColor ( 0xFFFFFF ) + ,m_nLineColor ( COL_TRANSPARENT ) + ,m_nHeaderColor ( COL_TRANSPARENT ) ,m_nTextColor ( 0 )//black as default - ,m_nRowColor1 ( 0xFFFFFF ) - ,m_nRowColor2 ( 0xFFFFFF ) + ,m_nRowColor1 ( COL_TRANSPARENT ) + ,m_nRowColor2 ( COL_TRANSPARENT ) ,m_eVerticalAlign ( com::sun::star::style::VerticalAlignment_TOP ) { } }; - //==================================================================== + //================================================================================================================== //= UnoControlTableModel - //==================================================================== - //-------------------------------------------------------------------- + //================================================================================================================== +#ifdef DBG_UTIL + const char* UnoControlTableModel_checkInvariants( const void* _pInstance ) + { + return static_cast< const UnoControlTableModel* >( _pInstance )->checkInvariants(); + } + + //------------------------------------------------------------------------------------------------------------------ + const char* UnoControlTableModel::checkInvariants() const + { + if ( m_pImpl->aRowHeadersTitle.size() != m_pImpl->aCellContent.size() ) + return "inconsistency between data and row header arrays"; + + // TODO: more? + + return NULL; + } +#endif + +#define DBG_CHECK_ME() \ + DBG_TESTSOLARMUTEX(); \ + DBG_CHKTHIS( UnoControlTableModel, UnoControlTableModel_checkInvariants ) + + //------------------------------------------------------------------------------------------------------------------ + DBG_NAME( UnoControlTableModel ) UnoControlTableModel::UnoControlTableModel() :m_pImpl( new UnoControlTableModel_Impl ) { + DBG_CTOR( UnoControlTableModel, UnoControlTableModel_checkInvariants ); m_pImpl->bHasColumnHeaders = true; m_pImpl->bHasRowHeaders = false; m_pImpl->pRenderer.reset( new GridTableRenderer( *this ) ); m_pImpl->pInputHandler.reset( new DefaultInputHandler ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ UnoControlTableModel::~UnoControlTableModel() { + DBG_DTOR( UnoControlTableModel, UnoControlTableModel_checkInvariants ); DELETEZ( m_pImpl ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableSize UnoControlTableModel::getColumnCount() const { + DBG_CHECK_ME(); return (TableSize)m_pImpl->aColumns.size(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableSize UnoControlTableModel::getRowCount() const { + DBG_CHECK_ME(); return m_pImpl->nRowCount; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool UnoControlTableModel::hasColumnHeaders() const { + DBG_CHECK_ME(); return m_pImpl->bHasColumnHeaders; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool UnoControlTableModel::hasRowHeaders() const { + DBG_CHECK_ME(); return m_pImpl->bHasRowHeaders; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setRowHeaders(bool _bRowHeaders) { + DBG_CHECK_ME(); m_pImpl->bHasRowHeaders = _bRowHeaders; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setColumnHeaders(bool _bColumnHeaders) { + DBG_CHECK_ME(); m_pImpl->bHasColumnHeaders = _bColumnHeaders; } - void UnoControlTableModel::setColumnCount(TableSize _nColCount) - { - m_pImpl->aColumns.resize( _nColCount); - } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool UnoControlTableModel::isCellEditable( ColPos col, RowPos row ) const { + DBG_CHECK_ME(); (void)col; (void)row; return false; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ PColumnModel UnoControlTableModel::getColumnModel( ColPos column ) { + DBG_CHECK_ME(); ENSURE_OR_RETURN( ( column >= 0 ) && ( column < getColumnCount() ), "DefaultTableModel::getColumnModel: invalid index!", PColumnModel() ); return m_pImpl->aColumns[ column ]; } - //-------------------------------------------------------------------- - void UnoControlTableModel::appendColumn( const PColumnModel& i_column ) + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::appendColumn( Reference< XGridColumn > const & i_column ) { + DBG_CHECK_ME(); insertColumn( m_pImpl->aColumns.size(), i_column ); } - //-------------------------------------------------------------------- - void UnoControlTableModel::insertColumn( ColPos const i_position, const PColumnModel& i_column ) + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::insertColumn( ColPos const i_position, Reference< XGridColumn > const & i_column ) { - ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ), "illegal position!" ); - ENSURE_OR_RETURN_VOID( !!i_column, "illegal column" ); + DBG_CHECK_ME(); + ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ), "UnoControlTableModel::insertColumn: illegal position!" ); - m_pImpl->aColumns.insert( m_pImpl->aColumns.begin() + i_position, i_column ); + const PColumnModel pColumn( new UnoGridColumnFacade( *this, i_column ) ); + m_pImpl->aColumns.insert( m_pImpl->aColumns.begin() + i_position, pColumn ); // notify listeners ModellListeners aListeners( m_pImpl->m_aListeners ); @@ -365,13 +251,25 @@ using namespace ::com::sun::star::awt::grid; } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::removeAllColumns() { + DBG_CHECK_ME(); if ( m_pImpl->aColumns.empty() ) return; const ColPos nLastIndex = m_pImpl->aColumns.size() - 1; + + // dispose the column instances + for ( ColumnModels::const_iterator col = m_pImpl->aColumns.begin(); + col != m_pImpl->aColumns.end(); + ++col + ) + { + UnoGridColumnFacade* pColumn = dynamic_cast< UnoGridColumnFacade* >( col->get() ); + ENSURE_OR_CONTINUE( pColumn != NULL, "UnoControlTableModel::removeAllColumns: illegal column implementation!" ); + pColumn->dispose(); + } m_pImpl->aColumns.clear(); // notify listeners @@ -385,92 +283,107 @@ using namespace ::com::sun::star::awt::grid; } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ PTableRenderer UnoControlTableModel::getRenderer() const { + DBG_CHECK_ME(); return m_pImpl->pRenderer; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ PTableInputHandler UnoControlTableModel::getInputHandler() const { + DBG_CHECK_ME(); return m_pImpl->pInputHandler; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableMetrics UnoControlTableModel::getRowHeight() const { + DBG_CHECK_ME(); return m_pImpl->nRowHeight; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setRowHeight(TableMetrics _nRowHeight) { + DBG_CHECK_ME(); m_pImpl->nRowHeight = _nRowHeight; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableMetrics UnoControlTableModel::getColumnHeaderHeight() const { + DBG_CHECK_ME(); DBG_ASSERT( hasColumnHeaders(), "DefaultTableModel::getColumnHeaderHeight: invalid call!" ); return m_pImpl->nColumnHeaderHeight; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableMetrics UnoControlTableModel::getRowHeaderWidth() const { + DBG_CHECK_ME(); DBG_ASSERT( hasRowHeaders(), "DefaultTableModel::getRowHeaderWidth: invalid call!" ); return m_pImpl->nRowHeaderWidth; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setColumnHeaderHeight(TableMetrics _nHeight) { + DBG_CHECK_ME(); m_pImpl->nColumnHeaderHeight = _nHeight; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setRowHeaderWidth(TableMetrics _nWidth) { + DBG_CHECK_ME(); m_pImpl->nRowHeaderWidth = _nWidth; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::SetTitleHeight( TableMetrics _nHeight ) { + DBG_CHECK_ME(); DBG_ASSERT( _nHeight > 0, "DefaultTableModel::SetTitleHeight: invalid height value!" ); m_pImpl->nColumnHeaderHeight = _nHeight; // TODO: notification } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::SetHandleWidth( TableMetrics _nWidth ) { + DBG_CHECK_ME(); DBG_ASSERT( _nWidth > 0, "DefaultTableModel::SetHandleWidth: invalid width value!" ); m_pImpl->nRowHeaderWidth = _nWidth; // TODO: notification } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ ScrollbarVisibility UnoControlTableModel::getVerticalScrollbarVisibility() const { + DBG_CHECK_ME(); return m_pImpl->eVScrollMode; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ ScrollbarVisibility UnoControlTableModel::getHorizontalScrollbarVisibility() const { + DBG_CHECK_ME(); return m_pImpl->eHScrollMode; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::addTableModelListener( const PTableModelListener& i_listener ) { + DBG_CHECK_ME(); ENSURE_OR_RETURN_VOID( !!i_listener, "illegal NULL listener" ); m_pImpl->m_aListeners.push_back( i_listener ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::removeTableModelListener( const PTableModelListener& i_listener ) { + DBG_CHECK_ME(); for ( ModellListeners::iterator lookup = m_pImpl->m_aListeners.begin(); lookup != m_pImpl->m_aListeners.end(); ++lookup @@ -485,26 +398,31 @@ using namespace ::com::sun::star::awt::grid; OSL_ENSURE( false, "UnoControlTableModel::removeTableModelListener: listener is not registered - sure you're doing the right thing here?" ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const { + DBG_CHECK_ME(); m_pImpl->eVScrollMode = i_visibility; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const { + DBG_CHECK_ME(); m_pImpl->eHScrollMode = i_visibility; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setCellContent(const std::vector >& cellContent) { + DBG_CHECK_ME(); m_pImpl->aCellContent = cellContent; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::getCellContent( ColPos const i_col, RowPos const i_row, Any& o_cellContent ) { + DBG_CHECK_ME(); ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( size_t( i_row ) < m_pImpl->aCellContent.size() ), "UnoControlTableModel::getCellContent: illegal row index!" ); ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); @@ -513,9 +431,10 @@ using namespace ::com::sun::star::awt::grid; o_cellContent = rRowContent[ i_col ]; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::updateCellContent( RowPos const i_row, ColPos const i_col, Any const & i_cellContent ) { + DBG_CHECK_ME(); ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( size_t( i_row ) < m_pImpl->aCellContent.size() ), "UnoControlTableModel::updateCellContent: illegal row index!" ); ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); @@ -526,9 +445,10 @@ using namespace ::com::sun::star::awt::grid; // TODO: listener notification } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setRowHeaderNames( const Sequence< ::rtl::OUString >& i_rowHeaders ) { + DBG_CHECK_ME(); ENSURE_OR_RETURN_VOID( size_t( i_rowHeaders.getLength() ) == m_pImpl->aRowHeadersTitle.size(), "UnoControlTableModel::setRowHeaderNames: illegal number of row headers!" ); // this method is not intended to set a new row count, but only to modify the existing row headers @@ -542,17 +462,19 @@ using namespace ::com::sun::star::awt::grid; // TODO: listener notification } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString UnoControlTableModel::getRowHeader( RowPos const i_rowPos ) const { + DBG_CHECK_ME(); ENSURE_OR_RETURN( ( i_rowPos >= 0 ) && ( size_t( i_rowPos ) < m_pImpl->aRowHeadersTitle.size() ), "UnoControlTableModel::getRowHeader: illegal row position!", ::rtl::OUString() ); return m_pImpl->aRowHeadersTitle[ i_rowPos ]; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::appendRow( Sequence< Any > const & i_rowData, ::rtl::OUString const & i_rowHeader ) { + DBG_CHECK_ME(); ENSURE_OR_RETURN_VOID( i_rowData.getLength() == getColumnCount(), "UnoControlTableModel::appendRow: invalid row data!" ); // add row data @@ -574,9 +496,10 @@ using namespace ::com::sun::star::awt::grid; // TODO: listener notification } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::removeRow( RowPos const i_rowPos ) { + DBG_CHECK_ME(); ENSURE_OR_RETURN_VOID( ( i_rowPos >= 0 ) && ( i_rowPos < getRowCount() ), "UnoControlTableModel::removeRow: illegal row position!" ); if ( hasRowHeaders() ) @@ -590,9 +513,10 @@ using namespace ::com::sun::star::awt::grid; // TODO: listener notification } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::clearAllRows() { + DBG_CHECK_ME(); if ( hasRowHeaders() ) { ::std::vector< ::rtl::OUString > aEmpty; @@ -607,70 +531,123 @@ using namespace ::com::sun::star::awt::grid; // TODO: listener notification } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::util::Color UnoControlTableModel::getLineColor() { + DBG_CHECK_ME(); return m_pImpl->m_nLineColor; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setLineColor( ::com::sun::star::util::Color _rColor ) { + DBG_CHECK_ME(); m_pImpl->m_nLineColor = _rColor; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::util::Color UnoControlTableModel::getHeaderBackgroundColor() { + DBG_CHECK_ME(); return m_pImpl->m_nHeaderColor; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setHeaderBackgroundColor( ::com::sun::star::util::Color _rColor ) { + DBG_CHECK_ME(); m_pImpl->m_nHeaderColor = _rColor; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::util::Color UnoControlTableModel::getTextColor() { + DBG_CHECK_ME(); return m_pImpl->m_nTextColor; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setTextColor( ::com::sun::star::util::Color _rColor ) { + DBG_CHECK_ME(); m_pImpl->m_nTextColor = _rColor; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::util::Color UnoControlTableModel::getOddRowBackgroundColor() { + DBG_CHECK_ME(); return m_pImpl->m_nRowColor1; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setOddRowBackgroundColor( ::com::sun::star::util::Color _rColor ) { + DBG_CHECK_ME(); m_pImpl->m_nRowColor1 = _rColor; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::util::Color UnoControlTableModel::getEvenRowBackgroundColor() { + DBG_CHECK_ME(); return m_pImpl->m_nRowColor2; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setEvenRowBackgroundColor( ::com::sun::star::util::Color _rColor ) { + DBG_CHECK_ME(); m_pImpl->m_nRowColor2 = _rColor; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::style::VerticalAlignment UnoControlTableModel::getVerticalAlign() { + DBG_CHECK_ME(); return m_pImpl->m_eVerticalAlign; } //-------------------------------------------------------------------- void UnoControlTableModel::setVerticalAlign( com::sun::star::style::VerticalAlignment _xAlign ) { - m_pImpl->m_eVerticalAlign = _xAlign; + DBG_CHECK_ME(); + m_pImpl->m_eVerticalAlign = _xAlign; + } + + //-------------------------------------------------------------------- + ColPos UnoControlTableModel::getColumnPos( UnoGridColumnFacade const & i_column ) const + { + DBG_CHECK_ME(); + for ( ColumnModels::const_iterator col = m_pImpl->aColumns.begin(); + col != m_pImpl->aColumns.end(); + ++col + ) + { + if ( &i_column == col->get() ) + return col - m_pImpl->aColumns.begin(); + } + OSL_ENSURE( false, "UnoControlTableModel::getColumnPos: column not found!" ); + return COL_INVALID; + } + + //-------------------------------------------------------------------- + void UnoControlTableModel::notifyColumnChange( ColPos const i_columnPos, ColumnAttributeGroup const i_attributeGroup ) const + { + DBG_CHECK_ME(); + ENSURE_OR_RETURN_VOID( ( i_columnPos >= 0 ) && ( i_columnPos < getColumnCount() ), + "UnoControlTableModel::notifyColumnChange: invalid column index!" ); + + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->columnChanged( i_columnPos, i_attributeGroup ); + } } +// ..................................................................................................................... +} } // svt::table +// ..................................................................................................................... diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 1f13b776a49f..d6dcf138ccf2 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -28,62 +28,38 @@ #ifndef _UNOCONTROL_TABLEMODEL_HXX_ #define _UNOCONTROL_TABLEMODEL_HXX_ -#include -#include +#include "svtools/table/tablemodel.hxx" +#include "svtools/table/tablecontrol.hxx" + +/** === begin UNO includes === **/ #include #include #include #include #include #include -#include -#include -#include -#include #include #include #include -#include - - -using namespace ::svt::table; - -class UnoControlTableColumn : public IColumnModel -{ - private: - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > - m_xGridColumn; - - public: - UnoControlTableColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn >& i_gridColumn ); - - // IColumnModel overridables - virtual ::com::sun::star::uno::Any - getID() const; - virtual void setID( const ::com::sun::star::uno::Any& i_ID ); - virtual String getName() const; - virtual void setName( const String& _rName ); - virtual bool isResizable() const; - virtual void setResizable( bool _bResizable ); - virtual TableMetrics getWidth() const; - virtual void setWidth( TableMetrics _nWidth ); - virtual TableMetrics getMinWidth() const; - virtual void setMinWidth( TableMetrics _nMinWidth ); - virtual TableMetrics getMaxWidth() const; - virtual void setMaxWidth( TableMetrics _nMaxWidth ); - virtual TableMetrics getPreferredWidth() const; - virtual void setPreferredWidth( TableMetrics _nPrefWidth ); - virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign(); - virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign); +/** === end UNO includes === **/ - private: - UnoControlTableColumn(); // not implemented -}; +#include +#include -struct UnoControlTableModel_Impl; +#include -class UnoControlTableModel : public ITableModel +// ..................................................................................................................... +namespace svt { namespace table { +// ..................................................................................................................... + + //================================================================================================================== + //= UnoControlTableModel + //================================================================================================================== + class UnoGridColumnFacade; + struct UnoControlTableModel_Impl; + class UnoControlTableModel : public ITableModel + { private: UnoControlTableModel_Impl* m_pImpl; @@ -110,11 +86,6 @@ class UnoControlTableModel : public ITableModel /// sets a new width for the handle column (containing the row headers) void SetHandleWidth( TableMetrics _nWidth ); - /// sets the width of a column - inline void SetColumnWidth( ColPos _nColumn, TableMetrics _nWidth100thMM ); - /// retrieves the width of a column, in 1/100th millimeters - inline TableMetrics GetColumnWidth( ColPos _nColumn ); - public: // ITableModel overridables virtual TableSize getColumnCount() const; @@ -141,10 +112,9 @@ class UnoControlTableModel : public ITableModel virtual ::com::sun::star::util::Color getEvenRowBackgroundColor(); virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign(); - // column write access - void appendColumn( const PColumnModel& i_column ); - void insertColumn( ColPos const i_position, const PColumnModel& i_column ); + void appendColumn( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column ); + void insertColumn( ColPos const i_position, ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column ); void removeAllColumns(); // row write access @@ -160,7 +130,6 @@ class UnoControlTableModel : public ITableModel void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setCellContent(const std::vector >& cellContent); - void setColumnCount(TableSize _nColCount); void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); void setLineColor(::com::sun::star::util::Color _rColor); @@ -169,15 +138,20 @@ class UnoControlTableModel : public ITableModel void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor); void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor); void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); -}; -inline void UnoControlTableModel::SetColumnWidth( ColPos _nColumn, TableMetrics _nWidth100thMM ) -{ - getColumnModel( _nColumn )->setWidth( _nWidth100thMM ); -} + /// retrieves the index of a column within the model + ColPos getColumnPos( UnoGridColumnFacade const & i_column ) const; -inline TableMetrics UnoControlTableModel::GetColumnWidth( ColPos _nColumn ) -{ - return getColumnModel( _nColumn )->getWidth(); -} - #endif // _UNOCONTROL_TABLEMODEL_HXX_ + /// notifies a change in a column belonging to the model + void notifyColumnChange( ColPos const i_columnPos, ColumnAttributeGroup const i_attributeGroup ) const; + +#ifdef DBG_UTIL + const char* checkInvariants() const; +#endif + }; + +// ..................................................................................................................... +} } // svt::table +// ..................................................................................................................... + +#endif // _UNOCONTROL_TABLEMODEL_HXX_ diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx new file mode 100755 index 000000000000..9996d7c6687c --- /dev/null +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -0,0 +1,362 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include "unogridcolumnfacade.hxx" +#include "unocontroltablemodel.hxx" + +#include "svtools/table/defaultinputhandler.hxx" +#include "svtools/table/gridtablerenderer.hxx" +#include "svtools/table/tablecontrol.hxx" + +/** === begin UNO includes === **/ +#include +#include +#include +/** === end UNO includes === **/ + +#include +#include +#include +#include +#include + +// ..................................................................................................................... +namespace svt { namespace table +{ +// ..................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::awt::grid::XGridColumn; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::awt::grid::XGridColumnListener; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::awt::grid::GridColumnEvent; + using ::com::sun::star::uno::Any; + using ::com::sun::star::style::HorizontalAlignment_LEFT; + using ::com::sun::star::style::HorizontalAlignment; + /** === end UNO using === **/ + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + template< class ATTRIBUTE_TYPE > + void lcl_set( Reference< XGridColumn > const & i_column, void ( SAL_CALL XGridColumn::*i_setter )( ATTRIBUTE_TYPE ), + ATTRIBUTE_TYPE i_value ) + { + try + { + (i_column.get()->*i_setter) ( i_value ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + template< class ATTRIBUTE_TYPE > + ATTRIBUTE_TYPE lcl_get( Reference< XGridColumn > const & i_column, ATTRIBUTE_TYPE ( SAL_CALL XGridColumn::*i_getter )() ) + { + ATTRIBUTE_TYPE value = ATTRIBUTE_TYPE(); + try + { + value = (i_column.get()->*i_getter)(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return value; + } + } + + //================================================================================================================== + //= ColumnChangeMultiplexer + //================================================================================================================== + typedef ::cppu::WeakImplHelper1 < XGridColumnListener + > ColumnChangeMultiplexer_Base; + class ColumnChangeMultiplexer :public ColumnChangeMultiplexer_Base + ,public ::boost::noncopyable + { + public: + ColumnChangeMultiplexer( UnoGridColumnFacade& i_colImpl ); + + void dispose(); + + protected: + ~ColumnChangeMultiplexer(); + + // XGridColumnListener + virtual void SAL_CALL columnChanged( const GridColumnEvent& i_event ) throw (RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const EventObject& i_event ) throw (RuntimeException); + + private: + UnoGridColumnFacade* m_pColumnImplementation; + }; + + //------------------------------------------------------------------------------------------------------------------ + ColumnChangeMultiplexer::ColumnChangeMultiplexer( UnoGridColumnFacade& i_colImpl ) + :m_pColumnImplementation( &i_colImpl ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + ColumnChangeMultiplexer::~ColumnChangeMultiplexer() + { + } + + //------------------------------------------------------------------------------------------------------------------ + void ColumnChangeMultiplexer::dispose() + { + DBG_TESTSOLARMUTEX(); + m_pColumnImplementation = NULL; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL ColumnChangeMultiplexer::columnChanged( const GridColumnEvent& i_event ) throw (RuntimeException) + { + ColumnAttributeGroup nChangedAttributes( COL_ATTRS_NONE ); + + if ( i_event.valueName.equalsAscii( "HAlign" ) ) + nChangedAttributes |= COL_ATTRS_APPEARANCE; + + if ( i_event.valueName.equalsAscii( "ColWidth" ) + || i_event.valueName.equalsAscii( "MaxWidth" ) + || i_event.valueName.equalsAscii( "MinWidth" ) + || i_event.valueName.equalsAscii( "PrefWidth" ) + || i_event.valueName.equalsAscii( "ColumnResize" ) + ) + nChangedAttributes |= COL_ATTRS_WIDTH; + + OSL_ENSURE( nChangedAttributes != COL_ATTRS_NONE, + "ColumnChangeMultiplexer::columnChanged: unknown column attributed changed!" ); + + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + if ( m_pColumnImplementation != NULL ) + m_pColumnImplementation->columnChanged( nChangedAttributes ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL ColumnChangeMultiplexer::disposing( const EventObject& i_event ) throw (RuntimeException) + { + OSL_UNUSED( i_event ); + } + + //================================================================================================================== + //= UnoGridColumnFacade + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + UnoGridColumnFacade::UnoGridColumnFacade( UnoControlTableModel const & i_owner, Reference< XGridColumn > const & i_gridColumn ) + :m_pOwner( &i_owner ) + ,m_xGridColumn( i_gridColumn, UNO_QUERY_THROW ) + ,m_pChangeMultiplexer( new ColumnChangeMultiplexer( *this ) ) + { + m_xGridColumn->addGridColumnListener( m_pChangeMultiplexer.get() ); + } + + //------------------------------------------------------------------------------------------------------------------ + UnoGridColumnFacade::~UnoGridColumnFacade() + { + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::dispose() + { + DBG_TESTSOLARMUTEX(); + ENSURE_OR_RETURN_VOID( m_pOwner != NULL, "UnoGridColumnFacade::dispose: already disposed!" ); + + m_xGridColumn->removeGridColumnListener( m_pChangeMultiplexer.get() ); + m_pChangeMultiplexer->dispose(); + m_pChangeMultiplexer.clear(); + m_xGridColumn.clear(); + m_pOwner = NULL; + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::columnChanged( ColumnAttributeGroup const i_attributeGroup ) + { + DBG_TESTSOLARMUTEX(); + if ( m_pOwner != NULL ) + m_pOwner->notifyColumnChange( m_pOwner->getColumnPos( *this ), i_attributeGroup ); + } + + //------------------------------------------------------------------------------------------------------------------ + Any UnoGridColumnFacade::getID() const + { + Any aID; + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", aID ); + try + { + aID = m_xGridColumn->getIdentifier(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return aID; + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setID( const Any& i_ID ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + try + { + m_xGridColumn->setIdentifier( i_ID ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + String UnoGridColumnFacade::getName() const + { + ::rtl::OUString sName; + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", sName ); + try + { + sName = m_xGridColumn->getTitle(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return sName; + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setName( const String& _rName ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + try + { + m_xGridColumn->setTitle( _rName ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + bool UnoGridColumnFacade::isResizable() const + { + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", false ); + return lcl_get( m_xGridColumn, &XGridColumn::getResizeable ); + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setResizable( bool _bResizable ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + return lcl_set( m_xGridColumn, &XGridColumn::setResizeable, sal_Bool( _bResizable ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + TableMetrics UnoGridColumnFacade::getWidth() const + { + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 0 ); + return lcl_get( m_xGridColumn, &XGridColumn::getColumnWidth ); + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setWidth( TableMetrics _nWidth ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + lcl_set( m_xGridColumn, &XGridColumn::setColumnWidth, _nWidth ); + } + + //------------------------------------------------------------------------------------------------------------------ + TableMetrics UnoGridColumnFacade::getMinWidth() const + { + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 0 ); + return lcl_get( m_xGridColumn, &XGridColumn::getMinWidth ); + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setMinWidth( TableMetrics _nMinWidth ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMinWidth ); + } + + //------------------------------------------------------------------------------------------------------------------ + TableMetrics UnoGridColumnFacade::getMaxWidth() const + { + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 0 ); + return lcl_get( m_xGridColumn, &XGridColumn::getMaxWidth ); + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setMaxWidth( TableMetrics _nMaxWidth ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMaxWidth ); + } + + //------------------------------------------------------------------------------------------------------------------ + TableMetrics UnoGridColumnFacade::getPreferredWidth() const + { + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 0 ); + return lcl_get( m_xGridColumn, &XGridColumn::getPreferredWidth ); + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setPreferredWidth( TableMetrics _nPrefWidth ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + lcl_set( m_xGridColumn, &XGridColumn::setPreferredWidth, _nPrefWidth ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::com::sun::star::style::HorizontalAlignment UnoGridColumnFacade::getHorizontalAlign() + { + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", HorizontalAlignment_LEFT ); + return lcl_get( m_xGridColumn, &XGridColumn::getHorizontalAlign ); + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setHorizontalAlign( com::sun::star::style::HorizontalAlignment _align ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + lcl_set( m_xGridColumn, &XGridColumn::setHorizontalAlign, _align ); + } + +// ..................................................................................................................... +} } // svt::table +// ..................................................................................................................... diff --git a/svtools/source/uno/unogridcolumnfacade.hxx b/svtools/source/uno/unogridcolumnfacade.hxx new file mode 100755 index 000000000000..a49f1c8963e7 --- /dev/null +++ b/svtools/source/uno/unogridcolumnfacade.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_GRIDCOLUMNFACADE_HXX +#define SVTOOLS_GRIDCOLUMNFACADE_HXX + +#include "svtools/table/tablemodel.hxx" +#include "svtools/table/tablecontrol.hxx" + +/** === begin UNO includes === **/ +#include +#include +#include +/** === end UNO includes === **/ + +#include +#include + +#include + +// ..................................................................................................................... +namespace svt { namespace table +{ +// ..................................................................................................................... + + //================================================================================================================== + //= UnoGridColumnFacade + //================================================================================================================== + class ColumnChangeMultiplexer; + class UnoControlTableModel; + class UnoGridColumnFacade :public IColumnModel + ,public ::boost::noncopyable + { + public: + UnoGridColumnFacade( + UnoControlTableModel const & i_owner, + ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_gridColumn + ); + ~UnoGridColumnFacade(); + + // IColumnModel overridables + virtual ::com::sun::star::uno::Any + getID() const; + virtual void setID( const ::com::sun::star::uno::Any& i_ID ); + virtual String getName() const; + virtual void setName( const String& _rName ); + virtual bool isResizable() const; + virtual void setResizable( bool _bResizable ); + virtual TableMetrics getWidth() const; + virtual void setWidth( TableMetrics _nWidth ); + virtual TableMetrics getMinWidth() const; + virtual void setMinWidth( TableMetrics _nMinWidth ); + virtual TableMetrics getMaxWidth() const; + virtual void setMaxWidth( TableMetrics _nMaxWidth ); + virtual TableMetrics getPreferredWidth() const; + virtual void setPreferredWidth( TableMetrics _nPrefWidth ); + virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign(); + virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign); + + /** disposes the column wrapper + + Note that the XGridColumn which is wrapped by the instance is not disposed, as we + do not own it. + */ + void dispose(); + + // callback for the XGridColumnListener + void columnChanged( ColumnAttributeGroup const i_attributeGroup ); + + private: + const UnoControlTableModel* m_pOwner; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > m_xGridColumn; + ::rtl::Reference< ColumnChangeMultiplexer > m_pChangeMultiplexer; + }; + +// ..................................................................................................................... +} } // svt::table +// ..................................................................................................................... + +#endif // SVTOOLS_GRIDCOLUMNFACADE_HXX -- cgit From a9fa19d43d47ed87d5c961c0f1f8b371272a8b16 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 Jan 2011 09:08:06 +0100 Subject: gridsort: css.awt.grid.GridControlEvent is unused - removed --- offapi/com/sun/star/awt/grid/GridControlEvent.idl | 54 ----------------------- offapi/com/sun/star/awt/grid/makefile.mk | 1 - 2 files changed, 55 deletions(-) delete mode 100644 offapi/com/sun/star/awt/grid/GridControlEvent.idl diff --git a/offapi/com/sun/star/awt/grid/GridControlEvent.idl b/offapi/com/sun/star/awt/grid/GridControlEvent.idl deleted file mode 100644 index ce8736fb1b93..000000000000 --- a/offapi/com/sun/star/awt/grid/GridControlEvent.idl +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_GridControlEvent_idl__ -#define __com_sun_star_awt_GridControlEvent_idl__ - -#ifndef __com_sun_star_lang_EventObject_idl__ -#include -#endif - - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - - -struct GridControlEvent: com::sun::star::lang::EventObject -{ - //------------------------------------------------------------------------- - - string ActionCommand; - -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index 489d14c55a75..44be3193371c 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -39,7 +39,6 @@ PACKAGE=com$/sun$/star$/awt$/grid # ------------------------------------------------------------------------ IDLFILES=\ GridColumnEvent.idl\ - GridControlEvent.idl\ GridDataEvent.idl\ SelectionEventType.idl\ GridSelectionEvent.idl\ -- cgit From 60312aa1f8fc2030fdd5c9eeb2815c5fc6f843ca Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 Jan 2011 12:16:37 +0100 Subject: gridsort: member names usually start with UpperCase - corrected this for GridColumn/DataEvent, for sake of consistency --- svtools/source/uno/svtxgridcontrol.cxx | 48 ++++++++++++++--------------- svtools/source/uno/unogridcolumnfacade.cxx | 12 ++++---- toolkit/source/controls/grid/gridcolumn.cxx | 4 +-- toolkit/source/controls/grid/gridcolumn.hxx | 4 +-- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 9ba2e8cd6745..805cff7aca98 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -403,7 +403,7 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD { ::vos::OGuard aGuard( GetMutex() ); - const TableSize rowDataLength = (TableSize)Event.rowData.getLength(); + const TableSize rowDataLength = (TableSize)Event.RowData.getLength(); const TableSize colCount = m_xColumnModel->getColumnCount(); if ( colCount == 0 ) { @@ -413,7 +413,7 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD if ( rowDataLength != colCount ) throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), *this ); - m_pTableModel->appendRow( Event.rowData, Event.headerName ); + m_pTableModel->appendRow( Event.RowData, Event.HeaderName ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowAdded: no control (anymore)!" ); @@ -444,7 +444,7 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowRemoved: no control (anymore)!" ); - if(Event.index == -1) + if(Event.RowIndex == -1) { if ( !isSelectionEmpty() ) deselectAllRows(); @@ -460,21 +460,21 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri Any()); } } - else if ( Event.index >= 0 && Event.index < m_pTableModel->getRowCount() ) + else if ( Event.RowIndex >= 0 && Event.RowIndex < m_pTableModel->getRowCount() ) { - if ( isSelectedIndex( Event.index ) ) + if ( isSelectedIndex( Event.RowIndex ) ) { Sequence< sal_Int32 > selected(1); - selected[0]=Event.index; + selected[0]=Event.RowIndex; deselectRows( selected ); } - m_pTableModel->removeRow( Event.index ); + m_pTableModel->removeRow( Event.RowIndex ); } - pTable->InvalidateDataWindow(Event.index, Event.index, true); + pTable->InvalidateDataWindow(Event.RowIndex, Event.RowIndex, true); if(pTable->isAccessibleAlive()) { pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, - makeAny( AccessibleTableModelChange(DELETE, Event.index, Event.index+1, 0, m_pTableModel->getColumnCount())), + makeAny( AccessibleTableModelChange(DELETE, Event.RowIndex, Event.RowIndex+1, 0, m_pTableModel->getColumnCount())), Any()); } } @@ -486,42 +486,42 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::Gr TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" ); - if ( Event.valueName.equalsAscii( "RowHeight" ) ) + if ( Event.AttributeName.equalsAscii( "RowHeight" ) ) { sal_Int32 rowHeight = m_pTableModel->getRowHeight(); - Event.newValue>>=rowHeight; + Event.NewValue>>=rowHeight; m_pTableModel->setRowHeight(rowHeight); pTable->Invalidate(); } - else if ( Event.valueName.equalsAscii( "RowHeaderWidth" ) ) + else if ( Event.AttributeName.equalsAscii( "RowHeaderWidth" ) ) { sal_Int32 rowHeaderWidth = m_pTableModel->getRowHeaderWidth(); - Event.newValue>>=rowHeaderWidth; + Event.NewValue>>=rowHeaderWidth; m_pTableModel->setRowHeaderWidth(rowHeaderWidth); pTable->Invalidate(); } - else if ( Event.valueName.equalsAscii( "RowHeaders" ) ) + else if ( Event.AttributeName.equalsAscii( "RowHeaders" ) ) { Sequence< rtl::OUString > rowHeaders; - OSL_VERIFY( Event.newValue >>= rowHeaders ); + OSL_VERIFY( Event.NewValue >>= rowHeaders ); m_pTableModel->setRowHeaderNames( rowHeaders ); pTable->Invalidate(); } - else if ( Event.valueName.equalsAscii( "CellUpdated" ) ) + else if ( Event.AttributeName.equalsAscii( "CellUpdated" ) ) { sal_Int32 col = -1; - OSL_VERIFY( Event.oldValue >>= col ); + OSL_VERIFY( Event.OldValue >>= col ); - m_pTableModel->updateCellContent( Event.index, col, Event.newValue ); - pTable->InvalidateDataWindow( Event.index, Event.index, false ); + m_pTableModel->updateCellContent( Event.RowIndex, col, Event.NewValue ); + pTable->InvalidateDataWindow( Event.RowIndex, Event.RowIndex, false ); } - else if ( Event.valueName.equalsAscii( "RowUpdated" ) ) + else if ( Event.AttributeName.equalsAscii( "RowUpdated" ) ) { Sequence< sal_Int32 > cols; - OSL_VERIFY( Event.oldValue >>= cols ); + OSL_VERIFY( Event.OldValue >>= cols ); Sequence< Any > values; - OSL_VERIFY( Event.newValue >>= values ); + OSL_VERIFY( Event.NewValue >>= values ); ENSURE_OR_RETURN_VOID( cols.getLength() == values.getLength(), "SVTXGridControl::dataChanged: inconsistent array lengths!" ); @@ -531,10 +531,10 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::Gr for ( ColPos i = 0; i< cols.getLength(); ++i ) { ENSURE_OR_CONTINUE( ( cols[i] >= 0 ) && ( cols[i] < columnCount ), "illegal column index" ); - m_pTableModel->updateCellContent( Event.index, cols[i], values[i] ); + m_pTableModel->updateCellContent( Event.RowIndex, cols[i], values[i] ); } - pTable->InvalidateDataWindow( Event.index, Event.index, false ); + pTable->InvalidateDataWindow( Event.RowIndex, Event.RowIndex, false ); } } diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx index 9996d7c6687c..4e094bbd6523 100755 --- a/svtools/source/uno/unogridcolumnfacade.cxx +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -150,14 +150,14 @@ namespace svt { namespace table { ColumnAttributeGroup nChangedAttributes( COL_ATTRS_NONE ); - if ( i_event.valueName.equalsAscii( "HAlign" ) ) + if ( i_event.AttributeName.equalsAscii( "HAlign" ) ) nChangedAttributes |= COL_ATTRS_APPEARANCE; - if ( i_event.valueName.equalsAscii( "ColWidth" ) - || i_event.valueName.equalsAscii( "MaxWidth" ) - || i_event.valueName.equalsAscii( "MinWidth" ) - || i_event.valueName.equalsAscii( "PrefWidth" ) - || i_event.valueName.equalsAscii( "ColumnResize" ) + if ( i_event.AttributeName.equalsAscii( "ColWidth" ) + || i_event.AttributeName.equalsAscii( "MaxWidth" ) + || i_event.AttributeName.equalsAscii( "MinWidth" ) + || i_event.AttributeName.equalsAscii( "PrefWidth" ) + || i_event.AttributeName.equalsAscii( "ColumnResize" ) ) nChangedAttributes |= COL_ATTRS_WIDTH; diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index d681a3101b12..cc0790beb651 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -87,10 +87,10 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void GridColumn::broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue, ::osl::ClearableMutexGuard& i_Guard ) + void GridColumn::broadcast_changed( ::rtl::OUString name, Any i_oldValue, Any i_newValue, ::osl::ClearableMutexGuard& i_Guard ) { Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridColumnEvent aEvent( xSource, name, oldValue, newValue, m_nIndex); + GridColumnEvent aEvent( xSource, name, i_oldValue, i_newValue, m_nIndex); ::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( XGridColumnListener::static_type() ); diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index b8d70551032a..a099e9c2c01d 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -91,8 +91,8 @@ public: private: void broadcast_changed( ::rtl::OUString name, - ::com::sun::star::uno::Any oldValue, - ::com::sun::star::uno::Any newValue, + ::com::sun::star::uno::Any i_oldValue, + ::com::sun::star::uno::Any i_newValue, ::osl::ClearableMutexGuard& i_Guard ); -- cgit From 91e166b89b0fc3d543aab418e9c5655f29f418bd Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 Jan 2011 12:16:37 +0100 Subject: gridsort: member names usually start with UpperCase - corrected this for GridColumn/DataEvent, for sake of consistency --- offapi/com/sun/star/awt/grid/GridColumnEvent.idl | 10 +++++----- offapi/com/sun/star/awt/grid/GridDataEvent.idl | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/GridColumnEvent.idl b/offapi/com/sun/star/awt/grid/GridColumnEvent.idl index caab721185a5..4ab6e71caf51 100644 --- a/offapi/com/sun/star/awt/grid/GridColumnEvent.idl +++ b/offapi/com/sun/star/awt/grid/GridColumnEvent.idl @@ -42,17 +42,17 @@ module com { module sun { module star { module awt { module grid { */ struct GridColumnEvent: com::sun::star::lang::EventObject { - /** Contains the property name of the changed value **/ - string valueName; + /** Contains the name of the attributes whose value changed. **/ + string AttributeName; /** Contains the old value **/ - any oldValue; + any OldValue; /** Contains the new value **/ - any newValue; + any NewValue; /** Contains the index of the changed column**/ - long index; + long ColumnIndex; //------------------------------------------------------------------------- }; diff --git a/offapi/com/sun/star/awt/grid/GridDataEvent.idl b/offapi/com/sun/star/awt/grid/GridDataEvent.idl index 1e0afb610f16..26b563b20296 100644 --- a/offapi/com/sun/star/awt/grid/GridDataEvent.idl +++ b/offapi/com/sun/star/awt/grid/GridDataEvent.idl @@ -44,29 +44,29 @@ module com { module sun { module star { module awt { module grid { @see XGridControl @see XGridDataListener - @sonce OOo 3.3.0 + @since OOo 3.3.0 */ struct GridDataEvent: com::sun::star::lang::EventObject { //------------------------------------------------------------------------- - /** Contains the property name of the changed value **/ - string valueName; + /** Contains the name of the attribute whose value changed. **/ + string AttributeName; /** Contains the old value **/ - any oldValue; + any OldValue; /** Contains the new value **/ - any newValue; + any NewValue; /** Contains the index of the changed row**/ - long index; + long RowIndex; /** Contains the header name of the changed row**/ - string headerName; + string HeaderName; /** Contains the changed row**/ - sequence rowData; + sequence RowData; }; -- cgit From 671aee616838ee541e2d5bf8a4dde40e6aaa83a6 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 Jan 2011 11:35:10 +0100 Subject: gridsort: correct registration for tthe GridColumn service --- toolkit/source/helper/registerservices.cxx | 147 +++++++++++++++-------------- 1 file changed, 75 insertions(+), 72 deletions(-) diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index c8ef067246f7..ef6dca4f4916 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -127,14 +127,17 @@ namespace toolkit return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new OGeometryControlModel( i_factory ) ); } -#define CHECKANDCREATEFACTORY( ImplName, ServiceName1, ServiceName2 ) \ - pRet = tryCreateFactory( sImplementationName, "stardiv.Toolkit." #ImplName, \ +#define GET_FACTORY_WITH_IMPL_PREFIX( ClassName, ImplNamePrefix, ServiceName1, ServiceName2 ) \ + pRet = tryCreateFactory( sImplementationName, ImplNamePrefix "." #ClassName, \ ServiceName1, ServiceName2, \ - ImplName##_CreateInstance, xServiceFactory \ + ClassName##_CreateInstance, xServiceFactory \ ); \ if ( pRet ) \ return pRet; \ +#define GET_FACTORY( ImplName, ServiceName1, ServiceName2 ) \ + GET_FACTORY_WITH_IMPL_PREFIX( ImplName, "stardiv.Toolkit", ServiceName1, ServiceName2 ) + using namespace toolkit; IMPL_CREATEINSTANCE2( VCLXToolkit ) @@ -226,75 +229,75 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory = static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( _pServiceManager ); - CHECKANDCREATEFACTORY( VCLXToolkit, szServiceName_Toolkit, szServiceName2_Toolkit ) - CHECKANDCREATEFACTORY( VCLXPopupMenu, szServiceName_PopupMenu, szServiceName2_PopupMenu ) - CHECKANDCREATEFACTORY( VCLXMenuBar, szServiceName_MenuBar, szServiceName2_MenuBar ) - CHECKANDCREATEFACTORY( VCLXPointer, szServiceName_Pointer, szServiceName2_Pointer ) - CHECKANDCREATEFACTORY( UnoControlContainer, szServiceName_UnoControlContainer, szServiceName2_UnoControlContainer ) - CHECKANDCREATEFACTORY( UnoControlContainerModel, szServiceName_UnoControlContainerModel, szServiceName2_UnoControlContainerModel ) - CHECKANDCREATEFACTORY( StdTabController, szServiceName_TabController, szServiceName2_TabController ) - CHECKANDCREATEFACTORY( StdTabControllerModel, szServiceName_TabControllerModel, szServiceName2_TabControllerModel ) - CHECKANDCREATEFACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog ) - CHECKANDCREATEFACTORY( UnoControlDialogModel, szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel ) - CHECKANDCREATEFACTORY( UnoEditControl, szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit ) - CHECKANDCREATEFACTORY( UnoControlEditModel, szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel ) - CHECKANDCREATEFACTORY( UnoDateFieldControl, szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField ) - CHECKANDCREATEFACTORY( UnoControlDateFieldModel, szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel ) - CHECKANDCREATEFACTORY( UnoTimeFieldControl, szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField ) - CHECKANDCREATEFACTORY( UnoControlTimeFieldModel, szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel ) - CHECKANDCREATEFACTORY( UnoNumericFieldControl, szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField ) - CHECKANDCREATEFACTORY( UnoControlNumericFieldModel, szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel ) - CHECKANDCREATEFACTORY( UnoCurrencyFieldControl, szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField ) - CHECKANDCREATEFACTORY( UnoControlCurrencyFieldModel, szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel ) - CHECKANDCREATEFACTORY( UnoPatternFieldControl, szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField ) - CHECKANDCREATEFACTORY( UnoControlPatternFieldModel, szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel ) - CHECKANDCREATEFACTORY( UnoFormattedFieldControl, szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField ) - CHECKANDCREATEFACTORY( UnoControlFormattedFieldModel, szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel ) - CHECKANDCREATEFACTORY( UnoFileControl, szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl ) - CHECKANDCREATEFACTORY( UnoControlFileControlModel, szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel ) - CHECKANDCREATEFACTORY( UnoButtonControl, szServiceName_UnoControlButton, szServiceName2_UnoControlButton ) - CHECKANDCREATEFACTORY( UnoControlButtonModel, szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel ) - CHECKANDCREATEFACTORY( UnoImageControlControl, szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton ) - CHECKANDCREATEFACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel ) - CHECKANDCREATEFACTORY( UnoImageControlControl, szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl ) - CHECKANDCREATEFACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel ) - CHECKANDCREATEFACTORY( UnoRadioButtonControl, szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton ) - CHECKANDCREATEFACTORY( UnoControlRadioButtonModel, szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel ) - CHECKANDCREATEFACTORY( UnoCheckBoxControl, szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox ) - CHECKANDCREATEFACTORY( UnoControlCheckBoxModel, szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel ) - CHECKANDCREATEFACTORY( UnoListBoxControl, szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox ) - CHECKANDCREATEFACTORY( UnoControlListBoxModel, szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel ) - CHECKANDCREATEFACTORY( UnoComboBoxControl, szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox ) - CHECKANDCREATEFACTORY( UnoControlComboBoxModel, szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel ) - CHECKANDCREATEFACTORY( UnoFixedTextControl, szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText ) - CHECKANDCREATEFACTORY( UnoControlFixedTextModel, szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel ) - CHECKANDCREATEFACTORY( UnoGroupBoxControl, szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox ) - CHECKANDCREATEFACTORY( UnoControlGroupBoxModel, szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel ) - CHECKANDCREATEFACTORY( UnoProgressBarControl, szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar ) - CHECKANDCREATEFACTORY( UnoControlProgressBarModel, szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel ) - CHECKANDCREATEFACTORY( UnoScrollBarControl, szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar ) - CHECKANDCREATEFACTORY( UnoControlScrollBarModel, szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel ) - CHECKANDCREATEFACTORY( UnoFixedLineControl, szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine ) - CHECKANDCREATEFACTORY( UnoControlFixedLineModel, szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel ) - CHECKANDCREATEFACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer ) - CHECKANDCREATEFACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap ) - CHECKANDCREATEFACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel ) - CHECKANDCREATEFACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL ) - CHECKANDCREATEFACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL ) - CHECKANDCREATEFACTORY( TreeControl, szServiceName_TreeControl, NULL ) - CHECKANDCREATEFACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL ) - CHECKANDCREATEFACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL ) - CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel ) - CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl ) - CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel ) - CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl ) - CHECKANDCREATEFACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL ) - CHECKANDCREATEFACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL ) - CHECKANDCREATEFACTORY( GridControl, szServiceName_GridControl, NULL ); - CHECKANDCREATEFACTORY( GridControlModel, szServiceName_GridControlModel, NULL ); - CHECKANDCREATEFACTORY( DefaultGridDataModel, szServiceName_DefaultGridDataModel, NULL ); - CHECKANDCREATEFACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL ); - CHECKANDCREATEFACTORY( GridColumn, szServiceName_GridColumn, NULL ); + GET_FACTORY( VCLXToolkit, szServiceName_Toolkit, szServiceName2_Toolkit ) + GET_FACTORY( VCLXPopupMenu, szServiceName_PopupMenu, szServiceName2_PopupMenu ) + GET_FACTORY( VCLXMenuBar, szServiceName_MenuBar, szServiceName2_MenuBar ) + GET_FACTORY( VCLXPointer, szServiceName_Pointer, szServiceName2_Pointer ) + GET_FACTORY( UnoControlContainer, szServiceName_UnoControlContainer, szServiceName2_UnoControlContainer ) + GET_FACTORY( UnoControlContainerModel, szServiceName_UnoControlContainerModel, szServiceName2_UnoControlContainerModel ) + GET_FACTORY( StdTabController, szServiceName_TabController, szServiceName2_TabController ) + GET_FACTORY( StdTabControllerModel, szServiceName_TabControllerModel, szServiceName2_TabControllerModel ) + GET_FACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog ) + GET_FACTORY( UnoControlDialogModel, szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel ) + GET_FACTORY( UnoEditControl, szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit ) + GET_FACTORY( UnoControlEditModel, szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel ) + GET_FACTORY( UnoDateFieldControl, szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField ) + GET_FACTORY( UnoControlDateFieldModel, szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel ) + GET_FACTORY( UnoTimeFieldControl, szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField ) + GET_FACTORY( UnoControlTimeFieldModel, szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel ) + GET_FACTORY( UnoNumericFieldControl, szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField ) + GET_FACTORY( UnoControlNumericFieldModel, szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel ) + GET_FACTORY( UnoCurrencyFieldControl, szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField ) + GET_FACTORY( UnoControlCurrencyFieldModel, szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel ) + GET_FACTORY( UnoPatternFieldControl, szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField ) + GET_FACTORY( UnoControlPatternFieldModel, szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel ) + GET_FACTORY( UnoFormattedFieldControl, szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField ) + GET_FACTORY( UnoControlFormattedFieldModel, szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel ) + GET_FACTORY( UnoFileControl, szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl ) + GET_FACTORY( UnoControlFileControlModel, szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel ) + GET_FACTORY( UnoButtonControl, szServiceName_UnoControlButton, szServiceName2_UnoControlButton ) + GET_FACTORY( UnoControlButtonModel, szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel ) + GET_FACTORY( UnoImageControlControl, szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton ) + GET_FACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel ) + GET_FACTORY( UnoImageControlControl, szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl ) + GET_FACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel ) + GET_FACTORY( UnoRadioButtonControl, szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton ) + GET_FACTORY( UnoControlRadioButtonModel, szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel ) + GET_FACTORY( UnoCheckBoxControl, szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox ) + GET_FACTORY( UnoControlCheckBoxModel, szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel ) + GET_FACTORY( UnoListBoxControl, szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox ) + GET_FACTORY( UnoControlListBoxModel, szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel ) + GET_FACTORY( UnoComboBoxControl, szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox ) + GET_FACTORY( UnoControlComboBoxModel, szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel ) + GET_FACTORY( UnoFixedTextControl, szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText ) + GET_FACTORY( UnoControlFixedTextModel, szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel ) + GET_FACTORY( UnoGroupBoxControl, szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox ) + GET_FACTORY( UnoControlGroupBoxModel, szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel ) + GET_FACTORY( UnoProgressBarControl, szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar ) + GET_FACTORY( UnoControlProgressBarModel, szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel ) + GET_FACTORY( UnoScrollBarControl, szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar ) + GET_FACTORY( UnoControlScrollBarModel, szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel ) + GET_FACTORY( UnoFixedLineControl, szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine ) + GET_FACTORY( UnoControlFixedLineModel, szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel ) + GET_FACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer ) + GET_FACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap ) + GET_FACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel ) + GET_FACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL ) + GET_FACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL ) + GET_FACTORY( TreeControl, szServiceName_TreeControl, NULL ) + GET_FACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL ) + GET_FACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL ) + GET_FACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel ) + GET_FACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl ) + GET_FACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel ) + GET_FACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl ) + GET_FACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL ) + GET_FACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL ) + GET_FACTORY( GridControl, szServiceName_GridControl, NULL ); + GET_FACTORY( GridControlModel, szServiceName_GridControlModel, NULL ); + GET_FACTORY( DefaultGridDataModel, szServiceName_DefaultGridDataModel, NULL ); + GET_FACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL ); + GET_FACTORY_WITH_IMPL_PREFIX( GridColumn, "org.openoffice.comp.toolkit", szServiceName_GridColumn, NULL ); if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 ) -- cgit From 40fa25aad018cb9c31aa78f7e2c9634f796e0a04 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 Jan 2011 14:13:19 +0100 Subject: gridsort: when removing a control due to a model change, ensure the control is disposed (otherwise relicts of it will remain in our VCL counterpart) --- toolkit/source/controls/dialogcontrol.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 31c1a9c850dd..f7e2094d01aa 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -1409,7 +1409,18 @@ void UnoDialogControl::ImplRemoveControl( Reference< XControlModel >& rxModel ) Sequence< Reference< XControl > > aControls = getControls(); Reference< XControl > xCtrl = StdTabController::FindControl( aControls, rxModel ); if ( xCtrl.is() ) + { removeControl( xCtrl ); + try + { + Reference< XComponent > const xControlComp( xCtrl, UNO_QUERY_THROW ); + xControlComp->dispose(); + } + catch( Exception const & ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } } void UnoDialogControl::ImplSetPosSize( Reference< XControl >& rxCtrl ) -- cgit From adebaa24f8ee734ed5694feee1ba225b4b1dcf95 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 Jan 2011 14:16:36 +0100 Subject: gridsort: allow inserting columns into the column model while the control is already alive (unfinished) Missing: Adjustments to the data model. Probably we need to change the API here: It does not make sense that the only method to retrieve actual data from the data model is "any[][] getData" - this doesn't scale at all, and blocks all dynamic changes to the columns. I suppose we need some "any getCellData( col, row )" here. --- svtools/source/table/tablecontrol_impl.cxx | 101 ++++++++++----------- svtools/source/table/tablecontrol_impl.hxx | 7 +- .../controls/grid/defaultgridcolumnmodel.cxx | 10 +- 3 files changed, 62 insertions(+), 56 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index dc6dfc352137..295c811edb84 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -467,19 +467,25 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - void TableControl_Impl::columnsInserted( ColPos first, ColPos last ) + void TableControl_Impl::columnsInserted( ColPos i_first, ColPos i_last ) { + m_nColumnCount = m_pModel->getColumnCount(); impl_ni_updateColumnWidths(); - (void)first; - (void)last; - } + impl_ni_updateScrollbars(); + + impl_invalidateColumnsAfter( i_first ); + OSL_UNUSED( i_last ); + } //-------------------------------------------------------------------- - void TableControl_Impl::columnsRemoved( ColPos first, ColPos last ) + void TableControl_Impl::columnsRemoved( ColPos i_first, ColPos i_last ) { + m_nColumnCount = m_pModel->getColumnCount(); impl_ni_updateColumnWidths(); - (void)first; - (void)last; + impl_ni_updateScrollbars(); + + impl_invalidateColumnsAfter( i_first ); + OSL_UNUSED( i_last ); } //-------------------------------------------------------------------- @@ -502,19 +508,45 @@ namespace svt { namespace table OSL_UNUSED( lastRow ); } + //-------------------------------------------------------------------- + void TableControl_Impl::impl_invalidateColumn( ColPos const i_column ) + { + DBG_CHECK_ME(); + + Rectangle aAllCellsArea; + impl_getAllVisibleCellsArea( aAllCellsArea ); + + const TableColumnGeometry aColumn( *this, aAllCellsArea, i_column ); + if ( aColumn.isValid() ) + m_rAntiImpl.Invalidate( aColumn.getRect() ); + } + + //-------------------------------------------------------------------- + void TableControl_Impl::impl_invalidateColumnsAfter( ColPos const i_column ) + { + DBG_CHECK_ME(); + + const ColPos nFirstVisibleCol = m_nLeftColumn; + const ColPos nLastVisibleCol = m_nLeftColumn + impl_getVisibleColumns( true ) - 1; + if ( ( i_column >= nFirstVisibleCol ) && ( i_column <= nLastVisibleCol ) ) + { + Rectangle aInvalidateArea; + impl_getAllVisibleCellsArea( aInvalidateArea ); + + const TableColumnGeometry aColumn( *this, aInvalidateArea, i_column ); + aInvalidateArea.Left() = aColumn.getRect().Left(); + + m_rAntiImpl.Invalidate( aInvalidateArea ); + } + } + //-------------------------------------------------------------------- void TableControl_Impl::columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ) { ColumnAttributeGroup nGroup( i_attributeGroup ); if ( nGroup & COL_ATTRS_APPEARANCE ) { - Rectangle aAllCellsArea; - impl_getAllVisibleCellsArea( aAllCellsArea ); - - const TableColumnGeometry aColumn( *this, aAllCellsArea, i_column ); - if ( aColumn.isValid() ) - m_rAntiImpl.Invalidate( aColumn.getRect() ); - + impl_invalidateColumn( i_column ); nGroup &= ~COL_ATTRS_APPEARANCE; } @@ -1812,7 +1844,7 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - TableSize TableControl_Impl::impl_getVisibleColumns( bool _bAcceptPartialRow ) const + TableSize TableControl_Impl::impl_getVisibleColumns( bool _bAcceptPartialCol ) const { DBG_CHECK_ME(); @@ -1822,7 +1854,7 @@ namespace svt { namespace table Rectangle( Point( 0, 0 ), m_pDataWindow->GetOutputSizePixel() ), m_nLeftColumn, *this, - _bAcceptPartialRow + _bAcceptPartialCol ); } @@ -2260,10 +2292,6 @@ namespace svt { namespace table // column has become smaller, check against minimum width if ( ( minWidthLogical != 0 ) && ( requestedWidthLogical < minWidthLogical ) ) requestedWidthLogical = minWidthLogical; - - // impl_updateLeftColumn(); - // does this make sense here? We didn't call impl_ni_updateColumnWidths, yet, so m_aColumnWidths - // still contains the old values } else if ( oldEnd < requestedEnd ) { @@ -2285,39 +2313,6 @@ namespace svt { namespace table return m_bResizingColumn; } - //------------------------------------------------------------------------------- - void TableControl_Impl::impl_updateLeftColumn() - { - DBG_CHECK_ME(); - if ( m_nLeftColumn == 0 ) - return; - - // the right end of the last column - const long lastColumnEnd = m_aColumnWidths[ m_nColumnCount - 1 ].getEnd(); - - // free space at the right of the last column - const long freeSpace = m_pDataWindow->GetOutputSizePixel().Width() - lastColumnEnd; - - // if the columnd left of the currently-left-most column would fit into the free - // space, then implicitly scroll - const long leftNeighbourWidth = m_aColumnWidths[ m_nLeftColumn - 1 ].getWidth(); - if ( leftNeighbourWidth < freeSpace ) - { - for ( ColumnPositions::iterator colPos = m_aColumnWidths.begin(); - colPos != m_aColumnWidths.end(); - ++colPos - ) - { - colPos->move( leftNeighbourWidth ); - } - - --m_nLeftColumn; - // TODO: wouldn't this require updating the scrollbar? - } - - // TODO: isnt' it that this might be done repeatedly? - } - //-------------------------------------------------------------------- Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader) { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 4c5038de2cc0..65532065ae67 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -307,7 +307,7 @@ namespace svt { namespace table specifies whether a possible only partially visible last row is counted, too. */ - TableSize impl_getVisibleColumns( bool _bAcceptPartialRow ) const; + TableSize impl_getVisibleColumns( bool _bAcceptPartialCol ) const; /** determines the rectangle occupied by the given cell */ @@ -394,7 +394,10 @@ namespace svt { namespace table */ ColPos impl_getColumnForOrdinate( long const i_ordinate ) const; - void impl_updateLeftColumn(); + /// invalidates the window area occupied by the given column + void impl_invalidateColumn( ColPos const i_column ); + /// invalidates the window area occupied by the given column, and everything at the right side of it + void impl_invalidateColumnsAfter( ColPos const i_column ); DECL_LINK( OnScroll, ScrollBar* ); DECL_LINK( OnUpdateScrollbars, void* ); diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 8537a03321aa..34d610ef5661 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -119,12 +119,20 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + ::osl::ClearableMutexGuard aGuard( m_aMutex ); m_aColumns.push_back( i_column ); sal_Int32 index = m_aColumns.size() - 1; i_column->setIndex( index ); + // fire insertion notifications + ContainerEvent aEvent; + aEvent.Source = *this; + aEvent.Accessor <<= index; + aEvent.Element <<= i_column; + aGuard.clear(); + m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, aEvent ); + return index; } -- cgit From 9a402704663a1ec0ea241517cffc8f26efc6dbfa Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 Jan 2011 14:45:02 +0100 Subject: gridsort: removed XGridColumnModel::copyColumn This does the very same as XGridColumn::XCloneable::createClone does, so there's no need for this method anymore. --- toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 6 ------ toolkit/source/controls/grid/defaultgridcolumnmodel.hxx | 1 - 2 files changed, 7 deletions(-) diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 34d610ef5661..7383fc958dae 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -248,12 +248,6 @@ namespace toolkit } } - //------------------------------------------------------------------------------------------------------------------ - Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::copyColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException) - { - return Reference< XGridColumn >( i_column->createClone(), UNO_QUERY_THROW ); - } - //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL DefaultGridColumnModel::getImplementationName( ) throw (RuntimeException) { diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index dbd89df57b7d..118d6bbf3240 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -65,7 +65,6 @@ public: virtual void SAL_CALL setColumnHeaderHeight( sal_Int32 _value) throw (com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getColumnHeaderHeight() throw (com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL copyColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException); // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); -- cgit From 828ecc65de0b4375c74ecd08fb9286b0c6355688 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 Jan 2011 14:45:02 +0100 Subject: gridsort: removed XGridColumnModel::copyColumn This does the very same as XGridColumn::XCloneable::createClone does, so there's no need for this method anymore. --- offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index da3f2d6aaf62..8ebaf355cb0a 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -116,13 +116,6 @@ interface XGridColumnModel the number of default columns that should be set. */ void setDefaultColumns([in] long elements); - - /**Creates new XGridColumn with the settings of other column. To be used if the columns which are added to - the column model have the same settings. - @param column - the column, which is already created - */ - XGridColumn copyColumn( [in] XGridColumn column ); }; //============================================================================= -- cgit From 9d264d2667daa4284d08afe0e4e93d0c67efa85e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 6 Jan 2011 15:27:01 +0100 Subject: vcl118: #i116120# cope with too small geometries --- vcl/source/control/tabctrl.cxx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index e9696aa8c492..7b9e2dcb08f9 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -461,15 +461,18 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ) Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight ) { Size aWinSize = Control::GetOutputSizePixel(); - if ( nWidth == -1 ) + if ( nWidth < 0 ) nWidth = aWinSize.Width(); - if ( nHeight == -1 ) + if ( nHeight < 0 ) nHeight = aWinSize.Height(); if ( mpTabCtrlData->maItemList.empty() ) { - return Rectangle( Point( TAB_OFFSET, TAB_OFFSET ), - Size( nWidth-TAB_OFFSET*2, nHeight-TAB_OFFSET*2 ) ); + long nW = nWidth-TAB_OFFSET*2; + long nH = nHeight-TAB_OFFSET*2; + return (nW > 0 && nH > 0) + ? Rectangle( Point( TAB_OFFSET, TAB_OFFSET ), Size( nW, nH ) ) + : Rectangle(); } if ( nItemPos == TAB_PAGERECT ) @@ -481,9 +484,11 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight nLastPos = 0; Rectangle aRect = ImplGetTabRect( nLastPos, nWidth, nHeight ); - aRect = Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), - Size( nWidth-TAB_OFFSET*2, - nHeight-aRect.Bottom()-TAB_OFFSET*2 ) ); + long nW = nWidth-TAB_OFFSET*2; + long nH = nHeight-aRect.Bottom()-TAB_OFFSET*2; + aRect = (nW > 0 && nH > 0) + ? Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), Size( nW, nH ) ) + : Rectangle(); return aRect; } -- cgit From f167cee01ffd13e949e68f8395050dc1264f9ab5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 Jan 2011 16:28:45 +0100 Subject: gridsort: XGridDataModel: do not provide access to all data at once, instead use cell-based access --- svtools/source/uno/svtxgridcontrol.cxx | 94 +++---------- svtools/source/uno/unocontroltablemodel.cxx | 152 +++++++-------------- svtools/source/uno/unocontroltablemodel.hxx | 11 +- .../source/controls/grid/defaultgriddatamodel.cxx | 31 +++-- .../source/controls/grid/defaultgriddatamodel.hxx | 5 +- 5 files changed, 83 insertions(+), 210 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 805cff7aca98..06b0576d169b 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -268,48 +268,13 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An if ( !m_xDataModel.is() ) throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The data model isn't set!"), *this ); - Sequence< Sequence< Any > > cellData = m_xDataModel->getData(); - if ( cellData.getLength() != 0 ) - { - const sal_Int32 nDataRowCount = cellData.getLength(); - - const Sequence< ::rtl::OUString > rowHeaders = m_xDataModel->getRowHeaders(); - const sal_Int32 nRowHeaderCount = rowHeaders.getLength(); - - if ( ( nRowHeaderCount != 0 ) && ( nRowHeaderCount != nDataRowCount ) ) - throw GridInvalidDataException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "row header / content data inconsistency" ) ), *this ); - - // check data consistency - sal_Int32 nDataColumnCount = 0; - for ( sal_Int32 i=0; i& rRawRowData = cellData[i]; - if ( ( i > 0 ) && ( rRawRowData.getLength() != nDataColumnCount ) ) - throw GridInvalidDataException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "inconsistent column counts in the row data" ) ), *this ); - nDataColumnCount = rRawRowData.getLength(); - } - - // ensure default columns exist, if they have not previously been added - if ( ( nDataColumnCount > 0 ) && ( m_xColumnModel->getColumnCount() == 0 ) ) - m_xColumnModel->setDefaultColumns( nDataColumnCount ); - // this will trigger notifications, which in turn will let us update our m_pTableModel - - // ensure the row data has as much columns as indicate by our model - if ( nDataColumnCount != m_pTableModel->getColumnCount() ) - throw GridInvalidDataException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Grid model's column count doesn't match the row data's column count." ) ), - *this ); - - // finally add the rows - // TODO: suspend the model's notifications for the single rows, do one notification after all - // rows have been inserted - for ( TableSize i = 0; i < nDataRowCount; ++i ) - { - m_pTableModel->appendRow( cellData[i], rowHeaders[i] ); - } - } + m_pTableModel->setDataModel( m_xDataModel ); + + // ensure default columns exist, if they have not previously been added + sal_Int32 const nDataColumnCount = m_xDataModel->getColumnCount(); + if ( ( nDataColumnCount > 0 ) && ( m_xColumnModel->getColumnCount() == 0 ) ) + m_xColumnModel->setDefaultColumns( nDataColumnCount ); + // this will trigger notifications, which in turn will let us update our m_pTableModel sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height(); if ( m_xDataModel->getRowHeight() == 0 ) @@ -413,8 +378,6 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD if ( rowDataLength != colCount ) throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), *this ); - m_pTableModel->appendRow( Event.RowData, Event.HeaderName ); - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowAdded: no control (anymore)!" ); @@ -449,8 +412,6 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri if ( !isSelectionEmpty() ) deselectAllRows(); - m_pTableModel->clearAllRows(); - pTable->clearSelection(); if ( pTable->isAccessibleAlive() ) @@ -468,10 +429,10 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri selected[0]=Event.RowIndex; deselectRows( selected ); } - m_pTableModel->removeRow( Event.RowIndex ); } - pTable->InvalidateDataWindow(Event.RowIndex, Event.RowIndex, true); - if(pTable->isAccessibleAlive()) + + pTable->InvalidateDataWindow( Event.RowIndex, Event.RowIndex, true ); + if ( pTable->isAccessibleAlive() ) { pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, makeAny( AccessibleTableModelChange(DELETE, Event.RowIndex, Event.RowIndex+1, 0, m_pTableModel->getColumnCount())), @@ -502,38 +463,15 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::Gr } else if ( Event.AttributeName.equalsAscii( "RowHeaders" ) ) { - Sequence< rtl::OUString > rowHeaders; - OSL_VERIFY( Event.NewValue >>= rowHeaders ); - m_pTableModel->setRowHeaderNames( rowHeaders ); + // TODO: we could do better than this - invalidate the header area only pTable->Invalidate(); } - else if ( Event.AttributeName.equalsAscii( "CellUpdated" ) ) + else if ( ( Event.AttributeName.equalsAscii( "CellUpdated" ) ) + || ( Event.AttributeName.equalsAscii( "RowUpdated" ) ) + ) { - sal_Int32 col = -1; - OSL_VERIFY( Event.OldValue >>= col ); - - m_pTableModel->updateCellContent( Event.RowIndex, col, Event.NewValue ); - pTable->InvalidateDataWindow( Event.RowIndex, Event.RowIndex, false ); - } - else if ( Event.AttributeName.equalsAscii( "RowUpdated" ) ) - { - Sequence< sal_Int32 > cols; - OSL_VERIFY( Event.OldValue >>= cols ); - - Sequence< Any > values; - OSL_VERIFY( Event.NewValue >>= values ); - - ENSURE_OR_RETURN_VOID( cols.getLength() == values.getLength(), "SVTXGridControl::dataChanged: inconsistent array lengths!" ); - - const TableSize columnCount = m_pTableModel->getColumnCount(); - // TODO: suspend listener notification, so that the table model doesn't notify |cols.size()| different events. - // Instead, only one event should be broadcasted. - for ( ColPos i = 0; i< cols.getLength(); ++i ) - { - ENSURE_OR_CONTINUE( ( cols[i] >= 0 ) && ( cols[i] < columnCount ), "illegal column index" ); - m_pTableModel->updateCellContent( Event.RowIndex, cols[i], values[i] ); - } - + // TODO: Our UnoControlTableModel should be a listener at the data model, and multiplex those events, + // so the TableControl/_Impl can react on it. pTable->InvalidateDataWindow( Event.RowIndex, Event.RowIndex, false ); } } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 8bfc1d1400f2..4bdfa0ebdabd 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -41,6 +41,7 @@ /** === end UNO includes === **/ #include +#include #include #include #include @@ -63,9 +64,11 @@ namespace svt { namespace table using ::com::sun::star::awt::grid::XGridColumnListener; using ::com::sun::star::lang::EventObject; using ::com::sun::star::awt::grid::GridColumnEvent; + using ::com::sun::star::awt::grid::XGridDataModel; using ::com::sun::star::uno::Any; using ::com::sun::star::style::HorizontalAlignment_LEFT; using ::com::sun::star::style::HorizontalAlignment; + using ::com::sun::star::uno::WeakReference; /** === end UNO using === **/ //================================================================================================================== @@ -76,7 +79,6 @@ namespace svt { namespace table struct UnoControlTableModel_Impl { ColumnModels aColumns; - TableSize nRowCount; bool bHasColumnHeaders; bool bHasRowHeaders; ScrollbarVisibility eVScrollMode; @@ -86,8 +88,6 @@ namespace svt { namespace table TableMetrics nRowHeight; TableMetrics nColumnHeaderHeight; TableMetrics nRowHeaderWidth; - ::std::vector< ::rtl::OUString > aRowHeadersTitle; - ::std::vector< ::std::vector< Any > > aCellContent; ::com::sun::star::util::Color m_nLineColor; ::com::sun::star::util::Color m_nHeaderColor; ::com::sun::star::util::Color m_nTextColor; @@ -95,10 +95,10 @@ namespace svt { namespace table ::com::sun::star::util::Color m_nRowColor2; ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; ModellListeners m_aListeners; + WeakReference< XGridDataModel > m_aDataModel; UnoControlTableModel_Impl() :aColumns ( ) - ,nRowCount ( 0 ) ,bHasColumnHeaders ( true ) ,bHasRowHeaders ( false ) ,eVScrollMode ( ScrollbarShowNever ) @@ -108,8 +108,6 @@ namespace svt { namespace table ,nRowHeight ( 10 ) ,nColumnHeaderHeight( 10 ) ,nRowHeaderWidth ( 10 ) - ,aRowHeadersTitle ( ) - ,aCellContent ( ) ,m_nLineColor ( COL_TRANSPARENT ) ,m_nHeaderColor ( COL_TRANSPARENT ) ,m_nTextColor ( 0 )//black as default @@ -132,8 +130,9 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ const char* UnoControlTableModel::checkInvariants() const { - if ( m_pImpl->aRowHeadersTitle.size() != m_pImpl->aCellContent.size() ) - return "inconsistency between data and row header arrays"; + Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); + if ( !xDataModel.is() ) + return "data model anymore"; // TODO: more? @@ -175,7 +174,19 @@ namespace svt { namespace table TableSize UnoControlTableModel::getRowCount() const { DBG_CHECK_ME(); - return m_pImpl->nRowCount; + + TableSize nRowCount = 0; + try + { + Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); + ENSURE_OR_THROW( xDataModel.is(), "no data model anymore!" ); + nRowCount = xDataModel->getRowCount(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return nRowCount; } //------------------------------------------------------------------------------------------------------------------ @@ -413,122 +424,53 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setCellContent(const std::vector >& cellContent) + void UnoControlTableModel::setDataModel( Reference< XGridDataModel > const & i_gridDataModel ) { DBG_CHECK_ME(); - m_pImpl->aCellContent = cellContent; + m_pImpl->m_aDataModel = i_gridDataModel; + // TODO: register as listener, so we're notified of row/data changes, and can multiplex them to our + // own listeners } //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::getCellContent( ColPos const i_col, RowPos const i_row, Any& o_cellContent ) { DBG_CHECK_ME(); - ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( size_t( i_row ) < m_pImpl->aCellContent.size() ), - "UnoControlTableModel::getCellContent: illegal row index!" ); - ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); - ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( size_t( i_col ) < rRowContent.size() ), - "UnoControlTableModel::getCellContent: illegal column index" ); - o_cellContent = rRowContent[ i_col ]; - } - - //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::updateCellContent( RowPos const i_row, ColPos const i_col, Any const & i_cellContent ) - { - DBG_CHECK_ME(); - ENSURE_OR_RETURN_VOID( ( i_row >= 0 ) && ( size_t( i_row ) < m_pImpl->aCellContent.size() ), - "UnoControlTableModel::updateCellContent: illegal row index!" ); - ::std::vector< Any >& rRowContent( m_pImpl->aCellContent[ i_row ] ); - ENSURE_OR_RETURN_VOID( ( i_col >= 0 ) && ( size_t( i_col ) < rRowContent.size() ), - "UnoControlTableModel::updateCellContent: illegal column index" ); - rRowContent[ i_col ] = i_cellContent; - - // TODO: listener notification - } - - //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setRowHeaderNames( const Sequence< ::rtl::OUString >& i_rowHeaders ) - { - DBG_CHECK_ME(); - ENSURE_OR_RETURN_VOID( size_t( i_rowHeaders.getLength() ) == m_pImpl->aRowHeadersTitle.size(), - "UnoControlTableModel::setRowHeaderNames: illegal number of row headers!" ); - // this method is not intended to set a new row count, but only to modify the existing row headers - - ::std::copy( - ::comphelper::stl_begin( i_rowHeaders ), - ::comphelper::stl_end( i_rowHeaders ), - m_pImpl->aRowHeadersTitle.begin() - ); - // TODO: listener notification + try + { + Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); + ENSURE_OR_THROW( xDataModel.is(), "no data model anymore!" ); + o_cellContent = xDataModel->getCellData( i_col, i_row ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString UnoControlTableModel::getRowHeader( RowPos const i_rowPos ) const { DBG_CHECK_ME(); - ENSURE_OR_RETURN( ( i_rowPos >= 0 ) && ( size_t( i_rowPos ) < m_pImpl->aRowHeadersTitle.size() ), - "UnoControlTableModel::getRowHeader: illegal row position!", ::rtl::OUString() ); - return m_pImpl->aRowHeadersTitle[ i_rowPos ]; - } - //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::appendRow( Sequence< Any > const & i_rowData, ::rtl::OUString const & i_rowHeader ) - { - DBG_CHECK_ME(); - ENSURE_OR_RETURN_VOID( i_rowData.getLength() == getColumnCount(), "UnoControlTableModel::appendRow: invalid row data!" ); - - // add row data - ::std::vector< Any > newRow( i_rowData.getLength() ); - if ( !newRow.empty() ) - ::std::copy( - ::comphelper::stl_begin( i_rowData ), - ::comphelper::stl_end( i_rowData ), - newRow.begin() - ); - - m_pImpl->aCellContent.push_back( newRow ); - - if ( hasRowHeaders() ) - m_pImpl->aRowHeadersTitle.push_back( i_rowHeader ); - - ++m_pImpl->nRowCount; - - // TODO: listener notification - } - - //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::removeRow( RowPos const i_rowPos ) - { - DBG_CHECK_ME(); - ENSURE_OR_RETURN_VOID( ( i_rowPos >= 0 ) && ( i_rowPos < getRowCount() ), "UnoControlTableModel::removeRow: illegal row position!" ); - - if ( hasRowHeaders() ) - m_pImpl->aRowHeadersTitle.erase( m_pImpl->aRowHeadersTitle.begin() + i_rowPos ); + ::rtl::OUString sRowHeader; - const ::std::vector< ::std::vector< Any > >::iterator contentPos = m_pImpl->aCellContent.begin() + i_rowPos; - m_pImpl->aCellContent.erase( contentPos ); + Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); + ENSURE_OR_RETURN( xDataModel.is(), "UnoControlTableModel::getRowHeader: no data model anymore!", sRowHeader ); - --m_pImpl->nRowCount; - - // TODO: listener notification - } - - //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::clearAllRows() - { - DBG_CHECK_ME(); - if ( hasRowHeaders() ) + try { - ::std::vector< ::rtl::OUString > aEmpty; - m_pImpl->aRowHeadersTitle.swap( aEmpty ); + Sequence< ::rtl::OUString > const aRowHeaders( xDataModel->getRowHeaders() ); + ENSURE_OR_RETURN( ( i_rowPos >= 0 ) && ( i_rowPos < aRowHeaders.getLength() ), + "UnoControlTableModel::getRowHeader: illegal row position!", sRowHeader ); + sRowHeader = aRowHeaders[ i_rowPos ]; } - - ::std::vector< ::std::vector< Any > > aEmptyContent; - m_pImpl->aCellContent.swap( aEmptyContent ); - - m_pImpl->nRowCount = 0; - - // TODO: listener notification + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return sRowHeader; } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index d6dcf138ccf2..2cb107b3551d 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -117,19 +117,10 @@ namespace svt { namespace table void insertColumn( ColPos const i_position, ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column ); void removeAllColumns(); - // row write access - void setRowHeaderNames( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_rowHeaders ); - void appendRow( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > const & i_rowData, ::rtl::OUString const & i_rowHeader ); - void removeRow( RowPos const i_rowPos ); - void clearAllRows(); - - // cell data write access - void updateCellContent( RowPos const i_rowPos, ColPos const i_colPos, ::com::sun::star::uno::Any const & i_cellContent ); - // other operations void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; - void setCellContent(const std::vector >& cellContent); + void setDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > const & i_gridDataModel ); void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); void setLineColor(::com::sun::star::util::Color _rColor); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index be3dd303a566..c2fca18dee61 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -158,6 +158,14 @@ namespace toolkit return m_aData.size(); } + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL DefaultGridDataModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException) + { + if ( m_aData.empty() ) + return 0; + return m_aData[0].size(); + } + //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getRowHeaders() throw (::com::sun::star::uno::RuntimeException) { @@ -222,21 +230,19 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< Any > > SAL_CALL DefaultGridDataModel::getData() throw (::com::sun::star::uno::RuntimeException) + Any SAL_CALL DefaultGridDataModel::getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) { + ::osl::MutexGuard aGuard( GetMutex() ); - std::vector< std::vector< Any > >::iterator iterator; - std::vector< Sequence< Any > > dummyContainer(0); + if ( ( i_row < 0 ) || ( size_t( i_row ) > m_aData.size() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + ::std::vector< Any > const & rRow( m_aData[ i_row ] ); - for(iterator = m_aData.begin(); iterator != m_aData.end(); iterator++) - { - Sequence< Any > cols(comphelper::containerToSequence(*iterator)); - dummyContainer.push_back( cols ); - } - Sequence< Sequence< Any > > dataSequence(comphelper::containerToSequence(dummyContainer)); + if ( ( i_column < 0 ) || ( size_t( i_column ) > rRow.size() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - return dataSequence; + return rRow[ i_column ]; } //------------------------------------------------------------------------------------------------------------------ @@ -305,8 +311,6 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::dispose() throw (RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - ::com::sun::star::lang::EventObject aEvent; aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); BrdcstHelper.aLC.disposeAndClear( aEvent ); @@ -328,7 +332,6 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) ); return aImplName; } @@ -336,14 +339,12 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ sal_Bool SAL_CALL DefaultGridDataModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return ServiceName.equalsAscii( szServiceName_DefaultGridDataModel ); } //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridDataModel ) ); static const Sequence< OUString > aSeq( &aServiceName, 1 ); return aSeq; diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index bfb67c7fea2a..66260d49ae6d 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -65,10 +65,11 @@ public: virtual ::sal_Int32 SAL_CALL getRowHeight() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setRowHeight(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowHeaders() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< Any > > SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & m_aData) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & _aData) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); virtual void SAL_CALL removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); -- cgit From ba24c7a4fd8714a6ae2b7c49d00d33a65f24eca2 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 Jan 2011 16:28:45 +0100 Subject: gridsort: XGridDataModel: do not provide access to all data at once, instead use cell-based access --- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index e4abd1664349..bdffdab5da6e 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -32,6 +32,7 @@ #include #include #include +#include //============================================================================= @@ -63,19 +64,22 @@ interface XGridDataModel */ [attribute] sequence< string > RowHeaders; - /** Returns the content of each row. - */ - [attribute,readonly] sequence< sequence< any > > Data; - /**Specifies the width of row header. */ [attribute] long RowHeaderWidth; - /** Returns the number of rows in in the model. - @returns - the number of rows. + /** denotes the number of rows for which the model can provide data + */ + [attribute, readonly] long RowCount; + + /** denotes the number of columns for which the model can provide data + */ + [attribute, readonly] long ColumnCount; + + /** retrieves the data for a given cell */ - long getRowCount(); + any getCellData( [in] long Column, [in] long Row ) + raises ( com::sun::star::lang::IndexOutOfBoundsException ); /** Adds a row to the model. -- cgit From e1c80401419cf94b34706c4fa7fdd929665c640e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 09:55:56 +0100 Subject: gridsort: removed css.awt.grid.ScrollBarMode - it was unused, and if it weren't, it wouldn't belong into this module --- toolkit/source/controls/grid/gridcontrol.cxx | 1 - toolkit/source/helper/property.cxx | 1 - 2 files changed, 2 deletions(-) diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 668044ba6b40..fe8e894a65ed 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index b57170a4071e..1b08c33a9219 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include -- cgit From 74bbd23c2d27db99f1f2cba8e16fa8486d1bf3da Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 09:55:56 +0100 Subject: gridsort: removed css.awt.grid.ScrollBarMode - it was unused, and if it weren't, it wouldn't belong into this module --- offapi/com/sun/star/awt/grid/ScrollBarMode.idl | 70 ---------------------- .../com/sun/star/awt/grid/UnoControlGridModel.idl | 1 - offapi/com/sun/star/awt/grid/makefile.mk | 1 - 3 files changed, 72 deletions(-) delete mode 100644 offapi/com/sun/star/awt/grid/ScrollBarMode.idl diff --git a/offapi/com/sun/star/awt/grid/ScrollBarMode.idl b/offapi/com/sun/star/awt/grid/ScrollBarMode.idl deleted file mode 100644 index d22cd8f30c78..000000000000 --- a/offapi/com/sun/star/awt/grid/ScrollBarMode.idl +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_grid_ScrollBarMode_idl__ -#define __com_sun_star_awt_grid_ScrollBarMode_idl__ - - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - -/** specifies the adjustment type. - */ -enum ScrollBarMode -{ - //------------------------------------------------------------------------- - - /** adjustment is originated by a line jump. - -

          A line jump can, for example, be caused by a click on - one of the pointer buttons.

          - */ - AUTO, - - //------------------------------------------------------------------------- - - /** adjustment is originated by a page jump. - -

          A page jump can, for example, be caused by a click in the - background area of the scrollbar (neither one of the pointer - buttons, nor the thumb).

          - */ - ON, - - OFF - - - -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl index d27e31162d7f..bdbcf00d64fa 100644 --- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl +++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index 44be3193371c..2ab14b26e283 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -52,7 +52,6 @@ IDLFILES=\ DefaultGridDataModel.idl\ XGridDataModel.idl\ XGridColumnModel.idl\ - ScrollBarMode.idl\ XGridControl.idl\ UnoControlGrid.idl\ UnoControlGridModel.idl\ -- cgit From 9cb54ddb6ee986202829eab834cb856a4df5c45f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 10:31:19 +0100 Subject: gridsort: RowHeaderWidth/ColumnHeaderHeight do not belong to the GridData/ColumnModel, but to the GridControlModel --- svtools/source/uno/svtxgridcontrol.cxx | 70 ++++++++++++---------- toolkit/inc/toolkit/helper/property.hxx | 2 + .../controls/grid/defaultgridcolumnmodel.cxx | 20 +------ .../controls/grid/defaultgridcolumnmodel.hxx | 3 - .../source/controls/grid/defaultgriddatamodel.cxx | 17 ------ .../source/controls/grid/defaultgriddatamodel.hxx | 3 - toolkit/source/controls/grid/gridcontrol.cxx | 6 ++ toolkit/source/helper/property.cxx | 6 +- 8 files changed, 51 insertions(+), 76 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 06b0576d169b..c4a524ac5e87 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -131,6 +131,36 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An switch( GetPropertyId( PropertyName ) ) { + case BASEPROPERTY_ROW_HEADER_WIDTH: + { + sal_Int32 rowHeaderWidth( m_pTableModel->getRowHeaderWidth() ); + aValue >>= rowHeaderWidth; + ENSURE_OR_BREAK( rowHeaderWidth > 0, "SVTXGridControl::setProperty: illegal row header width!" ); + m_pTableModel->setRowHeaderWidth( rowHeaderWidth ); + // TODO: the model should broadcast this change itself, and the table should invalidate itself as needed + pTable->Invalidate(); + } + break; + + case BASEPROPERTY_COLUMN_HEADER_HEIGHT: + { + if ( !aValue.hasValue() ) + { + sal_Int32 const fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MAP_APPFONT ).Height(); + m_pTableModel->setColumnHeaderHeight( fontHeight ); + } + else + { + sal_Int32 nColumnHeaderHeight = 0; + aValue >>= nColumnHeaderHeight; + ENSURE_OR_BREAK( nColumnHeaderHeight > 0, "SVTXGridControl::setProperty: illegal column header height!" ); + m_pTableModel->setColumnHeaderHeight( nColumnHeaderHeight ); + } + // TODO: the model should broadcast this change itself, and the table should invalidate itself as needed + pTable->Invalidate(); + } + break; + case BASEPROPERTY_BACKGROUNDCOLOR: { // let the base class handle this for the TableControl @@ -275,13 +305,6 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An if ( ( nDataColumnCount > 0 ) && ( m_xColumnModel->getColumnCount() == 0 ) ) m_xColumnModel->setDefaultColumns( nDataColumnCount ); // this will trigger notifications, which in turn will let us update our m_pTableModel - - sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height(); - if ( m_xDataModel->getRowHeight() == 0 ) - m_pTableModel->setRowHeight( fontHeight ); - else - m_pTableModel->setRowHeight( m_xDataModel->getRowHeight() ); - m_pTableModel->setRowHeaderWidth( m_xDataModel->getRowHeaderWidth() ); } break; } @@ -454,13 +477,6 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::Gr m_pTableModel->setRowHeight(rowHeight); pTable->Invalidate(); } - else if ( Event.AttributeName.equalsAscii( "RowHeaderWidth" ) ) - { - sal_Int32 rowHeaderWidth = m_pTableModel->getRowHeaderWidth(); - Event.NewValue>>=rowHeaderWidth; - m_pTableModel->setRowHeaderWidth(rowHeaderWidth); - pTable->Invalidate(); - } else if ( Event.AttributeName.equalsAscii( "RowHeaders" ) ) { // TODO: we could do better than this - invalidate the header area only @@ -813,28 +829,16 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow() try { - if ( m_xColumnModel->getColumnCount() != 0 ) + const Sequence< Reference< XGridColumn > > columns = m_xColumnModel->getColumns(); + for ( const Reference< XGridColumn >* colRef = columns.getConstArray(); + colRef != columns.getConstArray() + columns.getLength(); + ++colRef + ) { - if ( m_xColumnModel->getColumnHeaderHeight() == 0 ) - { - sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MAP_APPFONT ).Height(); - m_pTableModel->setColumnHeaderHeight( fontHeight ); - } - else - m_pTableModel->setColumnHeaderHeight( m_xColumnModel->getColumnHeaderHeight() ); + ENSURE_OR_CONTINUE( colRef->is(), "illegal column!" ); - const Sequence< Reference< XGridColumn > > columns = m_xColumnModel->getColumns(); - for ( const Reference< XGridColumn >* colRef = columns.getConstArray(); - colRef != columns.getConstArray() + columns.getLength(); - ++colRef - ) - { - ENSURE_OR_CONTINUE( colRef->is(), "illegal column!" ); - - m_pTableModel->appendColumn( *colRef ); - } + m_pTableModel->appendColumn( *colRef ); } - } catch( const Exception& ) { diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index 837d283f4e8c..164071f5a39b 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -202,6 +202,8 @@ namespace rtl { #define BASEPROPERTY_GRID_ROW_BACKGROUND 151 #define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152 #define BASEPROPERTY_ITEM_SEPARATOR_POS 153 +#define BASEPROPERTY_ROW_HEADER_WIDTH 154 +#define BASEPROPERTY_COLUMN_HEADER_HEIGHT 155 // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 7383fc958dae..00bbbf9d6c1b 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -71,7 +71,6 @@ namespace toolkit ,m_aContext( i_factory ) ,m_aContainerListeners( m_aMutex ) ,m_aColumns() - ,m_nColumnHeaderHeight(0) { } @@ -82,7 +81,6 @@ namespace toolkit ,m_aContext( i_copySource.m_aContext ) ,m_aContainerListeners( m_aMutex ) ,m_aColumns() - ,m_nColumnHeaderHeight( i_copySource.m_nColumnHeaderHeight ) { Columns aColumns; aColumns.reserve( i_copySource.m_aColumns.size() ); @@ -139,14 +137,14 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ Sequence< Reference< XGridColumn > > SAL_CALL DefaultGridColumnModel::getColumns() throw (RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + ::osl::MutexGuard aGuard( m_aMutex ); return ::comphelper::containerToSequence( m_aColumns ); } //------------------------------------------------------------------------------------------------------------------ Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (IndexOutOfBoundsException, RuntimeException) { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + ::osl::MutexGuard aGuard( m_aMutex ); if ( index >=0 && index < ((sal_Int32)m_aColumns.size())) return m_aColumns[index]; @@ -154,20 +152,6 @@ namespace toolkit throw IndexOutOfBoundsException(); } - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridColumnModel::setColumnHeaderHeight(sal_Int32 _value) throw (RuntimeException) - { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); - m_nColumnHeaderHeight = _value; - } - - //------------------------------------------------------------------------------------------------------------------ - sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnHeaderHeight() throw (RuntimeException) - { - ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); - return m_nColumnHeaderHeight; - } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridColumnModel::setDefaultColumns(sal_Int32 rowElements) throw (RuntimeException) { diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index 118d6bbf3240..102da190486e 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -62,8 +62,6 @@ public: virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL getColumns() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setColumnHeaderHeight( sal_Int32 _value) throw (com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getColumnHeaderHeight() throw (com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException); // XServiceInfo @@ -87,7 +85,6 @@ private: ::comphelper::ComponentContext m_aContext; ::cppu::OInterfaceContainerHelper m_aContainerListeners; Columns m_aColumns; - sal_Int32 m_nColumnHeaderHeight; }; } diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index c2fca18dee61..ed6d124b4c8b 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -43,7 +43,6 @@ using namespace ::com::sun::star::lang; #define ROWHEADERS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaders" )) #define CELLUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CellUpdated" )) #define ROWUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowUpdated" )) -#define ROWHEADERWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaderWidth" )) //...................................................................................................................... namespace toolkit @@ -71,7 +70,6 @@ namespace toolkit ,MutexAndBroadcastHelper() ,m_nRowHeight(0) ,m_aRowHeaders() - ,m_nRowHeaderWidth(10) { } @@ -82,7 +80,6 @@ namespace toolkit ,m_nRowHeight( i_copySource.m_nRowHeight ) ,m_aData( i_copySource.m_aData ) ,m_aRowHeaders( i_copySource.m_aRowHeaders ) - ,m_nRowHeaderWidth( i_copySource.m_nRowHeaderWidth ) { } @@ -265,20 +262,6 @@ namespace toolkit broadcast_remove( -1, ::rtl::OUString(), 0); } - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException) - { - sal_Int32 oldValue = m_nRowHeaderWidth; - m_nRowHeaderWidth = _value; - broadcast_changed( ROWHEADERWIDTH, 0, Any(oldValue), Any(_value) ); - } - - //------------------------------------------------------------------------------------------------------------------ - sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeaderWidth() throw (::com::sun::star::uno::RuntimeException) - { - return m_nRowHeaderWidth; - } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::updateCell(::sal_Int32 row, ::sal_Int32 column, const Any& value) throw (::com::sun::star::uno::RuntimeException) { diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 66260d49ae6d..6d0afb15bd87 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -74,8 +74,6 @@ public: virtual void SAL_CALL addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); virtual void SAL_CALL removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); virtual void SAL_CALL removeAll() throw (RuntimeException); - virtual void SAL_CALL setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getRowHeaderWidth() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCell( ::sal_Int32 row, ::sal_Int32 column, const ::com::sun::star::uno::Any& value ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRow( ::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& values ) throw (::com::sun::star::uno::RuntimeException); @@ -102,7 +100,6 @@ private: sal_Int32 m_nRowHeight; std::vector< std::vector < Any > > m_aData; std::vector< ::rtl::OUString > m_aRowHeaders; - sal_Int32 m_nRowHeaderWidth; }; } diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index fe8e894a65ed..8194536544b1 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -75,7 +75,9 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: ImplRegisterProperty( BASEPROPERTY_VSCROLL ); ImplRegisterProperty( BASEPROPERTY_TABSTOP ); ImplRegisterProperty( BASEPROPERTY_GRID_SHOWROWHEADER ); + ImplRegisterProperty( BASEPROPERTY_ROW_HEADER_WIDTH ); ImplRegisterProperty( BASEPROPERTY_GRID_SHOWCOLUMNHEADER ); + ImplRegisterProperty( BASEPROPERTY_COLUMN_HEADER_HEIGHT ); ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) ); ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) ); ImplRegisterProperty( BASEPROPERTY_GRID_SELECTIONMODE ); @@ -196,8 +198,12 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const return uno::makeAny( SelectionType(1) ); case BASEPROPERTY_GRID_SHOWROWHEADER: return uno::makeAny( (sal_Bool)sal_False ); + case BASEPROPERTY_ROW_HEADER_WIDTH: + return uno::makeAny( sal_Int32( 10 ) ); case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: return uno::makeAny( (sal_Bool)sal_True ); + case BASEPROPERTY_COLUMN_HEADER_HEIGHT: + return Any(); case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: return uno::makeAny( com::sun::star::util::Color( COL_TRANSPARENT ) ); case BASEPROPERTY_GRID_HEADER_BACKGROUND: diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 1b08c33a9219..0f91dcd3e9cf 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -276,8 +276,10 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "URL", URL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "WritingMode", WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ), - DECL_PROP_2 ( "ShowRowHeader", GRID_SHOWROWHEADER, sal_Bool, BOUND, MAYBEDEFAULT ), - DECL_PROP_2 ( "ShowColumnHeader", GRID_SHOWCOLUMNHEADER, sal_Bool, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "ShowRowHeader", GRID_SHOWROWHEADER, sal_Bool, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "RowHeaderWidth", ROW_HEADER_WIDTH, sal_Int32, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "ShowColumnHeader", GRID_SHOWCOLUMNHEADER, sal_Bool, BOUND, MAYBEDEFAULT ), + DECL_PROP_3 ( "ColumnHeaderHeight", COLUMN_HEADER_HEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_1 ( "GridDataModel", GRID_DATAMODEL, Reference< ::com::sun::star::awt::grid::XGridDataModel >, BOUND ), DECL_PROP_1 ( "ColumnModel", GRID_COLUMNMODEL, Reference< ::com::sun::star::awt::grid::XGridColumnModel >, BOUND ), DECL_PROP_3 ( "SelectionModel", GRID_SELECTIONMODE, ::com::sun::star::view::SelectionType, BOUND, MAYBEDEFAULT, MAYBEVOID ), -- cgit From 5c398088ae12011b0cda564b580c31bed7558aed Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 10:31:19 +0100 Subject: gridsort: RowHeaderWidth/ColumnHeaderHeight do not belong to the GridData/ColumnModel, but to the GridControlModel --- .../com/sun/star/awt/grid/UnoControlGridModel.idl | 25 ++++++++++++++++++++-- offapi/com/sun/star/awt/grid/XGridColumn.idl | 6 ------ offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 4 ---- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 4 ---- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl index bdbcf00d64fa..2edbb7061127 100644 --- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl +++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl @@ -51,15 +51,36 @@ service UnoControlGridModel service com::sun::star::awt::UnoControlModel; /** Specifies whether the grid control should display a special header column. -

          The default value is

          + +

          The default value is

          */ [property] boolean ShowRowHeader; + /** specifies the width of the row header column, if applicable. + +

          The width is specified in application font units - see MeasureUnit.

          + +

          The value given here is ignored if ShowRowHeader is .

          + */ + [property] long RowHeaderWidth; + /** Specifies whether the grid control should display a title row. -

          The default value is

          + +

          The default value is

          */ [property] boolean ShowColumnHeader; + /** specifies the height of the column header row, if applicable. + +

          The height is specified in application font units - see MeasureUnit.

          + +

          The value given here is ignored if ShowColumnHeader is .

          + +

          If the property is , the grid control shall automatically determine a height which conveniently allows, + according to the used font, to display one line of text.

          + */ + [property, maybevoid] long ColumnHeaderHeight; + /** Specifies the XGridColumnModel that is providing the column structure.

          You can implement your own instance of XGridColumnModel or use diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index 0b7ae843ffaa..f654ca9ba8bf 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -70,12 +70,6 @@ interface XGridColumn [attribute] boolean Resizeable; /** Specifies the horizontal alignment of the content in the control. - -

          -            LEFT
          -            CENTER
          -            RIGHT
          -        
          */ [attribute] ::com::sun::star::style::HorizontalAlignment HorizontalAlign; diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index 8ebaf355cb0a..ac281c8bad65 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -62,10 +62,6 @@ interface XGridColumnModel */ interface ::com::sun::star::util::XCloneable; - /**Specifies the height of column header. - */ - [attribute] long ColumnHeaderHeight; - /** Returns the number of columns. @returns the number of columns. diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index bdffdab5da6e..e69ddd576815 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -64,10 +64,6 @@ interface XGridDataModel */ [attribute] sequence< string > RowHeaders; - /**Specifies the width of row header. - */ - [attribute] long RowHeaderWidth; - /** denotes the number of rows for which the model can provide data */ [attribute, readonly] long RowCount; -- cgit From c36c24d7c4396dff864b77e91fe36cd7890a5342 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 10:51:57 +0100 Subject: gridsort: RowHeight belongs to the GridControlModel (not the GridDataModel), too --- svtools/source/uno/svtxgridcontrol.cxx | 38 ++++++++++++++-------- svtools/source/uno/treecontrolpeer.cxx | 4 +-- toolkit/inc/toolkit/helper/property.hxx | 2 +- .../source/controls/grid/defaultgriddatamodel.cxx | 18 ---------- .../source/controls/grid/defaultgriddatamodel.hxx | 3 -- toolkit/source/controls/grid/gridcontrol.cxx | 2 ++ toolkit/source/controls/tree/treecontrol.cxx | 4 +-- toolkit/source/helper/property.cxx | 2 +- 8 files changed, 32 insertions(+), 41 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index c4a524ac5e87..a1cae97b64ff 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -144,18 +144,35 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An case BASEPROPERTY_COLUMN_HEADER_HEIGHT: { + sal_Int32 columnHeaderHeight = 0; if ( !aValue.hasValue() ) { - sal_Int32 const fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MAP_APPFONT ).Height(); - m_pTableModel->setColumnHeaderHeight( fontHeight ); + columnHeaderHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MAP_APPFONT ).Height(); } else { - sal_Int32 nColumnHeaderHeight = 0; - aValue >>= nColumnHeaderHeight; - ENSURE_OR_BREAK( nColumnHeaderHeight > 0, "SVTXGridControl::setProperty: illegal column header height!" ); - m_pTableModel->setColumnHeaderHeight( nColumnHeaderHeight ); + aValue >>= columnHeaderHeight; } + ENSURE_OR_BREAK( columnHeaderHeight > 0, "SVTXGridControl::setProperty: illegal column header height!" ); + m_pTableModel->setColumnHeaderHeight( columnHeaderHeight ); + // TODO: the model should broadcast this change itself, and the table should invalidate itself as needed + pTable->Invalidate(); + } + break; + + case BASEPROPERTY_ROW_HEIGHT: + { + sal_Int32 rowHeight = 0; + if ( !aValue.hasValue() ) + { + rowHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MAP_APPFONT ).Height(); + } + else + { + aValue >>= rowHeight; + } + m_pTableModel->setRowHeight( rowHeight ); + ENSURE_OR_BREAK( rowHeight > 0, "SVTXGridControl::setProperty: illegal row height!" ); // TODO: the model should broadcast this change itself, and the table should invalidate itself as needed pTable->Invalidate(); } @@ -470,14 +487,7 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::Gr TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" ); - if ( Event.AttributeName.equalsAscii( "RowHeight" ) ) - { - sal_Int32 rowHeight = m_pTableModel->getRowHeight(); - Event.NewValue>>=rowHeight; - m_pTableModel->setRowHeight(rowHeight); - pTable->Invalidate(); - } - else if ( Event.AttributeName.equalsAscii( "RowHeaders" ) ) + if ( Event.AttributeName.equalsAscii( "RowHeaders" ) ) { // TODO: we could do better than this - invalidate the header area only pTable->Invalidate(); diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index f37d5f80ed68..c796352c373d 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -1360,7 +1360,7 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An case BASEPROPERTY_TREE_DATAMODEL: onChangeDataModel( rTree, Reference< XTreeDataModel >( aValue, UNO_QUERY ) ); break; - case BASEPROPERTY_TREE_ROWHEIGHT: + case BASEPROPERTY_ROW_HEIGHT: { sal_Int32 nHeight = 0; if( aValue >>= nHeight ) @@ -1445,7 +1445,7 @@ Any TreeControlPeer::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru } return Any( eSelectionType ); } - case BASEPROPERTY_TREE_ROWHEIGHT: + case BASEPROPERTY_ROW_HEIGHT: return Any( (sal_Int32)rTree.GetEntryHeight() ); case BASEPROPERTY_TREE_DATAMODEL: return Any( mxDataModel ); diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index 164071f5a39b..405b6ac44053 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -177,7 +177,7 @@ namespace rtl { #define BASEPROPERTY_TREE_ROOTDISPLAYED 127 #define BASEPROPERTY_TREE_SHOWSHANDLES 128 #define BASEPROPERTY_TREE_SHOWSROOTHANDLES 129 -#define BASEPROPERTY_TREE_ROWHEIGHT 130 +#define BASEPROPERTY_ROW_HEIGHT 130 #define BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING 131 #define BASEPROPERTY_TREE_END 131 #define BASEPROPERTY_DIALOGSOURCEURL 132 diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index ed6d124b4c8b..7a04b77c2574 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -39,7 +39,6 @@ using namespace ::com::sun::star::awt; using namespace ::com::sun::star::awt::grid; using namespace ::com::sun::star::lang; -#define ROWHEIGHT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeight" )) #define ROWHEADERS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaders" )) #define CELLUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CellUpdated" )) #define ROWUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowUpdated" )) @@ -68,7 +67,6 @@ namespace toolkit DefaultGridDataModel::DefaultGridDataModel() :DefaultGridDataModel_Base() ,MutexAndBroadcastHelper() - ,m_nRowHeight(0) ,m_aRowHeaders() { } @@ -77,7 +75,6 @@ namespace toolkit DefaultGridDataModel::DefaultGridDataModel( DefaultGridDataModel const & i_copySource ) :DefaultGridDataModel_Base() ,MutexAndBroadcastHelper() - ,m_nRowHeight( i_copySource.m_nRowHeight ) ,m_aData( i_copySource.m_aData ) ,m_aRowHeaders( i_copySource.m_aRowHeaders ) { @@ -134,21 +131,6 @@ namespace toolkit broadcast( row_removed, aEvent); } - //------------------------------------------------------------------------------------------------------------------ - ::sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeight() throw (::com::sun::star::uno::RuntimeException) - { - return m_nRowHeight; - } - - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::setRowHeight(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) - { - sal_Int32 oldValue = m_nRowHeight; - m_nRowHeight = value; - - broadcast_changed( ROWHEIGHT, 0, Any(oldValue), Any(value)); - } - //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException) { diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 6d0afb15bd87..43bb43a005a8 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -62,8 +62,6 @@ public: virtual ~DefaultGridDataModel(); // XGridDataModel - virtual ::sal_Int32 SAL_CALL getRowHeight() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRowHeight(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowHeaders() throw (::com::sun::star::uno::RuntimeException); @@ -97,7 +95,6 @@ private: void broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException); void broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException); - sal_Int32 m_nRowHeight; std::vector< std::vector < Any > > m_aData; std::vector< ::rtl::OUString > m_aRowHeaders; }; diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 8194536544b1..76bf33768776 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -78,6 +78,7 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: ImplRegisterProperty( BASEPROPERTY_ROW_HEADER_WIDTH ); ImplRegisterProperty( BASEPROPERTY_GRID_SHOWCOLUMNHEADER ); ImplRegisterProperty( BASEPROPERTY_COLUMN_HEADER_HEIGHT ); + ImplRegisterProperty( BASEPROPERTY_ROW_HEIGHT ); ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) ); ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) ); ImplRegisterProperty( BASEPROPERTY_GRID_SELECTIONMODE ); @@ -203,6 +204,7 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: return uno::makeAny( (sal_Bool)sal_True ); case BASEPROPERTY_COLUMN_HEADER_HEIGHT: + case BASEPROPERTY_ROW_HEIGHT: return Any(); case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: return uno::makeAny( com::sun::star::util::Color( COL_TRANSPARENT ) ); diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index 1dae4a3456d7..d2c66c64b41a 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -75,7 +75,7 @@ UnoTreeModel::UnoTreeModel( const ::com::sun::star::uno::Reference< ::com::sun:: ImplRegisterProperty( BASEPROPERTY_TREE_ROOTDISPLAYED ); ImplRegisterProperty( BASEPROPERTY_TREE_SHOWSHANDLES ); ImplRegisterProperty( BASEPROPERTY_TREE_SHOWSROOTHANDLES ); - ImplRegisterProperty( BASEPROPERTY_TREE_ROWHEIGHT ); + ImplRegisterProperty( BASEPROPERTY_ROW_HEIGHT ); ImplRegisterProperty( BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING ); ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION ); } @@ -101,7 +101,7 @@ Any UnoTreeModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { case BASEPROPERTY_TREE_SELECTIONTYPE: return Any( SelectionType_NONE ); - case BASEPROPERTY_TREE_ROWHEIGHT: + case BASEPROPERTY_ROW_HEIGHT: return Any( sal_Int32( 0 ) ); case BASEPROPERTY_TREE_DATAMODEL: return Any( Reference< XTreeDataModel >( 0 ) ); diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 0f91dcd3e9cf..e2849c60cc58 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -270,7 +270,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "RootDisplayed", TREE_ROOTDISPLAYED, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ShowsHandles", TREE_SHOWSHANDLES, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ShowsRootHandles", TREE_SHOWSROOTHANDLES, sal_Bool, BOUND, MAYBEDEFAULT ), - DECL_PROP_3 ( "RowHeight", TREE_ROWHEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "RowHeight", ROW_HEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "InvokesStopNodeEditing", TREE_INVOKESSTOPNODEEDITING, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "DialogSourceURL", DIALOGSOURCEURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "URL", URL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), -- cgit From a9edc6355d2323e1ac37c05bddd04d3e32896c09 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 10:51:57 +0100 Subject: gridsort: RowHeight belongs to the GridControlModel (not the GridDataModel), too --- offapi/com/sun/star/awt/grid/UnoControlGridModel.idl | 6 ++++++ offapi/com/sun/star/awt/grid/XGridDataModel.idl | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl index 2edbb7061127..acd02b572a05 100644 --- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl +++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl @@ -81,6 +81,12 @@ service UnoControlGridModel */ [property, maybevoid] long ColumnHeaderHeight; + /** Specifies the height of rows in the grid control. + +

          The height is specified in application font units - see MeasureUnit.

          + */ + [property, maybevoid] long RowHeight; + /** Specifies the XGridColumnModel that is providing the column structure.

          You can implement your own instance of XGridColumnModel or use diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index e69ddd576815..72c270e5575a 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -56,10 +56,6 @@ interface XGridDataModel */ interface ::com::sun::star::util::XCloneable; - /** Specifies the height of each row. - */ - [attribute] long RowHeight; - /** Contains the row header. */ [attribute] sequence< string > RowHeaders; -- cgit From ca53d4504968bb2fd396c352657c9dc5b3ee6c40 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 13:08:22 +0100 Subject: gridsort: added XGridColumnModel::createColumn --- toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 13 ++++++++++++- toolkit/source/controls/grid/defaultgridcolumnmodel.hxx | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 00bbbf9d6c1b..eecb530aae55 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -29,6 +29,7 @@ #include "precompiled_toolkit.hxx" #include "defaultgridcolumnmodel.hxx" +#include "gridcolumn.hxx" /** === begin UNO includes === **/ #include @@ -60,6 +61,7 @@ namespace toolkit using ::com::sun::star::uno::Exception; using ::com::sun::star::lang::IndexOutOfBoundsException; using ::com::sun::star::util::XCloneable; + using ::com::sun::star::lang::IllegalArgumentException; /** === end UNO using === **/ //================================================================================================================== @@ -115,10 +117,13 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - ::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException) + ::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException, IllegalArgumentException) { ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( !i_column.is() ) + throw IllegalArgumentException( ::rtl::OUString(), *this, 1 ); + m_aColumns.push_back( i_column ); sal_Int32 index = m_aColumns.size() - 1; i_column->setIndex( index ); @@ -134,6 +139,12 @@ namespace toolkit return index; } + //------------------------------------------------------------------------------------------------------------------ + Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::createColumn( ) throw (RuntimeException) + { + return new GridColumn(); + } + //------------------------------------------------------------------------------------------------------------------ Sequence< Reference< XGridColumn > > SAL_CALL DefaultGridColumnModel::getColumns() throw (RuntimeException) { diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index 102da190486e..99751f37c25c 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -59,7 +59,8 @@ public: // XGridColumnModel virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL createColumn( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL getColumns() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException); -- cgit From 14ea1e208b3038c5639abd99c11799146a69643c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 13:08:22 +0100 Subject: gridsort: added XGridColumnModel::createColumn --- offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 26 +++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index ac281c8bad65..94ddc4eb5eeb 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -34,6 +34,7 @@ #include #include #include +#include //============================================================================= @@ -69,22 +70,29 @@ interface XGridColumnModel long getColumnCount(); /** Adds a column to the model. + +

          You should use the createColumn member to create a new column. This gives + implementations of the XGridColumnModel interface the possibility to provide own column + implementations which extend the basic GridColumn type.

          + @param column the column to add to the model. - @returns - the index of new created column. - */ - long addColumn( [in] XGridColumn column ); - - /* - long getSelectedCount(); + the index of new created column. - sequence getSelectedColumns(); + @throws ::com::sun::star::lang::IllegalArgumentException + if the given column is not a valid element for the column container, or if it is . + */ + long addColumn( [in] XGridColumn column ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); - sequence getSelectedIndex(); + /** creates a new column for use with the column model. +

          The newly created column is not yet inserted into the column container, you need to call addColumn + after you initialized the column object.

          */ + XGridColumn + createColumn(); /** Returns all columns of the model. @returns -- cgit From 4f39e56b002026409d52d0caeabda97c81961b91 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 14:39:27 +0100 Subject: gridsort: allow the non-UNO table model to retrieve data which is not known to the UNO DataModel --- svtools/source/uno/svtxgridcontrol.cxx | 5 ++++- svtools/source/uno/unocontroltablemodel.cxx | 29 ++++++++++++++++++++++++++++- svtools/source/uno/unocontroltablemodel.hxx | 1 + 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index a1cae97b64ff..9c2dbbc448e9 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -333,7 +333,10 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An // obtain new col model m_xColumnModel = Reference< XGridColumnModel >( aValue, UNO_QUERY_THROW ); - // remove new columns + // announce to the TableModel + m_pTableModel->setColumnModel( m_xColumnModel ); + + // add new columns impl_updateColumnsFromModel_nothrow(); break; diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 4bdfa0ebdabd..0c2fb73181aa 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -65,6 +65,7 @@ namespace svt { namespace table using ::com::sun::star::lang::EventObject; using ::com::sun::star::awt::grid::GridColumnEvent; using ::com::sun::star::awt::grid::XGridDataModel; + using ::com::sun::star::awt::grid::XGridColumnModel; using ::com::sun::star::uno::Any; using ::com::sun::star::style::HorizontalAlignment_LEFT; using ::com::sun::star::style::HorizontalAlignment; @@ -96,6 +97,7 @@ namespace svt { namespace table ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; ModellListeners m_aListeners; WeakReference< XGridDataModel > m_aDataModel; + WeakReference< XGridColumnModel > m_aColumnModel; UnoControlTableModel_Impl() :aColumns ( ) @@ -432,6 +434,13 @@ namespace svt { namespace table // own listeners } + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::setColumnModel( Reference< XGridColumnModel > const & i_gridColumnModel ) + { + DBG_CHECK_ME(); + m_pImpl->m_aColumnModel = i_gridColumnModel; + } + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::getCellContent( ColPos const i_col, RowPos const i_row, Any& o_cellContent ) { @@ -441,7 +450,25 @@ namespace svt { namespace table { Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); ENSURE_OR_THROW( xDataModel.is(), "no data model anymore!" ); - o_cellContent = xDataModel->getCellData( i_col, i_row ); + + if ( i_col >= xDataModel->getColumnCount() ) + { + // this is allowed, in case the column model has been dynamically extended, but the data model does + // not (yet?) know about it. + // So, handle it gracefully. + #if OSL_DEBUG_LEVEL > 0 + { + Reference< XGridColumnModel > const xColumnModel( m_pImpl->m_aColumnModel ); + OSL_ENSURE( xColumnModel.is() && i_col < xColumnModel->getColumnCount(), + "UnoControlTableModel::getCellContent: request a column's value which the ColumnModel doesn't know about!" ); + } + #endif + o_cellContent.clear(); + } + else + { + o_cellContent = xDataModel->getCellData( i_col, i_row ); + } } catch( const Exception& ) { diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 2cb107b3551d..a5f67aa98bfa 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -121,6 +121,7 @@ namespace svt { namespace table void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > const & i_gridDataModel ); + void setColumnModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > const & i_gridColumnModel ); void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); void setLineColor(::com::sun::star::util::Color _rColor); -- cgit From 8e4ab13027f6ee90c788c064ff0912347cafb652 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 7 Jan 2011 14:53:16 +0100 Subject: sb139: #i113686# let LRU_Cache::setValue nop after LRU_Cache::clear (so that IdlReflectionServiceImpl does not leak ring-referenced _aElements members after dispose) --- stoc/source/corereflection/lrucache.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx index 062c13d981e5..98c5faf4586d 100644 --- a/stoc/source/corereflection/lrucache.hxx +++ b/stoc/source/corereflection/lrucache.hxx @@ -177,9 +177,9 @@ template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual > inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( const t_Key & rKey, const t_Val & rValue ) { + ::osl::MutexGuard aGuard( _aCacheMutex ); if (_nCachedElements > 0) { - ::osl::MutexGuard aGuard( _aCacheMutex ); const typename t_Key2Element::const_iterator iFind( _aKey2Element.find( rKey ) ); CacheEntry * pEntry; @@ -221,6 +221,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::clear() _pBlock[nPos].aKey = t_Key(); _pBlock[nPos].aVal = t_Val(); } + _nCachedElements = 0; #ifdef __CACHE_DIAGNOSE OSL_TRACE( "> cleared cache <\n" ); #endif -- cgit From 27103fadc0eabf17ae4124975f8d4ac977618695 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 7 Jan 2011 14:56:55 +0100 Subject: vcl118: fix a namespace problem --- vcl/aqua/source/gdi/salprn.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index c79add81d791..0187f312b2ca 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -380,14 +380,14 @@ static bool getUseNativeDialog() try { // get service provider - Reference< XMultiServiceFactory > xSMgr( unohelper::GetMultiServiceFactory() ); + uno::Reference< XMultiServiceFactory > xSMgr( unohelper::GetMultiServiceFactory() ); // create configuration hierachical access name if( xSMgr.is() ) { try { - Reference< XMultiServiceFactory > xConfigProvider( - Reference< XMultiServiceFactory >( + uno::Reference< XMultiServiceFactory > xConfigProvider( + uno::Reference< XMultiServiceFactory >( xSMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ))), UNO_QUERY ) @@ -399,8 +399,8 @@ static bool getUseNativeDialog() aVal.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); aVal.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common/Misc" ) ); aArgs.getArray()[0] <<= aVal; - Reference< XNameAccess > xConfigAccess( - Reference< XNameAccess >( + uno::Reference< XNameAccess > xConfigAccess( + uno::Reference< XNameAccess >( xConfigProvider->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )), aArgs ), -- cgit From 0c949676d836385e1925d2ae6b50d597266fa38e Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 7 Jan 2011 15:14:58 +0100 Subject: sb139: #i113686# do not clear IdlReflectionServiceImpl::_x[TD]Mgr to avoid null pointer dereferentiation --- stoc/source/corereflection/crefl.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 99019e959dfa..d3ebed762bac 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -179,8 +179,6 @@ void IdlReflectionServiceImpl::dispose() MutexGuard aGuard( _aComponentMutex ); _aElements.clear(); - _xTDMgr.clear(); - _xMgr.clear(); #ifdef TEST_LIST_CLASSES OSL_ENSURE( g_aClassNames.size() == 0, "### idl classes still alive!" ); ClassNameList::const_iterator iPos( g_aClassNames.begin() ); -- cgit From 075ffa4ea267ae143c9c6c583073451ace1d57b3 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 15:28:22 +0100 Subject: gridsort: alllow removing columns from a grid control column model --- svtools/source/table/tablecontrol_impl.cxx | 2 +- svtools/source/uno/svtxgridcontrol.cxx | 97 +++++++++++++--------- svtools/source/uno/svtxgridcontrol.hxx | 5 +- svtools/source/uno/unocontroltablemodel.cxx | 46 +++++++++- svtools/source/uno/unocontroltablemodel.hxx | 3 + .../controls/grid/defaultgridcolumnmodel.cxx | 27 +++++- .../controls/grid/defaultgridcolumnmodel.hxx | 3 +- 7 files changed, 136 insertions(+), 47 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 295c811edb84..7140da39ba8f 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -484,7 +484,7 @@ namespace svt { namespace table impl_ni_updateColumnWidths(); impl_ni_updateScrollbars(); - impl_invalidateColumnsAfter( i_first ); + impl_invalidateColumnsAfter( i_first - 1 ); OSL_UNUSED( i_last ); } diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 9c2dbbc448e9..1ad45308aa97 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -54,6 +54,7 @@ using namespace ::svt::table; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt::grid; using namespace ::com::sun::star::view; +using namespace ::com::sun::star::style; using namespace ::com::sun::star::container; using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::accessibility::AccessibleEventId; @@ -62,16 +63,14 @@ using ::com::sun::star::accessibility::AccessibleTableModelChange; SVTXGridControl::SVTXGridControl() - :m_pTableModel (new UnoControlTableModel()), - m_xDataModel(0), - m_xColumnModel(0), - m_bHasColumnHeaders(false), - m_bHasRowHeaders(false), - m_bVScroll(false), - m_bHScroll(false), - m_bUpdate(false), - m_nSelectedRowCount(0), - m_aSelectionListeners( *this ) + :m_pTableModel( new UnoControlTableModel() ) + ,m_xDataModel( 0 ) + ,m_xColumnModel( 0 ) + ,m_bHasColumnHeaders( false ) + ,m_bHasRowHeaders( false ) + ,m_bTableModelInitCompleted( false ) + ,m_nSelectedRowCount( 0 ) + ,m_aSelectionListeners( *this ) { } @@ -83,13 +82,8 @@ SVTXGridControl::~SVTXGridControl() // --------------------------------------------------------------------------------------------------------------------- void SVTXGridControl::SetWindow( Window* pWindow ) { - TableControl* pTable = dynamic_cast< TableControl* >( pWindow ); - ENSURE_OR_THROW( ( pTable != NULL ) || ( pWindow == NULL ), "SVTXGridControl::SetWindow: illegal window!" ); - SVTXGridControl_Base::SetWindow( pWindow ); - - if ( pTable ) - pTable->SetModel( PTableModel( m_pTableModel ) ); + impl_checkTableModelInit(); } // --------------------------------------------------------------------------------------------------------------------- @@ -133,7 +127,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An { case BASEPROPERTY_ROW_HEADER_WIDTH: { - sal_Int32 rowHeaderWidth( m_pTableModel->getRowHeaderWidth() ); + sal_Int32 rowHeaderWidth( -1 ); aValue >>= rowHeaderWidth; ENSURE_OR_BREAK( rowHeaderWidth > 0, "SVTXGridControl::setProperty: illegal row header width!" ); m_pTableModel->setRowHeaderWidth( rowHeaderWidth ); @@ -212,10 +206,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An { sal_Bool bHScroll = true; if( aValue >>= bHScroll ) - { - m_bHScroll = bHScroll; m_pTableModel->setHorizontalScrollbarVisibility( bHScroll ? ScrollbarShowAlways : ScrollbarShowSmart ); - } break; } case BASEPROPERTY_VSCROLL: @@ -223,7 +214,6 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An sal_Bool bVScroll = true; if( aValue >>= bVScroll ) { - m_bVScroll = bVScroll; m_pTableModel->setVerticalScrollbarVisibility( bVScroll ? ScrollbarShowAlways : ScrollbarShowSmart ); } break; @@ -285,17 +275,9 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_VERTICALALIGN: { - com::sun::star::style::VerticalAlignment vAlign(com::sun::star::style::VerticalAlignment(0)); - if( aValue >>= vAlign ) - { - switch( vAlign ) - { - case com::sun::star::style::VerticalAlignment_TOP: m_pTableModel->setVerticalAlign(com::sun::star::style::VerticalAlignment(0)); break; - case com::sun::star::style::VerticalAlignment_MIDDLE: m_pTableModel->setVerticalAlign(com::sun::star::style::VerticalAlignment(1)); break; - case com::sun::star::style::VerticalAlignment_BOTTOM: m_pTableModel->setVerticalAlign(com::sun::star::style::VerticalAlignment(2)); break; - default: m_pTableModel->setVerticalAlign(com::sun::star::style::VerticalAlignment(0)); break; - } - } + VerticalAlignment eAlign( VerticalAlignment_TOP ); + if ( aValue >>= eAlign ) + m_pTableModel->setVerticalAlign( eAlign ); break; } @@ -316,6 +298,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The data model isn't set!"), *this ); m_pTableModel->setDataModel( m_xDataModel ); + impl_checkTableModelInit(); // ensure default columns exist, if they have not previously been added sal_Int32 const nDataColumnCount = m_xDataModel->getColumnCount(); @@ -336,6 +319,9 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An // announce to the TableModel m_pTableModel->setColumnModel( m_xColumnModel ); + // announce the table model to the table control, if we have everything which is needed + impl_checkTableModelInit(); + // add new columns impl_updateColumnsFromModel_nothrow(); @@ -347,6 +333,20 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } } + +void SVTXGridControl::impl_checkTableModelInit() +{ + if ( !m_bTableModelInitCompleted && m_pTableModel->hasColumnModel() && m_pTableModel->hasDataModel() ) + { + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + if ( pTable ) + { + pTable->SetModel( PTableModel( m_pTableModel ) ); + m_bTableModelInitCompleted = true; + } + } +} + Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -372,19 +372,28 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru return Any( eSelectionType ); } case BASEPROPERTY_GRID_SHOWROWHEADER: - { return Any ((sal_Bool) m_pTableModel->hasRowHeaders()); - } + case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: return Any ((sal_Bool) m_pTableModel->hasColumnHeaders()); + case BASEPROPERTY_GRID_DATAMODEL: return Any ( m_xDataModel ); + case BASEPROPERTY_GRID_COLUMNMODEL: return Any ( m_xColumnModel); + case BASEPROPERTY_HSCROLL: - return Any ( m_bHScroll); + { + sal_Bool const bHasScrollbar = ( m_pTableModel->getHorizontalScrollbarVisibility() != ScrollbarShowNever ); + return makeAny( bHasScrollbar ); + } + case BASEPROPERTY_VSCROLL: - return Any ( m_bVScroll); + { + sal_Bool const bHasScrollbar = ( m_pTableModel->getVerticalScrollbarVisibility() != ScrollbarShowNever ); + return makeAny( bHasScrollbar ); + } } return VCLXWindow::getProperty( PropertyName ); @@ -508,31 +517,41 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::Gr //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) { - const Reference< XGridColumn > xGridColumn( i_event.Element, UNO_QUERY_THROW ); + ::vos::OGuard aGuard( GetMutex() ); + + Reference< XGridColumn > const xGridColumn( i_event.Element, UNO_QUERY_THROW ); + sal_Int32 nIndex( m_pTableModel->getColumnCount() ); OSL_VERIFY( i_event.Accessor >>= nIndex ); - m_pTableModel->insertColumn( nIndex, xGridColumn ); } //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) { - // TODO: remove the respective column from our table model + ::vos::OGuard aGuard( GetMutex() ); + + sal_Int32 nIndex( -1 ); + OSL_VERIFY( i_event.Accessor >>= nIndex ); + m_pTableModel->removeColumn( nIndex ); } //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException) { + OSL_ENSURE( false, "SVTXGridControl::elementReplaced: not implemented!" ); + // at the moment, the XGridColumnModel API does not allow replacing columns // TODO: replace the respective column in our table model } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { VCLXWindow::disposing( Source ); } +//---------------------------------------------------------------------------------------------------------------------- ::sal_Int32 SAL_CALL SVTXGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index ce1b7edd0b09..fadeae325b3b 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -60,9 +60,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > m_xColumnModel; bool m_bHasColumnHeaders; bool m_bHasRowHeaders; - bool m_bVScroll; - bool m_bHScroll; - bool m_bUpdate; + bool m_bTableModelInitCompleted; sal_Int32 m_nSelectedRowCount; SelectionListenerMultiplexer m_aSelectionListeners; @@ -118,5 +116,6 @@ protected: private: void impl_updateColumnsFromModel_nothrow(); + void impl_checkTableModelInit(); }; #endif // _SVT_GRIDCONTROL_HXX_ diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 0c2fb73181aa..91ad989a26c1 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -248,7 +248,8 @@ namespace svt { namespace table void UnoControlTableModel::insertColumn( ColPos const i_position, Reference< XGridColumn > const & i_column ) { DBG_CHECK_ME(); - ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ), "UnoControlTableModel::insertColumn: illegal position!" ); + ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ), + "UnoControlTableModel::insertColumn: illegal position!" ); const PColumnModel pColumn( new UnoGridColumnFacade( *this, i_column ) ); m_pImpl->aColumns.insert( m_pImpl->aColumns.begin() + i_position, pColumn ); @@ -264,6 +265,35 @@ namespace svt { namespace table } } + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::removeColumn( ColPos const i_position ) + { + DBG_CHECK_ME(); + ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ), + "UnoControlTableModel::removeColumn: illegal position!" ); + + // remove the column + ColumnModels::iterator pos = m_pImpl->aColumns.begin() + i_position; + const PColumnModel pColumn = *pos; + m_pImpl->aColumns.erase( pos ); + + // notify listeners + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->columnsRemoved( i_position, i_position ); + } + + // dispose the column + UnoGridColumnFacade* pColumnImpl = dynamic_cast< UnoGridColumnFacade* >( pColumn.get() ); + OSL_ENSURE( pColumnImpl != NULL, "UnoControlTableModel::removeColumn: illegal column implementation!" ); + if ( pColumnImpl ) + pColumnImpl->dispose(); + } + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::removeAllColumns() { @@ -434,6 +464,13 @@ namespace svt { namespace table // own listeners } + //------------------------------------------------------------------------------------------------------------------ + bool UnoControlTableModel::hasDataModel() const + { + Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); + return xDataModel.is(); + } + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setColumnModel( Reference< XGridColumnModel > const & i_gridColumnModel ) { @@ -441,6 +478,13 @@ namespace svt { namespace table m_pImpl->m_aColumnModel = i_gridColumnModel; } + //------------------------------------------------------------------------------------------------------------------ + bool UnoControlTableModel::hasColumnModel() const + { + Reference< XGridColumnModel > const xColumnModel( m_pImpl->m_aColumnModel ); + return xColumnModel.is(); + } + //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::getCellContent( ColPos const i_col, RowPos const i_row, Any& o_cellContent ) { diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index a5f67aa98bfa..ba15c3042949 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -115,13 +115,16 @@ namespace svt { namespace table // column write access void appendColumn( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column ); void insertColumn( ColPos const i_position, ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column ); + void removeColumn( ColPos const i_position ); void removeAllColumns(); // other operations void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > const & i_gridDataModel ); + bool hasDataModel() const; void setColumnModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > const & i_gridColumnModel ); + bool hasColumnModel() const; void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); void setLineColor(::com::sun::star::util::Color _rColor); diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index eecb530aae55..acd02f37db1c 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -116,6 +116,12 @@ namespace toolkit return m_aColumns.size(); } + //------------------------------------------------------------------------------------------------------------------ + Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::createColumn( ) throw (RuntimeException) + { + return new GridColumn(); + } + //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException, IllegalArgumentException) { @@ -133,6 +139,7 @@ namespace toolkit aEvent.Source = *this; aEvent.Accessor <<= index; aEvent.Element <<= i_column; + aGuard.clear(); m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, aEvent ); @@ -140,9 +147,25 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::createColumn( ) throw (RuntimeException) + void SAL_CALL DefaultGridColumnModel::removeColumn( ::sal_Int32 i_columnIndex ) throw (RuntimeException, IndexOutOfBoundsException) { - return new GridColumn(); + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + + if ( ( i_columnIndex < 0 ) || ( size_t( i_columnIndex ) >= m_aColumns.size() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + + Columns::iterator pos = m_aColumns.begin() + i_columnIndex; + Reference< XGridColumn > const xColumn( *pos ); + m_aColumns.erase( pos ); + + // fire removal notifications + ContainerEvent aEvent; + aEvent.Source = *this; + aEvent.Accessor <<= i_columnIndex; + aEvent.Element <<= xColumn; + + aGuard.clear(); + m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvent ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index 99751f37c25c..31b3c45afd67 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -59,8 +59,9 @@ public: // XGridColumnModel virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL createColumn( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException); + virtual void SAL_CALL removeColumn( ::sal_Int32 i_columnIndex ) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL getColumns() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException); -- cgit From dcd6c8a87317a81beea35a067667165b9e0f051b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 15:28:22 +0100 Subject: gridsort: alllow removing columns from a grid control column model --- offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index 94ddc4eb5eeb..49ad3cbc1f9a 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -64,11 +64,20 @@ interface XGridColumnModel interface ::com::sun::star::util::XCloneable; /** Returns the number of columns. + @returns the number of columns. */ long getColumnCount(); + /** creates a new column for use with the column model. + +

          The newly created column is not yet inserted into the column container, you need to call addColumn + after you initialized the column object.

          + */ + XGridColumn + createColumn(); + /** Adds a column to the model.

          You should use the createColumn member to create a new column. This gives @@ -86,13 +95,15 @@ interface XGridColumnModel long addColumn( [in] XGridColumn column ) raises ( ::com::sun::star::lang::IllegalArgumentException ); - /** creates a new column for use with the column model. + /** retrieves a column from the model -

          The newly created column is not yet inserted into the column container, you need to call addColumn - after you initialized the column object.

          + @param ColumnIndex + denotes the index of the column to remove + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if ColumnIndex does not denote a valid column index. */ - XGridColumn - createColumn(); + void removeColumn( [in] long ColumnIndex ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** Returns all columns of the model. @returns -- cgit From ce87fad0a9eba1247450d34140d44e234523cdf5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 15:34:09 +0100 Subject: gridsort: when columns are removed from or inserted into the model, invalidate the complete control - since columns are auto-resized, effectively all columns might need a repaint --- svtools/source/table/tablecontrol_impl.cxx | 27 ++++++--------------------- svtools/source/table/tablecontrol_impl.hxx | 2 -- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 7140da39ba8f..d4de4bc0d3ef 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -473,7 +473,9 @@ namespace svt { namespace table impl_ni_updateColumnWidths(); impl_ni_updateScrollbars(); - impl_invalidateColumnsAfter( i_first ); + m_rAntiImpl.Invalidate(); + + OSL_UNUSED( i_first ); OSL_UNUSED( i_last ); } @@ -484,7 +486,9 @@ namespace svt { namespace table impl_ni_updateColumnWidths(); impl_ni_updateScrollbars(); - impl_invalidateColumnsAfter( i_first - 1 ); + m_rAntiImpl.Invalidate(); + + OSL_UNUSED( i_first ); OSL_UNUSED( i_last ); } @@ -521,25 +525,6 @@ namespace svt { namespace table m_rAntiImpl.Invalidate( aColumn.getRect() ); } - //-------------------------------------------------------------------- - void TableControl_Impl::impl_invalidateColumnsAfter( ColPos const i_column ) - { - DBG_CHECK_ME(); - - const ColPos nFirstVisibleCol = m_nLeftColumn; - const ColPos nLastVisibleCol = m_nLeftColumn + impl_getVisibleColumns( true ) - 1; - if ( ( i_column >= nFirstVisibleCol ) && ( i_column <= nLastVisibleCol ) ) - { - Rectangle aInvalidateArea; - impl_getAllVisibleCellsArea( aInvalidateArea ); - - const TableColumnGeometry aColumn( *this, aInvalidateArea, i_column ); - aInvalidateArea.Left() = aColumn.getRect().Left(); - - m_rAntiImpl.Invalidate( aInvalidateArea ); - } - } - //-------------------------------------------------------------------- void TableControl_Impl::columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ) { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 65532065ae67..73819327f0ae 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -396,8 +396,6 @@ namespace svt { namespace table /// invalidates the window area occupied by the given column void impl_invalidateColumn( ColPos const i_column ); - /// invalidates the window area occupied by the given column, and everything at the right side of it - void impl_invalidateColumnsAfter( ColPos const i_column ); DECL_LINK( OnScroll, ScrollBar* ); DECL_LINK( OnUpdateScrollbars, void* ); -- cgit From 334a11ea8284cf6fa5af6dfbbb9d105418356ca6 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 15:35:19 +0100 Subject: gridsort: document ownership of the grid columns --- offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index 49ad3cbc1f9a..0d654f048970 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -84,6 +84,9 @@ interface XGridColumnModel implementations of the XGridColumnModel interface the possibility to provide own column implementations which extend the basic GridColumn type.

          +

          As soon as the column has been inserted into the model, the model takes ownership of it. This means when the + column is removed, or when the column model is disposed, the grid column is disposed as well.

          + @param column the column to add to the model. @returns @@ -95,7 +98,9 @@ interface XGridColumnModel long addColumn( [in] XGridColumn column ) raises ( ::com::sun::star::lang::IllegalArgumentException ); - /** retrieves a column from the model + /** removes a column from the model + +

          The column object will be disposed upon removal.

          @param ColumnIndex denotes the index of the column to remove -- cgit From c23439dc8491926ff6de6e354faef4194085f7e3 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 7 Jan 2011 15:40:32 +0100 Subject: vcl118: fix a namespace problem --- vcl/aqua/source/dtrans/DragSource.cxx | 13 +++++++------ vcl/aqua/source/dtrans/service_entry.cxx | 14 +++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx index 1a8f950e50d4..b3c2498c0eb8 100644 --- a/vcl/aqua/source/dtrans/DragSource.cxx +++ b/vcl/aqua/source/dtrans/DragSource.cxx @@ -47,6 +47,7 @@ using namespace rtl; using namespace cppu; using namespace osl; +using namespace com::sun::star; using namespace com::sun::star::datatransfer; using namespace com::sun::star::datatransfer::clipboard; using namespace com::sun::star::datatransfer::dnd; @@ -61,7 +62,7 @@ using namespace std; // For OOo internal D&D we provide the Transferable without NSDragPboard // interference as a shortcut -Reference DragSource::g_XTransferable = Reference(); +uno::Reference DragSource::g_XTransferable; NSView* DragSource::g_DragSourceView = nil; bool DragSource::g_DropSuccessSet = false; bool DragSource::g_DropSuccess = false; @@ -138,7 +139,7 @@ Sequence dragSource_getSupportedServiceNames() bDropSuccess ); mDragSource->mXDragSrcListener->dragDropEnd(dsde); - mDragSource->mXDragSrcListener = Reference(); + mDragSource->mXDragSrcListener = uno::Reference(); } @@ -242,8 +243,8 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger, sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, - const Reference& transferable, - const Reference& listener ) + const uno::Reference& transferable, + const uno::Reference& listener ) throw( RuntimeException) { MutexGuard guard(m_aMutex); @@ -257,7 +258,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger, mXCurrentContext = static_cast(new DragSourceContext(this)); auto_ptr clipb(new AquaClipboard(NULL, false)); g_XTransferable = transferable; - clipb->setContents(g_XTransferable, Reference()); + clipb->setContents(g_XTransferable, uno::Reference()); mDragSourceActions = sourceActions; g_DragSourceView = mView; @@ -297,7 +298,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger, [dragImage release]; - g_XTransferable = Reference(); + g_XTransferable = uno::Reference(); g_DragSourceView = nil; // reset drop success flags diff --git a/vcl/aqua/source/dtrans/service_entry.cxx b/vcl/aqua/source/dtrans/service_entry.cxx index 16308951bcfe..3781d6cbbc30 100644 --- a/vcl/aqua/source/dtrans/service_entry.cxx +++ b/vcl/aqua/source/dtrans/service_entry.cxx @@ -37,28 +37,28 @@ using namespace ::osl; using namespace ::rtl; +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::cppu; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::datatransfer::clipboard; -Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >& i_rArguments ) +uno::Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >& i_rArguments ) { SalData* pSalData = GetSalData(); if( ! pSalData->mxClipboard.is() ) - pSalData->mxClipboard = Reference(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY); + pSalData->mxClipboard = uno::Reference(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY); return pSalData->mxClipboard; } - -Reference AquaSalInstance::CreateDragSource() +uno::Reference AquaSalInstance::CreateDragSource() { - return Reference(static_cast< XInitialization* >(new DragSource()), UNO_QUERY); + return uno::Reference(static_cast< XInitialization* >(new DragSource()), UNO_QUERY); } -Reference AquaSalInstance::CreateDropTarget() +uno::Reference AquaSalInstance::CreateDropTarget() { - return Reference(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY); + return uno::Reference(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY); } -- cgit From ee6e84390f6ed66e26aec1a6f41aa870b4637ee7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 15:52:55 +0100 Subject: gridsort: do not retrieve all row headers at once, this doesn't scale. Instead, allow to retrieve the header/title of a row given by index --- svtools/source/uno/unocontroltablemodel.cxx | 5 +---- toolkit/source/controls/grid/defaultgriddatamodel.cxx | 9 +++++++-- toolkit/source/controls/grid/defaultgriddatamodel.hxx | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 91ad989a26c1..29d33d0526ee 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -532,10 +532,7 @@ namespace svt { namespace table try { - Sequence< ::rtl::OUString > const aRowHeaders( xDataModel->getRowHeaders() ); - ENSURE_OR_RETURN( ( i_rowPos >= 0 ) && ( i_rowPos < aRowHeaders.getLength() ), - "UnoControlTableModel::getRowHeader: illegal row position!", sRowHeader ); - sRowHeader = aRowHeaders[ i_rowPos ]; + sRowHeader = xDataModel->getRowTitle( i_rowPos ); } catch( const Exception& ) { diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 7a04b77c2574..8e12260be7d2 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -146,9 +146,14 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getRowHeaders() throw (::com::sun::star::uno::RuntimeException) + ::rtl::OUString SAL_CALL DefaultGridDataModel::getRowTitle( ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) { - return comphelper::containerToSequence(m_aRowHeaders); + ::osl::MutexGuard aGuard( GetMutex() ); + + if ( ( i_row < 0 ) || ( size_t( i_row ) >= m_aRowHeaders.size() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + + return m_aRowHeaders[ i_row ]; } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 43bb43a005a8..c44c02fb0227 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -64,9 +64,9 @@ public: // XGridDataModel virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowHeaders() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getRowTitle( ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & _aData) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); -- cgit From 344095b555a30365a318fd4edf1cc57353cef7a0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 7 Jan 2011 15:52:55 +0100 Subject: gridsort: do not retrieve all row headers at once, this doesn't scale. Instead, allow to retrieve the header/title of a row given by index --- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index 72c270e5575a..b262181cba27 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -56,10 +56,6 @@ interface XGridDataModel */ interface ::com::sun::star::util::XCloneable; - /** Contains the row header. - */ - [attribute] sequence< string > RowHeaders; - /** denotes the number of rows for which the model can provide data */ [attribute, readonly] long RowCount; @@ -69,9 +65,23 @@ interface XGridDataModel [attribute, readonly] long ColumnCount; /** retrieves the data for a given cell + + @raises ::com::sun::star::lang::IndexOutOfBoundsException + if the column or row index do not denote a valid cell position. */ any getCellData( [in] long Column, [in] long Row ) - raises ( com::sun::star::lang::IndexOutOfBoundsException ); + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the title of the given row + +

          A grid control will usually paint a row's title in the header column of the respective row.

          + + @raises ::com::sun::star::lang::IndexOutOfBoundsException + if the given index does not denote a valid row. + */ + string + getRowTitle( [in] long Row ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** Adds a row to the model. -- cgit From 6b67bdb0ef37852d056dc9f1796ece3911921ab9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 10 Jan 2011 11:41:28 +0100 Subject: gridsort: toolkit depends on qadevOOo for quite a few revisions now - reflect this in build.lst --- toolkit/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index 753f25a55666..d9823204ecb0 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -1,4 +1,4 @@ -ti toolkit : vcl test NULL +ti toolkit : vcl test qadevOOo NULL ti toolkit usr1 - all ti_mkout NULL ti toolkit\prj get - all ti_prj NULL ti toolkit\inc nmake - all ti_inc NULL -- cgit From 64dcaa7199870f0c03403df10a5ae9d028b9c7b6 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 10 Jan 2011 13:49:30 +0100 Subject: sb139: #i77102# forget about configmgr user-layer removals that no longer remove anything --- configmgr/source/xcuparser.cxx | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index 1a9575bb6726..dc5d08cb4e08 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -1099,17 +1099,25 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) { } break; case OPERATION_REMOVE: - // Ignore removal of unknown members, members finalized in a lower - // layer, and members made mandatory in this or a lower layer: - if (i != set->getMembers().end() && !state_.top().locked && - finalizedLayer >= valueParser_.getLayer() && - mandatoryLayer > valueParser_.getLayer()) { - set->getMembers().erase(i); + // Ignore removal of unknown members, members finalized in a lower + // layer, and members made mandatory in this or a lower layer; + // forget about user-layer removals that no longer remove anything + // (so that paired additions/removals in the user layer do not grow + // registrymodifications.xcu unbounded): + bool known = i != set->getMembers().end(); + if (known && !state_.top().locked && + finalizedLayer >= valueParser_.getLayer() && + mandatoryLayer > valueParser_.getLayer()) + { + set->getMembers().erase(i); + } + state_.push(State(true)); + if (known) { + recordModification(false); + } + break; } - state_.push(State(true)); - recordModification(false); - break; } } -- cgit From d64c1529ace2ddf4060704a1a871c005156c5a81 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 10 Jan 2011 14:09:52 +0100 Subject: sb139: #i114601# COMMON_OUTDIR removed in the meantime, so COMMON_OUTPUT typo can go, too --- officecfg/util/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/officecfg/util/makefile.mk b/officecfg/util/makefile.mk index 332ac90fe2ea..c1fa54277141 100644 --- a/officecfg/util/makefile.mk +++ b/officecfg/util/makefile.mk @@ -37,7 +37,6 @@ TARGET=util $(MISC)$/$(TARGET)_delzip : -$(RM) $(BIN)$/registry_{$(alllangiso)}.zip - -$(RM) $(COMMON_OUTPUT)$/bin$/registry_{$(alllangiso)}.zip $(BIN)$/registry_{$(alllangiso)}.zip : $(MISC)$/$(TARGET)_delzip cd $(MISC)$/registry$/res$/$(@:b:s/registry_//) && zip -ru ..$/..$/..$/..$/bin$/registry_$(@:b:s/registry_//).zip org/* -- cgit From 17be18e8a505afe4ddb6b7e2278d698554edd884 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 10 Jan 2011 14:57:31 +0100 Subject: sb139: #i103789# various OSL_DEBUG_LEVEL>1 problems in uno/data.cxx --- cppu/source/uno/data.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx index 5b29637b581b..bb2869ca037f 100644 --- a/cppu/source/uno/data.cxx +++ b/cppu/source/uno/data.cxx @@ -28,6 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cppu.hxx" +#include +#include + #include "cppu/macros.hxx" #include "osl/mutex.hxx" @@ -350,8 +353,6 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData( #if OSL_DEBUG_LEVEL > 1 -#include - #if defined( SAL_W32) #pragma pack(push, 8) #elif defined(SAL_OS2) @@ -364,12 +365,12 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData( #define MAX_ALIGNMENT_4 #endif -#define OFFSET_OF( s, m ) ((sal_Size)((char *)&((s *)16)->m -16)) +#define OFFSET_OF( s, m ) reinterpret_cast< std::size_t >((char *)&((s *)16)->m -16) #define BINTEST_VERIFY( c ) \ - if (! (c)) { fprintf( stderr, "### binary compatibility test failed: " #c " [line %d]!!!\n", __LINE__ ); abort(); } + if (! (c)) { fprintf( stderr, "### binary compatibility test failed: %s [line %d]!!!\n", #c, __LINE__ ); abort(); } #define BINTEST_VERIFYOFFSET( s, m, n ) \ - if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %d instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); } + if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %" SAL_PRI_SIZET "u instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); } #if OSL_DEBUG_LEVEL > 1 #if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390)) -- cgit From cdd45d555cc6afca1aa2bf3a43922256c478d54b Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 10 Jan 2011 15:01:04 +0100 Subject: sb139: #i112929# removed unused s_semi (patch by cmc) --- stoc/source/security/file_policy.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx index e9eb46ac6344..b59502852d1d 100644 --- a/stoc/source/security/file_policy.cxx +++ b/stoc/source/security/file_policy.cxx @@ -444,7 +444,6 @@ static OUString s_user = OUSTR("user"); static OUString s_permission = OUSTR("permission"); static OUString s_openBrace = OUSTR("{"); static OUString s_closingBrace = OUSTR("}"); -static OUString s_semi = OUSTR(";"); static OUString s_filePermission = OUSTR("com.sun.star.io.FilePermission"); static OUString s_socketPermission = OUSTR("com.sun.star.connection.SocketPermission"); -- cgit From 34f93e97f28bdfc6ee731fd7213588fe505cbd2f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 10 Jan 2011 15:47:51 +0100 Subject: gridsort: XGridDataModel: moved modifying functionality into XMutableGridDataModel. --- svtools/source/uno/svtxgridcontrol.cxx | 157 ++++++---- svtools/source/uno/svtxgridcontrol.hxx | 7 +- svtools/source/uno/unocontroltablemodel.cxx | 10 +- svtools/source/uno/unocontroltablemodel.hxx | 3 +- .../source/controls/grid/defaultgriddatamodel.cxx | 341 ++++++++++++++------- .../source/controls/grid/defaultgriddatamodel.hxx | 43 +-- toolkit/source/controls/grid/gridcontrol.cxx | 17 +- .../source/controls/grid/grideventforwarder.cxx | 16 +- .../source/controls/grid/grideventforwarder.hxx | 5 +- 9 files changed, 389 insertions(+), 210 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 1ad45308aa97..de4fe1c02e17 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -64,12 +64,12 @@ using ::com::sun::star::accessibility::AccessibleTableModelChange; SVTXGridControl::SVTXGridControl() :m_pTableModel( new UnoControlTableModel() ) - ,m_xDataModel( 0 ) ,m_xColumnModel( 0 ) ,m_bHasColumnHeaders( false ) ,m_bHasRowHeaders( false ) ,m_bTableModelInitCompleted( false ) ,m_nSelectedRowCount( 0 ) + ,m_nKnowRowCount( 0 ) ,m_aSelectionListeners( *this ) { } @@ -292,22 +292,21 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } case BASEPROPERTY_GRID_DATAMODEL: { - { - m_xDataModel = Reference< XGridDataModel >( aValue, UNO_QUERY ); - if ( !m_xDataModel.is() ) - throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The data model isn't set!"), *this ); - - m_pTableModel->setDataModel( m_xDataModel ); - impl_checkTableModelInit(); - - // ensure default columns exist, if they have not previously been added - sal_Int32 const nDataColumnCount = m_xDataModel->getColumnCount(); - if ( ( nDataColumnCount > 0 ) && ( m_xColumnModel->getColumnCount() == 0 ) ) - m_xColumnModel->setDefaultColumns( nDataColumnCount ); - // this will trigger notifications, which in turn will let us update our m_pTableModel - } - break; + Reference< XGridDataModel > const xDataModel( aValue, UNO_QUERY ); + if ( !xDataModel.is() ) + throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The data model isn't set!"), *this ); + + m_pTableModel->setDataModel( xDataModel ); + impl_checkTableModelInit(); + + // ensure default columns exist, if they have not previously been added + sal_Int32 const nDataColumnCount = xDataModel->getColumnCount(); + if ( ( nDataColumnCount > 0 ) && ( m_xColumnModel->getColumnCount() == 0 ) ) + m_xColumnModel->setDefaultColumns( nDataColumnCount ); + // this will trigger notifications, which in turn will let us update our m_pTableModel } + break; + case BASEPROPERTY_GRID_COLUMNMODEL: { // remove all old columns @@ -342,6 +341,7 @@ void SVTXGridControl::impl_checkTableModelInit() if ( pTable ) { pTable->SetModel( PTableModel( m_pTableModel ) ); + m_nKnowRowCount = m_pTableModel->getRowCount(); m_bTableModelInitCompleted = true; } } @@ -378,7 +378,7 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru return Any ((sal_Bool) m_pTableModel->hasColumnHeaders()); case BASEPROPERTY_GRID_DATAMODEL: - return Any ( m_xDataModel ); + return Any ( m_pTableModel->getDataModel() ); case BASEPROPERTY_GRID_COLUMNMODEL: return Any ( m_xColumnModel); @@ -416,22 +416,26 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) VCLXWindow::ImplGetPropertyIds( rIds, true ); } -void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL SVTXGridControl::rowsAdded( const GridDataEvent& i_event ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); - const TableSize rowDataLength = (TableSize)Event.RowData.getLength(); - const TableSize colCount = m_xColumnModel->getColumnCount(); - if ( colCount == 0 ) + sal_Int32 const affectedRows = i_event.Rows.getLength(); + ENSURE_OR_RETURN_VOID( affectedRows > 0, "SVTXGridControl::rowsAdded: invalid row count!" ); + + Reference< XGridDataModel > const xDataModel( m_pTableModel->getDataModel(), UNO_QUERY_THROW ); + sal_Int32 const affectedColumns = i_event.Columns.getLength() ? i_event.Columns.getLength() : xDataModel->getColumnCount(); + ENSURE_OR_RETURN_VOID( affectedColumns > 0, "SVTXGridControl::rowsAdded: no columns at all?" ); + TableSize const columnCount = m_xColumnModel->getColumnCount(); + if ( columnCount == 0 ) { - m_xColumnModel->setDefaultColumns( rowDataLength ); + m_xColumnModel->setDefaultColumns( affectedColumns ); // this will trigger notifications, which in turn will let us update our m_pTableModel } - if ( rowDataLength != colCount ) - throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), *this ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowAdded: no control (anymore)!" ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowsAdded: no control (anymore)!" ); pTable->InvalidateDataWindow( m_pTableModel->getRowCount() - 1, 0, false ); if ( pTable->isAccessibleAlive() ) @@ -452,14 +456,15 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD } } -void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL SVTXGridControl::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowRemoved: no control (anymore)!" ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowsRemoved: no control (anymore)!" ); - if(Event.RowIndex == -1) + if ( i_event.Rows.getLength() == 0 ) { if ( !isSelectionEmpty() ) deselectAllRows(); @@ -468,52 +473,88 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri if ( pTable->isAccessibleAlive() ) { - pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, - makeAny( AccessibleTableModelChange(DELETE, 0, m_pTableModel->getColumnCount(), 0, m_pTableModel->getColumnCount())), - Any()); + pTable->commitGridControlEvent( + TABLE_MODEL_CHANGED, + makeAny( AccessibleTableModelChange( DELETE, 0, m_pTableModel->getColumnCount(), 0, m_pTableModel->getColumnCount() ) ), + Any() + ); } } - else if ( Event.RowIndex >= 0 && Event.RowIndex < m_pTableModel->getRowCount() ) + else { - if ( isSelectedIndex( Event.RowIndex ) ) + #if OSL_DEBUG_LEVEL > 0 + for ( sal_Int32 row = 0; row < i_event.Rows.getLength() - 1; ++row ) { - Sequence< sal_Int32 > selected(1); - selected[0]=Event.RowIndex; - deselectRows( selected ); + OSL_ENSURE( i_event.Rows[row] < i_event.Rows[row], "SVTXGridControl::rowsRemoved: row indexes not sorted!" ); } - } + #endif + sal_Int32 removedRowCount = 0; + for ( sal_Int32 row = 0; row < i_event.Rows.getLength(); ++row ) + { + sal_Int32 const rowIndex = i_event.Rows[row]; + ENSURE_OR_CONTINUE( ( rowIndex >= 0 ) && ( rowIndex < m_nKnowRowCount ), + "SVTXGridControl::rowsRemoved: illegal row index!" ); - pTable->InvalidateDataWindow( Event.RowIndex, Event.RowIndex, true ); - if ( pTable->isAccessibleAlive() ) - { - pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, - makeAny( AccessibleTableModelChange(DELETE, Event.RowIndex, Event.RowIndex+1, 0, m_pTableModel->getColumnCount())), - Any()); + if ( isSelectedIndex( rowIndex ) ) + { + Sequence< sal_Int32 > selected(1); + selected[0] = rowIndex; + deselectRows( selected ); + } + + if ( pTable->isAccessibleAlive() ) + { + pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, + makeAny( AccessibleTableModelChange( + DELETE, rowIndex - removedRowCount, rowIndex - removedRowCount + 1, 0, m_pTableModel->getColumnCount() + // the adjustment via removedRowCount is necessary here, since with every removed row, the + // *actual* index of all subsequent rows changes, but i_event.Rows still contains the original row indexes + ) ), + Any() + ); + } + ++removedRowCount; + } + + // TODO: I don't think that the selected rows of the TableControl properly survive this - they might contain + // too large indexes now. + // Really, the ITableModel should broadcast the "rowsRemoved" event to its listeners, and the TableControl/_Impl + // should do all necessary adjustments, including for its selection, itself. } + + m_nKnowRowCount = m_pTableModel->getRowCount(); + pTable->InvalidateDataWindow( 0, m_nKnowRowCount, true ); } -void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" ); - if ( Event.AttributeName.equalsAscii( "RowHeaders" ) ) - { - // TODO: we could do better than this - invalidate the header area only - pTable->Invalidate(); - } - else if ( ( Event.AttributeName.equalsAscii( "CellUpdated" ) ) - || ( Event.AttributeName.equalsAscii( "RowUpdated" ) ) - ) - { - // TODO: Our UnoControlTableModel should be a listener at the data model, and multiplex those events, - // so the TableControl/_Impl can react on it. - pTable->InvalidateDataWindow( Event.RowIndex, Event.RowIndex, false ); - } + // TODO: Our UnoControlTableModel should be a listener at the data model, and multiplex those events, + // so the TableControl/_Impl can react on it. + if ( i_event.Rows.getLength() == 0 ) + pTable->InvalidateDataWindow( 0, m_pTableModel->getRowCount(), false ); + else + pTable->InvalidateDataWindow( i_event.Rows[0], i_event.Rows[ i_event.Rows.getLength() - 1 ], false ); } +//---------------------------------------------------------------------------------------------------------------------- +void SAL_CALL SVTXGridControl::rowTitleChanged( const GridDataEvent& Event ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowTitleChanged: no control (anymore)!" ); + + // TODO: we could do better than this - invalidate the header area only + pTable->Invalidate(); +} + + //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) { @@ -721,7 +762,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R return sal_False; } -::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) +::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex( ::sal_Int32 index ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index fadeae325b3b..19b52c183295 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -56,12 +56,12 @@ class SVTXGridControl : public SVTXGridControl_Base { private: ::boost::shared_ptr< UnoControlTableModel > m_pTableModel; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > m_xDataModel; ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > m_xColumnModel; bool m_bHasColumnHeaders; bool m_bHasRowHeaders; bool m_bTableModelInitCompleted; sal_Int32 m_nSelectedRowCount; + sal_Int32 m_nKnowRowCount; SelectionListenerMultiplexer m_aSelectionListeners; protected: @@ -73,9 +73,10 @@ public: ~SVTXGridControl(); // XGridDataListener - virtual void SAL_CALL rowAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rowRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowsAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowTitleChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); // XContainerListener virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 29d33d0526ee..8a6658578569 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -465,10 +465,16 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - bool UnoControlTableModel::hasDataModel() const + Reference< XGridDataModel > UnoControlTableModel::getDataModel() const { Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); - return xDataModel.is(); + return xDataModel; + } + + //------------------------------------------------------------------------------------------------------------------ + bool UnoControlTableModel::hasDataModel() const + { + return getDataModel().is(); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index ba15c3042949..1f3f7f075264 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -33,7 +33,6 @@ /** === begin UNO includes === **/ #include -#include #include #include #include @@ -123,6 +122,8 @@ namespace svt { namespace table void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > const & i_gridDataModel ); bool hasDataModel() const; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > + getDataModel() const; void setColumnModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > const & i_gridColumnModel ); bool hasColumnModel() const; void setRowHeaders(bool _bRowHeaders); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 8e12260be7d2..698e64c4429c 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -28,21 +28,23 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" #include "defaultgriddatamodel.hxx" -#include + +#include #include +#include #include +#include + using ::rtl::OUString; +using ::comphelper::stl_begin; +using ::comphelper::stl_end; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::awt::grid; using namespace ::com::sun::star::lang; -#define ROWHEADERS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaders" )) -#define CELLUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CellUpdated" )) -#define ROWUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowUpdated" )) - //...................................................................................................................... namespace toolkit //...................................................................................................................... @@ -68,6 +70,7 @@ namespace toolkit :DefaultGridDataModel_Base() ,MutexAndBroadcastHelper() ,m_aRowHeaders() + ,m_nColumnCount(0) { } @@ -86,196 +89,304 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void DefaultGridDataModel::broadcast( broadcast_type eType, const GridDataEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException) + namespace { - ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridDataListener::static_type() ); - if( pIter ) + Sequence< sal_Int32 > lcl_buildSingleElementSequence( sal_Int32 const i_index ) { - ::cppu::OInterfaceIteratorHelper aListIter(*pIter); - while(aListIter.hasMoreElements()) - { - XGridDataListener* pListener = static_cast(aListIter.next()); - switch( eType ) - { - case row_added: pListener->rowAdded(aEvent); break; - case row_removed: pListener->rowRemoved(aEvent); break; - case data_changed: pListener->dataChanged(aEvent); break; - } - } + Sequence< sal_Int32 > aIndexes(1); + aIndexes[0] = i_index; + return aIndexes; } - } + Sequence< sal_Int32 > lcl_buildIndexSequence( sal_Int32 const i_start, sal_Int32 const i_end ) + { + Sequence< sal_Int32 > aIndexes; + ENSURE_OR_RETURN( i_end >= i_start, "lcl_buildIndexSequence: illegal indexes!", aIndexes ); - //------------------------------------------------------------------------------------------------------------------ - void DefaultGridDataModel::broadcast_changed( ::rtl::OUString name, sal_Int32 index, Any oldValue, Any newValue) throw (::com::sun::star::uno::RuntimeException) - { - Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridDataEvent aEvent( xSource, name, oldValue, newValue, index, ::rtl::OUString(), Sequence< Any >()); - broadcast( data_changed, aEvent); - } + aIndexes.realloc( i_end - i_start + 1 ); + for ( sal_Int32 i = i_start; i <= i_end; ++i ) + aIndexes[ i - i_start ] = i; - //------------------------------------------------------------------------------------------------------------------ - void DefaultGridDataModel::broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, - ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException) - { - Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, (const ::com::sun::star::uno::Sequence< Any >&)rowData ); - broadcast( row_added, aEvent); + return aIndexes; + } } //------------------------------------------------------------------------------------------------------------------ - void DefaultGridDataModel::broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, - ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException) + void DefaultGridDataModel::broadcast( GridDataEvent const & i_event, + void ( SAL_CALL XGridDataListener::*i_listenerMethod )( GridDataEvent const & ), ::osl::ClearableMutexGuard & i_instanceLock ) { - Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, rowData ); - broadcast( row_removed, aEvent); + ::cppu::OInterfaceContainerHelper* pListeners = BrdcstHelper.getContainer( XGridDataListener::static_type() ); + if ( !pListeners ) + return; + + i_instanceLock.clear(); + pListeners->notifyEach( i_listenerMethod, i_event ); } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException) { + ::osl::MutexGuard aGuard( GetMutex() ); return m_aData.size(); } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL DefaultGridDataModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException) { - if ( m_aData.empty() ) - return 0; - return m_aData[0].size(); + ::osl::MutexGuard aGuard( GetMutex() ); + return m_nColumnCount; } //------------------------------------------------------------------------------------------------------------------ - ::rtl::OUString SAL_CALL DefaultGridDataModel::getRowTitle( ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) + Any SAL_CALL DefaultGridDataModel::getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) { ::osl::MutexGuard aGuard( GetMutex() ); - if ( ( i_row < 0 ) || ( size_t( i_row ) >= m_aRowHeaders.size() ) ) + if ( ( i_row < 0 ) || ( size_t( i_row ) > m_aData.size() ) + || ( i_column < 0 ) || ( i_column > m_nColumnCount ) + ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - return m_aRowHeaders[ i_row ]; + ::std::vector< Any > const & rRow( m_aData[ i_row ] ); + if ( size_t( i_column ) < rRow.size() ) + return rRow[ i_column ]; + + return Any(); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & i_rowHeaders ) throw (::com::sun::star::uno::RuntimeException) + ::rtl::OUString SAL_CALL DefaultGridDataModel::getRowTitle( ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) { - ::com::sun::star::uno::Sequence< ::rtl::OUString > oldValue( comphelper::containerToSequence( m_aRowHeaders ) ); - - const sal_Int32 sequenceSize = i_rowHeaders.getLength(); + ::osl::MutexGuard aGuard( GetMutex() ); - sal_Int32 i = 0; - for ( std::vector< rtl::OUString >::iterator iterator = m_aRowHeaders.begin(); - iterator != m_aRowHeaders.end(); - ++iterator, ++i - ) - { - if ( sequenceSize > i ) - *iterator = i_rowHeaders[i]; - else - *iterator = ::rtl::OUString(); - } + if ( ( i_row < 0 ) || ( size_t( i_row ) >= m_aRowHeaders.size() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - broadcast_changed( ROWHEADERS, 0, Any( oldValue ), Any( comphelper::containerToSequence( m_aRowHeaders ) ) ); + return m_aRowHeaders[ i_row ]; } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & rRowdata) throw (::com::sun::star::uno::RuntimeException) + void SAL_CALL DefaultGridDataModel::addRow( const ::rtl::OUString& i_title, const Sequence< Any >& i_data ) throw (RuntimeException) { + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + + sal_Int32 const columnCount = i_data.getLength(); + // store header name - m_aRowHeaders.push_back(headername); + m_aRowHeaders.push_back( i_title ); // store row m_aData - std::vector< Any > newRow; - for ( int i = 0; i < rRowdata.getLength();i++) - { - newRow.push_back(rRowdata[i]); - } - + ::std::vector< Any > newRow( columnCount ); + ::std::copy( i_data.getConstArray(), i_data.getConstArray() + columnCount, newRow.begin() ); m_aData.push_back( newRow ); - broadcast_add( m_aData.size()-1, headername, comphelper::containerToSequence(newRow)); + // update column count + if ( columnCount > m_nColumnCount ) + m_nColumnCount = columnCount; + broadcast( + GridDataEvent( *this, Sequence< sal_Int32 >(), lcl_buildSingleElementSequence( m_aData.size() - 1 ) ), + &XGridDataListener::rowsAdded, + aGuard + ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) + void SAL_CALL DefaultGridDataModel::addRows( const Sequence< ::rtl::OUString >& i_titles, const Sequence< Sequence< Any > >& i_data ) throw (IllegalArgumentException, RuntimeException) { - if ( index >= 0 && index <= getRowCount()-1) + if ( i_titles.getLength() != i_data.getLength() ) + throw IllegalArgumentException( ::rtl::OUString(), *this, -1 ); + + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + + sal_Int32 const rowCount = i_titles.getLength(); + if ( rowCount == 0 ) + return; + + // determine max col count in the new data + sal_Int32 maxColCount = 0; + for ( sal_Int32 row=0; row maxColCount ) + maxColCount = i_data[row].getLength(); + + if ( maxColCount < m_nColumnCount ) + maxColCount = m_nColumnCount; + + for ( sal_Int32 row=0; row& rowData ( (Sequence< Any >&)m_aData[index] ); - m_aData.erase(m_aData.begin() + index); - broadcast_remove( index, headerName, rowData); + ::std::vector< Any > newRow( maxColCount ); + Sequence< Any > const & rRowData = i_data[row]; + ::std::copy( rRowData.getConstArray(), rRowData.getConstArray() + rRowData.getLength(), newRow.begin() ); + m_aData.push_back( newRow ); } - else - return; + + if ( maxColCount > m_nColumnCount ) + m_nColumnCount = maxColCount; + + broadcast( + GridDataEvent( *this, Sequence< sal_Int32 >(), lcl_buildIndexSequence( m_aData.size() - rowCount, m_aData.size() - 1 ) ), + &XGridDataListener::rowsAdded, + aGuard + ); } //------------------------------------------------------------------------------------------------------------------ - Any SAL_CALL DefaultGridDataModel::getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) + void SAL_CALL DefaultGridDataModel::removeRow( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) { - ::osl::MutexGuard aGuard( GetMutex() ); + ::osl::ClearableMutexGuard aGuard( GetMutex() ); - if ( ( i_row < 0 ) || ( size_t( i_row ) > m_aData.size() ) ) + if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - ::std::vector< Any > const & rRow( m_aData[ i_row ] ); + m_aRowHeaders.erase( m_aRowHeaders.begin() + i_rowIndex ); + m_aData.erase( m_aData.begin() + i_rowIndex ); - if ( ( i_column < 0 ) || ( size_t( i_column ) > rRow.size() ) ) - throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - - return rRow[ i_column ]; + broadcast( + GridDataEvent( *this, Sequence< sal_Int32 >(), lcl_buildSingleElementSequence( i_rowIndex ) ), + &XGridDataListener::rowsRemoved, + aGuard + ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) + void SAL_CALL DefaultGridDataModel::removeRows( const Sequence< ::sal_Int32 >& i_rowIndexes ) throw (IndexOutOfBoundsException, RuntimeException) { - BrdcstHelper.addListener( XGridDataListener::static_type(), xListener ); + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + + sal_Int32 const rowCount = i_rowIndexes.getLength(); + if ( rowCount == 0 ) + return; + + for ( sal_Int32 row=0; row= m_aData.size() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + } + + Sequence< sal_Int32 > rowIndexes( i_rowIndexes ); + ::std::sort( stl_begin( rowIndexes ), stl_end( rowIndexes ) ); + + for ( sal_Int32 row = rowCount; row > 0; ) + { + sal_Int32 const rowIndex = rowIndexes[--row]; + m_aRowHeaders.erase( m_aRowHeaders.begin() + rowIndex ); + m_aData.erase( m_aData.begin() + rowIndex ); + } + + broadcast( + GridDataEvent( *this, Sequence< sal_Int32 >(), rowIndexes ), + &XGridDataListener::rowsRemoved, + aGuard + ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException) + void SAL_CALL DefaultGridDataModel::removeAllRows( ) throw (RuntimeException) { - BrdcstHelper.removeListener( XGridDataListener::static_type(), xListener ); + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + + m_aRowHeaders.clear(); + m_aData.clear(); + + broadcast( + GridDataEvent( *this, Sequence< sal_Int32 >(), Sequence< sal_Int32 >() ), + &XGridDataListener::rowsRemoved, + aGuard + ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::removeAll() throw (RuntimeException) + void SAL_CALL DefaultGridDataModel::updateCell( ::sal_Int32 i_rowIndex, ::sal_Int32 i_columnIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { - m_aRowHeaders.clear(); - m_aData.clear(); - broadcast_remove( -1, ::rtl::OUString(), 0); + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + + if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) + || ( i_columnIndex < 0 ) || ( i_columnIndex >= m_nColumnCount ) + ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + + ::std::vector< Any >& rRowData( m_aData[ i_rowIndex ] ); + if ( size_t( i_columnIndex ) >= rRowData.size() ) + rRowData.resize( i_columnIndex + 1 ); + rRowData[ i_columnIndex ] = i_value; + + broadcast( + GridDataEvent( *this, lcl_buildSingleElementSequence( i_columnIndex ), lcl_buildSingleElementSequence( i_rowIndex ) ), + &XGridDataListener::dataChanged, + aGuard + ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::updateCell(::sal_Int32 row, ::sal_Int32 column, const Any& value) throw (::com::sun::star::uno::RuntimeException) + void SAL_CALL DefaultGridDataModel::updateRow( const Sequence< ::sal_Int32 >& i_columnIndexes, ::sal_Int32 i_rowIndex, const Sequence< Any >& i_values ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { - if(row >= 0 && row < (signed)m_aData.size()) + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + + if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + + if ( i_columnIndexes.getLength() != i_values.getLength() ) + throw IllegalArgumentException( ::rtl::OUString(), *this, 1 ); + + sal_Int32 const columnCount = i_columnIndexes.getLength(); + if ( columnCount == 0 ) + return; + + for ( sal_Int32 col = 0; col < columnCount; ++col ) + { + if ( ( i_columnIndexes[col] < 0 ) || ( i_columnIndexes[col] > m_nColumnCount ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + } + + ::std::vector< Any >& rDataRow = m_aData[ i_rowIndex ]; + for ( sal_Int32 col = 0; col < columnCount; ++col ) { - if(column >= 0 && column < (signed)m_aData[0].size()) - { - m_aData[row][column] = value; - Sequence< Any >dataSeq(comphelper::containerToSequence(m_aData[row])); - broadcast_changed( CELLUPDATED, row, Any(column), value ); - } + sal_Int32 const columnIndex = i_columnIndexes[ col ]; + if ( size_t( columnIndex ) >= rDataRow.size() ) + rDataRow.resize( columnIndex + 1 ); + + rDataRow[ columnIndex ] = i_values[ col ]; } + + // by definition, the indexes in the notified sequences shall be sorted + Sequence< sal_Int32 > columnIndexes( i_columnIndexes ); + ::std::sort( stl_begin( columnIndexes ), stl_end( columnIndexes ) ); + + broadcast( + GridDataEvent( *this, columnIndexes, lcl_buildSingleElementSequence( i_rowIndex ) ), + &XGridDataListener::dataChanged, + aGuard + ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::updateRow(::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 > & columns, const ::com::sun::star::uno::Sequence< Any > & values) throw (::com::sun::star::uno::RuntimeException) + void SAL_CALL DefaultGridDataModel::setRowTitle( ::sal_Int32 i_rowIndex, const ::rtl::OUString& i_title ) throw (IndexOutOfBoundsException, RuntimeException) { - if(row >= 0 && row < (signed)m_aData.size()) - { - if(columns.getLength() == values.getLength()) - { - for(int i = 0; i < columns.getLength(); i++) - m_aData[row][i] = values[i]; - Sequence< Any >dataSeq(comphelper::containerToSequence(m_aData[row])); - broadcast_changed( ROWUPDATED, row, Any(columns), Any(values) ); - } - } + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + + if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + + m_aRowHeaders[ i_rowIndex ] = i_title; + + broadcast( + GridDataEvent( *this, Sequence< sal_Int32 >(), lcl_buildSingleElementSequence( i_rowIndex ) ), + &XGridDataListener::rowTitleChanged, + aGuard + ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< grid::XGridDataListener >& i_listener ) throw (RuntimeException) + { + BrdcstHelper.addListener( XGridDataListener::static_type(), i_listener ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::removeGridDataListener( const Reference< grid::XGridDataListener >& i_listener ) throw (RuntimeException) + { + BrdcstHelper.removeListener( XGridDataListener::static_type(), i_listener ); } //------------------------------------------------------------------------------------------------------------------ @@ -313,7 +424,7 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException) + Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException) { static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridDataModel ) ); static const Sequence< OUString > aSeq( &aServiceName, 1 ); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index c44c02fb0227..6dd81b8453ae 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" -#include +#include #include #include #include @@ -52,7 +52,7 @@ namespace toolkit enum broadcast_type { row_added, row_removed, data_changed}; -typedef ::cppu::WeakImplHelper2< XGridDataModel, XServiceInfo > DefaultGridDataModel_Base; +typedef ::cppu::WeakImplHelper2< XMutableGridDataModel, XServiceInfo > DefaultGridDataModel_Base; class DefaultGridDataModel : public DefaultGridDataModel_Base, public MutexAndBroadcastHelper { @@ -61,19 +61,23 @@ public: DefaultGridDataModel( DefaultGridDataModel const & i_copySource ); virtual ~DefaultGridDataModel(); + // XMutableGridDataModel + virtual void SAL_CALL addRow( const ::rtl::OUString& Title, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Data ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& Titles, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeRow( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeRows( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& RowIndexes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateCell( ::sal_Int32 RowIndex, ::sal_Int32 ColumnIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateRow( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRowTitle( ::sal_Int32 RowIndex, const ::rtl::OUString& Title ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + // XGridDataModel virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getRowTitle( ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); - virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & _aData) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); - virtual void SAL_CALL removeGridDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException); - virtual void SAL_CALL removeAll() throw (RuntimeException); - virtual void SAL_CALL updateCell( ::sal_Int32 row, ::sal_Int32 column, const ::com::sun::star::uno::Any& value ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateRow( ::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& values ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getRowTitle( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); // XComponent virtual void SAL_CALL dispose( ) throw (RuntimeException); @@ -89,14 +93,15 @@ public: virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException); private: + void broadcast( + GridDataEvent const & i_event, + void ( SAL_CALL ::com::sun::star::awt::grid::XGridDataListener::*i_listenerMethod )( ::com::sun::star::awt::grid::GridDataEvent const & ), + ::osl::ClearableMutexGuard & i_instanceLock + ); - void broadcast( broadcast_type eType, const GridDataEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException); - void broadcast_changed( ::rtl::OUString name, sal_Int32 index, Any oldValue, Any newValue ) throw (::com::sun::star::uno::RuntimeException); - void broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException); - void broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException); - - std::vector< std::vector < Any > > m_aData; - std::vector< ::rtl::OUString > m_aRowHeaders; + ::std::vector< ::std::vector < Any > > m_aData; + ::std::vector< ::rtl::OUString > m_aRowHeaders; + sal_Int32 m_nColumnCount; }; } diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 76bf33768776..b2322b69df69 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -293,7 +294,7 @@ namespace try { - const Reference< XContainer > xColModel( + Reference< XContainer > const xColModel( xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnModel" ) ) ), UNO_QUERY_THROW ); if ( i_add ) @@ -301,14 +302,18 @@ namespace else xColModel->removeContainerListener( i_listener.get() ); - const Reference< XGridDataModel > xDataModel( + Reference< XGridDataModel > const xDataModel( xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GridDataModel" ) ) ), UNO_QUERY_THROW ); - if ( i_add ) - xDataModel->addGridDataListener( i_listener.get() ); - else - xDataModel->removeGridDataListener( i_listener.get() ); + Reference< XMutableGridDataModel > const xMutableDataModel( xDataModel, UNO_QUERY ); + if ( xMutableDataModel.is() ) + { + if ( i_add ) + xMutableDataModel->addGridDataListener( i_listener.get() ); + else + xMutableDataModel->removeGridDataListener( i_listener.get() ); + } } catch( const Exception& ) { diff --git a/toolkit/source/controls/grid/grideventforwarder.cxx b/toolkit/source/controls/grid/grideventforwarder.cxx index 2c99acb86959..b3d17a897bad 100755 --- a/toolkit/source/controls/grid/grideventforwarder.cxx +++ b/toolkit/source/controls/grid/grideventforwarder.cxx @@ -81,19 +81,19 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridEventForwarder::rowAdded( const GridDataEvent& i_event ) throw (RuntimeException) + void SAL_CALL GridEventForwarder::rowsAdded( const GridDataEvent& i_event ) throw (RuntimeException) { Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY ); if ( xPeer.is() ) - xPeer->rowAdded( i_event ); + xPeer->rowsAdded( i_event ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridEventForwarder::rowRemoved( const GridDataEvent& i_event ) throw (RuntimeException) + void SAL_CALL GridEventForwarder::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException) { Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY ); if ( xPeer.is() ) - xPeer->rowRemoved( i_event ); + xPeer->rowsRemoved( i_event ); } //------------------------------------------------------------------------------------------------------------------ @@ -104,6 +104,14 @@ namespace toolkit xPeer->dataChanged( i_event ); } + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridEventForwarder::rowTitleChanged( const GridDataEvent& i_event ) throw (RuntimeException) + { + Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY ); + if ( xPeer.is() ) + xPeer->rowTitleChanged( i_event ); + } + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridEventForwarder::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) { diff --git a/toolkit/source/controls/grid/grideventforwarder.hxx b/toolkit/source/controls/grid/grideventforwarder.hxx index 93905b06f492..c0c09a7cc95d 100755 --- a/toolkit/source/controls/grid/grideventforwarder.hxx +++ b/toolkit/source/controls/grid/grideventforwarder.hxx @@ -61,9 +61,10 @@ namespace toolkit virtual void SAL_CALL release() throw(); // XGridDataListener - virtual void SAL_CALL rowAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rowRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowsAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowTitleChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); // XContainerListener virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); -- cgit From 57ccfcb41267ecd172f79fb86fafacbc1b2cbb14 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 10 Jan 2011 15:47:51 +0100 Subject: gridsort: XGridDataModel: moved modifying functionality into XMutableGridDataModel. --- .../com/sun/star/awt/grid/DefaultGridDataModel.idl | 12 +- offapi/com/sun/star/awt/grid/GridDataEvent.idl | 33 ++--- .../com/sun/star/awt/grid/UnoControlGridModel.idl | 4 + offapi/com/sun/star/awt/grid/XGridDataListener.idl | 17 +-- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 59 +------- .../sun/star/awt/grid/XMutableGridDataModel.idl | 155 +++++++++++++++++++++ offapi/com/sun/star/awt/grid/makefile.mk | 1 + 7 files changed, 190 insertions(+), 91 deletions(-) create mode 100755 offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl diff --git a/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl b/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl index c487afc79b49..6f30d1dcefa1 100644 --- a/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl @@ -27,9 +27,7 @@ #ifndef __com_sun_star_awt_DefaultGridDataModel_idl__ #define __com_sun_star_awt_DefaultGridDataModel_idl__ -#ifndef __com_sun_star_awt_grid_XGridDataModel_idl__ -#include -#endif +#include //============================================================================= @@ -39,11 +37,17 @@ /** If you do not want to implement the XGridDataModel yourself, use this service. +

          The DefaultGridDataModel implementation is a dumb container of tabular data. You can add + and remove rows, modify cell values, and the like.

          + +

          The implementation will implicitly increase its column count if you add a row which has more values than + the current column count.

          + @since OOo 3.3.0 */ service DefaultGridDataModel { - interface com::sun::star::awt::grid::XGridDataModel; + interface com::sun::star::awt::grid::XMutableGridDataModel; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/GridDataEvent.idl b/offapi/com/sun/star/awt/grid/GridDataEvent.idl index 26b563b20296..9afadfd3df7e 100644 --- a/offapi/com/sun/star/awt/grid/GridDataEvent.idl +++ b/offapi/com/sun/star/awt/grid/GridDataEvent.idl @@ -35,12 +35,9 @@ module com { module sun { module star { module awt { module grid { //============================================================================= -/** An event used by a XGridDataModel to notify changes in the data - model to the XGridControl. - You usually need to fill this event only if you implement the XGridDataModel - yourself. +/** used to notify changes in the data represented by an XMutableGridDataModel. - @see XGridDataModel + @see XMutableGridDataModel @see XGridControl @see XGridDataListener @@ -48,27 +45,21 @@ module com { module sun { module star { module awt { module grid { */ struct GridDataEvent: com::sun::star::lang::EventObject { - //------------------------------------------------------------------------- + /** denotes the columns affected by the data change - /** Contains the name of the attribute whose value changed. **/ - string AttributeName; +

          The array contains the indexes of the affected columns, in ascending order.

          - /** Contains the old value **/ - any OldValue; +

          If this sequence is empty, the callee should all assume all columns to be affected.

          + */ + sequence< long > Columns; - /** Contains the new value **/ - any NewValue; - - /** Contains the index of the changed row**/ - long RowIndex; - - /** Contains the header name of the changed row**/ - string HeaderName; - - /** Contains the changed row**/ - sequence RowData; + /** denotes the rows affected by the data change +

          The array contains the indexes of the affected rows, in ascending order.

          +

          If this sequence is empty, the callee should all assume all rows to be affected.

          + */ + sequence< long > Rows; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl index acd02b572a05..c4f4e3a08f09 100644 --- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl +++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl @@ -94,6 +94,8 @@ service UnoControlGridModel

          The column model is in the ownership of the grid model: When you set a new column model, or dispose the grid model, then the (old) column model is disposed, too.

          + +

          The default for this property is an empty instance of the DefaultGridColumnModel.

          */ [property] XGridColumnModel ColumnModel; @@ -104,6 +106,8 @@ service UnoControlGridModel

          The data model is in the ownership of the grid model: When you set a new data model, or dispose the grid model, then the (old) data model is disposed, too.

          + +

          The default for this property is an empty instance of the DefaultGridDataModel.

          */ [property] XGridDataModel GridDataModel; diff --git a/offapi/com/sun/star/awt/grid/XGridDataListener.idl b/offapi/com/sun/star/awt/grid/XGridDataListener.idl index d6d0d930b331..1e5573cef2b7 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataListener.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataListener.idl @@ -52,20 +52,21 @@ module com { module sun { module star { module awt { module grid { interface XGridDataListener: com::sun::star::lang::XEventListener { - /** - Invoked after a row was added to the data model. + /** is called when one or more rows of data have been added to a grid control's data model. */ - void rowAdded( [in] GridDataEvent Event ); + void rowsAdded( [in] GridDataEvent Event ); - /** - Invoked after a row was added to the data model. + /** is called when one or more rows of data have been removed from a grid control's data model. */ - void rowRemoved( [in] GridDataEvent Event ); + void rowsRemoved( [in] GridDataEvent Event ); - /** - Invoked after a row was added to the data model. + /** is called when existing data in a grid control's data model has been modified. */ void dataChanged( [in] GridDataEvent Event ); + + /** is called when the title of one or more rows changed. + */ + void rowTitleChanged( [in] GridDataEvent Event ); }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index b262181cba27..687b56e620fe 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -80,65 +80,8 @@ interface XGridDataModel if the given index does not denote a valid row. */ string - getRowTitle( [in] long Row ) + getRowTitle( [in] long RowIndex ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); - - /** Adds a row to the model. - - @param headername - specifies the name of the row. - @param data - the content of the row. - */ - void addRow( [in] string headername, [in] sequence< any > data ); - - /** Removes a row from the model. - - @param index - the index of the row that should be removed. - */ - void removeRow( [in] long index); - - /** Removes all rows from the model. - */ - void removeAll(); - - /**Updates the content of a given cell. - @param row - the row index - @param column - the column index - @param value - the new value of the cell. - */ - void updateCell([in] long row, [in] long column, [in] any value ); - - /**Updates the content of a given row. - @param row - the row index - @param columns - column indexes of the cells, which should be updated - @param value - the new values of the cells. - */ - void updateRow([in] long row, [in] sequence< long > columns, [in] sequence< any > values); - - //------------------------------------------------------------------------- - - /** Adds a listener for the GridDataEvent posted after the grid changes. - @param Listener - the listener to add. - */ - [oneway] void addGridDataListener( [in] XGridDataListener listener); - - //------------------------------------------------------------------------- - - /** Removes a listener previously added with addGridDataListener(). - @param Listener - the listener to remove. - */ - [oneway] void removeGridDataListener( [in] XGridDataListener listener); - }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl new file mode 100755 index 000000000000..fb011b30dfcc --- /dev/null +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -0,0 +1,155 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_XMutableGridDataModel_idl__ +#define __com_sun_star_awt_grid_XMutableGridDataModel_idl__ + +#include +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +//================================================================================================================== + +/** allows to modify the data represented by a XGridDataModel + */ +interface XMutableGridDataModel : XGridDataModel +{ + /** adds a row to the model. + + @param Title + is the header title of the row. + @param Data + specifies the content of the row. + */ + void addRow( [in] string Title, [in] sequence< any > Data ); + + /** adds multiple rows of data to the model. + @param Titles + specifies the header titles of the to-be-added rows. + @param Data + specifies the data of the rows to be added. + @throws ::com::sun::star::lang::IllegalArgumentException + if Titles and Data are of different length. + */ + void addRows( [in] sequence< string > Titles, [in] sequence< sequence< any > > Data ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); + + /** removes a row of data from the model + + @param RowIndex + the index of the row that should be removed. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the given index is invalid + */ + void removeRow( [in] long RowIndex ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** removes multiple rows of data from the model + +

          Grid data listeners are notified of this change via the XGridDataListener::rowsRemoved + method. The GridDataEvent::Rows member contains the indexes of the rows before the removal. + This is important to take into account by the listener, as with every removed row, the index of all subsequent + rows changes - nonetheless, the Rows array contains the original row indexes.

          + + @param RowIndexes + the indexes of the rows that should be removed. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if one of the indexes given in RowIndexes is invalid. + */ + void removeRows( [in] sequence< long > RowIndexes ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** Removes all rows from the model. + */ + void removeAllRows(); + + /** updates the content of the given cell + @param RowIndex + the row index of the to-be-updated cell + @param ColumnIndex + the column index of the to-be-updated cell + @param Value + the new value of the cell. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the row or column index is invalid + */ + void updateCell([in] long RowIndex, [in] long ColumnIndex, [in] any Value ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** updates the content of a given row. + + @param ColumnIndexes + contains the column indexes of the cells, which should be updated + @param RowIndex + contains the index of the row whose data is to be updated + @param Values + specifies the new values of the cells. + @raises ::com::sun::star::lang::IndexOutOfBoundsException + if one of the row indexes or the column index is invalid + @raises ::com::sun::star::lang::IndexOutOfBoundsException + if the lengths of the ColumnIndexes and Values sequences are not equal. + */ + void updateRow( [in] sequence< long > ColumnIndexes, [in] long RowIndex, [in] sequence< any > Values ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException + , ::com::sun::star::lang::IllegalArgumentException); + + /** sets a new title for a given row. + + @raises ::com::sun::star::lang::IndexOutOfBoundsException + if the given index does not denote a valid row. + */ + void + setRowTitle( [in] long RowIndex, [in] string Title ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + //------------------------------------------------------------------------- + + /** registers listener to be notified of data changes in the model + @param Listener + specifies the listener to register + */ + void addGridDataListener( [in] XGridDataListener Listener ); + + //------------------------------------------------------------------------- + + /** revokes a listener which was previously registered via addGridDataListener + @param Listener + specifies the listener to revoke. + */ + void removeGridDataListener( [in] XGridDataListener Listener ); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index 2ab14b26e283..014a89d0afb1 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -51,6 +51,7 @@ IDLFILES=\ XGridCellRenderer.idl\ DefaultGridDataModel.idl\ XGridDataModel.idl\ + XMutableGridDataModel.idl\ XGridColumnModel.idl\ XGridControl.idl\ UnoControlGrid.idl\ -- cgit From 858b82e990dee4558dbe3fe3c026d806f5acd524 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 10 Jan 2011 15:48:16 +0100 Subject: gridsort: removed XGridColumn::setIndex - don't really want to have something like this at the public API --- .../controls/grid/defaultgridcolumnmodel.cxx | 18 +++++---- toolkit/source/controls/grid/gridcolumn.cxx | 45 +++++++++++++++++++--- toolkit/source/controls/grid/gridcolumn.hxx | 15 ++++++-- 3 files changed, 61 insertions(+), 17 deletions(-) diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index acd02f37db1c..d417a1432bd2 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -127,12 +127,13 @@ namespace toolkit { ::osl::ClearableMutexGuard aGuard( m_aMutex ); - if ( !i_column.is() ) - throw IllegalArgumentException( ::rtl::OUString(), *this, 1 ); + GridColumn* const pGridColumn = GridColumn::getImplementation( i_column ); + if ( pGridColumn == NULL ) + throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "invalid column implementation" ) ), *this, 1 ); m_aColumns.push_back( i_column ); sal_Int32 index = m_aColumns.size() - 1; - i_column->setIndex( index ); + pGridColumn->setIndex( index ); // fire insertion notifications ContainerEvent aEvent; @@ -154,7 +155,7 @@ namespace toolkit if ( ( i_columnIndex < 0 ) || ( size_t( i_columnIndex ) >= m_aColumns.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - Columns::iterator pos = m_aColumns.begin() + i_columnIndex; + Columns::iterator const pos = m_aColumns.begin() + i_columnIndex; Reference< XGridColumn > const xColumn( *pos ); m_aColumns.erase( pos ); @@ -212,12 +213,13 @@ namespace toolkit // add new columns for ( sal_Int32 i=0; i xColumn( m_aContext.createComponent( "com.sun.star.awt.grid.GridColumn" ), UNO_QUERY_THROW ); + ::rtl::Reference< GridColumn > const pGridColumn = new GridColumn(); + Reference< XGridColumn > const xColumn( pGridColumn.get() ); ::rtl::OUStringBuffer colTitle; colTitle.appendAscii( "Column " ); colTitle.append( i ); - xColumn->setTitle( colTitle.makeStringAndClear() ); - xColumn->setPreferredWidth( 80 /* APPFONT */ ); + pGridColumn->setTitle( colTitle.makeStringAndClear() ); + pGridColumn->setPreferredWidth( 80 /* APPFONT */ ); ContainerEvent aEvent; aEvent.Source = *this; @@ -226,7 +228,7 @@ namespace toolkit aInsertedColumns.push_back( aEvent ); m_aColumns.push_back( xColumn ); - xColumn->setIndex( i ); + pGridColumn->setIndex( i ); } } diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index cc0790beb651..711affab8017 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -29,6 +29,7 @@ #include "gridcolumn.hxx" #include +#include #include #define COLWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColWidth" )) @@ -56,7 +57,7 @@ namespace toolkit GridColumn::GridColumn() :GridColumn_Base( m_aMutex ) ,m_aIdentifier() - ,m_nIndex(0) + ,m_nIndex(-1) ,m_nColumnWidth(4) ,m_nPreferredWidth(0) ,m_nMaxWidth(0) @@ -71,7 +72,7 @@ namespace toolkit :cppu::BaseMutex() ,GridColumn_Base( m_aMutex ) ,m_aIdentifier( i_copySource.m_aIdentifier ) - ,m_nIndex( i_copySource.m_nIndex ) + ,m_nIndex( -1 ) ,m_nColumnWidth( i_copySource.m_nColumnWidth ) ,m_nPreferredWidth( i_copySource.m_nPreferredWidth ) ,m_nMaxWidth( i_copySource.m_nMaxWidth ) @@ -89,8 +90,8 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void GridColumn::broadcast_changed( ::rtl::OUString name, Any i_oldValue, Any i_newValue, ::osl::ClearableMutexGuard& i_Guard ) { - Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridColumnEvent aEvent( xSource, name, i_oldValue, i_newValue, m_nIndex); + Reference< XInterface > const xSource( static_cast< ::cppu::OWeakObject* >( this ) ); + GridColumnEvent const aEvent( xSource, name, i_oldValue, i_newValue, m_nIndex); ::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( XGridColumnListener::static_type() ); @@ -272,9 +273,17 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridColumn::setIndex(sal_Int32 _nIndex) throw (::com::sun::star::uno::RuntimeException) + ::sal_Int32 SAL_CALL GridColumn::getIndex() throw (RuntimeException) { - m_nIndex = _nIndex; + ::osl::MutexGuard aGuard( m_aMutex ); + return m_nIndex; + } + + //------------------------------------------------------------------------------------------------------------------ + void GridColumn::setIndex( sal_Int32 const i_index ) + { + ::osl::MutexGuard aGuard( m_aMutex ); + m_nIndex = i_index; } //------------------------------------------------------------------------------------------------------------------ @@ -306,6 +315,30 @@ namespace toolkit { return new GridColumn( *this ); } + + //------------------------------------------------------------------------------------------------------------------ + sal_Int64 SAL_CALL GridColumn::getSomething( const Sequence< sal_Int8 >& i_identifier ) throw(RuntimeException) + { + if ( ( i_identifier.getLength() == 16 ) && ( i_identifier == getUnoTunnelId() ) ) + return ::sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) ); + return 0; + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< sal_Int8 > GridColumn::getUnoTunnelId() throw() + { + static ::cppu::OImplementationId const aId; + return aId.getImplementationId(); + } + + //------------------------------------------------------------------------------------------------------------------ + GridColumn* GridColumn::getImplementation( const Reference< XInterface >& i_component ) + { + Reference< XUnoTunnel > const xTunnel( i_component, UNO_QUERY ); + if ( xTunnel.is() ) + return reinterpret_cast< GridColumn* >( ::sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething( getUnoTunnelId() ) ) ); + return NULL; + } } ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index a099e9c2c01d..89d6da0c8cd2 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -43,8 +43,9 @@ namespace toolkit { -typedef ::cppu::WeakComponentImplHelper2 < ::com::sun::star::awt::grid::XGridColumn +typedef ::cppu::WeakComponentImplHelper3 < ::com::sun::star::awt::grid::XGridColumn , ::com::sun::star::lang::XServiceInfo + , ::com::sun::star::lang::XUnoTunnel > GridColumn_Base; class GridColumn :public ::cppu::BaseMutex ,public GridColumn_Base @@ -69,6 +70,7 @@ public: virtual void SAL_CALL setResizeable(::sal_Bool the_value) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getIndex() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::style::HorizontalAlignment SAL_CALL getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setHorizontalAlign(::com::sun::star::style::HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); @@ -87,7 +89,14 @@ public: virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setIndex(sal_Int32 _nIndex)throw (::com::sun::star::uno::RuntimeException); + // XUnoTunnel and friends + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& i_identifier ) throw(::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelId() throw(); + static GridColumn* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_component ); + + // attribute access + void setIndex( sal_Int32 const i_index ); + private: void broadcast_changed( ::rtl::OUString name, -- cgit From a47a228eb5e1173e519d9aee9dc674875cb32116 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 10 Jan 2011 15:48:16 +0100 Subject: gridsort: removed XGridColumn::setIndex - don't really want to have something like this at the public API --- offapi/com/sun/star/awt/grid/XGridColumn.idl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index f654ca9ba8bf..fea2cde7b6d2 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -76,11 +76,17 @@ interface XGridColumn /** A title is displayed in the colum header row if UnoControlGridModel::ShowRowHeader is set to **/ [attribute] string Title; + /** denotes the index of the column within the grid column model it belongs to + +

          If the column is not yet part of a column model, Index is -1.

          + */ + [attribute, readonly] long Index; + /** Adds a listener for the GridColumnEvent posted after the grid changes. @param Listener the listener to add. */ - [oneway] void addGridColumnListener( [in] XGridColumnListener listener); + void addGridColumnListener( [in] XGridColumnListener listener); //------------------------------------------------------------------------- @@ -88,13 +94,7 @@ interface XGridColumn @param Listener the listener to remove. */ - [oneway] void removeGridColumnListener( [in] XGridColumnListener listener); - - /**Sets column index - @param index - index, which is the index of the column in the column array of the column model - */ - void setIndex( [in] long index ); + void removeGridColumnListener( [in] XGridColumnListener listener); }; //============================================================================= -- cgit From 93f059dfb6d817afaff56694f242dba3a1897c3b Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 10 Jan 2011 16:45:42 +0100 Subject: sb139: #i116391# for backwards compatibility, allow absolute paths in configmgr getByHierarchicalName et al --- configmgr/source/access.cxx | 100 ++++++++++++++++++++++++++++++-------------- 1 file changed, 69 insertions(+), 31 deletions(-) diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 933a414d331c..2548643c7ce1 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -1993,45 +1993,83 @@ rtl::Reference< ChildAccess > Access::getUnmodifiedChild( } rtl::Reference< ChildAccess > Access::getSubChild(rtl::OUString const & path) { - rtl::OUString name; - bool setElement; - rtl::OUString templateName; - sal_Int32 i = Data::parseSegment( - path, 0, &name, &setElement, &templateName); - if (i == -1 || (i != path.getLength() && path[i] != '/')) { - return rtl::Reference< ChildAccess >(); - } - rtl::Reference< ChildAccess > child(getChild(name)); - if (!child.is()) { - return rtl::Reference< ChildAccess >(); - } - if (setElement) { - rtl::Reference< Node > p(getNode()); - switch (p->kind()) { - case Node::KIND_LOCALIZED_PROPERTY: - if (!Components::allLocales(getRootAccess()->getLocale()) || - templateName.getLength() != 0) - { + sal_Int32 i = 0; + // For backwards compatibility, allow absolute paths where meaningful: + if (path.getLength() != 0 && path[0] == '/') { + ++i; + if (!getRootAccess().is()) { + return rtl::Reference< ChildAccess >(); + } + Path abs(getAbsolutePath()); + for (Path::iterator j(abs.begin()); j != abs.end(); ++j) { + rtl::OUString name1; + bool setElement1; + rtl::OUString templateName1; + i = Data::parseSegment( + path, i, &name1, &setElement1, &templateName1); + if (i == -1 || (i != path.getLength() && path[i] != '/')) { return rtl::Reference< ChildAccess >(); } - break; - case Node::KIND_SET: - if (templateName.getLength() != 0 && - !dynamic_cast< SetNode * >(p.get())->isValidTemplate( - templateName)) + rtl::OUString name2; + bool setElement2; + rtl::OUString templateName2; + Data::parseSegment(*j, 0, &name2, &setElement2, &templateName2); + if (name1 != name2 || setElement1 != setElement2 || + (setElement1 && + !Data::equalTemplateNames(templateName1, templateName2))) { return rtl::Reference< ChildAccess >(); } - break; - default: + if (i != path.getLength()) { + ++i; + } + } + } + for (rtl::Reference< Access > parent(this);;) { + rtl::OUString name; + bool setElement; + rtl::OUString templateName; + i = Data::parseSegment(path, i, &name, &setElement, &templateName); + if (i == -1 || (i != path.getLength() && path[i] != '/')) { return rtl::Reference< ChildAccess >(); } + rtl::Reference< ChildAccess > child(parent->getChild(name)); + if (!child.is()) { + return rtl::Reference< ChildAccess >(); + } + if (setElement) { + rtl::Reference< Node > p(parent->getNode()); + switch (p->kind()) { + case Node::KIND_LOCALIZED_PROPERTY: + if (!Components::allLocales(getRootAccess()->getLocale()) || + templateName.getLength() != 0) + { + return rtl::Reference< ChildAccess >(); + } + break; + case Node::KIND_SET: + if (templateName.getLength() != 0 && + !dynamic_cast< SetNode * >(p.get())->isValidTemplate( + templateName)) + { + return rtl::Reference< ChildAccess >(); + } + break; + default: + return rtl::Reference< ChildAccess >(); + } + } + // For backwards compatibility, ignore a final slash after non-value + // nodes: + if (child->isValue()) { + return i == path.getLength() + ? child : rtl::Reference< ChildAccess >(); + } else if (i >= path.getLength() - 1) { + return child; + } + ++i; + parent = child.get(); } - // For backwards compatibility, ignore a final slash after non-value nodes: - return child->isValue() - ? (i == path.getLength() ? child : rtl::Reference< ChildAccess >()) - : (i >= path.getLength() - 1 - ? child : child->getSubChild(path.copy(i + 1))); } bool Access::setChildProperty( -- cgit From 5a256f4486e4b9875ea62c9a8f65ad110fda71b9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 10:58:26 +0100 Subject: gridsort: removed XGridControl::setTooltip. It had a rather strange semantics, seems to be unused in the current OOo code base, and would belong to the model, if at all. Still one thing to do: do not unconditionally display the cell content as tooltip, but make this dependent on whether or not the cell content fits into the cell. --- svtools/inc/svtools/table/abstracttablecontrol.hxx | 2 - svtools/inc/svtools/table/tablecontrol.hxx | 13 ++-- svtools/inc/svtools/table/tabledatawindow.hxx | 1 + svtools/inc/svtools/table/tablemodel.hxx | 17 +++++ svtools/source/table/cellvalueconversion.cxx | 6 +- svtools/source/table/tablecontrol.cxx | 27 +------- svtools/source/table/tablecontrol_impl.cxx | 75 +--------------------- svtools/source/table/tablecontrol_impl.hxx | 3 - svtools/source/table/tabledatawindow.cxx | 68 ++++++++++++++++---- svtools/source/uno/svtxgridcontrol.cxx | 15 +---- svtools/source/uno/svtxgridcontrol.hxx | 1 - svtools/source/uno/unocontroltablemodel.cxx | 9 +++ svtools/source/uno/unocontroltablemodel.hxx | 1 + toolkit/source/controls/grid/gridcontrol.cxx | 6 -- toolkit/source/controls/grid/gridcontrol.hxx | 1 - 15 files changed, 98 insertions(+), 147 deletions(-) diff --git a/svtools/inc/svtools/table/abstracttablecontrol.hxx b/svtools/inc/svtools/table/abstracttablecontrol.hxx index ac91006e42f5..eb70a6967e6f 100644 --- a/svtools/inc/svtools/table/abstracttablecontrol.hxx +++ b/svtools/inc/svtools/table/abstracttablecontrol.hxx @@ -116,8 +116,6 @@ namespace svt { namespace table /** returns selection engine*/ virtual SelectionEngine* getSelEngine() = 0; virtual void activateCellAt( const Point& rPoint ) = 0; - virtual bool isTooltipActive() = 0; - virtual rtl::OUString& setTooltip(const Point& rPoint ) = 0; virtual RowPos getRowAtPoint( const Point& rPoint ) = 0; virtual ColPos getColAtPoint( const Point& rPoint ) = 0; virtual void resizeColumn(const Point& rPoint ) = 0; diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index b75ebe0dcc88..d557597b6ff8 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -77,11 +77,8 @@ namespace svt { namespace table DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); ::boost::shared_ptr< TableControl_Impl > m_pImpl; - ::com::sun::star::uno::Sequence< sal_Int32 > m_nCols; - ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aText; Link m_aSelectHdl; bool m_bSelectionChanged; - bool m_bTooltip; public: ::std::auto_ptr< AccessibleTableControl_Impl > m_pAccessTable; @@ -110,8 +107,8 @@ namespace svt { namespace table */ sal_Int32 GetCurrentRow() const; - /** returns the row, which contains the input point*/ - ColPos GetRowAtPoint( const Point& rPoint ); + IAbstractTableControl& + getTableControlInterface(); /** retrieves the current column @@ -194,6 +191,7 @@ namespace svt { namespace table virtual void FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& rStateSet, AccessibleTableControlObjType eObjType ) const; + //// Window virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const; virtual void GrabFocus(); @@ -224,12 +222,9 @@ namespace svt { namespace table virtual void commitGridControlEvent( sal_Int16 _nEventId, const com::sun::star::uno::Any& _rNewValue, const com::sun::star::uno::Any& _rOldValue ); virtual void RemoveSelectedRow(RowPos _nRowPos); virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; - ::com::sun::star::uno::Sequence< sal_Int32 >& getColumnsForTooltip(); - ::com::sun::star::uno::Sequence< ::rtl::OUString >& getTextForTooltip(); - void setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols); + void clearSelection(); void selectionChanged(bool _bChanged); - bool isTooltip(); protected: ::svt::IAccessibleFactory& getAccessibleFactory(); diff --git a/svtools/inc/svtools/table/tabledatawindow.hxx b/svtools/inc/svtools/table/tabledatawindow.hxx index 829feecd5836..1cc030be512b 100644 --- a/svtools/inc/svtools/table/tabledatawindow.hxx +++ b/svtools/inc/svtools/table/tabledatawindow.hxx @@ -75,6 +75,7 @@ namespace svt { namespace table virtual long Notify(NotifyEvent& rNEvt); virtual void SetControlBackground(const Color& rColor); virtual void SetControlBackground(); + virtual void RequestHelp( const HelpEvent& rHEvt ); void SetBackground(const Wallpaper& rColor); void SetBackground(); diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index dc25788bc491..b8c13822a460 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -432,6 +432,23 @@ namespace svt { namespace table */ virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ) = 0; + /** returns an object which should be displayed as tooltip for the given cell + + At the moment, only string-convertible values are supported here. In the future, one might imagine displaying + scaled-down versions of a graphic in a cell, and a larger version of that very graphic as tooltip. + + If no tooltip object is provided, then the cell content is used, and displayed as tooltip for the cell + if and only if it doesn't fit into the cell's space itself. + + @param i_col + The column index of the cell in question. COL_ROW_HEADERS is a valid argument here. + @param i_row + The row index of the cell in question. ROW_COL_HEADERS is a valid argument. + @param o_cellToolTip + takes the tooltip object upon return. + */ + virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip ) = 0; + /** retrieves title of a given row */ virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const = 0; diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx index 9b36ad095203..286ca505bb30 100755 --- a/svtools/source/table/cellvalueconversion.cxx +++ b/svtools/source/table/cellvalueconversion.cxx @@ -46,12 +46,16 @@ namespace svt //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString CellValueConversion::convertToString( const Any& i_value ) { + ::rtl::OUString sConvertString; + if ( !i_value.hasValue() ) + return sConvertString; + + // TODO: use css.script.XTypeConverter? sal_Int32 nInt = 0; sal_Bool bBool = false; double fDouble = 0; - ::rtl::OUString sConvertString; ::rtl::OUString sStringValue; if ( i_value >>= sConvertString ) diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 08227b9abd91..1b6027b71324 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -70,7 +70,6 @@ namespace svt { namespace table :Control( _pParent, _nStyle ) ,m_pImpl( new TableControl_Impl( *this ) ) ,m_bSelectionChanged(false) - ,m_bTooltip(false) { TableDataWindow* aTableData = m_pImpl->getDataWindow(); aTableData->SetMouseButtonDownHdl( LINK( this, TableControl, ImplMouseButtonDownHdl ) ); @@ -245,9 +244,9 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - RowPos TableControl::GetRowAtPoint( const Point& rPoint ) + IAbstractTableControl& TableControl::getTableControlInterface() { - return m_pImpl->getRowAtPoint( rPoint ); + return *m_pImpl; } //-------------------------------------------------------------------- @@ -574,34 +573,12 @@ Rectangle TableControl::calcTableRect(BOOL _bOnScreen) (void)_bOnScreen; return m_pImpl->calcTableRect(); } -//-------------------------------------------------------------------- -::com::sun::star::uno::Sequence< sal_Int32 >& TableControl::getColumnsForTooltip() -{ - return m_nCols; -} -//-------------------------------------------------------------------- -::com::sun::star::uno::Sequence< ::rtl::OUString >& TableControl::getTextForTooltip() -{ - return m_aText; -} -//-------------------------------------------------------------------- -void TableControl::setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols ) -{ - m_aText = aText; - m_nCols = nCols; - m_bTooltip = true; -} // ----------------------------------------------------------------------- void TableControl::selectionChanged(bool _bChanged) { m_bSelectionChanged = _bChanged; } // ----------------------------------------------------------------------- -bool TableControl::isTooltip() -{ - return m_bTooltip; -} -// ----------------------------------------------------------------------- IMPL_LINK( TableControl, ImplSelectHdl, void*, EMPTYARG ) { Select(); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index d4de4bc0d3ef..ef217527cdff 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -185,6 +185,9 @@ namespace svt { namespace table (void)i_col; o_cellContent.clear(); } + virtual void getCellToolTip( ColPos const, RowPos const, ::com::sun::star::uno::Any& ) + { + } virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const { (void)i_rowPos; @@ -2071,78 +2074,6 @@ namespace svt { namespace table } return -1; } - //------------------------------------------------------------------------------- - bool TableControl_Impl::isTooltipActive() - { - return m_rAntiImpl.isTooltip(); - } - //------------------------------------------------------------------------------- - ::rtl::OUString& TableControl_Impl::setTooltip(const Point& rPoint ) - { - ::rtl::OUString aTooltipText; - const RowPos hitRow = getRowAtPoint( rPoint ); - const ColPos hitCol = getColAtPoint( rPoint ); - com::sun::star::uno::Sequence< sal_Int32 > cols = m_rAntiImpl.getColumnsForTooltip(); - com::sun::star::uno::Sequence< ::rtl::OUString > text = m_rAntiImpl.getTextForTooltip(); - if(text.getLength()==0 && cols.getLength()==0) - { - aTooltipText = getCellContentAsString( hitRow, hitCol ); - } - else if(text.getLength() == 0) - { - for(int i=0; i i) - { - aTooltipText += getCellContentAsString( hitRow, cols[i] ); - } - } - } - } - return m_aTooltipText = aTooltipText; - } //-------------------------------------------------------------------- ColPos TableControl_Impl::impl_getColumnForOrdinate( long const i_ordinate ) const diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 73819327f0ae..730b00b638b8 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -159,7 +159,6 @@ namespace svt { namespace table ColPos m_nResizingColumn; bool m_bResizingGrid; bool m_bUpdatingColWidths; - rtl::OUString m_aTooltipText; #if DBG_UTIL #define INV_SCROLL_POSITION 1 @@ -255,8 +254,6 @@ namespace svt { namespace table virtual bool dispatchAction( TableControlAction _eAction ); virtual SelectionEngine* getSelEngine(); virtual void activateCellAt( const Point& rPoint ); - virtual bool isTooltipActive(); - virtual rtl::OUString& setTooltip(const Point& rPoint ); virtual RowPos getRowAtPoint( const Point& rPoint ); virtual ColPos getColAtPoint( const Point& rPoint ); virtual void resizeColumn(const Point& rPoint); diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 41bd851e6b82..2fc08b13742e 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -29,15 +29,22 @@ #include "svtools/table/tablecontrol.hxx" #include "svtools/table/tabledatawindow.hxx" + #include "tablecontrol_impl.hxx" +#include "tablegeometry.hxx" +#include "cellvalueconversion.hxx" + #include //........................................................................ namespace svt { namespace table { - class TableControl_Impl; //........................................................................ + /** === begin UNO using === **/ + using ::com::sun::star::uno::Any; + /** === end UNO using === **/ + //==================================================================== //= TableDataWindow //==================================================================== @@ -77,29 +84,62 @@ namespace svt { namespace table { Window::SetControlBackground(); } + + //-------------------------------------------------------------------- + void TableDataWindow::RequestHelp( const HelpEvent& rHEvt ) + { + USHORT const nHelpMode = rHEvt.GetMode(); + if ( ( nHelpMode & HELPMODE_QUICK ) != 0 ) + { + Point const aMousePos( m_rTableControl.getAntiImpl().ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); + + RowPos const hitRow = m_rTableControl.getRowAtPoint( aMousePos ); + ColPos const hitCol = m_rTableControl.getColAtPoint( aMousePos ); + if ( ( hitRow >= 0 ) && ( hitRow < m_rTableControl.getRowCount() ) + && ( hitCol >= 0 ) && ( hitCol < m_rTableControl.getColumnCount() ) + ) + { + PTableModel const pTableModel( m_rTableControl.getAntiImpl().GetModel() ); + + Any aCellToolTip; + pTableModel->getCellToolTip( hitCol, hitRow, aCellToolTip ); + if ( !aCellToolTip.hasValue() ) + { + // use the cell content + pTableModel->getCellContent( hitCol, hitRow, aCellToolTip ); + // TODO: use the cell content as tool tip only if it doesn't fit into the cell. Need to + // ask the renderer for this. + } + + ::rtl::OUString const sHelpText( CellValueConversion::convertToString( aCellToolTip ) ); + if ( sHelpText.getLength() > 0 ) + { + Rectangle const aControlScreenRect( + m_rTableControl.getAntiImpl().OutputToScreenPixel( Point( 0, 0 ) ), + m_rTableControl.getAntiImpl().GetOutputSizePixel() + ); + Help::ShowQuickHelp( &m_rTableControl.getAntiImpl(), aControlScreenRect, sHelpText ); + } + } + } + else + { + Window::RequestHelp( rHEvt ); + } + } + //-------------------------------------------------------------------- void TableDataWindow::MouseMove( const MouseEvent& rMEvt ) { Point aPoint = rMEvt.GetPosPixel(); if ( !m_rTableControl.getInputHandler()->MouseMove( m_rTableControl, rMEvt ) ) { - if ( m_rTableControl.isTooltipActive() && m_rTableControl.getRowAtPoint( aPoint ) >= 0 ) - { - SetPointer(POINTER_ARROW); - const ::rtl::OUString& rHelpText = m_rTableControl.setTooltip(aPoint); - Help::EnableBalloonHelp(); - Window::SetHelpText( rHelpText ); - } - else if ( m_rTableControl.getRowAtPoint( aPoint ) == ROW_COL_HEADERS ) + if ( m_rTableControl.getRowAtPoint( aPoint ) == ROW_COL_HEADERS ) { - if(Help::IsBalloonHelpEnabled()) - Help::DisableBalloonHelp(); - m_rTableControl.resizeColumn(aPoint); + m_rTableControl.resizeColumn( aPoint ); } else { - if(Help::IsBalloonHelpEnabled()) - Help::DisableBalloonHelp(); Window::MouseMove( rMEvt ); } } diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index de4fe1c02e17..d4ab00868ec9 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -30,8 +30,7 @@ #include "svtxgridcontrol.hxx" #include "accessibletableimp.hxx" #include -#include "svtools/table/gridtablerenderer.hxx" -#include "svtools/table/defaultinputhandler.hxx" +#include "svtools/table/abstracttablecontrol.hxx" #include "svtools/table/tablecontrol.hxx" #include "unocontroltablemodel.hxx" #include @@ -93,17 +92,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getItemIndexAtPoint: no control (anymore)!", -1 ); - return pTable->GetRowAtPoint( Point( x, y ) ); -} - -// --------------------------------------------------------------------------------------------------------------------- -void SAL_CALL SVTXGridControl::setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const com::sun::star::uno::Sequence< sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException) -{ - ::vos::OGuard aGuard( GetMutex() ); - - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable != NULL, "SVTXGridControl::setToolTip: no control (anymore)!" ); - pTable->setTooltip(text, columns); + return pTable->getTableControlInterface().getRowAtPoint( Point( x, y ) ); } void SAL_CALL SVTXGridControl::addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index 19b52c183295..361e7d41cad7 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -102,7 +102,6 @@ public: virtual void SAL_CALL addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const ::com::sun::star::uno::Sequence< sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException); void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 8a6658578569..f7b2ca07eb22 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -526,6 +526,15 @@ namespace svt { namespace table } } + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::getCellToolTip( ColPos const i_col, RowPos const i_row, Any& o_cellToolTip ) + { + DBG_CHECK_ME(); + OSL_UNUSED( i_col ); + OSL_UNUSED( i_row ); + OSL_UNUSED( o_cellToolTip ); + } + //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString UnoControlTableModel::getRowHeader( RowPos const i_rowPos ) const { diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 1f3f7f075264..a6cd858ed34f 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -103,6 +103,7 @@ namespace svt { namespace table virtual void addTableModelListener( const PTableModelListener& i_listener ); virtual void removeTableModelListener( const PTableModelListener& i_listener ); virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ); + virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip ); virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const; virtual ::com::sun::star::util::Color getLineColor(); virtual ::com::sun::star::util::Color getHeaderBackgroundColor(); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index b2322b69df69..3623bb64bd27 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -339,12 +339,6 @@ sal_Bool SAL_CALL UnoGridControl::setModel( const Reference< XControlModel >& i_ return xGrid->getItemIndexAtPoint( x, y ); } -//---------------------------------------------------------------------------------------------------------------------- -void SAL_CALL UnoGridControl::setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException) -{ - Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->setToolTip( text, columns ); -} - //---------------------------------------------------------------------------------------------------------------------- ::sal_Int32 SAL_CALL UnoGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException) { diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index ce651a4061a9..65410d465730 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -98,7 +98,6 @@ public: // ::com::sun::star::awt::grid::XGridControl virtual ::sal_Int32 SAL_CALL getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::grid::XGridSelection virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); -- cgit From e058014fdd70ee0923702eab0b71654f4ed5221b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 10:58:26 +0100 Subject: gridsort: removed XGridControl::setTooltip. It had a rather strange semantics, seems to be unused in the current OOo code base, and would belong to the model, if at all. Still one thing to do: do not unconditionally display the cell content as tooltip, but make this dependent on whether or not the cell content fits into the cell. --- offapi/com/sun/star/awt/grid/XGridControl.idl | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridControl.idl b/offapi/com/sun/star/awt/grid/XGridControl.idl index 5019a571663b..df9bafa9cc6e 100644 --- a/offapi/com/sun/star/awt/grid/XGridControl.idl +++ b/offapi/com/sun/star/awt/grid/XGridControl.idl @@ -28,9 +28,6 @@ #define __com_sun_star_awt_grid_XGridControl_idl__ #include -#include -#include -#include //============================================================================= @@ -44,23 +41,11 @@ module com { module sun { module star { module awt { module grid { @since OOo 3.3.0 */ -interface XGridControl: XGridSelection +interface XGridControl : XGridSelection { /** Converting */ - long getItemIndexAtPoint( [in] long x, [in] long y); - - /** Sets tooltip for row - @param textForTooltip - text, which will be shown as tooltip. - If only cell content should be displayed, leave sequence empty. - @param columnsForTooltip - column numbers, which define the cell content that should be shown in the tooltip. - If only text should be shown, leave this sequence empty. - */ - void setToolTip( [in] sequence< string > textForTooltip, [in] sequence< long > columnsForTooltip); - }; //============================================================================= -- cgit From 1cc8adbaf6e766689c879672936e98f88b1d9c08 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 10:58:26 +0100 Subject: gridsort: removed XGridControl::setTooltip. It had a rather strange semantics, seems to be unused in the current OOo code base, and would belong to the model, if at all. Still one thing to do: do not unconditionally display the cell content as tooltip, but make this dependent on whether or not the cell content fits into the cell. --- automation/source/server/statemnt.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 3e086f485826..a42f0fd67f95 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -83,6 +83,7 @@ #include #include #include +#include #include #include // Hat keinen Includeschutz @@ -6209,7 +6210,7 @@ protected: Point aPos( aSize.Width() / 2, aSize.Height() / 2 ); long nStep = aSize.Height() / 4; ::svt::table::RowPos nLastPos; - while ( ( nLastPos = pTC->GetRowAtPoint( aPos ) ) != nNr1-1 && nStep > 0 ) + while ( ( nLastPos = pTC->getTableControlInterface().getRowAtPoint( aPos ) ) != nNr1-1 && nStep > 0 ) { if ( nLastPos > nNr1-1 || nLastPos == ROW_INVALID ) aPos.Y() -= nStep; @@ -6217,7 +6218,7 @@ protected: aPos.Y() += nStep; nStep /= 2; } - if ( pTC->GetRowAtPoint( aPos ) == nNr1-1 ) + if ( pTC->getTableControlInterface().getRowAtPoint( aPos ) == nNr1-1 ) { MouseEvent aMEvnt(aPos,1,MOUSE_SIMPLECLICK|MOUSE_SELECT,MOUSE_LEFT,KEY_MOD1); pTC->getSelEngine()->SelMouseButtonDown( aMEvnt ); -- cgit From 012b72f48860433345989eedc9cd1ccb9350b455 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 11:42:27 +0100 Subject: gridsort: +XGridColumn::HelpText, to be displayed as tooltip for the column header --- svtools/inc/svtools/table/tablemodel.hxx | 10 ++- svtools/source/table/tabledatawindow.cxx | 31 ++++++--- svtools/source/uno/unogridcolumnfacade.cxx | 38 +++++++++-- svtools/source/uno/unogridcolumnfacade.hxx | 2 + .../controls/grid/defaultgridcolumnmodel.cxx | 2 +- toolkit/source/controls/grid/gridcolumn.cxx | 78 ++++++++-------------- toolkit/source/controls/grid/gridcolumn.hxx | 18 ++++- 7 files changed, 109 insertions(+), 70 deletions(-) diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index b8c13822a460..3eb87f1eb40e 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -213,6 +213,14 @@ namespace svt { namespace table */ virtual void setName( const String& _rName ) = 0; + /** retrieves the help text to be displayed for the column. + */ + virtual String getHelpText() const = 0; + + /** sets a new the help text to be displayed for the column. + */ + virtual void setHelpText( const String& i_helpText ) = 0; + /** determines whether the column can be resized @see getMinWidth @@ -443,7 +451,7 @@ namespace svt { namespace table @param i_col The column index of the cell in question. COL_ROW_HEADERS is a valid argument here. @param i_row - The row index of the cell in question. ROW_COL_HEADERS is a valid argument. + The row index of the cell in question. @param o_cellToolTip takes the tooltip object upon return. */ diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 2fc08b13742e..2092a4bccdc9 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -95,23 +95,32 @@ namespace svt { namespace table RowPos const hitRow = m_rTableControl.getRowAtPoint( aMousePos ); ColPos const hitCol = m_rTableControl.getColAtPoint( aMousePos ); - if ( ( hitRow >= 0 ) && ( hitRow < m_rTableControl.getRowCount() ) - && ( hitCol >= 0 ) && ( hitCol < m_rTableControl.getColumnCount() ) - ) + + if ( ( hitCol >= 0 ) && ( hitCol < m_rTableControl.getColumnCount() ) ) { + ::rtl::OUString sHelpText; + PTableModel const pTableModel( m_rTableControl.getAntiImpl().GetModel() ); - Any aCellToolTip; - pTableModel->getCellToolTip( hitCol, hitRow, aCellToolTip ); - if ( !aCellToolTip.hasValue() ) + if ( hitRow == ROW_COL_HEADERS ) { - // use the cell content - pTableModel->getCellContent( hitCol, hitRow, aCellToolTip ); - // TODO: use the cell content as tool tip only if it doesn't fit into the cell. Need to - // ask the renderer for this. + sHelpText = pTableModel->getColumnModel( hitCol )->getHelpText(); + } + else if ( ( hitRow >= 0 ) && ( hitRow < m_rTableControl.getRowCount() ) ) + { + Any aCellToolTip; + pTableModel->getCellToolTip( hitCol, hitRow, aCellToolTip ); + if ( !aCellToolTip.hasValue() ) + { + // use the cell content + pTableModel->getCellContent( hitCol, hitRow, aCellToolTip ); + // TODO: use the cell content as tool tip only if it doesn't fit into the cell. Need to + // ask the renderer for this. + } + + sHelpText = CellValueConversion::convertToString( aCellToolTip ); } - ::rtl::OUString const sHelpText( CellValueConversion::convertToString( aCellToolTip ) ); if ( sHelpText.getLength() > 0 ) { Rectangle const aControlScreenRect( diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx index 4e094bbd6523..00fa72199815 100755 --- a/svtools/source/uno/unogridcolumnfacade.cxx +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -150,14 +150,14 @@ namespace svt { namespace table { ColumnAttributeGroup nChangedAttributes( COL_ATTRS_NONE ); - if ( i_event.AttributeName.equalsAscii( "HAlign" ) ) + if ( i_event.AttributeName.equalsAscii( "HorizontalAlign" ) ) nChangedAttributes |= COL_ATTRS_APPEARANCE; - if ( i_event.AttributeName.equalsAscii( "ColWidth" ) + if ( i_event.AttributeName.equalsAscii( "ColumnWidth" ) || i_event.AttributeName.equalsAscii( "MaxWidth" ) || i_event.AttributeName.equalsAscii( "MinWidth" ) - || i_event.AttributeName.equalsAscii( "PrefWidth" ) - || i_event.AttributeName.equalsAscii( "ColumnResize" ) + || i_event.AttributeName.equalsAscii( "PreferredWidth" ) + || i_event.AttributeName.equalsAscii( "Resizeable" ) ) nChangedAttributes |= COL_ATTRS_WIDTH; @@ -273,6 +273,36 @@ namespace svt { namespace table } } + //------------------------------------------------------------------------------------------------------------------ + String UnoGridColumnFacade::getHelpText() const + { + ::rtl::OUString sHelpText; + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", sHelpText ); + try + { + sHelpText = m_xGridColumn->getHelpText(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return sHelpText; + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setHelpText( const String& i_helpText ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + try + { + m_xGridColumn->setHelpText( i_helpText ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + //------------------------------------------------------------------------------------------------------------------ bool UnoGridColumnFacade::isResizable() const { diff --git a/svtools/source/uno/unogridcolumnfacade.hxx b/svtools/source/uno/unogridcolumnfacade.hxx index a49f1c8963e7..6f606bb6f86b 100755 --- a/svtools/source/uno/unogridcolumnfacade.hxx +++ b/svtools/source/uno/unogridcolumnfacade.hxx @@ -68,6 +68,8 @@ namespace svt { namespace table virtual void setID( const ::com::sun::star::uno::Any& i_ID ); virtual String getName() const; virtual void setName( const String& _rName ); + virtual String getHelpText() const; + virtual void setHelpText( const String& i_helpText ); virtual bool isResizable() const; virtual void setResizable( bool _bResizable ); virtual TableMetrics getWidth() const; diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index d417a1432bd2..04ecf93d9bc5 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -217,7 +217,7 @@ namespace toolkit Reference< XGridColumn > const xColumn( pGridColumn.get() ); ::rtl::OUStringBuffer colTitle; colTitle.appendAscii( "Column " ); - colTitle.append( i ); + colTitle.append( i + 1 ); pGridColumn->setTitle( colTitle.makeStringAndClear() ); pGridColumn->setPreferredWidth( 80 /* APPFONT */ ); diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 711affab8017..25272f4e489a 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -32,14 +32,6 @@ #include #include -#define COLWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColWidth" )) -#define MAXWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MaxWidth" )) -#define MINWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MinWidth" )) -#define PREFWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "PrefWidth" )) -#define HALIGN ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HAlign" )) -#define TITLE ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )) -#define COLRESIZE ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColumnResize" )) - namespace toolkit { using namespace ::com::sun::star; @@ -88,10 +80,13 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void GridColumn::broadcast_changed( ::rtl::OUString name, Any i_oldValue, Any i_newValue, ::osl::ClearableMutexGuard& i_Guard ) + void GridColumn::broadcast_changed( sal_Char const * const i_asciiAttributeName, Any i_oldValue, Any i_newValue, ::osl::ClearableMutexGuard& i_Guard ) { Reference< XInterface > const xSource( static_cast< ::cppu::OWeakObject* >( this ) ); - GridColumnEvent const aEvent( xSource, name, i_oldValue, i_newValue, m_nIndex); + GridColumnEvent const aEvent( + xSource, ::rtl::OUString::createFromAscii( i_asciiAttributeName ), + i_oldValue, i_newValue, m_nIndex + ); ::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( XGridColumnListener::static_type() ); @@ -110,7 +105,8 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException) { - value >>= m_aIdentifier; + ::osl::MutexGuard aGuard( m_aMutex ); + m_aIdentifier = value; } //------------------------------------------------------------------------------------------------------------------ @@ -123,12 +119,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setColumnWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); - if ( m_nColumnWidth == value ) - return; - - m_nColumnWidth = value; - broadcast_changed( COLWIDTH, Any( m_nColumnWidth ), Any( value ), aGuard ); + impl_set( m_nColumnWidth, value, "ColumnWidth" ); } //------------------------------------------------------------------------------------------------------------------ @@ -141,12 +132,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setPreferredWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); - if ( m_nPreferredWidth == value ) - return; - - m_nPreferredWidth = value; - broadcast_changed( PREFWIDTH, Any( m_nPreferredWidth ), Any( value ), aGuard ); + impl_set( m_nPreferredWidth, value, "PreferredWidth" ); } //------------------------------------------------------------------------------------------------------------------ @@ -159,12 +145,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setMaxWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); - if ( m_nMaxWidth == value ) - return; - - m_nMaxWidth = value; - broadcast_changed( MAXWIDTH, Any( m_nMaxWidth ), Any( value ), aGuard ); + impl_set( m_nMaxWidth, value, "MaxWidth" ); } //------------------------------------------------------------------------------------------------------------------ @@ -177,12 +158,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setMinWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); - if ( m_nMinWidth == value ) - return; - - m_nMinWidth = value; - broadcast_changed( MINWIDTH, Any( m_nMinWidth ), Any( value ), aGuard ); + impl_set( m_nMinWidth, value, "MinWidth" ); } //------------------------------------------------------------------------------------------------------------------ @@ -195,12 +171,20 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); - if ( m_sTitle == value ) - return; + impl_set( m_sTitle, value, "Title" ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL GridColumn::getHelpText() throw (RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + return m_sHelpText; + } - m_sTitle = value; - broadcast_changed( TITLE, Any( m_sTitle ), Any( value ), aGuard ); + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setHelpText( const ::rtl::OUString & value ) throw (RuntimeException) + { + impl_set( m_sHelpText, value, "HelpText" ); } //------------------------------------------------------------------------------------------------------------------ @@ -213,12 +197,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setResizeable(sal_Bool value) throw (::com::sun::star::uno::RuntimeException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); - if ( m_bResizeable == value ) - return; - - m_bResizeable = value; - broadcast_changed( COLRESIZE, Any( m_bResizeable ), Any( value ), aGuard ); + impl_set( m_bResizeable, value, "Resizeable" ); } //------------------------------------------------------------------------------------------------------------------ @@ -231,12 +210,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setHorizontalAlign(HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); - if ( m_eHorizontalAlign == align ) - return; - - m_eHorizontalAlign = align; - broadcast_changed( HALIGN, Any( m_eHorizontalAlign ), Any( align ), aGuard ); + impl_set( m_eHorizontalAlign, value, "HorizontalAlign" ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index 89d6da0c8cd2..a46b18a84fce 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -70,6 +70,8 @@ public: virtual void SAL_CALL setResizeable(::sal_Bool the_value) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getHelpText() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setHelpText(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getIndex() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::style::HorizontalAlignment SAL_CALL getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setHorizontalAlign(::com::sun::star::style::HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException); @@ -99,12 +101,25 @@ public: private: void broadcast_changed( - ::rtl::OUString name, + sal_Char const * const i_asciiAttributeName, ::com::sun::star::uno::Any i_oldValue, ::com::sun::star::uno::Any i_newValue, ::osl::ClearableMutexGuard& i_Guard ); + template< class TYPE > + void impl_set( TYPE & io_attribute, TYPE const & i_newValue, sal_Char const * i_attributeName ) + { + ::osl::ClearableMutexGuard aGuard( m_aMutex ); + if ( io_attribute == i_newValue ) + return; + + TYPE const aOldValue( io_attribute ); + io_attribute = i_newValue; + broadcast_changed( i_attributeName, ::com::sun::star::uno::makeAny( aOldValue ), ::com::sun::star::uno::makeAny( io_attribute ), aGuard ); + } + + ::com::sun::star::uno::Any m_aIdentifier; sal_Int32 m_nIndex; sal_Int32 m_nColumnWidth; @@ -113,6 +128,7 @@ private: sal_Int32 m_nMinWidth; sal_Bool m_bResizeable; ::rtl::OUString m_sTitle; + ::rtl::OUString m_sHelpText; ::com::sun::star::style::HorizontalAlignment m_eHorizontalAlign; }; -- cgit From 89199c1a017c97c239e7956863047d2553a00a97 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 11:42:27 +0100 Subject: gridsort: +XGridColumn::HelpText, to be displayed as tooltip for the column header --- offapi/com/sun/star/awt/grid/XGridColumn.idl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index fea2cde7b6d2..8b0be51c309b 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -76,6 +76,12 @@ interface XGridColumn /** A title is displayed in the colum header row if UnoControlGridModel::ShowRowHeader is set to **/ [attribute] string Title; + /** is the help text associated with the column. + +

          A grid control will usually display a column's help text as tooltip.

          + */ + [attribute] string HelpText; + /** denotes the index of the column within the grid column model it belongs to

          If the column is not yet part of a column model, Index is -1.

          -- cgit From 16028c42b11486c7a407736c78202eda88934e13 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 12:36:41 +0100 Subject: gridsort: XGridControl::getItemIndexAtPoint renamed to getRowAtPoint; introduced getColumnAtPoint --- svtools/source/uno/svtxgridcontrol.cxx | 21 ++++++++++++++++++--- svtools/source/uno/svtxgridcontrol.hxx | 7 +++++-- toolkit/source/controls/grid/gridcolumn.cxx | 2 +- toolkit/source/controls/grid/gridcontrol.cxx | 13 ++++++++++--- toolkit/source/controls/grid/gridcontrol.hxx | 3 ++- 5 files changed, 36 insertions(+), 10 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index d4ab00868ec9..c2cf8faac548 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -86,25 +86,40 @@ void SVTXGridControl::SetWindow( Window* pWindow ) } // --------------------------------------------------------------------------------------------------------------------- -sal_Int32 SAL_CALL SVTXGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) +sal_Int32 SAL_CALL SVTXGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getItemIndexAtPoint: no control (anymore)!", -1 ); - return pTable->getTableControlInterface().getRowAtPoint( Point( x, y ) ); + ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getRowAtPoint: no control (anymore)!", -1 ); + sal_Int32 const nRow = pTable->getTableControlInterface().getRowAtPoint( Point( x, y ) ); + return ( nRow >= 0 ) ? nRow : -1; } +// --------------------------------------------------------------------------------------------------------------------- +sal_Int32 SAL_CALL SVTXGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getColumnAtPoint: no control (anymore)!", -1 ); + sal_Int32 const nColumn = pTable->getTableControlInterface().getColAtPoint( Point( x, y ) ); + return ( nColumn >= 0 ) ? nColumn : -1; +} + +// --------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) { m_aSelectionListeners.addInterface(listener); } +// --------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) { m_aSelectionListeners.removeInterface(listener); } +// --------------------------------------------------------------------------------------------------------------------- void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const Any& aValue) throw(RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index 361e7d41cad7..c3d1f909126b 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -86,7 +86,7 @@ public: // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); - //::com::sun::star::awt::grid::XGridControl + // XGridSelection virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException); @@ -101,7 +101,10 @@ public: virtual void SAL_CALL selectColumn(::sal_Int32 x) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + + // XGridControl + virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 25272f4e489a..09fb053ce152 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -210,7 +210,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setHorizontalAlign(HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException) { - impl_set( m_eHorizontalAlign, value, "HorizontalAlign" ); + impl_set( m_eHorizontalAlign, align, "HorizontalAlign" ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 3623bb64bd27..70afcc5c3a13 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -333,10 +333,17 @@ sal_Bool SAL_CALL UnoGridControl::setModel( const Reference< XControlModel >& i_ } //---------------------------------------------------------------------------------------------------------------------- -::sal_Int32 UnoGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) +::sal_Int32 UnoGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) { - Reference< XGridControl > xGrid ( getPeer(), UNO_QUERY_THROW ); - return xGrid->getItemIndexAtPoint( x, y ); + Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW ); + return xGrid->getRowAtPoint( x, y ); +} + +//---------------------------------------------------------------------------------------------------------------------- +::sal_Int32 UnoGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) +{ + Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW ); + return xGrid->getColumnAtPoint( x, y ); } //---------------------------------------------------------------------------------------------------------------------- diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index 65410d465730..6dfc5d71e639 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -97,7 +97,8 @@ public: sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::grid::XGridControl - virtual ::sal_Int32 SAL_CALL getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::grid::XGridSelection virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); -- cgit From aac19933d26d14a1958290a93ceb41f7ff3d7822 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 12:36:41 +0100 Subject: gridsort: XGridControl::getItemIndexAtPoint renamed to getRowAtPoint; introduced getColumnAtPoint --- offapi/com/sun/star/awt/grid/XGridControl.idl | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridControl.idl b/offapi/com/sun/star/awt/grid/XGridControl.idl index df9bafa9cc6e..4cdcb03beb43 100644 --- a/offapi/com/sun/star/awt/grid/XGridControl.idl +++ b/offapi/com/sun/star/awt/grid/XGridControl.idl @@ -43,9 +43,27 @@ module com { module sun { module star { module awt { module grid { */ interface XGridControl : XGridSelection { - /** Converting + /** retrieves the row which a given point belongs to + + @param X + the ordinate of the point, in pixel coordinates. + @param Y + the abscissa of the point, in pixel coordinates. + @return + the index of the row which the point lies in, or -1 if no row is under the given point. + */ + long getRowAtPoint( [in] long X, [in] long Y ); + + /** retrieves the column which a given point belongs to + + @param X + the ordinate of the point, in pixel coordinates. + @param Y + the abscissa of the point, in pixel coordinates. + @return + the index of the column which the point lies in, or -1 if no column is under the given point. */ - long getItemIndexAtPoint( [in] long x, [in] long y); + long getColumnAtPoint( [in] long X, [in] long Y ); }; //============================================================================= -- cgit From 3d7ca63d0efdc25200133c4086b48982b3a20eca Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 13:26:40 +0100 Subject: gridsort: IAbstractTableControl renamed to ITableControl, added a few more methods previously found at the TableControl_Impl only --- svtools/inc/svtools/table/abstracttablecontrol.hxx | 133 ----- svtools/inc/svtools/table/defaultinputhandler.hxx | 20 +- svtools/inc/svtools/table/tablecontrol.hxx | 6 +- .../inc/svtools/table/tablecontrolinterface.hxx | 143 +++++ svtools/inc/svtools/table/tableinputhandler.hxx | 22 +- svtools/source/table/defaultinputhandler.cxx | 22 +- svtools/source/table/tablecontrol.cxx | 641 +++++++++++---------- svtools/source/table/tablecontrol_impl.cxx | 137 +++-- svtools/source/table/tablecontrol_impl.hxx | 10 +- svtools/source/table/tabledatawindow.cxx | 15 +- svtools/source/uno/svtxgridcontrol.cxx | 2 +- 11 files changed, 603 insertions(+), 548 deletions(-) delete mode 100644 svtools/inc/svtools/table/abstracttablecontrol.hxx create mode 100644 svtools/inc/svtools/table/tablecontrolinterface.hxx diff --git a/svtools/inc/svtools/table/abstracttablecontrol.hxx b/svtools/inc/svtools/table/abstracttablecontrol.hxx deleted file mode 100644 index eb70a6967e6f..000000000000 --- a/svtools/inc/svtools/table/abstracttablecontrol.hxx +++ /dev/null @@ -1,133 +0,0 @@ -/************************************************************************* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * -************************************************************************/ - -#ifndef SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX -#define SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX - -#include -#include -#include -#include "tabletypes.hxx" -//........................................................................ -namespace svt { namespace table -{ -//........................................................................ - - enum TableControlAction - { - /// moves the cursor in the table control one row up, if possible, by keeping the current column - cursorUp, - /// moves the cursor in the table control one row down, if possible, by keeping the current column - cursorDown, - /// moves the cursor in the table control one column to the left, if possible, by keeping the current row - cursorLeft, - /// moves the cursor in the table control one column to the right, if possible, by keeping the current row - cursorRight, - /// moves the cursor to the beginning of the current line - cursorToLineStart, - /// moves the cursor to the end of the current line - cursorToLineEnd, - /// moves the cursor to the first row, keeping the current column - cursorToFirstLine, - /// moves the cursor to the last row, keeping the current column - cursorToLastLine, - /// moves the cursor one page up, keeping the current column - cursorPageUp, - /// moves the cursor one page down, keeping the current column - cursorPageDown, - /// moves the cursor to the top-most, left-most cell - cursorTopLeft, - /// moves the cursor to the bottom-most, right-most cell - cursorBottomRight, - /// selects the row, where the actual cursor is - cursorSelectRow, - /// selects the rows, above the actual cursor is - cursorSelectRowUp, - /// selects the row, beneath the actual cursor is - cursorSelectRowDown, - /// selects the row, from the actual cursor till top - cursorSelectRowAreaTop, - /// selects the row, from the actual cursor till bottom - cursorSelectRowAreaBottom, - - /// invalid and final enumeration value, not to be actually used - invalidTableControlAction - }; - - //==================================================================== - //= IAbstractTableControl - //==================================================================== - /** defines a callback interface to be implemented by a concrete table control - */ - class SAL_NO_VTABLE IAbstractTableControl - { - public: - /** hides the cell cursor - - The method cares for successive calls, that is, for every call to - ->hideCursor(), you need one call to ->showCursor. Only if the number - of both calls matches, the cursor is really shown. - - @see showCursor - */ - virtual void hideCursor() = 0; - - /** shows the cell cursor - - @see hideCursor - */ - virtual void showCursor() = 0; - - /** dispatches an action to the table control - - @return - if the action could be dispatched successfully, otherwise. Usual - failure conditions include some other instance vetoing the action, or impossibility - to execute the action at all (for instance moving up one row when already positioned - on the very first row). - - @see TableControlAction - */ - virtual bool dispatchAction( TableControlAction _eAction ) = 0; - - /** returns selection engine*/ - virtual SelectionEngine* getSelEngine() = 0; - virtual void activateCellAt( const Point& rPoint ) = 0; - virtual RowPos getRowAtPoint( const Point& rPoint ) = 0; - virtual ColPos getColAtPoint( const Point& rPoint ) = 0; - virtual void resizeColumn(const Point& rPoint ) = 0; - virtual bool checkResizeColumn(const Point& rPoint) = 0; - virtual bool endResizeColumn(const Point& rPoint) = 0; - virtual bool isRowSelected(RowPos _nRow) = 0; - - virtual ~IAbstractTableControl() {}; - }; - -//........................................................................ -} } // namespace svt::table -//........................................................................ - -#endif // SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX diff --git a/svtools/inc/svtools/table/defaultinputhandler.hxx b/svtools/inc/svtools/table/defaultinputhandler.hxx index ca760896d539..31b5db319290 100644 --- a/svtools/inc/svtools/table/defaultinputhandler.hxx +++ b/svtools/inc/svtools/table/defaultinputhandler.hxx @@ -50,16 +50,16 @@ namespace svt { namespace table DefaultInputHandler(); ~DefaultInputHandler(); - virtual bool MouseMove ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ); - virtual bool MouseButtonDown ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ); - virtual bool MouseButtonUp ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ); - virtual bool KeyInput ( IAbstractTableControl& _rControl, const KeyEvent& rKEvt ); - virtual bool GetFocus ( IAbstractTableControl& _rControl ); - virtual bool LoseFocus ( IAbstractTableControl& _rControl ); - virtual bool RequestHelp ( IAbstractTableControl& _rControl, const HelpEvent& rHEvt ); - virtual bool Command ( IAbstractTableControl& _rControl, const CommandEvent& rCEvt ); - virtual bool PreNotify ( IAbstractTableControl& _rControl, NotifyEvent& rNEvt ); - virtual bool Notify ( IAbstractTableControl& _rControl, NotifyEvent& rNEvt ); + virtual bool MouseMove ( ITableControl& _rControl, const MouseEvent& rMEvt ); + virtual bool MouseButtonDown ( ITableControl& _rControl, const MouseEvent& rMEvt ); + virtual bool MouseButtonUp ( ITableControl& _rControl, const MouseEvent& rMEvt ); + virtual bool KeyInput ( ITableControl& _rControl, const KeyEvent& rKEvt ); + virtual bool GetFocus ( ITableControl& _rControl ); + virtual bool LoseFocus ( ITableControl& _rControl ); + virtual bool RequestHelp ( ITableControl& _rControl, const HelpEvent& rHEvt ); + virtual bool Command ( ITableControl& _rControl, const CommandEvent& rCEvt ); + virtual bool PreNotify ( ITableControl& _rControl, NotifyEvent& rNEvt ); + virtual bool Notify ( ITableControl& _rControl, NotifyEvent& rNEvt ); }; //........................................................................ diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index d557597b6ff8..259b390071bb 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -107,7 +107,7 @@ namespace svt { namespace table */ sal_Int32 GetCurrentRow() const; - IAbstractTableControl& + ITableControl& getTableControlInterface(); /** retrieves the current column @@ -192,7 +192,8 @@ namespace svt { namespace table ::utl::AccessibleStateSetHelper& rStateSet, AccessibleTableControlObjType eObjType ) const; - //// Window + // ............................................................................................................. + // IAccessibleTable virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const; virtual void GrabFocus(); virtual XACC GetAccessible( BOOL bCreate = TRUE ); @@ -222,6 +223,7 @@ namespace svt { namespace table virtual void commitGridControlEvent( sal_Int16 _nEventId, const com::sun::star::uno::Any& _rNewValue, const com::sun::star::uno::Any& _rOldValue ); virtual void RemoveSelectedRow(RowPos _nRowPos); virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; + // ............................................................................................................. void clearSelection(); void selectionChanged(bool _bChanged); diff --git a/svtools/inc/svtools/table/tablecontrolinterface.hxx b/svtools/inc/svtools/table/tablecontrolinterface.hxx new file mode 100644 index 000000000000..c1ed1bf432b6 --- /dev/null +++ b/svtools/inc/svtools/table/tablecontrolinterface.hxx @@ -0,0 +1,143 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX +#define SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX + +#include +#include +#include + +#include "svtools/table/tabletypes.hxx" +#include "svtools/table/tablemodel.hxx" + +//........................................................................ +namespace svt { namespace table +{ +//........................................................................ + + enum TableControlAction + { + /// moves the cursor in the table control one row up, if possible, by keeping the current column + cursorUp, + /// moves the cursor in the table control one row down, if possible, by keeping the current column + cursorDown, + /// moves the cursor in the table control one column to the left, if possible, by keeping the current row + cursorLeft, + /// moves the cursor in the table control one column to the right, if possible, by keeping the current row + cursorRight, + /// moves the cursor to the beginning of the current line + cursorToLineStart, + /// moves the cursor to the end of the current line + cursorToLineEnd, + /// moves the cursor to the first row, keeping the current column + cursorToFirstLine, + /// moves the cursor to the last row, keeping the current column + cursorToLastLine, + /// moves the cursor one page up, keeping the current column + cursorPageUp, + /// moves the cursor one page down, keeping the current column + cursorPageDown, + /// moves the cursor to the top-most, left-most cell + cursorTopLeft, + /// moves the cursor to the bottom-most, right-most cell + cursorBottomRight, + /// selects the row, where the actual cursor is + cursorSelectRow, + /// selects the rows, above the actual cursor is + cursorSelectRowUp, + /// selects the row, beneath the actual cursor is + cursorSelectRowDown, + /// selects the row, from the actual cursor till top + cursorSelectRowAreaTop, + /// selects the row, from the actual cursor till bottom + cursorSelectRowAreaBottom, + + /// invalid and final enumeration value, not to be actually used + invalidTableControlAction + }; + + //==================================================================== + //= ITableControl + //==================================================================== + /** defines a callback interface to be implemented by a concrete table control + */ + class SAL_NO_VTABLE ITableControl + { + public: + /** hides the cell cursor + + The method cares for successive calls, that is, for every call to + ->hideCursor(), you need one call to ->showCursor. Only if the number + of both calls matches, the cursor is really shown. + + @see showCursor + */ + virtual void hideCursor() = 0; + + /** shows the cell cursor + + @see hideCursor + */ + virtual void showCursor() = 0; + + /** dispatches an action to the table control + + @return + if the action could be dispatched successfully, otherwise. Usual + failure conditions include some other instance vetoing the action, or impossibility + to execute the action at all (for instance moving up one row when already positioned + on the very first row). + + @see TableControlAction + */ + virtual bool dispatchAction( TableControlAction _eAction ) = 0; + + /** returns selection engine*/ + virtual SelectionEngine* getSelEngine() = 0; + + /** returns the table model + + The returned model is guaranteed to not be . + */ + virtual PTableModel getModel() const = 0; + + virtual void activateCellAt( const Point& rPoint ) = 0; + virtual RowPos getRowAtPoint( const Point& rPoint ) = 0; + virtual ColPos getColAtPoint( const Point& rPoint ) = 0; + virtual void resizeColumn(const Point& rPoint ) = 0; + virtual bool checkResizeColumn(const Point& rPoint) = 0; + virtual bool endResizeColumn(const Point& rPoint) = 0; + virtual bool isRowSelected(RowPos _nRow) = 0; + + virtual ~ITableControl() {}; + }; + +//........................................................................ +} } // namespace svt::table +//........................................................................ + +#endif // SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX diff --git a/svtools/inc/svtools/table/tableinputhandler.hxx b/svtools/inc/svtools/table/tableinputhandler.hxx index 6d6af9f641bb..87803f03e240 100644 --- a/svtools/inc/svtools/table/tableinputhandler.hxx +++ b/svtools/inc/svtools/table/tableinputhandler.hxx @@ -40,7 +40,7 @@ namespace svt { namespace table { //........................................................................ - class IAbstractTableControl; + class ITableControl; //==================================================================== //= ITableInputHandler @@ -56,16 +56,16 @@ namespace svt { namespace table // or whether it has been sufficiently handled by the ->ITableInputHandler instance // (). - virtual bool MouseMove ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ) = 0; - virtual bool MouseButtonDown ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ) = 0; - virtual bool MouseButtonUp ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ) = 0; - virtual bool KeyInput ( IAbstractTableControl& _rControl, const KeyEvent& rKEvt ) = 0; - virtual bool GetFocus ( IAbstractTableControl& _rControl ) = 0; - virtual bool LoseFocus ( IAbstractTableControl& _rControl ) = 0; - virtual bool RequestHelp ( IAbstractTableControl& _rControl, const HelpEvent& rHEvt ) = 0; - virtual bool Command ( IAbstractTableControl& _rControl, const CommandEvent& rCEvt ) = 0; - virtual bool PreNotify ( IAbstractTableControl& _rControl, NotifyEvent& rNEvt ) = 0; - virtual bool Notify ( IAbstractTableControl& _rControl, NotifyEvent& rNEvt ) = 0; + virtual bool MouseMove ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0; + virtual bool MouseButtonDown ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0; + virtual bool MouseButtonUp ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0; + virtual bool KeyInput ( ITableControl& _rControl, const KeyEvent& rKEvt ) = 0; + virtual bool GetFocus ( ITableControl& _rControl ) = 0; + virtual bool LoseFocus ( ITableControl& _rControl ) = 0; + virtual bool RequestHelp ( ITableControl& _rControl, const HelpEvent& rHEvt ) = 0; + virtual bool Command ( ITableControl& _rControl, const CommandEvent& rCEvt ) = 0; + virtual bool PreNotify ( ITableControl& _rControl, NotifyEvent& rNEvt ) = 0; + virtual bool Notify ( ITableControl& _rControl, NotifyEvent& rNEvt ) = 0; virtual ~ITableInputHandler() { } }; diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index 9f170c929eba..e8e4c3e178d0 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -28,7 +28,7 @@ #include "precompiled_svtools.hxx" #include "svtools/table/defaultinputhandler.hxx" -#include "svtools/table/abstracttablecontrol.hxx" +#include "svtools/table/tablecontrolinterface.hxx" #include #include @@ -61,7 +61,7 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseMove( IAbstractTableControl& _rControl, const MouseEvent& _rMEvt ) + bool DefaultInputHandler::MouseMove( ITableControl& _rControl, const MouseEvent& _rMEvt ) { Point aPoint = _rMEvt.GetPosPixel(); if ( m_bResize ) @@ -73,7 +73,7 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseButtonDown( IAbstractTableControl& _rControl, const MouseEvent& _rMEvt ) + bool DefaultInputHandler::MouseButtonDown( ITableControl& _rControl, const MouseEvent& _rMEvt ) { bool bHandled = false; Point aPoint = _rMEvt.GetPosPixel(); @@ -111,7 +111,7 @@ namespace svt { namespace table return bHandled; } //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseButtonUp( IAbstractTableControl& _rControl, const MouseEvent& _rMEvt ) + bool DefaultInputHandler::MouseButtonUp( ITableControl& _rControl, const MouseEvent& _rMEvt ) { bool bHandled = false; const Point aPoint = _rMEvt.GetPosPixel(); @@ -135,7 +135,7 @@ namespace svt { namespace table return bHandled; } //-------------------------------------------------------------------- - bool DefaultInputHandler::KeyInput( IAbstractTableControl& _rControl, const KeyEvent& rKEvt ) + bool DefaultInputHandler::KeyInput( ITableControl& _rControl, const KeyEvent& rKEvt ) { bool bHandled = false; @@ -184,21 +184,21 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - bool DefaultInputHandler::GetFocus( IAbstractTableControl& _rControl ) + bool DefaultInputHandler::GetFocus( ITableControl& _rControl ) { _rControl.showCursor(); return false; // continue processing } //-------------------------------------------------------------------- - bool DefaultInputHandler::LoseFocus( IAbstractTableControl& _rControl ) + bool DefaultInputHandler::LoseFocus( ITableControl& _rControl ) { _rControl.hideCursor(); return false; // continue processing } //-------------------------------------------------------------------- - bool DefaultInputHandler::RequestHelp( IAbstractTableControl& _rControl, const HelpEvent& _rHEvt ) + bool DefaultInputHandler::RequestHelp( ITableControl& _rControl, const HelpEvent& _rHEvt ) { (void)_rControl; (void)_rHEvt; @@ -207,7 +207,7 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - bool DefaultInputHandler::Command( IAbstractTableControl& _rControl, const CommandEvent& _rCEvt ) + bool DefaultInputHandler::Command( ITableControl& _rControl, const CommandEvent& _rCEvt ) { (void)_rControl; (void)_rCEvt; @@ -216,7 +216,7 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - bool DefaultInputHandler::PreNotify( IAbstractTableControl& _rControl, NotifyEvent& _rNEvt ) + bool DefaultInputHandler::PreNotify( ITableControl& _rControl, NotifyEvent& _rNEvt ) { (void)_rControl; (void)_rNEvt; @@ -225,7 +225,7 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - bool DefaultInputHandler::Notify( IAbstractTableControl& _rControl, NotifyEvent& _rNEvt ) + bool DefaultInputHandler::Notify( ITableControl& _rControl, NotifyEvent& _rNEvt ) { (void)_rControl; (void)_rNEvt; diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 1b6027b71324..74f4a901ecb8 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -27,34 +27,40 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "svtools/table/tablecontrol.hxx" #include "tablegeometry.hxx" #include "tablecontrol_impl.hxx" #include "accessibletableimp.hxx" + +#include "svtools/table/tablecontrol.hxx" #include "svtools/table/tabledatawindow.hxx" + #include #include +#include + using namespace ::com::sun::star::uno; using ::com::sun::star::accessibility::XAccessible; using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::lang; using namespace utl; -//using namespace rtl; -//........................................................................ + +//...................................................................................................................... namespace svt { namespace table { - //==================================================================== +//...................................................................................................................... + + //================================================================================================================== //= AccessibleTableControl_Impl - //==================================================================== - // ---------------------------------------------------------------------------- + //================================================================================================================== + // ----------------------------------------------------------------------------------------------------------------- Reference< XAccessible > AccessibleTableControl_Impl::getAccessibleTableHeader( AccessibleTableControlObjType _eObjType ) { if ( m_pAccessible && m_pAccessible->isAlive() ) return m_pAccessible->getTableHeader( _eObjType ); return NULL; } - // ---------------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- Reference< XAccessible > AccessibleTableControl_Impl::getAccessibleTable( ) { if ( m_pAccessible && m_pAccessible->isAlive() ) @@ -62,10 +68,10 @@ namespace svt { namespace table return NULL; } - //==================================================================== + //================================================================================================================== //= TableControl - //==================================================================== - //-------------------------------------------------------------------- + //================================================================================================================== + // ----------------------------------------------------------------------------------------------------------------- TableControl::TableControl( Window* _pParent, WinBits _nStyle ) :Control( _pParent, _nStyle ) ,m_pImpl( new TableControl_Impl( *this ) ) @@ -83,7 +89,7 @@ namespace svt { namespace table SetFillColor( aWindowColor ); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- TableControl::~TableControl() { ImplCallEventListeners( VCLEVENT_OBJECT_DYING ); @@ -95,21 +101,21 @@ namespace svt { namespace table m_pAccessTable->m_pAccessible->dispose(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- void TableControl::GetFocus() { if ( !m_pImpl->getInputHandler()->GetFocus( *m_pImpl ) ) Control::GetFocus(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- void TableControl::LoseFocus() { if ( !m_pImpl->getInputHandler()->LoseFocus( *m_pImpl ) ) Control::LoseFocus(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- void TableControl::KeyInput( const KeyEvent& rKEvt ) { if ( !m_pImpl->getInputHandler()->KeyInput( *m_pImpl, rKEvt ) ) @@ -125,7 +131,7 @@ namespace svt { namespace table } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- void TableControl::StateChanged( StateChangedType i_nStateChange ) { Control::StateChanged( i_nStateChange ); @@ -156,66 +162,69 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- void TableControl::Resize() { Control::Resize(); m_pImpl->onResize(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- void TableControl::SetModel( PTableModel _pModel ) { m_pImpl->setModel( _pModel ); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- PTableModel TableControl::GetModel() const { return m_pImpl->getModel(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- RowPos TableControl::GetTopRow() const { return m_pImpl->getTopRow(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- void TableControl::SetTopRow( RowPos _nRow ) { - // TODO - (void)_nRow; + OSL_ENSURE( false, "TableControl::SetTopRow: not implemented!" ); + OSL_UNUSED( _nRow ); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- sal_Int32 TableControl::GetCurrentRow() const { return m_pImpl->getCurRow(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- sal_Int32 TableControl::GetCurrentColumn() const { return m_pImpl->getCurColumn(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- bool TableControl::GoTo( ColPos _nColumn, RowPos _nRow ) { return m_pImpl->goTo( _nColumn, _nRow ); } - //-------------------------------------------------------------------- + + // ----------------------------------------------------------------------------------------------------------------- sal_Bool TableControl::GoToCell(sal_Int32 _nColPos, sal_Int32 _nRowPos) { return m_pImpl->goTo( _nColPos, _nRowPos ); } - //-------------------------------------------------------------------- + + // ----------------------------------------------------------------------------------------------------------------- void TableControl::clearSelection() { m_pImpl->clearSelection(); } - //-------------------------------------------------------------------- + + // ----------------------------------------------------------------------------------------------------------------- void TableControl::InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved) { Rectangle _rRect; @@ -232,36 +241,38 @@ namespace svt { namespace table m_pImpl->invalidateRow(_nRowStart, _rRect); } } - //-------------------------------------------------------------------- + + // ----------------------------------------------------------------------------------------------------------------- std::vector& TableControl::GetSelectedRows() { return m_pImpl->getSelectedRows(); } - //-------------------------------------------------------------------- + + // ----------------------------------------------------------------------------------------------------------------- void TableControl::RemoveSelectedRow(RowPos _nRowPos) { m_pImpl->removeSelectedRow(_nRowPos); } - //-------------------------------------------------------------------- - IAbstractTableControl& TableControl::getTableControlInterface() + // ----------------------------------------------------------------------------------------------------------------- + ITableControl& TableControl::getTableControlInterface() { return *m_pImpl; } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- SelectionEngine* TableControl::getSelEngine() { return m_pImpl->getSelEngine(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- TableDataWindow* TableControl::getDataWindow() { return m_pImpl->getDataWindow(); } - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------------------------- Reference< XAccessible > TableControl::CreateAccessible() { Window* pParent = GetAccessibleParentWindow(); @@ -320,285 +331,321 @@ namespace svt { namespace table } return aRetText; } -// ----------------------------------------------------------------------------- -::rtl::OUString TableControl::GetAccessibleObjectDescription( AccessibleTableControlObjType eObjType, sal_Int32 ) const -{ - ::rtl::OUString aRetText; - switch( eObjType ) + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString TableControl::GetAccessibleObjectDescription( AccessibleTableControlObjType eObjType, sal_Int32 ) const { - case TCTYPE_GRIDCONTROL: - aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GridControl description" ) ); - break; - case TCTYPE_TABLE: - aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLE description" ) ); - break; - case TCTYPE_ROWHEADERBAR: - aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERBAR description" ) ); - break; - case TCTYPE_COLUMNHEADERBAR: - aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERBAR description" ) ); - break; - case TCTYPE_TABLECELL: - aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLECELL description" ) ); - break; - case TCTYPE_ROWHEADERCELL: - aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERCELL description" ) ); - break; - case TCTYPE_COLUMNHEADERCELL: - aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERCELL description" ) ); - break; + ::rtl::OUString aRetText; + switch( eObjType ) + { + case TCTYPE_GRIDCONTROL: + aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GridControl description" ) ); + break; + case TCTYPE_TABLE: + aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLE description" ) ); + break; + case TCTYPE_ROWHEADERBAR: + aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERBAR description" ) ); + break; + case TCTYPE_COLUMNHEADERBAR: + aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERBAR description" ) ); + break; + case TCTYPE_TABLECELL: + aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLECELL description" ) ); + break; + case TCTYPE_ROWHEADERCELL: + aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERCELL description" ) ); + break; + case TCTYPE_COLUMNHEADERCELL: + aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERCELL description" ) ); + break; + } + return aRetText; } - return aRetText; -} -// ----------------------------------------------------------------------------- -::rtl::OUString TableControl::GetRowDescription( sal_Int32 _nRow) const -{ - (void)_nRow; - return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "row description" ) ); -} -// ----------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString TableControl::GetRowDescription( sal_Int32 _nRow) const + { + (void)_nRow; + return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "row description" ) ); + } -::rtl::OUString TableControl::GetRowName( sal_Int32 _nIndex) const -{ - return GetModel()->getRowHeader( _nIndex ); -} -// ----------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString TableControl::GetRowName( sal_Int32 _nIndex) const + { + return GetModel()->getRowHeader( _nIndex ); + } -::rtl::OUString TableControl::GetColumnDescription( sal_uInt16 _nColumn) const -{ - (void)_nColumn; - return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "col description" ) ); -} -// ----------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString TableControl::GetColumnDescription( sal_uInt16 _nColumn) const + { + (void)_nColumn; + return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "col description" ) ); + } -::rtl::OUString TableControl::GetColumnName( sal_Int32 _nIndex) const -{ - return GetModel()->getColumnModel(_nIndex)->getName(); -} + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString TableControl::GetColumnName( sal_Int32 _nIndex) const + { + return GetModel()->getColumnModel(_nIndex)->getName(); + } -// ----------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + ::com::sun::star::uno::Any TableControl::GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos ) const + { + Any aCellContent; + GetModel()->getCellContent( _nColPos, _nRowPos, aCellContent ); + return aCellContent; + } -::com::sun::star::uno::Any TableControl::GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos ) const -{ - Any aCellContent; - GetModel()->getCellContent( _nColPos, _nRowPos, aCellContent ); - return aCellContent; -} + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) const + { + return m_pImpl->getCellContentAsString( _nRowPos, _nColPos ); + } -// ----------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void TableControl::FillAccessibleStateSet( + ::utl::AccessibleStateSetHelper& rStateSet, + AccessibleTableControlObjType eObjType ) const + { + switch( eObjType ) + { + case TCTYPE_GRIDCONTROL: + case TCTYPE_TABLE: -::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) const -{ - return m_pImpl->getCellContentAsString( _nRowPos, _nColPos ); -} -// ----------------------------------------------------------------------------- + rStateSet.AddState( AccessibleStateType::FOCUSABLE ); + rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE); + if ( HasFocus() ) + rStateSet.AddState( AccessibleStateType::FOCUSED ); + if ( IsActive() ) + rStateSet.AddState( AccessibleStateType::ACTIVE ); + if ( IsEnabled() ) + rStateSet.AddState( AccessibleStateType::ENABLED ); + if ( IsReallyVisible() ) + rStateSet.AddState( AccessibleStateType::VISIBLE ); + rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS ); -void TableControl::FillAccessibleStateSet( - ::utl::AccessibleStateSetHelper& rStateSet, - AccessibleTableControlObjType eObjType ) const -{ - switch( eObjType ) - { - case TCTYPE_GRIDCONTROL: - case TCTYPE_TABLE: - - rStateSet.AddState( AccessibleStateType::FOCUSABLE ); - rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE); - if ( HasFocus() ) - rStateSet.AddState( AccessibleStateType::FOCUSED ); - if ( IsActive() ) - rStateSet.AddState( AccessibleStateType::ACTIVE ); - if ( IsEnabled() ) - rStateSet.AddState( AccessibleStateType::ENABLED ); - if ( IsReallyVisible() ) + break; + case TCTYPE_ROWHEADERBAR: + rStateSet.AddState( AccessibleStateType::VISIBLE ); + rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS ); + break; + case TCTYPE_COLUMNHEADERBAR: + rStateSet.AddState( AccessibleStateType::VISIBLE ); + rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS ); + break; + case TCTYPE_TABLECELL: + { + rStateSet.AddState( AccessibleStateType::TRANSIENT ); + rStateSet.AddState( AccessibleStateType::SELECTABLE); + if( GetSelectedRowCount()>0) + rStateSet.AddState( AccessibleStateType::SELECTED); + } + break; + case TCTYPE_ROWHEADERCELL: rStateSet.AddState( AccessibleStateType::VISIBLE ); - rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS ); - - break; - case TCTYPE_ROWHEADERBAR: - rStateSet.AddState( AccessibleStateType::VISIBLE ); - rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS ); - break; - case TCTYPE_COLUMNHEADERBAR: - rStateSet.AddState( AccessibleStateType::VISIBLE ); - rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS ); - break; - case TCTYPE_TABLECELL: - { rStateSet.AddState( AccessibleStateType::TRANSIENT ); - rStateSet.AddState( AccessibleStateType::SELECTABLE); - if( GetSelectedRowCount()>0) - rStateSet.AddState( AccessibleStateType::SELECTED); - } - break; - case TCTYPE_ROWHEADERCELL: - rStateSet.AddState( AccessibleStateType::VISIBLE ); - rStateSet.AddState( AccessibleStateType::TRANSIENT ); - break; - case TCTYPE_COLUMNHEADERCELL: - rStateSet.AddState( AccessibleStateType::VISIBLE ); - break; + break; + case TCTYPE_COLUMNHEADERCELL: + rStateSet.AddState( AccessibleStateType::VISIBLE ); + break; + } } -} -Rectangle TableControl::GetWindowExtentsRelative( Window *pRelativeWindow ) const -{ - return Control::GetWindowExtentsRelative( pRelativeWindow ); -} -//----------------------------------------------------------------------------- -void TableControl::GrabFocus() -{ - Control::GrabFocus(); -} -// ----------------------------------------------------------------------------- -Reference< XAccessible > TableControl::GetAccessible( BOOL bCreate ) -{ - return Control::GetAccessible( bCreate ); -} -// ----------------------------------------------------------------------------- -Window* TableControl::GetAccessibleParentWindow() const -{ - return Control::GetAccessibleParentWindow(); -} -// ----------------------------------------------------------------------------- -Window* TableControl::GetWindowInstance() -{ - return this; -} + //------------------------------------------------------------------------------------------------------------------ + Rectangle TableControl::GetWindowExtentsRelative( Window *pRelativeWindow ) const + { + return Control::GetWindowExtentsRelative( pRelativeWindow ); + } -sal_Bool TableControl::HasRowHeader() -{ - return GetModel()->hasRowHeaders(); -} -//-------------------------------------------------------------------------------- -sal_Bool TableControl::HasColHeader() -{ - return GetModel()->hasColumnHeaders(); -} -//-------------------------------------------------------------------------------- -sal_Int32 TableControl::GetAccessibleControlCount() const -{ - sal_Int32 count = 0; - if(GetRowCount()>0) - count+=1; - if(GetModel()->hasRowHeaders()) - count+=1; - if(GetModel()->hasColumnHeaders()) - count+=1; - return count; -} -sal_Bool TableControl::ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint ) -{ - sal_Int32 nRow = m_pImpl->getRowAtPoint( _rPoint ); - sal_Int32 nCol = m_pImpl->getColAtPoint( _rPoint ); - _rnIndex = nRow * GetColumnCount() + nCol; - return nRow >= 0 ? sal_True : sal_False; -} + //------------------------------------------------------------------------------------------------------------------ + void TableControl::GrabFocus() + { + Control::GrabFocus(); + } -long TableControl::GetRowCount() const -{ - return m_pImpl->getRowCount(); -} -long TableControl::GetColumnCount() const -{ - return m_pImpl->getColumnCount(); -} -sal_Bool TableControl::HasRowHeader() const -{ - PTableModel pModel = GetModel(); - return pModel->hasRowHeaders(); -} -sal_Int32 TableControl::GetSelectedRowCount() const -{ - return m_pImpl->getSelectedRows().size(); -} -bool TableControl::IsRowSelected( long _nRow ) const -{ - return m_pImpl->isRowSelected(m_pImpl->getSelectedRows(), _nRow); -} -sal_Bool TableControl::ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) -{ - _rnRow = m_pImpl->getRowAtPoint( _rPoint ); - _rnColPos = m_pImpl->getColAtPoint( _rPoint ); - return _rnRow >= 0 ? sal_True : sal_False; -} -void TableControl::FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const -{ - if ( GetCurrentRow() == _nRow && GetCurrentColumn() == _nColumnPos ) - _rStateSet.AddState( AccessibleStateType::FOCUSED ); - else // only transient when column is not focused - _rStateSet.AddState( AccessibleStateType::TRANSIENT ); -} -Rectangle TableControl::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) -{ - (void)_nRow; - (void)_nColumnPos; - return GetCharacterBounds(nIndex); -} -sal_Int32 TableControl::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) -{ - (void)_nRow; - (void)_nColumnPos; - return GetIndexForPoint(_rPoint); -; -} - // ----------------------------------------------------------------------------- -sal_Bool TableControl::isAccessibleAlive( ) const -{ - return ( NULL != m_pAccessTable->m_pAccessible ) && m_pAccessTable->m_pAccessible->isAlive(); -} + //------------------------------------------------------------------------------------------------------------------ + Reference< XAccessible > TableControl::GetAccessible( BOOL bCreate ) + { + return Control::GetAccessible( bCreate ); + } -// ----------------------------------------------------------------------------- -::svt::IAccessibleFactory& TableControl::getAccessibleFactory() -{ - return m_pAccessTable->m_aFactoryAccess.getFactory(); -} -// ----------------------------------------------------------------------------- -void TableControl::commitGridControlEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue ) -{ - if ( isAccessibleAlive() ) - m_pAccessTable->m_pAccessible->commitEvent( _nEventId, _rNewValue, _rOldValue); -} -// ----------------------------------------------------------------------------- -Rectangle TableControl::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen) -{ - (void)_bOnScreen; - return m_pImpl->calcHeaderRect(_bIsColumnBar); -} -// ----------------------------------------------------------------------------- -Rectangle TableControl::calcTableRect(BOOL _bOnScreen) -{ - (void)_bOnScreen; - return m_pImpl->calcTableRect(); -} -// ----------------------------------------------------------------------- -void TableControl::selectionChanged(bool _bChanged) -{ - m_bSelectionChanged = _bChanged; -} -// ----------------------------------------------------------------------- -IMPL_LINK( TableControl, ImplSelectHdl, void*, EMPTYARG ) -{ - Select(); - return 1; -} -IMPL_LINK( TableControl, ImplMouseButtonDownHdl, MouseEvent*, pData ) -{ - CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pData ); - return 1; -} -IMPL_LINK( TableControl, ImplMouseButtonUpHdl, MouseEvent*, pData ) -{ - CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, pData ); - return 1; -} -// ----------------------------------------------------------------------- -void TableControl::Select() -{ - ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_aSelectHdl, this ); -} -//........................................................................ + //------------------------------------------------------------------------------------------------------------------ + Window* TableControl::GetAccessibleParentWindow() const + { + return Control::GetAccessibleParentWindow(); + } + + //------------------------------------------------------------------------------------------------------------------ + Window* TableControl::GetWindowInstance() + { + return this; + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool TableControl::HasRowHeader() + { + return GetModel()->hasRowHeaders(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool TableControl::HasColHeader() + { + return GetModel()->hasColumnHeaders(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Int32 TableControl::GetAccessibleControlCount() const + { + sal_Int32 count = 0; + if(GetRowCount()>0) + count+=1; + if(GetModel()->hasRowHeaders()) + count+=1; + if(GetModel()->hasColumnHeaders()) + count+=1; + return count; + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool TableControl::ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint ) + { + sal_Int32 nRow = m_pImpl->getRowAtPoint( _rPoint ); + sal_Int32 nCol = m_pImpl->getColAtPoint( _rPoint ); + _rnIndex = nRow * GetColumnCount() + nCol; + return nRow >= 0 ? sal_True : sal_False; + } + + //------------------------------------------------------------------------------------------------------------------ + long TableControl::GetRowCount() const + { + return GetModel()->getRowCount(); + } + + //------------------------------------------------------------------------------------------------------------------ + long TableControl::GetColumnCount() const + { + return GetModel()->getColumnCount(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool TableControl::HasRowHeader() const + { + return GetModel()->hasRowHeaders(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Int32 TableControl::GetSelectedRowCount() const + { + return m_pImpl->getSelectedRows().size(); + } + + //------------------------------------------------------------------------------------------------------------------ + bool TableControl::IsRowSelected( long _nRow ) const + { + return m_pImpl->isRowSelected(m_pImpl->getSelectedRows(), _nRow); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool TableControl::ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) + { + _rnRow = m_pImpl->getRowAtPoint( _rPoint ); + _rnColPos = m_pImpl->getColAtPoint( _rPoint ); + return _rnRow >= 0 ? sal_True : sal_False; + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl::FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const + { + if ( GetCurrentRow() == _nRow && GetCurrentColumn() == _nColumnPos ) + _rStateSet.AddState( AccessibleStateType::FOCUSED ); + else // only transient when column is not focused + _rStateSet.AddState( AccessibleStateType::TRANSIENT ); + } + + //------------------------------------------------------------------------------------------------------------------ + Rectangle TableControl::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) + { + (void)_nRow; + (void)_nColumnPos; + return GetCharacterBounds(nIndex); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Int32 TableControl::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) + { + (void)_nRow; + (void)_nColumnPos; + return GetIndexForPoint(_rPoint); + ; + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool TableControl::isAccessibleAlive( ) const + { + return ( NULL != m_pAccessTable->m_pAccessible ) && m_pAccessTable->m_pAccessible->isAlive(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::svt::IAccessibleFactory& TableControl::getAccessibleFactory() + { + return m_pAccessTable->m_aFactoryAccess.getFactory(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl::commitGridControlEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue ) + { + if ( isAccessibleAlive() ) + m_pAccessTable->m_pAccessible->commitEvent( _nEventId, _rNewValue, _rOldValue); + } + + //------------------------------------------------------------------------------------------------------------------ + Rectangle TableControl::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen) + { + (void)_bOnScreen; + return m_pImpl->calcHeaderRect(_bIsColumnBar); + } + + //------------------------------------------------------------------------------------------------------------------ + Rectangle TableControl::calcTableRect(BOOL _bOnScreen) + { + (void)_bOnScreen; + return m_pImpl->calcTableRect(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl::selectionChanged(bool _bChanged) + { + m_bSelectionChanged = _bChanged; + } + + //------------------------------------------------------------------------------------------------------------------ + IMPL_LINK( TableControl, ImplSelectHdl, void*, EMPTYARG ) + { + Select(); + return 1; + } + + //------------------------------------------------------------------------------------------------------------------ + IMPL_LINK( TableControl, ImplMouseButtonDownHdl, MouseEvent*, pData ) + { + CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pData ); + return 1; + } + + //------------------------------------------------------------------------------------------------------------------ + IMPL_LINK( TableControl, ImplMouseButtonUpHdl, MouseEvent*, pData ) + { + CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, pData ); + return 1; + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl::Select() + { + ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_aSelectHdl, this ); + } + +//...................................................................................................................... }} // namespace svt::table -//........................................................................ +//...................................................................................................................... diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index ef217527cdff..4a4b087fcaf3 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -45,10 +45,10 @@ #include -//........................................................................ +//...................................................................................................................... namespace svt { namespace table { -//........................................................................ +//...................................................................................................................... //==================================================================== //= TempHideCursor @@ -56,10 +56,10 @@ namespace svt { namespace table class TempHideCursor { private: - IAbstractTableControl& m_rTable; + ITableControl& m_rTable; public: - TempHideCursor( IAbstractTableControl& _rTable ) + TempHideCursor( ITableControl& _rTable ) :m_rTable( _rTable ) { m_rTable.hideCursor(); @@ -258,7 +258,7 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ const sal_Char* TableControl_Impl::impl_checkInvariants() const { if ( !m_pModel ) @@ -359,7 +359,7 @@ namespace svt { namespace table #define DBG_CHECK_ME() \ DBG_CHKTHIS( TableControl_Impl, TableControl_Impl_checkInvariants ) - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableControl_Impl::TableControl_Impl( TableControl& _rAntiImpl ) :m_rAntiImpl ( _rAntiImpl ) ,m_pModel ( new EmptyTableModel ) @@ -397,7 +397,7 @@ namespace svt { namespace table m_pDataWindow->Show(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableControl_Impl::~TableControl_Impl() { DBG_DTOR( TableControl_Impl, TableControl_Impl_checkInvariants ); @@ -410,17 +410,7 @@ namespace svt { namespace table DELETEZ( m_pDataWindow ); } - //-------------------------------------------------------------------- - PTableModel TableControl_Impl::getModel() const - { - if ( dynamic_cast< const EmptyTableModel* >( m_pModel.get() ) != NULL ) - // if it's an EmptyTableModel, pretend that there is no model - return PTableModel(); - - return m_pModel; - } - - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::setModel( PTableModel _pModel ) { DBG_CHECK_ME(); @@ -451,7 +441,7 @@ namespace svt { namespace table if ( m_nColumnCount ) m_nCurColumn = 0; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::rowsInserted( RowPos first, RowPos last ) { OSL_ENSURE( false, "TableControl_Impl::rowsInserted: not implemented!" ); @@ -460,7 +450,7 @@ namespace svt { namespace table OSL_UNUSED( last ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::rowsRemoved( RowPos first, RowPos last ) { OSL_ENSURE( false, "TableControl_Impl::rowsRemoved: not implemented!" ); @@ -469,7 +459,7 @@ namespace svt { namespace table OSL_UNUSED( last ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::columnsInserted( ColPos i_first, ColPos i_last ) { m_nColumnCount = m_pModel->getColumnCount(); @@ -482,7 +472,7 @@ namespace svt { namespace table OSL_UNUSED( i_last ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::columnsRemoved( ColPos i_first, ColPos i_last ) { m_nColumnCount = m_pModel->getColumnCount(); @@ -495,7 +485,7 @@ namespace svt { namespace table OSL_UNUSED( i_last ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::columnMoved( ColPos oldIndex, ColPos newIndex ) { OSL_ENSURE( false, "TableControl_Impl::columnMoved: not implemented!" ); @@ -504,7 +494,7 @@ namespace svt { namespace table OSL_UNUSED( newIndex ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ) { OSL_ENSURE( false, "TableControl_Impl::cellsUpdated: not implemented!" ); @@ -515,7 +505,7 @@ namespace svt { namespace table OSL_UNUSED( lastRow ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_invalidateColumn( ColPos const i_column ) { DBG_CHECK_ME(); @@ -528,7 +518,7 @@ namespace svt { namespace table m_rAntiImpl.Invalidate( aColumn.getRect() ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ) { ColumnAttributeGroup nGroup( i_attributeGroup ); @@ -550,7 +540,7 @@ namespace svt { namespace table "TableControl_Impl::columnChanged: don't know how to handle this change!" ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const { DBG_CHECK_ME(); @@ -587,7 +577,7 @@ namespace svt { namespace table - 1; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_getAllVisibleDataCellArea( Rectangle& _rCellArea ) const { DBG_CHECK_ME(); @@ -597,7 +587,7 @@ namespace svt { namespace table _rCellArea.Top() = m_nColHeaderHeightPixel; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_ni_updateCachedModelValues() { m_nRowHeightPixel = 15; @@ -622,7 +612,7 @@ namespace svt { namespace table m_nRowCount = m_pModel->getRowCount(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_ni_updateColumnWidths() { ENSURE_OR_RETURN_VOID( !m_bUpdatingColWidths, "TableControl_Impl::impl_ni_updateColumnWidths: recursive call detected!" ); @@ -765,10 +755,10 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ namespace { - //................................................................ + //.............................................................................................................. /// determines whether a scrollbar is needed for the given values bool lcl_determineScrollbarNeed( long const i_position, ScrollbarVisibility const i_visibility, long const i_availableSpace, long const i_neededSpace ) @@ -784,7 +774,7 @@ namespace svt { namespace table return true; } - //................................................................ + //.............................................................................................................. void lcl_setButtonRepeat( Window& _rWindow, ULONG _nDelay ) { AllSettings aSettings = _rWindow.GetSettings(); @@ -796,7 +786,7 @@ namespace svt { namespace table _rWindow.SetSettings( aSettings, TRUE ); } - //................................................................ + //.............................................................................................................. void lcl_updateScrollbar( Window& _rParent, ScrollBar*& _rpBar, bool const i_needBar, long _nVisibleUnits, long _nPosition, long _nLineSize, long _nRange, @@ -834,7 +824,7 @@ namespace svt { namespace table } } - //................................................................ + //.............................................................................................................. /** returns the number of rows fitting into the given range, for the given row height. Partially fitting rows are counted, too, if the respective parameter says so. @@ -846,7 +836,7 @@ namespace svt { namespace table : _nOverallHeight / _nRowHeightPixel; } - //................................................................ + //.............................................................................................................. /** returns the number of columns fitting into the given area, with the first visible column as given. Partially fitting columns are counted, too, if the respective parameter says so. @@ -871,7 +861,7 @@ namespace svt { namespace table } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_ni_updateScrollbars() { TempHideCursor aHideCursor( *this ); @@ -1013,7 +1003,7 @@ namespace svt { namespace table ) ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::onResize() { DBG_CHECK_ME(); @@ -1046,7 +1036,7 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::doPaintContent( const Rectangle& _rUpdateRect ) { DBG_CHECK_ME(); @@ -1202,7 +1192,7 @@ namespace svt { namespace table } } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::hideCursor() { DBG_CHECK_ME(); @@ -1211,7 +1201,7 @@ namespace svt { namespace table impl_ni_doSwitchCursor( false ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::showCursor() { DBG_CHECK_ME(); @@ -1221,7 +1211,7 @@ namespace svt { namespace table impl_ni_doSwitchCursor( true ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool TableControl_Impl::dispatchAction( TableControlAction _eAction ) { DBG_CHECK_ME(); @@ -1600,7 +1590,7 @@ namespace svt { namespace table return bSuccess; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_ni_doSwitchCursor( bool _bShow ) { PTableRenderer pRenderer = !!m_pModel ? m_pModel->getRenderer() : PTableRenderer(); @@ -1617,7 +1607,7 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, Rectangle& _rCellRect ) const { DBG_CHECK_ME(); @@ -1638,7 +1628,8 @@ namespace svt { namespace table _rCellRect = aCell.getRect(); _rCellRect.Top()--;_rCellRect.Left()--; } - //------------------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ RowPos TableControl_Impl::getRowAtPoint( const Point& rPoint ) { DBG_CHECK_ME(); @@ -1659,7 +1650,7 @@ namespace svt { namespace table return ROW_INVALID; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ ColPos TableControl_Impl::getColAtPoint( const Point& rPoint ) { DBG_CHECK_ME(); @@ -1681,7 +1672,13 @@ namespace svt { namespace table return COL_INVALID; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + PTableModel TableControl_Impl::getModel() const + { + return m_pModel; + } + + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::activateCellAt(const Point& rPoint) { DBG_CHECK_ME(); @@ -1698,7 +1695,7 @@ namespace svt { namespace table ensureVisible( m_nCurColumn, m_nCurRow, true ); } } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect) { DBG_CHECK_ME(); @@ -1735,7 +1732,7 @@ namespace svt { namespace table } m_pDataWindow->Invalidate(_rCellRect); } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ //this method is to be called, when a new row is added void TableControl_Impl::invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect) { @@ -1748,7 +1745,7 @@ namespace svt { namespace table impl_ni_updateScrollbars(); m_pDataWindow->Invalidate(_rRow.getRect()); } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ std::vector& TableControl_Impl::getSelectedRows() { return m_nRowSelected; @@ -1759,7 +1756,7 @@ namespace svt { namespace table m_nRowSelected.clear(); } //-------------------------------------------------------------------- - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::removeSelectedRow(RowPos _nRowPos) { int i =0; @@ -2027,44 +2024,44 @@ namespace svt { namespace table return (TableSize)( m_nLeftColumn - nOldLeftColumn ); } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableSize TableControl_Impl::impl_scrollColumns( TableSize const i_columnDelta ) { DBG_CHECK_ME(); return impl_ni_ScrollColumns( i_columnDelta ); } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ SelectionEngine* TableControl_Impl::getSelEngine() { return m_pSelEngine; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableDataWindow* TableControl_Impl::getDataWindow() { return m_pDataWindow; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ ScrollBar* TableControl_Impl::getHorzScrollbar() { return m_pHScroll; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ ScrollBar* TableControl_Impl::getVertScrollbar() { return m_pVScroll; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ BOOL TableControl_Impl::isRowSelected(const ::std::vector& selectedRows, RowPos current) { return ::std::find(selectedRows.begin(),selectedRows.end(),current) != selectedRows.end(); } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool TableControl_Impl::isRowSelected(RowPos current) { return ::std::find(m_nRowSelected.begin(),m_nRowSelected.end(),current) != m_nRowSelected.end(); } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ int TableControl_Impl::getRowSelectedNumber(const ::std::vector& selectedRows, RowPos current) { std::vector::const_iterator it = ::std::find(selectedRows.begin(),selectedRows.end(),current); @@ -2272,31 +2269,31 @@ namespace svt { namespace table return 0L; } - //--------------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableFunctionSet::TableFunctionSet(TableControl_Impl* _pTableControl) :m_pTableControl( _pTableControl) ,m_nCurrentRow (-2) { } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ TableFunctionSet::~TableFunctionSet() { } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::BeginDrag() { } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::CreateAnchor() { m_pTableControl->m_nAnchor = m_pTableControl->m_nCurRow; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::DestroyAnchor() { m_pTableControl->m_nAnchor = -1; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ BOOL TableFunctionSet::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor) { BOOL bHandled = FALSE; @@ -2379,7 +2376,7 @@ namespace svt { namespace table m_pTableControl->ensureVisible( newCol, newRow, true ); return bHandled; } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ BOOL TableFunctionSet::IsSelectionAtPoint( const Point& rPoint ) { m_pTableControl->m_pSelEngine->AddAlways(FALSE); @@ -2394,7 +2391,7 @@ namespace svt { namespace table return selected; } } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::DeselectAtPoint( const Point& rPoint ) { (void)rPoint; @@ -2413,7 +2410,7 @@ namespace svt { namespace table } m_pTableControl->m_nRowSelected.erase(m_pTableControl->m_nRowSelected.begin()+pos); } - //------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::DeselectAll() { if(!m_pTableControl->m_nRowSelected.empty()) @@ -2428,6 +2425,6 @@ namespace svt { namespace table } } -//........................................................................ +//...................................................................................................................... } } // namespace svt::table -//........................................................................ +//...................................................................................................................... diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 730b00b638b8..4f2a626324b2 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -28,7 +28,7 @@ #define SVTOOLS_TABLECONTROL_IMPL_HXX #include -#include +#include #include #include @@ -98,7 +98,7 @@ namespace svt { namespace table //==================================================================== //= TableControl_Impl //==================================================================== - class TableControl_Impl :public IAbstractTableControl + class TableControl_Impl :public ITableControl ,public ITableModelListener { friend class TableGeometry; @@ -173,7 +173,6 @@ namespace svt { namespace table public: - PTableModel getModel() const; void setModel( PTableModel _pModel ); inline const PTableInputHandler& getInputHandler() const { return m_pInputHandler; } @@ -182,8 +181,6 @@ namespace svt { namespace table inline RowPos getCurRow() const { return m_nCurRow; } inline void setCurRow(RowPos curRow){ m_nCurRow = curRow; } inline RowPos getTopRow() const { return m_nTopRow; } - inline long getRowCount() const { return m_nRowCount; } - inline long getColumnCount() const { return m_nColumnCount; } inline const TableControl& getAntiImpl() const { return m_rAntiImpl; } inline TableControl& getAntiImpl() { return m_rAntiImpl; } @@ -248,11 +245,12 @@ namespace svt { namespace table void invalidateRows(); void clearSelection(); - // IAbstractTableControl + // ITableControl virtual void hideCursor(); virtual void showCursor(); virtual bool dispatchAction( TableControlAction _eAction ); virtual SelectionEngine* getSelEngine(); + virtual PTableModel getModel() const; virtual void activateCellAt( const Point& rPoint ); virtual RowPos getRowAtPoint( const Point& rPoint ); virtual ColPos getColAtPoint( const Point& rPoint ); diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 2092a4bccdc9..456f6061bbbb 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -51,7 +51,7 @@ namespace svt { namespace table //-------------------------------------------------------------------- TableDataWindow::TableDataWindow( TableControl_Impl& _rTableControl ) :Window( &_rTableControl.getAntiImpl() ) - ,m_rTableControl ( _rTableControl ) + ,m_rTableControl( _rTableControl ) { // by default, use the background as determined by the style settings const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); @@ -91,22 +91,23 @@ namespace svt { namespace table USHORT const nHelpMode = rHEvt.GetMode(); if ( ( nHelpMode & HELPMODE_QUICK ) != 0 ) { + ITableControl& rTableControl = m_rTableControl; + PTableModel const pTableModel( rTableControl.getModel() ); + Point const aMousePos( m_rTableControl.getAntiImpl().ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); - RowPos const hitRow = m_rTableControl.getRowAtPoint( aMousePos ); - ColPos const hitCol = m_rTableControl.getColAtPoint( aMousePos ); + RowPos const hitRow = rTableControl.getRowAtPoint( aMousePos ); + ColPos const hitCol = rTableControl.getColAtPoint( aMousePos ); - if ( ( hitCol >= 0 ) && ( hitCol < m_rTableControl.getColumnCount() ) ) + if ( ( hitCol >= 0 ) && ( hitCol < pTableModel->getColumnCount() ) ) { ::rtl::OUString sHelpText; - PTableModel const pTableModel( m_rTableControl.getAntiImpl().GetModel() ); - if ( hitRow == ROW_COL_HEADERS ) { sHelpText = pTableModel->getColumnModel( hitCol )->getHelpText(); } - else if ( ( hitRow >= 0 ) && ( hitRow < m_rTableControl.getRowCount() ) ) + else if ( ( hitRow >= 0 ) && ( hitRow < pTableModel->getRowCount() ) ) { Any aCellToolTip; pTableModel->getCellToolTip( hitCol, hitRow, aCellToolTip ); diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index c2cf8faac548..ef714f16a780 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -30,7 +30,7 @@ #include "svtxgridcontrol.hxx" #include "accessibletableimp.hxx" #include -#include "svtools/table/abstracttablecontrol.hxx" +#include "svtools/table/tablecontrolinterface.hxx" #include "svtools/table/tablecontrol.hxx" #include "unocontroltablemodel.hxx" #include -- cgit From bba68ad15d79fc2fd58c7bdf75d8badc66253077 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 13:26:40 +0100 Subject: gridsort: IAbstractTableControl renamed to ITableControl, added a few more methods previously found at the TableControl_Impl only --- automation/source/server/statemnt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index a42f0fd67f95..89c59f8172af 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -83,7 +83,7 @@ #include #include #include -#include +#include #include #include // Hat keinen Includeschutz -- cgit From e73cc303e5201dc04c61a30572b80d3da13a2699 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 13:35:20 +0100 Subject: gridsort: Help::ShowQuickHelp: new flag QUICKHELP_FORCE_REPOSITION, which re-positions the window even if the quick help text didn't change. Use this in the table control, this prevents the help text appearing too far from the mouse position --- svtools/source/table/tabledatawindow.cxx | 2 +- vcl/inc/vcl/help.hxx | 21 +++++++++++---------- vcl/source/app/help.cxx | 16 ++++++++++------ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 456f6061bbbb..b357fd91abda 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -128,7 +128,7 @@ namespace svt { namespace table m_rTableControl.getAntiImpl().OutputToScreenPixel( Point( 0, 0 ) ), m_rTableControl.getAntiImpl().GetOutputSizePixel() ); - Help::ShowQuickHelp( &m_rTableControl.getAntiImpl(), aControlScreenRect, sHelpText ); + Help::ShowQuickHelp( &m_rTableControl.getAntiImpl(), aControlScreenRect, sHelpText, String(), QUICKHELP_FORCE_REPOSITION ); } } } diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx index 1f4ba36d8f43..e4f9aa45b139 100644 --- a/vcl/inc/vcl/help.hxx +++ b/vcl/inc/vcl/help.hxx @@ -40,16 +40,17 @@ class Window; // - Help-Types - // -------------- -#define QUICKHELP_LEFT ((USHORT)0x0001) -#define QUICKHELP_CENTER ((USHORT)0x0002) -#define QUICKHELP_RIGHT ((USHORT)0x0004) -#define QUICKHELP_TOP ((USHORT)0x0008) -#define QUICKHELP_VCENTER ((USHORT)0x0010) -#define QUICKHELP_BOTTOM ((USHORT)0x0020) -#define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM) -#define QUICKHELP_CTRLTEXT ((USHORT)0x0040) -#define QUICKHELP_NOEVADEPOINTER ((USHORT)0x4000) -#define QUICKHELP_BIDI_RTL ((USHORT)0x8000) +#define QUICKHELP_LEFT ((USHORT)0x0001) +#define QUICKHELP_CENTER ((USHORT)0x0002) +#define QUICKHELP_RIGHT ((USHORT)0x0004) +#define QUICKHELP_TOP ((USHORT)0x0008) +#define QUICKHELP_VCENTER ((USHORT)0x0010) +#define QUICKHELP_BOTTOM ((USHORT)0x0020) +#define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM) +#define QUICKHELP_CTRLTEXT ((USHORT)0x0040) +#define QUICKHELP_FORCE_REPOSITION ((USHORT)0x0080) +#define QUICKHELP_NOEVADEPOINTER ((USHORT)0x4000) +#define QUICKHELP_BIDI_RTL ((USHORT)0x8000) // By changes you must also change: rsc/vclrsc.hxx #define OOO_HELP_INDEX ".help:index" diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 2c7ad2fa9c3e..37e7917d5e78 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -590,10 +590,14 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle, { DBG_ASSERT( pHelpWin != pParent, "HelpInHelp ?!" ); - if ( (( pHelpWin->GetHelpText() != rHelpText ) || - ( pHelpWin->GetWinStyle() != nHelpWinStyle ) || - ( pHelpArea && ( pHelpWin->GetHelpArea() != *pHelpArea ) ) ) - && pSVData->maHelpData.mbRequestingHelp ) + if ( ( ( pHelpWin->GetHelpText() != rHelpText ) + || ( pHelpWin->GetWinStyle() != nHelpWinStyle ) + || ( pHelpArea + && ( pHelpWin->GetHelpArea() != *pHelpArea ) + ) + ) + && pSVData->maHelpData.mbRequestingHelp + ) { // remove help window if no HelpText or other HelpText or // other help mode. but keep it if we are scrolling, ie not requesting help @@ -605,8 +609,8 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle, } else { - bool bTextChanged = rHelpText != pHelpWin->GetHelpText(); - if( bTextChanged ) + bool const bTextChanged = rHelpText != pHelpWin->GetHelpText(); + if ( bTextChanged || ( ( nStyle & QUICKHELP_FORCE_REPOSITION ) != 0 ) ) { Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); -- cgit From 0bbace39b3f04c82ec8d38ef6aedef7d14fcafc4 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 14:00:09 +0100 Subject: gridsort: XGridControl: add methods to retrieve the current row/col --- .../inc/svtools/table/tablecontrolinterface.hxx | 12 +- svtools/source/table/tablecontrol.cxx | 6 +- svtools/source/table/tablecontrol_impl.cxx | 198 +++++++++++---------- svtools/source/table/tablecontrol_impl.hxx | 17 +- svtools/source/uno/svtxgridcontrol.cxx | 26 +++ svtools/source/uno/svtxgridcontrol.hxx | 2 + toolkit/source/controls/grid/gridcontrol.cxx | 14 ++ toolkit/source/controls/grid/gridcontrol.hxx | 4 +- 8 files changed, 168 insertions(+), 111 deletions(-) diff --git a/svtools/inc/svtools/table/tablecontrolinterface.hxx b/svtools/inc/svtools/table/tablecontrolinterface.hxx index c1ed1bf432b6..359fd65815ef 100644 --- a/svtools/inc/svtools/table/tablecontrolinterface.hxx +++ b/svtools/inc/svtools/table/tablecontrolinterface.hxx @@ -125,13 +125,19 @@ namespace svt { namespace table */ virtual PTableModel getModel() const = 0; + /// returns the index of the currently active column + virtual ColPos getCurrentColumn() const = 0; + + /// returns the index of the currently active row + virtual RowPos getCurrentRow() const = 0; + virtual void activateCellAt( const Point& rPoint ) = 0; - virtual RowPos getRowAtPoint( const Point& rPoint ) = 0; - virtual ColPos getColAtPoint( const Point& rPoint ) = 0; + virtual RowPos getRowAtPoint( const Point& rPoint ) const = 0; + virtual ColPos getColAtPoint( const Point& rPoint ) const = 0; virtual void resizeColumn(const Point& rPoint ) = 0; virtual bool checkResizeColumn(const Point& rPoint) = 0; virtual bool endResizeColumn(const Point& rPoint) = 0; - virtual bool isRowSelected(RowPos _nRow) = 0; + virtual bool isRowSelected( RowPos _nRow ) const = 0; virtual ~ITableControl() {}; }; diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 74f4a901ecb8..4c94be7f01f4 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -197,13 +197,13 @@ namespace svt { namespace table // ----------------------------------------------------------------------------------------------------------------- sal_Int32 TableControl::GetCurrentRow() const { - return m_pImpl->getCurRow(); + return m_pImpl->getCurrentRow(); } // ----------------------------------------------------------------------------------------------------------------- sal_Int32 TableControl::GetCurrentColumn() const { - return m_pImpl->getCurColumn(); + return m_pImpl->getCurrentColumn(); } // ----------------------------------------------------------------------------------------------------------------- @@ -543,7 +543,7 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ bool TableControl::IsRowSelected( long _nRow ) const { - return m_pImpl->isRowSelected(m_pImpl->getSelectedRows(), _nRow); + return m_pImpl->isRowSelected( _nRow ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 4a4b087fcaf3..ac2d41c122a4 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -379,7 +379,7 @@ namespace svt { namespace table ,m_pHScroll ( NULL ) ,m_pScrollCorner ( NULL ) ,m_pSelEngine ( ) - ,m_nRowSelected ( ) + ,m_aSelectedRows ( ) ,m_pTableFunctionSet ( new TableFunctionSet( this ) ) ,m_nAnchor (-1 ) ,m_bResizingColumn ( false ) @@ -1085,7 +1085,7 @@ namespace svt { namespace table if ( _rUpdateRect.GetIntersection( aCell.getRect() ).IsEmpty() ) continue; - bool isActiveColumn = ( aCell.getColumn() == getCurColumn() ); + bool isActiveColumn = ( aCell.getColumn() == getCurrentColumn() ); bool isSelectedColumn = false; pRenderer->PaintColumnHeader( aCell.getColumn(), isActiveColumn, isSelectedColumn, *m_pDataWindow, aCell.getRect(), rStyle ); @@ -1142,12 +1142,12 @@ namespace svt { namespace table { if ( _rUpdateRect.GetIntersection( aRowIterator.getRect() ).IsEmpty() ) continue; - bool isActiveRow = ( aRowIterator.getRow() == getCurRow() ); + bool isActiveRow = ( aRowIterator.getRow() == getCurrentRow() ); bool isSelectedRow = false; - if(!m_nRowSelected.empty()) + if(!m_aSelectedRows.empty()) { - for(std::vector::iterator itSel=m_nRowSelected.begin(); - itSel!=m_nRowSelected.end();++itSel) + for(std::vector::iterator itSel=m_aSelectedRows.begin(); + itSel!=m_aSelectedRows.end();++itSel) { if(*itSel == aRowIterator.getRow()) isSelectedRow = true; @@ -1224,22 +1224,22 @@ namespace svt { namespace table if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) { //if other rows already selected, deselect them - if(m_nRowSelected.size()>0) + if(m_aSelectedRows.size()>0) { - for(std::vector::iterator it=m_nRowSelected.begin(); - it!=m_nRowSelected.end();++it) + for(std::vector::iterator it=m_aSelectedRows.begin(); + it!=m_aSelectedRows.end();++it) { invalidateSelectedRegion(*it, *it, rCells); } - m_nRowSelected.clear(); + m_aSelectedRows.clear(); } if(m_nCurRow < m_nRowCount-1) { ++m_nCurRow; - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); } else - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); ensureVisible(m_nCurColumn,m_nCurRow,false); m_rAntiImpl.selectionChanged(true); @@ -1255,24 +1255,24 @@ namespace svt { namespace table case cursorUp: if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) { - if(m_nRowSelected.size()>0) + if(m_aSelectedRows.size()>0) { - for(std::vector::iterator it=m_nRowSelected.begin(); - it!=m_nRowSelected.end();++it) + for(std::vector::iterator it=m_aSelectedRows.begin(); + it!=m_aSelectedRows.end();++it) { invalidateSelectedRegion(*it, *it, rCells); } - m_nRowSelected.clear(); + m_aSelectedRows.clear(); } if(m_nCurRow>0) { --m_nCurRow; - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } else { - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } ensureVisible(m_nCurColumn,m_nCurRow,false); @@ -1343,17 +1343,17 @@ namespace svt { namespace table if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) return bSuccess = false; //pos is the position of the current row in the vector of selected rows, if current row is selected - int pos = getRowSelectedNumber(m_nRowSelected, m_nCurRow); + int pos = getRowSelectedNumber(m_aSelectedRows, m_nCurRow); //if current row is selected, it should be deselected, when ALT+SPACE are pressed if(pos>-1) { - m_nRowSelected.erase(m_nRowSelected.begin()+pos); - if(m_nRowSelected.empty() && m_nAnchor != -1) + m_aSelectedRows.erase(m_aSelectedRows.begin()+pos); + if(m_aSelectedRows.empty() && m_nAnchor != -1) m_nAnchor = -1; } //else select the row->put it in the vector else - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); m_rAntiImpl.selectionChanged(true); bSuccess = true; @@ -1371,26 +1371,26 @@ namespace svt { namespace table else { //there are other selected rows - if(m_nRowSelected.size()>0) + if(m_aSelectedRows.size()>0) { //the anchor wasn't set -> a region is not selected, that's why clear all selection //and select the current row if(m_nAnchor==-1) { - for(std::vector::iterator it=m_nRowSelected.begin(); - it!=m_nRowSelected.end();++it) + for(std::vector::iterator it=m_aSelectedRows.begin(); + it!=m_aSelectedRows.end();++it) { invalidateSelectedRegion(*it, *it, rCells); } - m_nRowSelected.clear(); - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.clear(); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } else { //a region is already selected, prevRow is last selected row and the row above - nextRow - should be selected - int prevRow = getRowSelectedNumber(m_nRowSelected, m_nCurRow); - int nextRow = getRowSelectedNumber(m_nRowSelected, m_nCurRow-1); + int prevRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow); + int nextRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow-1); if(prevRow>-1) { //if m_nCurRow isn't the upper one, can move up, otherwise not @@ -1399,14 +1399,14 @@ namespace svt { namespace table else return bSuccess = true; //if nextRow already selected, deselect it, otherwise select it - if(nextRow>-1 && m_nRowSelected[nextRow] == m_nCurRow) + if(nextRow>-1 && m_aSelectedRows[nextRow] == m_nCurRow) { - m_nRowSelected.erase(m_nRowSelected.begin()+prevRow); + m_aSelectedRows.erase(m_aSelectedRows.begin()+prevRow); invalidateSelectedRegion(m_nCurRow+1, m_nCurRow+1, rCells); } else { - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } } @@ -1414,9 +1414,9 @@ namespace svt { namespace table { if(m_nCurRow>0) { - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); m_nCurRow--; - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells); } } @@ -1429,14 +1429,14 @@ namespace svt { namespace table //otherwise select only the upper row if(m_nCurRow>0) { - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); m_nCurRow--; - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells); } else { - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } } @@ -1458,26 +1458,26 @@ namespace svt { namespace table } else { - if(m_nRowSelected.size()>0) + if(m_aSelectedRows.size()>0) { //the anchor wasn't set -> a region is not selected, that's why clear all selection //and select the current row if(m_nAnchor==-1) { - for(std::vector::iterator it=m_nRowSelected.begin(); - it!=m_nRowSelected.end();++it) + for(std::vector::iterator it=m_aSelectedRows.begin(); + it!=m_aSelectedRows.end();++it) { invalidateSelectedRegion(*it, *it, rCells); } - m_nRowSelected.clear(); - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.clear(); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } else { //a region is already selected, prevRow is last selected row and the row beneath - nextRow - should be selected - int prevRow = getRowSelectedNumber(m_nRowSelected, m_nCurRow); - int nextRow = getRowSelectedNumber(m_nRowSelected, m_nCurRow+1); + int prevRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow); + int nextRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow+1); if(prevRow>-1) { //if m_nCurRow isn't the last one, can move down, otherwise not @@ -1486,14 +1486,14 @@ namespace svt { namespace table else return bSuccess = true; //if next row already selected, deselect it, otherwise select it - if(nextRow>-1 && m_nRowSelected[nextRow] == m_nCurRow) + if(nextRow>-1 && m_aSelectedRows[nextRow] == m_nCurRow) { - m_nRowSelected.erase(m_nRowSelected.begin()+prevRow); + m_aSelectedRows.erase(m_aSelectedRows.begin()+prevRow); invalidateSelectedRegion(m_nCurRow-1, m_nCurRow-1, rCells); } else { - m_nRowSelected.push_back(m_nCurRow); + m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } } @@ -1501,9 +1501,9 @@ namespace svt { namespace table { if(m_nCurRow=0) { - if(!isRowSelected(m_nRowSelected, iter)) - m_nRowSelected.push_back(iter); + if ( !isRowSelected( iter ) ) + m_aSelectedRows.push_back(iter); --iter; } m_nCurRow = 0; @@ -1572,8 +1572,8 @@ namespace svt { namespace table //put the rows in the vector while(iter<=m_nRowCount) { - if(!isRowSelected(m_nRowSelected, iter)) - m_nRowSelected.push_back(iter); + if ( !isRowSelected( iter ) ) + m_aSelectedRows.push_back(iter); ++iter; } m_nCurRow = m_nRowCount-1; @@ -1630,7 +1630,7 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - RowPos TableControl_Impl::getRowAtPoint( const Point& rPoint ) + RowPos TableControl_Impl::getRowAtPoint( const Point& rPoint ) const { DBG_CHECK_ME(); @@ -1651,7 +1651,7 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - ColPos TableControl_Impl::getColAtPoint( const Point& rPoint ) + ColPos TableControl_Impl::getColAtPoint( const Point& rPoint ) const { DBG_CHECK_ME(); @@ -1678,6 +1678,18 @@ namespace svt { namespace table return m_pModel; } + //------------------------------------------------------------------------------------------------------------------ + RowPos TableControl_Impl::getCurrentColumn() const + { + return m_nCurColumn; + } + + //------------------------------------------------------------------------------------------------------------------ + RowPos TableControl_Impl::getCurrentRow() const + { + return m_nCurRow; + } + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::activateCellAt(const Point& rPoint) { @@ -1748,12 +1760,12 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ std::vector& TableControl_Impl::getSelectedRows() { - return m_nRowSelected; + return m_aSelectedRows; } //-------------------------------------------------------------------- void TableControl_Impl::clearSelection() { - m_nRowSelected.clear(); + m_aSelectedRows.clear(); } //-------------------------------------------------------------------- //------------------------------------------------------------------------------------------------------------------ @@ -1761,20 +1773,20 @@ namespace svt { namespace table { int i =0; //if the row is selected, remove it from the selection vector - if(isRowSelected(m_nRowSelected, _nRowPos)) + if ( isRowSelected( _nRowPos ) ) { - if(m_nRowSelected.size()>1) - m_nRowSelected.erase(m_nRowSelected.begin()+_nRowPos); + if(m_aSelectedRows.size()>1) + m_aSelectedRows.erase(m_aSelectedRows.begin()+_nRowPos); else - m_nRowSelected.clear(); + m_aSelectedRows.clear(); } //after removing a row, row positions must be updated, so selected rows could stay selected - if(m_nRowSelected.size()>1) + if(m_aSelectedRows.size()>1) { - for(std::vector::iterator it=m_nRowSelected.begin();it!=m_nRowSelected.end();++it) + for(std::vector::iterator it=m_aSelectedRows.begin();it!=m_aSelectedRows.end();++it) { if(*it > _nRowPos) - m_nRowSelected[i]=*it-1; + m_aSelectedRows[i]=*it-1; ++i; } } @@ -2046,21 +2058,19 @@ namespace svt { namespace table { return m_pHScroll; } + //------------------------------------------------------------------------------------------------------------------ ScrollBar* TableControl_Impl::getVertScrollbar() { return m_pVScroll; } + //------------------------------------------------------------------------------------------------------------------ - BOOL TableControl_Impl::isRowSelected(const ::std::vector& selectedRows, RowPos current) + bool TableControl_Impl::isRowSelected( RowPos i_row ) const { - return ::std::find(selectedRows.begin(),selectedRows.end(),current) != selectedRows.end(); - } - //------------------------------------------------------------------------------------------------------------------ - bool TableControl_Impl::isRowSelected(RowPos current) - { - return ::std::find(m_nRowSelected.begin(),m_nRowSelected.end(),current) != m_nRowSelected.end(); + return ::std::find( m_aSelectedRows.begin(), m_aSelectedRows.end(), i_row ) != m_aSelectedRows.end(); } + //------------------------------------------------------------------------------------------------------------------ int TableControl_Impl::getRowSelectedNumber(const ::std::vector& selectedRows, RowPos current) { @@ -2305,7 +2315,7 @@ namespace svt { namespace table if ( bDontSelectAtCursor ) { - if ( m_pTableControl->m_nRowSelected.size()>1 ) + if ( m_pTableControl->m_aSelectedRows.size()>1 ) m_pTableControl->m_pSelEngine->AddAlways(TRUE); bHandled = TRUE; } @@ -2319,10 +2329,10 @@ namespace svt { namespace table //put selected rows in vector while ( m_pTableControl->m_nAnchor >= newRow ) { - bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, m_pTableControl->m_nAnchor); + bool isAlreadySelected = m_pTableControl->isRowSelected( m_pTableControl->m_nAnchor ); //if row isn't selected, put it in vector, otherwise don't put it there, because it will be twice there if(!isAlreadySelected) - m_pTableControl->m_nRowSelected.push_back(m_pTableControl->m_nAnchor); + m_pTableControl->m_aSelectedRows.push_back(m_pTableControl->m_nAnchor); m_pTableControl->m_nAnchor--; diff--; } @@ -2333,9 +2343,9 @@ namespace svt { namespace table { while ( m_pTableControl->m_nAnchor <= newRow ) { - bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, m_pTableControl->m_nAnchor); + bool isAlreadySelected = m_pTableControl->isRowSelected( m_pTableControl->m_nAnchor ); if(!isAlreadySelected) - m_pTableControl->m_nRowSelected.push_back(m_pTableControl->m_nAnchor); + m_pTableControl->m_aSelectedRows.push_back(m_pTableControl->m_nAnchor); m_pTableControl->m_nAnchor++; diff++; } @@ -2348,23 +2358,23 @@ namespace svt { namespace table //no region selected else { - if(m_pTableControl->m_nRowSelected.empty()) - m_pTableControl->m_nRowSelected.push_back( newRow ); + if(m_pTableControl->m_aSelectedRows.empty()) + m_pTableControl->m_aSelectedRows.push_back( newRow ); else { if(m_pTableControl->m_pSelEngine->GetSelectionMode()==SINGLE_SELECTION) { DeselectAll(); - m_pTableControl->m_nRowSelected.push_back( newRow ); + m_pTableControl->m_aSelectedRows.push_back( newRow ); } else { - bool isAlreadySelected = m_pTableControl->isRowSelected( m_pTableControl->m_nRowSelected, newRow ); + bool isAlreadySelected = m_pTableControl->isRowSelected( newRow ); if ( !isAlreadySelected ) - m_pTableControl->m_nRowSelected.push_back( newRow ); + m_pTableControl->m_aSelectedRows.push_back( newRow ); } } - if(m_pTableControl->m_nRowSelected.size()>1 && m_pTableControl->m_pSelEngine->GetSelectionMode()!=SINGLE_SELECTION) + if(m_pTableControl->m_aSelectedRows.size()>1 && m_pTableControl->m_pSelEngine->GetSelectionMode()!=SINGLE_SELECTION) m_pTableControl->m_pSelEngine->AddAlways(TRUE); Rectangle aCellRect; @@ -2380,13 +2390,13 @@ namespace svt { namespace table BOOL TableFunctionSet::IsSelectionAtPoint( const Point& rPoint ) { m_pTableControl->m_pSelEngine->AddAlways(FALSE); - if(m_pTableControl->m_nRowSelected.empty()) + if(m_pTableControl->m_aSelectedRows.empty()) return FALSE; else { RowPos curRow = m_pTableControl->getRowAtPoint( rPoint ); m_pTableControl->m_nAnchor = -1; - bool selected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, curRow); + bool selected = m_pTableControl->isRowSelected( curRow ); m_nCurrentRow = curRow; return selected; } @@ -2398,8 +2408,8 @@ namespace svt { namespace table long pos = 0; long i = 0; Rectangle rCells; - for(std::vector::iterator it=m_pTableControl->m_nRowSelected.begin(); - it!=m_pTableControl->m_nRowSelected.end();++it) + for(std::vector::iterator it=m_pTableControl->m_aSelectedRows.begin(); + it!=m_pTableControl->m_aSelectedRows.end();++it) { if(*it == m_nCurrentRow) { @@ -2408,20 +2418,20 @@ namespace svt { namespace table } ++i; } - m_pTableControl->m_nRowSelected.erase(m_pTableControl->m_nRowSelected.begin()+pos); + m_pTableControl->m_aSelectedRows.erase(m_pTableControl->m_aSelectedRows.begin()+pos); } //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::DeselectAll() { - if(!m_pTableControl->m_nRowSelected.empty()) + if(!m_pTableControl->m_aSelectedRows.empty()) { Rectangle rCells; - for(std::vector::iterator it=m_pTableControl->m_nRowSelected.begin(); - it!=m_pTableControl->m_nRowSelected.end();++it) + for(std::vector::iterator it=m_pTableControl->m_aSelectedRows.begin(); + it!=m_pTableControl->m_aSelectedRows.end();++it) { m_pTableControl->invalidateSelectedRegion(*it, *it, rCells); } - m_pTableControl->m_nRowSelected.clear(); + m_pTableControl->m_aSelectedRows.clear(); } } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 4f2a626324b2..1987dd96e6f5 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -150,7 +150,7 @@ namespace svt { namespace table //selection engine - for determining selection range, e.g. single, multiple SelectionEngine* m_pSelEngine; //vector which contains the selected rows - std::vector m_nRowSelected; + std::vector m_aSelectedRows; //part of selection engine TableFunctionSet* m_pTableFunctionSet; //part of selection engine @@ -177,8 +177,6 @@ namespace svt { namespace table inline const PTableInputHandler& getInputHandler() const { return m_pInputHandler; } - inline ColPos getCurColumn() const { return m_nCurColumn; } - inline RowPos getCurRow() const { return m_nCurRow; } inline void setCurRow(RowPos curRow){ m_nCurRow = curRow; } inline RowPos getTopRow() const { return m_nTopRow; } @@ -223,11 +221,6 @@ namespace svt { namespace table */ ::rtl::OUString getCellContentAsString( RowPos const i_row, ColPos const i_col ); - /** checks whether the vector with the selected rows contains the current row*/ - BOOL isRowSelected(const ::std::vector& selectedRows, RowPos current); - - bool isRowSelected(RowPos current); - /** returns the position of the current row in the selection vector */ int getRowSelectedNumber(const ::std::vector& selectedRows, RowPos current); @@ -251,12 +244,16 @@ namespace svt { namespace table virtual bool dispatchAction( TableControlAction _eAction ); virtual SelectionEngine* getSelEngine(); virtual PTableModel getModel() const; + virtual ColPos getCurrentColumn() const; + virtual RowPos getCurrentRow() const; virtual void activateCellAt( const Point& rPoint ); - virtual RowPos getRowAtPoint( const Point& rPoint ); - virtual ColPos getColAtPoint( const Point& rPoint ); + virtual RowPos getRowAtPoint( const Point& rPoint ) const; + virtual ColPos getColAtPoint( const Point& rPoint ) const; virtual void resizeColumn(const Point& rPoint); virtual bool checkResizeColumn(const Point& rPoint); virtual bool endResizeColumn(const Point& rPoint); + virtual bool isRowSelected( RowPos i_row ) const; + TableDataWindow* getDataWindow(); ScrollBar* getHorzScrollbar(); diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index ef714f16a780..69df1c929218 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -92,6 +92,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getRowAtPoint: no control (anymore)!", -1 ); + sal_Int32 const nRow = pTable->getTableControlInterface().getRowAtPoint( Point( x, y ) ); return ( nRow >= 0 ) ? nRow : -1; } @@ -103,10 +104,35 @@ sal_Int32 SAL_CALL SVTXGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getColumnAtPoint: no control (anymore)!", -1 ); + sal_Int32 const nColumn = pTable->getTableControlInterface().getColAtPoint( Point( x, y ) ); return ( nColumn >= 0 ) ? nColumn : -1; } +// --------------------------------------------------------------------------------------------------------------------- +sal_Int32 SAL_CALL SVTXGridControl::getCurrentColumn( ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getCurrentColumn: no control (anymore)!", -1 ); + + sal_Int32 const nColumn = pTable->GetCurrentColumn(); + return ( nColumn >= 0 ) ? nColumn : -1; +} + +// --------------------------------------------------------------------------------------------------------------------- +sal_Int32 SAL_CALL SVTXGridControl::getCurrentRow( ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getCurrentRow: no control (anymore)!", -1 ); + + sal_Int32 const nRow = pTable->GetCurrentRow(); + return ( nRow >= 0 ) ? nRow : -1; +} + // --------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) { diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index c3d1f909126b..8ebeb09374ec 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -105,6 +105,8 @@ public: // XGridControl virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getCurrentColumn( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getCurrentRow( ) throw (::com::sun::star::uno::RuntimeException); void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 70afcc5c3a13..28a203b81c03 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -346,6 +346,20 @@ sal_Bool SAL_CALL UnoGridControl::setModel( const Reference< XControlModel >& i_ return xGrid->getColumnAtPoint( x, y ); } +//---------------------------------------------------------------------------------------------------------------------- +::sal_Int32 SAL_CALL UnoGridControl::getCurrentColumn( ) throw (RuntimeException) +{ + Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW ); + return xGrid->getCurrentColumn(); +} + +//---------------------------------------------------------------------------------------------------------------------- +::sal_Int32 SAL_CALL UnoGridControl::getCurrentRow( ) throw (RuntimeException) +{ + Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW ); + return xGrid->getCurrentRow(); +} + //---------------------------------------------------------------------------------------------------------------------- ::sal_Int32 SAL_CALL UnoGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException) { diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index 6dfc5d71e639..cf832cb80705 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -97,8 +97,10 @@ public: sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::grid::XGridControl - virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getCurrentColumn( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getCurrentRow( ) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::grid::XGridSelection virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); -- cgit From 59a5decdc52544eb2f93aaaa83e87c9570d63b45 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 14:00:09 +0100 Subject: gridsort: XGridControl: add methods to retrieve the current row/col --- offapi/com/sun/star/awt/grid/XGridControl.idl | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridControl.idl b/offapi/com/sun/star/awt/grid/XGridControl.idl index 4cdcb03beb43..3c2c3d241528 100644 --- a/offapi/com/sun/star/awt/grid/XGridControl.idl +++ b/offapi/com/sun/star/awt/grid/XGridControl.idl @@ -43,27 +43,41 @@ module com { module sun { module star { module awt { module grid { */ interface XGridControl : XGridSelection { - /** retrieves the row which a given point belongs to + /** retrieves the column which a given point belongs to @param X the ordinate of the point, in pixel coordinates. @param Y the abscissa of the point, in pixel coordinates. @return - the index of the row which the point lies in, or -1 if no row is under the given point. + the index of the column which the point lies in, or -1 if no column is under the given point. */ - long getRowAtPoint( [in] long X, [in] long Y ); + long getColumnAtPoint( [in] long X, [in] long Y ); - /** retrieves the column which a given point belongs to + /** retrieves the row which a given point belongs to @param X the ordinate of the point, in pixel coordinates. @param Y the abscissa of the point, in pixel coordinates. @return - the index of the column which the point lies in, or -1 if no column is under the given point. + the index of the row which the point lies in, or -1 if no row is under the given point. */ - long getColumnAtPoint( [in] long X, [in] long Y ); + long getRowAtPoint( [in] long X, [in] long Y ); + + /** returns the column index of the currently active cell + +

          If the grid control's does not contain any cells (which happens if the grid column model does not contain any + columns, or if grid data model does not contain any rows), then -1 is returned.

          + */ + long getCurrentColumn(); + + /** returns the row index of the currently active cell + +

          If the grid control's does not contain any cells (which happens if the grid column model does not contain any + columns, or if grid data model does not contain any rows), then -1 is returned.

          + */ + long getCurrentRow(); }; //============================================================================= -- cgit From 5e725b448fcb0f732b2b492d7452b9304de0bbce Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 17:21:55 +0100 Subject: gridsort: PaintRowHeader's RowPos argument was superfluous - removed --- svtools/inc/svtools/table/gridtablerenderer.hxx | 1 - svtools/inc/svtools/table/tablerenderer.hxx | 3 ++- svtools/source/table/gridtablerenderer.cxx | 4 ++-- svtools/source/table/tablecontrol_impl.cxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/svtools/inc/svtools/table/gridtablerenderer.hxx b/svtools/inc/svtools/table/gridtablerenderer.hxx index 01492ae26fc4..72dfa503fea0 100644 --- a/svtools/inc/svtools/table/gridtablerenderer.hxx +++ b/svtools/inc/svtools/table/gridtablerenderer.hxx @@ -84,7 +84,6 @@ namespace svt { namespace table OutputDevice& _rDevice, const Rectangle& _rRowArea, const StyleSettings& _rStyle ); virtual void PaintRowHeader( - RowPos const i_rowPos, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ); diff --git a/svtools/inc/svtools/table/tablerenderer.hxx b/svtools/inc/svtools/table/tablerenderer.hxx index 4477f7065001..7490afae35b4 100644 --- a/svtools/inc/svtools/table/tablerenderer.hxx +++ b/svtools/inc/svtools/table/tablerenderer.hxx @@ -46,6 +46,7 @@ namespace svt { namespace table class SAL_NO_VTABLE ITableRenderer { public: + /** paints a (part of) header area There are two header areas in a table control: @@ -176,7 +177,7 @@ namespace svt { namespace table @param _rStyle the style to be used for drawing */ - virtual void PaintRowHeader( RowPos const i_rowPos, bool _bActive, bool _bSelected, + virtual void PaintRowHeader( bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) = 0; diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 9e7a5213c098..67fec8310964 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -213,7 +213,7 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - void GridTableRenderer::PaintRowHeader( RowPos const i_rowPos, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, + void GridTableRenderer::PaintRowHeader( bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) { _rDevice.Push( PUSH_LINECOLOR | PUSH_TEXTCOLOR ); @@ -240,7 +240,7 @@ namespace svt { namespace table Rectangle aRect( _rArea ); aRect.Left()+=4; aRect.Right()-=4; aRect.Bottom()-=2; - _rDevice.DrawText( aRect, m_pImpl->rModel.getRowHeader( i_rowPos ), nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); + _rDevice.DrawText( aRect, m_pImpl->rModel.getRowHeader( m_pImpl->nCurrentRow ), nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); // TODO: active? selected? (void)_bActive; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index ac2d41c122a4..bfa5485fdaed 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1174,7 +1174,7 @@ namespace svt { namespace table if ( m_pModel->hasRowHeaders() ) { const Rectangle aCurrentRowHeader( aRowHeaderArea.GetIntersection( aRowIterator.getRect() ) ); - pRenderer->PaintRowHeader( aRowIterator.getRow(), isActiveRow, isSelectedRow, *m_pDataWindow, aCurrentRowHeader, + pRenderer->PaintRowHeader( isActiveRow, isSelectedRow, *m_pDataWindow, aCurrentRowHeader, rStyle ); } if ( !colCount ) -- cgit From 69e0e16e0e50074127c6a4bef1f45dd6323b0164 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 21:45:01 +0100 Subject: gridsort: +QUICKHELP_NO_DELAY --- vcl/inc/vcl/help.hxx | 1 + vcl/source/app/help.cxx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx index e4f9aa45b139..4fb039b25bec 100644 --- a/vcl/inc/vcl/help.hxx +++ b/vcl/inc/vcl/help.hxx @@ -49,6 +49,7 @@ class Window; #define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM) #define QUICKHELP_CTRLTEXT ((USHORT)0x0040) #define QUICKHELP_FORCE_REPOSITION ((USHORT)0x0080) +#define QUICKHELP_NO_DELAY ((USHORT)0x0100) #define QUICKHELP_NOEVADEPOINTER ((USHORT)0x4000) #define QUICKHELP_BIDI_RTL ((USHORT)0x8000) diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 37e7917d5e78..46f5e2132e5c 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -629,7 +629,9 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle, if ( !pHelpWin && rHelpText.Len() ) { ULONG nCurTime = Time::GetSystemTicks(); - if( (nCurTime - pSVData->maHelpData.mnLastHelpHideTime) < pParent->GetSettings().GetHelpSettings().GetTipDelay() ) + if ( ( ( nCurTime - pSVData->maHelpData.mnLastHelpHideTime ) < pParent->GetSettings().GetHelpSettings().GetTipDelay() ) + || ( ( nStyle & QUICKHELP_NO_DELAY ) != 0 ) + ) nDelayMode = HELPDELAY_NONE; DBG_ASSERT( !pHelpWin, "Noch ein HelpWin ?!" ); -- cgit From 76365bac02b0ee3ffc3755699034b8d790d2c97a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 Jan 2011 21:45:47 +0100 Subject: gridsort: don't display cell tooltips unconditionally. Instead, when we use the cell content as tooltip, display it if and only if the renderer tells us it would not fit into the cell --- svtools/inc/svtools/table/gridtablerenderer.hxx | 6 +++ svtools/inc/svtools/table/tablerenderer.hxx | 35 ++++++++++++++ svtools/source/table/gridtablerenderer.cxx | 64 ++++++++++++++++++++++--- svtools/source/table/tabledatawindow.cxx | 31 +++++++----- 4 files changed, 118 insertions(+), 18 deletions(-) diff --git a/svtools/inc/svtools/table/gridtablerenderer.hxx b/svtools/inc/svtools/table/gridtablerenderer.hxx index 72dfa503fea0..3b4160b1fd6a 100644 --- a/svtools/inc/svtools/table/gridtablerenderer.hxx +++ b/svtools/inc/svtools/table/gridtablerenderer.hxx @@ -93,6 +93,12 @@ namespace svt { namespace table const StyleSettings& _rStyle ); virtual void ShowCellCursor( Window& _rView, const Rectangle& _rCursorRect); virtual void HideCellCursor( Window& _rView, const Rectangle& _rCursorRect); + virtual bool FitsIntoCell( + ::com::sun::star::uno::Any const & i_cellContent, + ColPos const i_colPos, RowPos const i_rowPos, + bool const i_active, bool const i_selected, + OutputDevice& i_targetDevice, Rectangle const & i_targetArea + ); private: struct CellRenderContext; diff --git a/svtools/inc/svtools/table/tablerenderer.hxx b/svtools/inc/svtools/table/tablerenderer.hxx index 7490afae35b4..3d50c9d70ee7 100644 --- a/svtools/inc/svtools/table/tablerenderer.hxx +++ b/svtools/inc/svtools/table/tablerenderer.hxx @@ -226,6 +226,41 @@ namespace svt { namespace table */ virtual void HideCellCursor( Window& _rView, const Rectangle& _rCursorRect) = 0; + /** checks whether a given cell content fits into a given target area on a given device. + + @param i_colPos + denotes the column which the cell content would be painted into. Your renderer implementation + would only need this parameter if rendering is done differently for different columns. + + @param i_rowPos + denotes the row which the cell content would be painted into. Your renderer implementation + would only need this parameter if rendering is done differently for different rows. + + @param i_active + is if and only if the renderer should assume the cell content would be painted for the active + cell. + + @param i_selected + is if and only if the renderer should assume the cell content would be painted for a selected + cell. + + @param i_targetDevice + denotes the target device for the assumed rendering operation + + @param i_targetArea + denotes the area within the target device for the assumed rendering operation. + + @return + if and only if the given cell content could be rendered into the given device and the + given area. + */ + virtual bool FitsIntoCell( + ::com::sun::star::uno::Any const & i_cellContent, + ColPos const i_colPos, RowPos const i_rowPos, + bool const i_active, bool const i_selected, + OutputDevice& i_targetDevice, Rectangle const & i_targetArea + ) = 0; + /// deletes the renderer instance virtual ~ITableRenderer() { } }; diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 67fec8310964..60628ffba95d 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -268,10 +269,28 @@ namespace svt { namespace table } }; + //-------------------------------------------------------------------- + namespace + { + /** transforms a rectangle denoting a cell area so that afterwards, it denotes the area we + can use for rendering the cell's content. + */ + static void lcl_convertCellToContentArea( Rectangle & io_area ) + { + ++io_area.Left(); --io_area.Right(); + } + + static void lcl_convertContentToTextRenderingArea( Rectangle & io_area ) + { + io_area.Left() += 2; io_area.Right() -= 2; + ++io_area.Top(); --io_area.Bottom(); + } + } + //-------------------------------------------------------------------- void GridTableRenderer::PaintCell( ColPos const i_column, bool _bSelected, bool _bActive, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) - { + { _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); Color background1 = m_pImpl->rModel.getOddRowBackgroundColor(); Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor(); @@ -299,15 +318,15 @@ namespace svt { namespace table _rDevice.SetLineColor( background1 ); else { - //if line color is set, then it was user defined and should be visible - //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible + // if line color is set, then it was user defined and should be visible + // if it wasn't set, it'll be the same as the default background color, so lines still won't be visible _rDevice.SetLineColor( lineColor ); } } _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); Rectangle aRect( _rArea ); - ++aRect.Left(); --aRect.Right(); + lcl_convertCellToContentArea( aRect ); const CellRenderContext aRenderContext( _rDevice, aRect, _rStyle, i_column, _bSelected ); impl_paintCellContent( aRenderContext ); @@ -413,8 +432,7 @@ namespace svt { namespace table } Rectangle textRect( i_context.aContentArea ); - textRect.Left() += 2; textRect.Right() -= 2; - ++textRect.Top(); --textRect.Bottom(); + lcl_convertContentToTextRenderingArea( textRect ); i_context.rDevice.DrawText( textRect, i_text, nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); } @@ -428,9 +446,41 @@ namespace svt { namespace table //-------------------------------------------------------------------- void GridTableRenderer::HideCellCursor( Window& _rView, const Rectangle& _rCursorRect) { - (void)_rCursorRect; + (void)_rCursorRect; _rView.HideFocus(); + } + + //-------------------------------------------------------------------- + bool GridTableRenderer::FitsIntoCell( Any const & i_cellContent, ColPos const i_colPos, RowPos const i_rowPos, + bool const i_active, bool const i_selected, OutputDevice& i_targetDevice, Rectangle const & i_targetArea ) + { + if ( !i_cellContent.hasValue() ) + return true; + + Reference< XGraphic > const xGraphic( i_cellContent, UNO_QUERY ); + if ( xGraphic.is() ) + // for the moment, assume it fits. We can always scale it down during painting ... + return true; + + ::rtl::OUString const sText( CellValueConversion::convertToString( i_cellContent ) ); + if ( sText.getLength() == 0 ) + return true; + + Rectangle aTargetArea( i_targetArea ); + lcl_convertCellToContentArea( aTargetArea ); + lcl_convertContentToTextRenderingArea( aTargetArea ); + + long const nTextHeight = i_targetDevice.GetTextHeight(); + if ( nTextHeight > aTargetArea.GetHeight() ) + return false; + + long const nTextWidth = i_targetDevice.GetTextWidth( sText ); + if ( nTextWidth > aTargetArea.GetWidth() ) + return false; + OSL_UNUSED( i_active ); + OSL_UNUSED( i_selected ); + return true; } //........................................................................ diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index b357fd91abda..ed7b3f8478b3 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -94,7 +94,7 @@ namespace svt { namespace table ITableControl& rTableControl = m_rTableControl; PTableModel const pTableModel( rTableControl.getModel() ); - Point const aMousePos( m_rTableControl.getAntiImpl().ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); + Point const aMousePos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); RowPos const hitRow = rTableControl.getRowAtPoint( aMousePos ); ColPos const hitCol = rTableControl.getColAtPoint( aMousePos ); @@ -115,21 +115,30 @@ namespace svt { namespace table { // use the cell content pTableModel->getCellContent( hitCol, hitRow, aCellToolTip ); - // TODO: use the cell content as tool tip only if it doesn't fit into the cell. Need to - // ask the renderer for this. + + // use the cell content as tool tip only if it doesn't fit into the cell. + bool const activeCell = ( hitRow == rTableControl.getCurrentRow() ) && ( hitCol == rTableControl.getCurrentColumn() ); + bool const selectedCell = rTableControl.isRowSelected( hitRow ); + + Rectangle const aWindowRect( Point( 0, 0 ), GetOutputSizePixel() ); + TableCellGeometry const aCell( m_rTableControl, aWindowRect, hitCol, hitRow ); + Rectangle const aCellRect( aCell.getRect() ); + + PTableRenderer const pRenderer = pTableModel->getRenderer(); + if ( pRenderer->FitsIntoCell( aCellToolTip, hitCol, hitRow, activeCell, selectedCell, *this, aCellRect ) ) + aCellToolTip.clear(); } sHelpText = CellValueConversion::convertToString( aCellToolTip ); } - if ( sHelpText.getLength() > 0 ) - { - Rectangle const aControlScreenRect( - m_rTableControl.getAntiImpl().OutputToScreenPixel( Point( 0, 0 ) ), - m_rTableControl.getAntiImpl().GetOutputSizePixel() - ); - Help::ShowQuickHelp( &m_rTableControl.getAntiImpl(), aControlScreenRect, sHelpText, String(), QUICKHELP_FORCE_REPOSITION ); - } + Rectangle const aControlScreenRect( + OutputToScreenPixel( Point( 0, 0 ) ), + GetOutputSizePixel() + ); + Help::ShowQuickHelp( this, aControlScreenRect, sHelpText, String(), QUICKHELP_FORCE_REPOSITION | QUICKHELP_NO_DELAY ); + // also do this when the help text is empty - in this case, a previously active tip help window + // (possible displaying the tooltip for another cell) will be hidden, which is intended here. } } else -- cgit From 13d81b8e4d8d7c96d2abdaa1679b5e32101d623f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 09:07:23 +0100 Subject: gridsort: XGridCell/Renderer are unused and useless --- offapi/com/sun/star/awt/grid/XGridCell.idl | 56 ---------------------- offapi/com/sun/star/awt/grid/XGridCellRenderer.idl | 52 -------------------- offapi/com/sun/star/awt/grid/makefile.mk | 5 +- 3 files changed, 2 insertions(+), 111 deletions(-) delete mode 100644 offapi/com/sun/star/awt/grid/XGridCell.idl delete mode 100644 offapi/com/sun/star/awt/grid/XGridCellRenderer.idl diff --git a/offapi/com/sun/star/awt/grid/XGridCell.idl b/offapi/com/sun/star/awt/grid/XGridCell.idl deleted file mode 100644 index 08f3cfd1b2d5..000000000000 --- a/offapi/com/sun/star/awt/grid/XGridCell.idl +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_grid_XGridCell_idl__ -#define __com_sun_star_awt_grid_XGridCell_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif - - - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - -interface XGridCell -{ - - [attribute] string Value; - - [attribute] boolean Editable; - - [attribute] any Data; -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/XGridCellRenderer.idl b/offapi/com/sun/star/awt/grid/XGridCellRenderer.idl deleted file mode 100644 index 7f9fa28c3307..000000000000 --- a/offapi/com/sun/star/awt/grid/XGridCellRenderer.idl +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_grid_XGridCellRenderer_idl__ -#define __com_sun_star_awt_grid_XGridCellRenderer_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - -/** renderer for cells - */ -interface XGridCellRenderer -{ - //------------------------------------------------------------------------- - -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index 014a89d0afb1..c511e1dbad07 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -47,8 +47,6 @@ IDLFILES=\ XGridColumn.idl\ XGridColumnListener.idl\ XGridDataListener.idl\ - XGridCell.idl\ - XGridCellRenderer.idl\ DefaultGridDataModel.idl\ XGridDataModel.idl\ XMutableGridDataModel.idl\ @@ -57,7 +55,8 @@ IDLFILES=\ UnoControlGrid.idl\ UnoControlGridModel.idl\ GridInvalidDataException.idl\ - GridInvalidModelException.idl + GridInvalidModelException.idl\ + # ------------------------------------------------------------------ .INCLUDE : target.mk -- cgit From 6c8d7babb69985bf3f676b59cf767952c971ebc5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 12:34:24 +0100 Subject: gridsort: reworked the color model for grid controls. Now supporting more than two alternating colors, having more reasonable defaults for the colors (VOID instead of some hard-coded values, which thus are unusable). Also, introduced new property UseGridLines controlling whether or not to paint the table grid. --- svtools/inc/svtools/table/gridtablerenderer.hxx | 14 +- svtools/inc/svtools/table/tablemodel.hxx | 52 +++++- svtools/source/table/gridtablerenderer.cxx | 235 +++++++++++++----------- svtools/source/table/tablecontrol_impl.cxx | 28 +-- svtools/source/uno/svtxgridcontrol.cxx | 169 ++++++++++++----- svtools/source/uno/unocontroltablemodel.cxx | 161 ++++++++++------ svtools/source/uno/unocontroltablemodel.hxx | 66 ++++--- toolkit/inc/toolkit/helper/property.hxx | 9 +- toolkit/source/controls/grid/gridcontrol.cxx | 21 +-- toolkit/source/helper/property.cxx | 9 +- 10 files changed, 484 insertions(+), 280 deletions(-) diff --git a/svtools/inc/svtools/table/gridtablerenderer.hxx b/svtools/inc/svtools/table/gridtablerenderer.hxx index 3b4160b1fd6a..c472fa408574 100644 --- a/svtools/inc/svtools/table/gridtablerenderer.hxx +++ b/svtools/inc/svtools/table/gridtablerenderer.hxx @@ -29,6 +29,8 @@ #include +#include + //........................................................................ namespace svt { namespace table { @@ -47,7 +49,7 @@ namespace svt { namespace table class GridTableRenderer : public ITableRenderer { private: - GridTableRenderer_Impl* m_pImpl; + ::boost::scoped_ptr< GridTableRenderer_Impl > m_pImpl; public: /** creates a table renderer associated with the given model @@ -69,7 +71,15 @@ namespace svt { namespace table This method returns the index of the last row which has been prepared */ - RowPos getCurrentRow(); + RowPos getCurrentRow() const; + + /** determines whether or not to paint grid lines + */ + bool useGridLines() const; + + /** controls whether or not to paint grid lines + */ + void useGridLines( bool const i_use ); public: // ITableRenderer overridables diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 3eb87f1eb40e..50030de7a31d 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -40,6 +40,7 @@ #include #include +#include #include //........................................................................ @@ -461,12 +462,51 @@ namespace svt { namespace table */ virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const = 0; - virtual ::com::sun::star::util::Color getLineColor() = 0; - virtual ::com::sun::star::util::Color getHeaderBackgroundColor() = 0; - virtual ::com::sun::star::util::Color getTextColor() = 0; - virtual ::com::sun::star::util::Color getOddRowBackgroundColor() = 0; - virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() = 0; - virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() = 0; + /** returns the color to be used for rendering the grid lines. + + If this value is not set, a default color from the style settings will be used. + */ + virtual ::boost::optional< ::Color > getLineColor() const = 0; + + /** returns the color to be used for rendering the header background. + + If this value is not set, a default color from the style settings will be used. + */ + virtual ::boost::optional< ::Color > getHeaderBackgroundColor() const = 0; + + /** returns the color to be used for rendering the header text. + + If this value is not set, a default color from the style settings will be used. + */ + virtual ::boost::optional< ::Color > getHeaderTextColor() const = 0; + + /** returns the color to be used for rendering cell texts. + + If this value is not set, a default color from the style settings will be used. + */ + virtual ::boost::optional< ::Color > getTextColor() const = 0; + + /** returns the color to be used for text lines (underline, strikethrough) when rendering cell text. + + If this value is not set, a default color from the style settings will be used. + */ + virtual ::boost::optional< ::Color > getTextLineColor() const = 0; + + /** returns the colors to be used for the row backgrounds. + + If this value is not set, every second row will have a background color derived from the style settings's + selection color, the other rows will not have a special background at all. + + If this value is an empty sequence, the rows will not have a special background at all, instead the + normal background of the complete control will be used. + + If value is a non-empty sequence, then rows will have the background colors as specified in the sequence, + in alternating order. + */ + virtual ::boost::optional< ::std::vector< ::Color > > + getRowBackgroundColors() const = 0; + + virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() const = 0; /// destroys the table model instance virtual ~ITableModel() { } diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 60628ffba95d..3163cc54174c 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -29,19 +29,23 @@ #include "cellvalueconversion.hxx" #include "svtools/table/gridtablerenderer.hxx" +#include "svtools/colorcfg.hxx" +/** === begin UNO includes === **/ #include +/** === end UNO includes === **/ #include #include #include #include -//........................................................................ +//...................................................................................................................... namespace svt { namespace table { -//........................................................................ +//...................................................................................................................... + /** === begin UNO using === **/ using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::UNO_QUERY; @@ -54,41 +58,70 @@ namespace svt { namespace table using ::com::sun::star::style::VerticalAlignment_TOP; using ::com::sun::star::style::VerticalAlignment_MIDDLE; using ::com::sun::star::style::VerticalAlignment_BOTTOM; + /** === end UNO using === **/ struct GridTableRenderer_Impl { ITableModel& rModel; RowPos nCurrentRow; + bool bUseGridLines; GridTableRenderer_Impl( ITableModel& _rModel ) :rModel( _rModel ) ,nCurrentRow( ROW_INVALID ) + ,bUseGridLines( true ) { } }; - //==================================================================== + //================================================================================================================== //= GridTableRenderer - //==================================================================== - //-------------------------------------------------------------------- + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ GridTableRenderer::GridTableRenderer( ITableModel& _rModel ) :m_pImpl( new GridTableRenderer_Impl( _rModel ) ) { } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ GridTableRenderer::~GridTableRenderer() { - DELETEZ( m_pImpl ); } - //-------------------------------------------------------------------- - RowPos GridTableRenderer::getCurrentRow() + //------------------------------------------------------------------------------------------------------------------ + RowPos GridTableRenderer::getCurrentRow() const { return m_pImpl->nCurrentRow; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + bool GridTableRenderer::useGridLines() const + { + return m_pImpl->bUseGridLines; + } + + //------------------------------------------------------------------------------------------------------------------ + void GridTableRenderer::useGridLines( bool const i_use ) + { + m_pImpl->bUseGridLines = i_use; + } + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + Color lcl_getEffectiveColor( + ::boost::optional< ::Color > const & i_modelColor, + StyleSettings const & i_styleSettings, + ::Color const & ( StyleSettings::*i_getDefaultColor ) () const + ) + { + if ( !!i_modelColor ) + return *i_modelColor; + return ( i_styleSettings.*i_getDefaultColor )(); + } + } + + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::PaintHeaderArea( OutputDevice& _rDevice, const Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea, const StyleSettings& _rStyle ) @@ -97,12 +130,11 @@ namespace svt { namespace table "GridTableRenderer::PaintHeaderArea: invalid area flags!" ); _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR); - Color background = m_pImpl->rModel.getHeaderBackgroundColor(); - if ( background != COL_TRANSPARENT ) - _rDevice.SetFillColor( background ); - else - _rDevice.SetFillColor( _rStyle.GetDialogColor() ); - _rDevice.SetLineColor( _rStyle.GetSeparatorColor() ); + + Color const background = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderBackgroundColor(), _rStyle, &StyleSettings::GetDialogColor ); + _rDevice.SetFillColor( background ); + + m_pImpl->bUseGridLines ? _rDevice.SetLineColor( _rStyle.GetSeparatorColor() ) : _rDevice.SetLineColor(); _rDevice.DrawRect( _rArea ); // delimiter lines at bottom/right _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); @@ -113,7 +145,7 @@ namespace svt { namespace table (void)_bIsRowHeaderArea; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::PaintColumnHeader( ColPos _nCol, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) { @@ -126,24 +158,26 @@ namespace svt { namespace table DBG_ASSERT( !!pColumn, "GridTableRenderer::PaintColumnHeader: invalid column model object!" ); if ( !!pColumn ) sHeaderText = pColumn->getName(); - if(m_pImpl->rModel.getTextColor() != 0x000000) - _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); - else - _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); + + ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); + _rDevice.SetTextColor( textColor ); + ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; - if(m_pImpl->rModel.getVerticalAlign() == 1) + if ( m_pImpl->rModel.getVerticalAlign() == 1 ) nVerFlag = TEXT_DRAW_VCENTER; - else if(m_pImpl->rModel.getVerticalAlign() == 2) + else if ( m_pImpl->rModel.getVerticalAlign() == 2 ) nVerFlag = TEXT_DRAW_BOTTOM; - if(m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 1) + if ( m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 1 ) nHorFlag = TEXT_DRAW_CENTER; - else if(m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 2) + else if ( m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 2 ) nHorFlag = TEXT_DRAW_RIGHT; + Rectangle aRect(_rArea); aRect.Left()+=4; aRect.Right()-=4; aRect.Bottom()-=2; - _rDevice.DrawText( aRect, sHeaderText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); + + _rDevice.DrawText( aRect, sHeaderText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); _rDevice.Pop(); @@ -151,10 +185,10 @@ namespace svt { namespace table // no special painting for the active column at the moment (void)_bSelected; - //selection for column header not yet implemented + // selection for column header not yet implemented } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::PrepareRow( RowPos _nRow, bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rRowArea, const StyleSettings& _rStyle ) { @@ -163,69 +197,74 @@ namespace svt { namespace table _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR); - Color aRowBackground = m_pImpl->rModel.getOddRowBackgroundColor(); - const Color lineColor = m_pImpl->rModel.getLineColor(); - Color aRowBackground2 = m_pImpl->rModel.getEvenRowBackgroundColor(); - const Color fieldColor = _rStyle.GetFieldColor(); - if ( aRowBackground == COL_TRANSPARENT ) - aRowBackground = fieldColor; - if ( aRowBackground2 == COL_TRANSPARENT ) - aRowBackground2 = fieldColor; - //if row is selected background color becomes blue, and lines should be also blue - //if they aren't user defined + ::Color backgroundColor = _rStyle.GetFieldColor(); + + ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() ); + ::Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; + if ( _bSelected ) { - const Color aSelected( _rStyle.GetHighlightColor() ); - aRowBackground = aSelected; - if ( lineColor == COL_TRANSPARENT ) - _rDevice.SetLineColor( aRowBackground ); - else - _rDevice.SetLineColor( lineColor ); + // selected rows use the background color from the style + backgroundColor = _rStyle.GetHighlightColor(); + if ( !aLineColor ) + lineColor = backgroundColor; } - // if row not selected, check the cases whether user defined backgrounds are set - // and set line color to be the same else { - if ( ( aRowBackground2 != fieldColor ) && ( _nRow % 2 ) ) + ::boost::optional< ::std::vector< ::Color > > aRowColors = m_pImpl->rModel.getRowBackgroundColors(); + if ( !aRowColors ) { - aRowBackground = aRowBackground2; - if ( lineColor == COL_TRANSPARENT ) - _rDevice.SetLineColor( aRowBackground ); + // use alternating default colors + if ( ( m_pImpl->nCurrentRow % 2 ) == 0 ) + { + backgroundColor = _rStyle.GetFieldColor(); + } else - _rDevice.SetLineColor( lineColor ); + { + Color hilightColor = _rStyle.GetHighlightColor(); + USHORT const luminance = hilightColor.GetLuminance(); + hilightColor.SetRed( 9 * ( 255 - hilightColor.GetRed() ) / 10 + hilightColor.GetRed() ); + hilightColor.SetGreen( 9 * ( 255 - hilightColor.GetGreen() ) / 10 + hilightColor.GetGreen() ); + hilightColor.SetBlue( 9 * ( 255 - hilightColor.GetBlue() ) / 10 + hilightColor.GetBlue() ); + backgroundColor = hilightColor; + } } - //fill the rows with alternating background colors if second background color is specified - else if ( aRowBackground != fieldColor && lineColor == COL_TRANSPARENT ) - _rDevice.SetLineColor( aRowBackground ); else { - //if Line color is set, then it was user defined and should be visible - //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible - _rDevice.SetLineColor( lineColor ); + if ( aRowColors->empty() ) + { + // all colors have the same background color + backgroundColor = _rStyle.GetFieldColor(); + } + else + { + backgroundColor = aRowColors->at( m_pImpl->nCurrentRow % aRowColors->size() ); + } } } - _rDevice.SetFillColor( aRowBackground ); - _rDevice.DrawRect( _rRowArea ); - // TODO: active? + m_pImpl->bUseGridLines ? _rDevice.SetLineColor( lineColor ) : _rDevice.SetLineColor(); + _rDevice.SetFillColor( backgroundColor ); + _rDevice.DrawRect( _rRowArea ); _rDevice.Pop(); + (void)_bActive; + // row containing the active cell not rendered any special at the moment } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::PaintRowHeader( bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) { _rDevice.Push( PUSH_LINECOLOR | PUSH_TEXTCOLOR ); - _rDevice.SetLineColor( _rStyle.GetSeparatorColor() ); + ::boost::optional< ::Color > const aLineColor( m_pImpl->rModel.getLineColor() ); + ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); - if ( m_pImpl->rModel.getTextColor() != 0x000000 ) - _rDevice.SetTextColor( m_pImpl->rModel.getTextColor() ); - else - _rDevice.SetTextColor( _rStyle.GetFieldTextColor() ); + ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); + _rDevice.SetTextColor( textColor ); ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; @@ -249,7 +288,7 @@ namespace svt { namespace table _rDevice.Pop(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ struct GridTableRenderer::CellRenderContext { OutputDevice& rDevice; @@ -269,7 +308,7 @@ namespace svt { namespace table } }; - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ namespace { /** transforms a rectangle denoting a cell area so that afterwards, it denotes the area we @@ -287,42 +326,23 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::PaintCell( ColPos const i_column, bool _bSelected, bool _bActive, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) { _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); - Color background1 = m_pImpl->rModel.getOddRowBackgroundColor(); - Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor(); - Color lineColor = m_pImpl->rModel.getLineColor(); - // if row is selected and line color isn't user specified, use the settings' color + ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() ); + ::Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; + if ( _bSelected ) { - if ( lineColor == COL_TRANSPARENT ) - _rDevice.SetLineColor( _rStyle.GetHighlightColor() ); - else - _rDevice.SetLineColor( lineColor ); - } - // else set line color to the color of row background - else - { - if ( ( background2 != COL_TRANSPARENT ) && ( m_pImpl->nCurrentRow % 2 ) ) - { - if ( lineColor == COL_TRANSPARENT ) - _rDevice.SetLineColor( background2 ); - else - _rDevice.SetLineColor( lineColor ); - } - else if ( ( background1 != COL_TRANSPARENT ) && ( lineColor == COL_TRANSPARENT ) ) - _rDevice.SetLineColor( background1 ); - else - { - // if line color is set, then it was user defined and should be visible - // if it wasn't set, it'll be the same as the default background color, so lines still won't be visible - _rDevice.SetLineColor( lineColor ); - } + // if no line color is specified by the model, use the usual selection color for lines + if ( !aLineColor ) + lineColor = _rStyle.GetHighlightColor(); } + + m_pImpl->bUseGridLines ? _rDevice.SetLineColor( lineColor ) : _rDevice.SetLineColor(); _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); Rectangle aRect( _rArea ); @@ -337,7 +357,7 @@ namespace svt { namespace table // no special painting for the active cell at the moment } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::impl_paintCellImage( CellRenderContext const & i_context, Image const & i_image ) { Point imagePos( Point( i_context.aContentArea.Left(), i_context.aContentArea.Top() ) ); @@ -382,7 +402,7 @@ namespace svt { namespace table i_context.rDevice.DrawImage( imagePos, imageSize, i_image, 0 ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::impl_paintCellContent( CellRenderContext const & i_context ) { Any aCellContent; @@ -400,15 +420,16 @@ namespace svt { namespace table impl_paintCellText( i_context, sText ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::impl_paintCellText( CellRenderContext const & i_context, ::rtl::OUString const & i_text ) { if ( i_context.bSelected ) i_context.rDevice.SetTextColor( i_context.rStyle.GetHighlightTextColor() ); - else if ( m_pImpl->rModel.getTextColor() != 0x000000 ) - i_context.rDevice.SetTextColor( m_pImpl->rModel.getTextColor() ); else - i_context.rDevice.SetTextColor( i_context.rStyle.GetFieldTextColor() ); + { + ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getTextColor(), i_context.rStyle, &StyleSettings::GetFieldTextColor ); + i_context.rDevice.SetTextColor( textColor ); + } ULONG nVerFlag = TEXT_DRAW_TOP; @@ -437,20 +458,20 @@ namespace svt { namespace table i_context.rDevice.DrawText( textRect, i_text, nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::ShowCellCursor( Window& _rView, const Rectangle& _rCursorRect) { _rView.ShowFocus( _rCursorRect ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::HideCellCursor( Window& _rView, const Rectangle& _rCursorRect) { (void)_rCursorRect; _rView.HideFocus(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool GridTableRenderer::FitsIntoCell( Any const & i_cellContent, ColPos const i_colPos, RowPos const i_rowPos, bool const i_active, bool const i_selected, OutputDevice& i_targetDevice, Rectangle const & i_targetArea ) { @@ -483,7 +504,7 @@ namespace svt { namespace table return true; } -//........................................................................ +//...................................................................................................................... } } // namespace svt::table -//........................................................................ +//...................................................................................................................... diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index bfa5485fdaed..feaf79c166fa 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -155,29 +155,33 @@ namespace svt { namespace table { (void)i_listener; } - virtual ::com::sun::star::util::Color getLineColor() + virtual ::boost::optional< ::Color > getLineColor() const { - return 0; + return ::boost::optional< ::Color >(); } - virtual ::com::sun::star::util::Color getHeaderBackgroundColor() + virtual ::boost::optional< ::Color > getHeaderBackgroundColor() const { - return -1; + return ::boost::optional< ::Color >(); } - virtual ::com::sun::star::util::Color getTextColor() + virtual ::boost::optional< ::Color > getHeaderTextColor() const { - return 0; + return ::boost::optional< ::Color >(); } - virtual ::com::sun::star::util::Color getOddRowBackgroundColor() + virtual ::boost::optional< ::Color > getTextColor() const { - return -1; + return ::boost::optional< ::Color >(); } - virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() + virtual ::boost::optional< ::Color > getTextLineColor() const { - return com::sun::star::style::VerticalAlignment(0); + return ::boost::optional< ::Color >(); } - virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() + virtual ::boost::optional< ::std::vector< ::Color > > getRowBackgroundColors() const { - return -1; + return ::boost::optional< ::std::vector< ::Color > >(); + } + virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() const + { + return com::sun::star::style::VerticalAlignment(0); } virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ) { diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 69df1c929218..ea0a41688355 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -31,6 +31,7 @@ #include "accessibletableimp.hxx" #include #include "svtools/table/tablecontrolinterface.hxx" +#include "svtools/table/gridtablerenderer.hxx" #include "svtools/table/tablecontrol.hxx" #include "unocontroltablemodel.hxx" #include @@ -155,7 +156,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An switch( GetPropertyId( PropertyName ) ) { - case BASEPROPERTY_ROW_HEADER_WIDTH: + case BASEPROPERTY_ROW_HEADER_WIDTH: { sal_Int32 rowHeaderWidth( -1 ); aValue >>= rowHeaderWidth; @@ -184,6 +185,18 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } break; + case BASEPROPERTY_USE_GRID_LINES: + { + GridTableRenderer* pGridRenderer = dynamic_cast< GridTableRenderer* >( + m_pTableModel->getRenderer().get() ); + ENSURE_OR_BREAK( pGridRenderer != NULL, "SVTXGridControl::setProperty(UseGridLines): invalid renderer!" ); + sal_Bool bUseGridLines = sal_False; + OSL_VERIFY( aValue >>= bUseGridLines ); + pGridRenderer->useGridLines( bUseGridLines ); + pTable->Invalidate(); + } + break; + case BASEPROPERTY_ROW_HEIGHT: { sal_Int32 rowHeight = 0; @@ -239,6 +252,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An m_pTableModel->setHorizontalScrollbarVisibility( bHScroll ? ScrollbarShowAlways : ScrollbarShowSmart ); break; } + case BASEPROPERTY_VSCROLL: { sal_Bool bVScroll = true; @@ -258,51 +272,37 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } break; } - case BASEPROPERTY_GRID_HEADER_BACKGROUND: - { - sal_Int32 colorHeader = COL_TRANSPARENT; - if( aValue >>= colorHeader ) - { - m_pTableModel->setHeaderBackgroundColor(colorHeader); - } + + case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS: + m_pTableModel->setRowBackgroundColors( aValue ); + pTable->Invalidate(); break; - } + case BASEPROPERTY_GRID_LINE_COLOR: - { - sal_Int32 colorLine = COL_TRANSPARENT; - if( aValue >>= colorLine ) - { - m_pTableModel->setLineColor(colorLine); - } + m_pTableModel->setLineColor( aValue ); + pTable->Invalidate(); break; - } - case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: - { - sal_Int32 colorEvenRow = COL_TRANSPARENT; - if( aValue >>= colorEvenRow ) - { - m_pTableModel->setEvenRowBackgroundColor(colorEvenRow); - } + + case BASEPROPERTY_GRID_HEADER_BACKGROUND: + m_pTableModel->setHeaderBackgroundColor( aValue ); + pTable->Invalidate(); break; - } - case BASEPROPERTY_GRID_ROW_BACKGROUND: - { - sal_Int32 colorBackground = COL_TRANSPARENT; - if( aValue >>= colorBackground ) - { - m_pTableModel->setOddRowBackgroundColor(colorBackground); - } + + case BASEPROPERTY_GRID_HEADER_TEXT_COLOR: + m_pTableModel->setHeaderTextColor( aValue ); + pTable->Invalidate(); break; - } + case BASEPROPERTY_TEXTCOLOR: - { - sal_Int32 colorText = 0x000000; - if( aValue >>= colorText ) - { - m_pTableModel->setTextColor(colorText); - } + m_pTableModel->setTextColor( aValue ); + pTable->Invalidate(); break; - } + + case BASEPROPERTY_TEXTLINECOLOR: + m_pTableModel->setTextLineColor( aValue ); + pTable->Invalidate(); + break; + case BASEPROPERTY_VERTICALALIGN: { VerticalAlignment eAlign( VerticalAlignment_TOP ); @@ -377,6 +377,17 @@ void SVTXGridControl::impl_checkTableModelInit() } } +namespace +{ + void lcl_convertColor( ::boost::optional< ::Color > const & i_color, Any & o_colorValue ) + { + if ( !i_color ) + o_colorValue.clear(); + else + o_colorValue <<= i_color->GetColor(); + } +} + Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -384,6 +395,8 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getProperty: no control (anymore)!", Any() ); + Any aPropertyValue; + const sal_uInt16 nPropId = GetPropertyId( PropertyName ); switch(nPropId) { @@ -399,34 +412,92 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru case MULTIPLE_SELECTION:eSelectionType = SelectionType_MULTI; break; default: eSelectionType = SelectionType_NONE; break; } - return Any( eSelectionType ); + aPropertyValue <<= eSelectionType; + break; } + case BASEPROPERTY_GRID_SHOWROWHEADER: - return Any ((sal_Bool) m_pTableModel->hasRowHeaders()); + aPropertyValue <<= sal_Bool( m_pTableModel->hasRowHeaders() ); + break; case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: - return Any ((sal_Bool) m_pTableModel->hasColumnHeaders()); + aPropertyValue <<= sal_Bool( m_pTableModel->hasColumnHeaders() ); + break; case BASEPROPERTY_GRID_DATAMODEL: - return Any ( m_pTableModel->getDataModel() ); + aPropertyValue <<= m_pTableModel->getDataModel(); + break; case BASEPROPERTY_GRID_COLUMNMODEL: - return Any ( m_xColumnModel); + aPropertyValue <<= m_xColumnModel; + break; case BASEPROPERTY_HSCROLL: { sal_Bool const bHasScrollbar = ( m_pTableModel->getHorizontalScrollbarVisibility() != ScrollbarShowNever ); - return makeAny( bHasScrollbar ); + aPropertyValue <<= bHasScrollbar; + break; } case BASEPROPERTY_VSCROLL: { sal_Bool const bHasScrollbar = ( m_pTableModel->getVerticalScrollbarVisibility() != ScrollbarShowNever ); - return makeAny( bHasScrollbar ); + aPropertyValue <<= bHasScrollbar; + break; + } + + case BASEPROPERTY_USE_GRID_LINES: + { + GridTableRenderer* pGridRenderer = dynamic_cast< GridTableRenderer* >( + m_pTableModel->getRenderer().get() ); + ENSURE_OR_BREAK( pGridRenderer != NULL, "SVTXGridControl::getProperty(UseGridLines): invalid renderer!" ); + aPropertyValue <<= pGridRenderer->useGridLines(); + } + break; + + case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS: + { + ::boost::optional< ::std::vector< ::Color > > aColors( m_pTableModel->getRowBackgroundColors() ); + if ( !aColors ) + aPropertyValue.clear(); + else + { + Sequence< ::com::sun::star::util::Color > aAPIColors( aColors->size() ); + for ( size_t i=0; isize(); ++i ) + { + aAPIColors[i] = aColors->at(i).GetColor(); + } + aPropertyValue <<= aAPIColors; } } + break; + + case BASEPROPERTY_GRID_LINE_COLOR: + lcl_convertColor( m_pTableModel->getLineColor(), aPropertyValue ); + break; + + case BASEPROPERTY_GRID_HEADER_BACKGROUND: + lcl_convertColor( m_pTableModel->getHeaderBackgroundColor(), aPropertyValue ); + break; + + case BASEPROPERTY_GRID_HEADER_TEXT_COLOR: + lcl_convertColor( m_pTableModel->getHeaderTextColor(), aPropertyValue ); + break; + + case BASEPROPERTY_TEXTCOLOR: + lcl_convertColor( m_pTableModel->getTextColor(), aPropertyValue ); + break; + + case BASEPROPERTY_TEXTLINECOLOR: + lcl_convertColor( m_pTableModel->getTextLineColor(), aPropertyValue ); + break; + + default: + aPropertyValue = VCLXWindow::getProperty( PropertyName ); + break; + } - return VCLXWindow::getProperty( PropertyName ); + return aPropertyValue; } void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) @@ -437,10 +508,10 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_GRID_DATAMODEL, BASEPROPERTY_GRID_COLUMNMODEL, BASEPROPERTY_GRID_SELECTIONMODE, - BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND, BASEPROPERTY_GRID_HEADER_BACKGROUND, + BASEPROPERTY_GRID_HEADER_TEXT_COLOR, BASEPROPERTY_GRID_LINE_COLOR, - BASEPROPERTY_GRID_ROW_BACKGROUND, + BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS, 0 ); VCLXWindow::ImplGetPropertyIds( rIds, true ); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index f7b2ca07eb22..66f7f518dab4 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -79,43 +79,45 @@ namespace svt { namespace table typedef ::std::vector< PColumnModel > ColumnModels; struct UnoControlTableModel_Impl { - ColumnModels aColumns; - bool bHasColumnHeaders; - bool bHasRowHeaders; - ScrollbarVisibility eVScrollMode; - ScrollbarVisibility eHScrollMode; - PTableRenderer pRenderer; - PTableInputHandler pInputHandler; - TableMetrics nRowHeight; - TableMetrics nColumnHeaderHeight; - TableMetrics nRowHeaderWidth; - ::com::sun::star::util::Color m_nLineColor; - ::com::sun::star::util::Color m_nHeaderColor; - ::com::sun::star::util::Color m_nTextColor; - ::com::sun::star::util::Color m_nRowColor1; - ::com::sun::star::util::Color m_nRowColor2; - ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; - ModellListeners m_aListeners; - WeakReference< XGridDataModel > m_aDataModel; - WeakReference< XGridColumnModel > m_aColumnModel; + ColumnModels aColumns; + bool bHasColumnHeaders; + bool bHasRowHeaders; + ScrollbarVisibility eVScrollMode; + ScrollbarVisibility eHScrollMode; + PTableRenderer pRenderer; + PTableInputHandler pInputHandler; + TableMetrics nRowHeight; + TableMetrics nColumnHeaderHeight; + TableMetrics nRowHeaderWidth; + ::boost::optional< ::Color > m_aGridLineColor; + ::boost::optional< ::Color > m_aHeaderBackgroundColor; + ::boost::optional< ::Color > m_aHeaderTextColor; + ::boost::optional< ::Color > m_aTextColor; + ::boost::optional< ::Color > m_aTextLineColor; + ::boost::optional< ::std::vector< ::Color > > m_aRowColors; + ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; + ModellListeners m_aListeners; + WeakReference< XGridDataModel > m_aDataModel; + WeakReference< XGridColumnModel > m_aColumnModel; UnoControlTableModel_Impl() - :aColumns ( ) - ,bHasColumnHeaders ( true ) - ,bHasRowHeaders ( false ) - ,eVScrollMode ( ScrollbarShowNever ) - ,eHScrollMode ( ScrollbarShowNever ) - ,pRenderer ( ) - ,pInputHandler ( ) - ,nRowHeight ( 10 ) - ,nColumnHeaderHeight( 10 ) - ,nRowHeaderWidth ( 10 ) - ,m_nLineColor ( COL_TRANSPARENT ) - ,m_nHeaderColor ( COL_TRANSPARENT ) - ,m_nTextColor ( 0 )//black as default - ,m_nRowColor1 ( COL_TRANSPARENT ) - ,m_nRowColor2 ( COL_TRANSPARENT ) - ,m_eVerticalAlign ( com::sun::star::style::VerticalAlignment_TOP ) + :aColumns ( ) + ,bHasColumnHeaders ( true ) + ,bHasRowHeaders ( false ) + ,eVScrollMode ( ScrollbarShowNever ) + ,eHScrollMode ( ScrollbarShowNever ) + ,pRenderer ( ) + ,pInputHandler ( ) + ,nRowHeight ( 10 ) + ,nColumnHeaderHeight ( 10 ) + ,nRowHeaderWidth ( 10 ) + ,m_aGridLineColor ( ) + ,m_aHeaderBackgroundColor ( ) + ,m_aHeaderTextColor ( ) + ,m_aTextColor ( ) + ,m_aTextLineColor ( ) + ,m_aRowColors ( ) + ,m_eVerticalAlign ( com::sun::star::style::VerticalAlignment_TOP ) { } }; @@ -557,77 +559,124 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getLineColor() + namespace + { + void lcl_setColor( Any const & i_color, ::boost::optional< ::Color > & o_convertedColor ) + { + if ( !i_color.hasValue() ) + o_convertedColor.reset(); + else + { + sal_Int32 nColor = COL_TRANSPARENT; + if ( i_color >>= nColor ) + { + o_convertedColor.reset( ::Color( nColor ) ); + } + else + { + OSL_ENSURE( false, "lcl_setColor: could not extract color value!" ); + } + } + } + } + + //------------------------------------------------------------------------------------------------------------------ + ::boost::optional< ::Color > UnoControlTableModel::getLineColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nLineColor; + return m_pImpl->m_aGridLineColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setLineColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setLineColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nLineColor = _rColor; + lcl_setColor( i_color, m_pImpl->m_aGridLineColor ); } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getHeaderBackgroundColor() + ::boost::optional< ::Color > UnoControlTableModel::getHeaderBackgroundColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nHeaderColor; + return m_pImpl->m_aHeaderBackgroundColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setHeaderBackgroundColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setHeaderBackgroundColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nHeaderColor = _rColor; + lcl_setColor( i_color, m_pImpl->m_aHeaderBackgroundColor ); } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getTextColor() + ::boost::optional< ::Color > UnoControlTableModel::getHeaderTextColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nTextColor; + return m_pImpl->m_aHeaderTextColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setTextColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setHeaderTextColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nTextColor = _rColor; + lcl_setColor( i_color, m_pImpl->m_aHeaderTextColor ); } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getOddRowBackgroundColor() + ::boost::optional< ::Color > UnoControlTableModel::getTextColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nRowColor1; + return m_pImpl->m_aTextColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setOddRowBackgroundColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setTextColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nRowColor1 = _rColor; + lcl_setColor( i_color, m_pImpl->m_aTextColor ); } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getEvenRowBackgroundColor() + ::boost::optional< ::Color > UnoControlTableModel::getTextLineColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nRowColor2; + return m_pImpl->m_aTextColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setEvenRowBackgroundColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setTextLineColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nRowColor2 = _rColor; + lcl_setColor( i_color, m_pImpl->m_aTextLineColor ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::boost::optional< ::std::vector< ::Color > > UnoControlTableModel::getRowBackgroundColors() const + { + DBG_CHECK_ME(); + return m_pImpl->m_aRowColors; + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::setRowBackgroundColors( ::com::sun::star::uno::Any const & i_APIValue ) + { + DBG_CHECK_ME(); + Sequence< ::com::sun::star::util::Color > aAPIColors; + if ( !( i_APIValue >>= aAPIColors ) ) + m_pImpl->m_aRowColors.reset(); + else + { + ::std::vector< ::Color > aColors( aAPIColors.getLength() ); + for ( sal_Int32 i=0; im_aRowColors.reset( aColors ); + } } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::style::VerticalAlignment UnoControlTableModel::getVerticalAlign() + ::com::sun::star::style::VerticalAlignment UnoControlTableModel::getVerticalAlign() const { DBG_CHECK_ME(); return m_pImpl->m_eVerticalAlign; diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index a6cd858ed34f..c1abe2c88e3a 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -87,30 +87,33 @@ namespace svt { namespace table public: // ITableModel overridables - virtual TableSize getColumnCount() const; - virtual TableSize getRowCount() const; - virtual bool hasColumnHeaders() const; - virtual bool hasRowHeaders() const; - virtual bool isCellEditable( ColPos col, RowPos row ) const; - virtual PColumnModel getColumnModel( ColPos column ); - virtual PTableRenderer getRenderer() const; - virtual PTableInputHandler getInputHandler() const; - virtual TableMetrics getRowHeight() const; - virtual TableMetrics getColumnHeaderHeight() const; - virtual TableMetrics getRowHeaderWidth() const; - virtual ScrollbarVisibility getVerticalScrollbarVisibility() const; - virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const; - virtual void addTableModelListener( const PTableModelListener& i_listener ); - virtual void removeTableModelListener( const PTableModelListener& i_listener ); - virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ); - virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip ); - virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const; - virtual ::com::sun::star::util::Color getLineColor(); - virtual ::com::sun::star::util::Color getHeaderBackgroundColor(); - virtual ::com::sun::star::util::Color getTextColor(); - virtual ::com::sun::star::util::Color getOddRowBackgroundColor(); - virtual ::com::sun::star::util::Color getEvenRowBackgroundColor(); - virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign(); + virtual TableSize getColumnCount() const; + virtual TableSize getRowCount() const; + virtual bool hasColumnHeaders() const; + virtual bool hasRowHeaders() const; + virtual bool isCellEditable( ColPos col, RowPos row ) const; + virtual PColumnModel getColumnModel( ColPos column ); + virtual PTableRenderer getRenderer() const; + virtual PTableInputHandler getInputHandler() const; + virtual TableMetrics getRowHeight() const; + virtual TableMetrics getColumnHeaderHeight() const; + virtual TableMetrics getRowHeaderWidth() const; + virtual ScrollbarVisibility getVerticalScrollbarVisibility() const; + virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const; + virtual void addTableModelListener( const PTableModelListener& i_listener ); + virtual void removeTableModelListener( const PTableModelListener& i_listener ); + virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ); + virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip ); + virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const; + virtual ::boost::optional< ::Color > getLineColor() const; + virtual ::boost::optional< ::Color > getHeaderBackgroundColor() const; + virtual ::boost::optional< ::Color > getHeaderTextColor() const; + virtual ::boost::optional< ::Color > getTextColor() const; + virtual ::boost::optional< ::Color > getTextLineColor() const; + virtual ::boost::optional< ::std::vector< ::Color > > + getRowBackgroundColors() const; + virtual ::com::sun::star::style::VerticalAlignment + getVerticalAlign() const; // column write access void appendColumn( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column ); @@ -121,19 +124,24 @@ namespace svt { namespace table // other operations void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; + void setDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > const & i_gridDataModel ); bool hasDataModel() const; ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > getDataModel() const; void setColumnModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > const & i_gridColumnModel ); bool hasColumnModel() const; + void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); - void setLineColor(::com::sun::star::util::Color _rColor); - void setHeaderBackgroundColor(::com::sun::star::util::Color _rColor); - void setTextColor(::com::sun::star::util::Color _rColor); - void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor); - void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor); + + void setLineColor( ::com::sun::star::uno::Any const & i_color ); + void setHeaderBackgroundColor( ::com::sun::star::uno::Any const & i_color ); + void setHeaderTextColor( ::com::sun::star::uno::Any const & i_color ); + void setTextColor( ::com::sun::star::uno::Any const & i_color ); + void setTextLineColor( ::com::sun::star::uno::Any const & i_color ); + void setRowBackgroundColors( ::com::sun::star::uno::Any const & i_APIValue ); + void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); /// retrieves the index of a column within the model diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index 405b6ac44053..861ed18df847 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -196,14 +196,15 @@ namespace rtl { #define BASEPROPERTY_ENABLEVISIBLE 145 // sal_Bool #define BASEPROPERTY_REFERENCE_DEVICE 146 #define BASEPROPERTY_HIGHCONTRASTMODE 147 -#define BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND 148 -#define BASEPROPERTY_GRID_HEADER_BACKGROUND 149 -#define BASEPROPERTY_GRID_LINE_COLOR 150 -#define BASEPROPERTY_GRID_ROW_BACKGROUND 151 +#define BASEPROPERTY_GRID_HEADER_BACKGROUND 148 +#define BASEPROPERTY_GRID_HEADER_TEXT_COLOR 149 +#define BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS 150 +#define BASEPROPERTY_GRID_LINE_COLOR 151 #define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152 #define BASEPROPERTY_ITEM_SEPARATOR_POS 153 #define BASEPROPERTY_ROW_HEADER_WIDTH 154 #define BASEPROPERTY_COLUMN_HEADER_HEIGHT 155 +#define BASEPROPERTY_USE_GRID_LINES 156 // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 28a203b81c03..33d0bf048bfd 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -87,11 +87,13 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: ImplRegisterProperty( BASEPROPERTY_FONTEMPHASISMARK ); ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR ); ImplRegisterProperty( BASEPROPERTY_TEXTCOLOR ); - ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN ); - ImplRegisterProperty( BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND ); - ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_BACKGROUND ); + ImplRegisterProperty( BASEPROPERTY_TEXTLINECOLOR ); + ImplRegisterProperty( BASEPROPERTY_USE_GRID_LINES ); ImplRegisterProperty( BASEPROPERTY_GRID_LINE_COLOR ); - ImplRegisterProperty( BASEPROPERTY_GRID_ROW_BACKGROUND ); + ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_BACKGROUND ); + ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_TEXT_COLOR ); + ImplRegisterProperty( BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS ); + ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN ); } //---------------------------------------------------------------------------------------------------------------------- @@ -199,6 +201,7 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_GRID_SELECTIONMODE: return uno::makeAny( SelectionType(1) ); case BASEPROPERTY_GRID_SHOWROWHEADER: + case BASEPROPERTY_USE_GRID_LINES: return uno::makeAny( (sal_Bool)sal_False ); case BASEPROPERTY_ROW_HEADER_WIDTH: return uno::makeAny( sal_Int32( 10 ) ); @@ -206,15 +209,11 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const return uno::makeAny( (sal_Bool)sal_True ); case BASEPROPERTY_COLUMN_HEADER_HEIGHT: case BASEPROPERTY_ROW_HEIGHT: - return Any(); - case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: - return uno::makeAny( com::sun::star::util::Color( COL_TRANSPARENT ) ); case BASEPROPERTY_GRID_HEADER_BACKGROUND: - return uno::makeAny( com::sun::star::util::Color( COL_TRANSPARENT ) ); + case BASEPROPERTY_GRID_HEADER_TEXT_COLOR: case BASEPROPERTY_GRID_LINE_COLOR: - return uno::makeAny( com::sun::star::util::Color( COL_TRANSPARENT ) ); - case BASEPROPERTY_GRID_ROW_BACKGROUND: - return uno::makeAny(com::sun::star::util::Color( COL_TRANSPARENT ) ); + case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS: + return Any(); default: return UnoControlModel::ImplGetDefaultValue( nPropId ); } diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index e2849c60cc58..97ba72c41f50 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -285,10 +285,11 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_3 ( "SelectionModel", GRID_SELECTIONMODE, ::com::sun::star::view::SelectionType, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "ReferenceDevice", REFERENCE_DEVICE, Reference< XDevice >,BOUND, MAYBEDEFAULT, TRANSIENT ), - DECL_PROP_3 ( "EvenRowBackgroundColor", GRID_EVEN_ROW_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), - DECL_PROP_3 ( "HeaderBackgroundColor", GRID_HEADER_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), - DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), - DECL_PROP_3 ( "RowBackgroundColor", GRID_ROW_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ) + DECL_PROP_3 ( "HeaderBackgroundColor", GRID_HEADER_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "HeaderTextColor", GRID_HEADER_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "RowBackgroundColors", GRID_ROW_BACKGROUND_COLORS, Sequence< sal_Int32 >, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_2 ( "UseGridLines", USE_GRID_LINES, sal_Bool, BOUND, MAYBEDEFAULT ), }; pPropertyInfos = aImplPropertyInfos; nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo ); -- cgit From edc807267cd919293994def7da1a22e4b53ba9b6 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 12:34:24 +0100 Subject: gridsort: reworked the color model for grid controls. Now supporting more than two alternating colors, having more reasonable defaults for the colors (VOID instead of some hard-coded values, which thus are unusable). Also, introduced new property UseGridLines controlling whether or not to paint the table grid. --- .../com/sun/star/awt/grid/UnoControlGridModel.idl | 58 ++++++++++++++++++---- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl index c4f4e3a08f09..a348d4b3e23c 100644 --- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl +++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl @@ -130,26 +130,48 @@ service UnoControlGridModel */ [property] ::com::sun::star::view::SelectionType SelectionModel; - /** Specifies the background color of rows. If color for even rows is set, then specifies - the color of odd rows. Default value is white. + /** controls whether or not to paint horizontal and vertical lines between the grid cells. + + @see LineColor */ - [property] ::com::sun::star::util::Color RowBackgroundColor; + [property] boolean UseGridLines; + + /** specifies the color to be used when drawing lines between cells - /** Specifies the background color of even rows. Default value is white. +

          If this property has a value of , the grid control renderer will use some default color, + depending on the system's style settings.

          + + @see UseGridLines */ - [property] ::com::sun::star::util::Color EvenRowBackgroundColor; + [property, maybevoid] ::com::sun::star::util::Color GridLineColor; + + /** specifies the color to be used when drawing the background of row or column headers - /** Specifies the background color of header. Default value is white. +

          If this property has a value of , the grid control renderer will use some default color, + depending on the system's style settings.

          */ - [property] ::com::sun::star::util::Color HeaderBackgroundColor; + [property, maybevoid] ::com::sun::star::util::Color HeaderBackgroundColor; - /** Specifies the text color. Default value is black. + /** specifies the color to be used when drawing the text within row or column headers + +

          If this property has a value of , the grid control renderer will use some default color, + depending on the system's style settings.

          */ - [property] ::com::sun::star::util::Color TextColor; + [property, maybevoid] ::com::sun::star::util::Color HeaderTextColor; + + /** specifies the colors to be used as background for data rows. + +

          If this sequence is non-empty, the data rows will be rendered with alternating background colors: Assuming + the sequence has n elements, each row will use the background color as specified by its number's + remainder modulo n.

          - /** Specifies the line color. Default value is white. +

          If this sequence is empty, all rows will use the same background color as the control as whole.

          + +

          If this property does not exist at a particular implementation, or is , rows will be painted + in alternating background colors, every second row having a background color derived from the control's + selection color.

          */ - [property] ::com::sun::star::util::Color LineColor; + [property, maybevoid] sequence< ::com::sun::star::util::Color > RowBackgroundColors; /** specifies the vertical alignment of the content in the control. @@ -165,6 +187,20 @@ service UnoControlGridModel */ [property] com::sun::star::awt::FontDescriptor FontDescriptor; + /** specifies the color to be used when drawing cell texts + +

          If this property has a value of , the grid control renderer will use some default color, + depending on the system's style settings.

          + */ + [property, maybevoid] ::com::sun::star::util::Color TextColor; + + /** specifies the color to be used when drawing text lines (underlining and strikethrough) + +

          If this property has a value of , the grid control renderer will use some default color, + depending on the system's style settings.

          + */ + [property, maybevoid] com::sun::star::util::Color TextLineColor; + /** specifies the FontEmphasis value of the text in the control. */ -- cgit From 8578ba4dc736b53c3ca8461516e4024d276b3b05 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 14:00:45 +0100 Subject: gridsort: consolidated and fixed table cell rendering. Instead of tampering with the target areas for cell rendering in various different places, do this in the renderer only, in a single defined way. --- svtools/source/table/gridtablerenderer.cxx | 106 +++++++++++++++-------------- svtools/source/table/tablecontrol_impl.cxx | 53 ++++----------- 2 files changed, 67 insertions(+), 92 deletions(-) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 3163cc54174c..fa84e6be6fdf 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -73,6 +73,26 @@ namespace svt { namespace table { } }; + namespace + { + static Rectangle lcl_getContentArea( GridTableRenderer_Impl const & i_impl, Rectangle const & i_cellArea ) + { + Rectangle aContentArea( i_cellArea ); + if ( i_impl.bUseGridLines ) + { + --aContentArea.Right(); + --aContentArea.Bottom(); + } + return aContentArea; + } + static Rectangle lcl_getTextRenderingArea( Rectangle const & i_contentArea ) + { + Rectangle aTextArea( i_contentArea ); + aTextArea.Left() += 2; aTextArea.Right() -= 2; + ++aTextArea.Top(); --aTextArea.Bottom(); + return aTextArea; + } + } //================================================================================================================== //= GridTableRenderer @@ -129,14 +149,18 @@ namespace svt { namespace table OSL_PRECOND( _bIsColHeaderArea || _bIsRowHeaderArea, "GridTableRenderer::PaintHeaderArea: invalid area flags!" ); - _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR); + _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR ); Color const background = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderBackgroundColor(), _rStyle, &StyleSettings::GetDialogColor ); _rDevice.SetFillColor( background ); - m_pImpl->bUseGridLines ? _rDevice.SetLineColor( _rStyle.GetSeparatorColor() ) : _rDevice.SetLineColor(); + _rDevice.SetLineColor(); _rDevice.DrawRect( _rArea ); + // delimiter lines at bottom/right + ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() ); + ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; + _rDevice.SetLineColor( lineColor ); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); @@ -150,8 +174,6 @@ namespace svt { namespace table OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) { _rDevice.Push( PUSH_LINECOLOR); - _rDevice.SetLineColor(_rStyle.GetSeparatorColor()); - _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight()); String sHeaderText; PColumnModel pColumn = m_pImpl->rModel.getColumnModel( _nCol ); @@ -173,12 +195,15 @@ namespace svt { namespace table else if ( m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 2 ) nHorFlag = TEXT_DRAW_RIGHT; - Rectangle aRect(_rArea); - aRect.Left()+=4; aRect.Right()-=4; - aRect.Bottom()-=2; + Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); + _rDevice.DrawText( aTextRect, sHeaderText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); - _rDevice.DrawText( aRect, sHeaderText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); + ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() ); + ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; + _rDevice.SetLineColor( lineColor ); + _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight()); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); + _rDevice.Pop(); (void)_bActive; @@ -243,7 +268,8 @@ namespace svt { namespace table } } - m_pImpl->bUseGridLines ? _rDevice.SetLineColor( lineColor ) : _rDevice.SetLineColor(); + //m_pImpl->bUseGridLines ? _rDevice.SetLineColor( lineColor ) : _rDevice.SetLineColor(); + _rDevice.SetLineColor(); _rDevice.SetFillColor( backgroundColor ); _rDevice.DrawRect( _rRowArea ); @@ -261,6 +287,7 @@ namespace svt { namespace table ::boost::optional< ::Color > const aLineColor( m_pImpl->rModel.getLineColor() ); ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; + _rDevice.SetLineColor( lineColor ); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); @@ -277,10 +304,8 @@ namespace svt { namespace table else if ( m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 2 ) nHorFlag = TEXT_DRAW_RIGHT; - Rectangle aRect( _rArea ); - aRect.Left()+=4; aRect.Right()-=4; - aRect.Bottom()-=2; - _rDevice.DrawText( aRect, m_pImpl->rModel.getRowHeader( m_pImpl->nCurrentRow ), nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); + Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); + _rDevice.DrawText( aTextRect, m_pImpl->rModel.getRowHeader( m_pImpl->nCurrentRow ), nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); // TODO: active? selected? (void)_bActive; @@ -308,48 +333,31 @@ namespace svt { namespace table } }; - //------------------------------------------------------------------------------------------------------------------ - namespace - { - /** transforms a rectangle denoting a cell area so that afterwards, it denotes the area we - can use for rendering the cell's content. - */ - static void lcl_convertCellToContentArea( Rectangle & io_area ) - { - ++io_area.Left(); --io_area.Right(); - } - - static void lcl_convertContentToTextRenderingArea( Rectangle & io_area ) - { - io_area.Left() += 2; io_area.Right() -= 2; - ++io_area.Top(); --io_area.Bottom(); - } - } - //------------------------------------------------------------------------------------------------------------------ void GridTableRenderer::PaintCell( ColPos const i_column, bool _bSelected, bool _bActive, OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle ) { _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); - ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() ); - ::Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; + Rectangle const aContentArea( lcl_getContentArea( *m_pImpl, _rArea ) ); + CellRenderContext const aRenderContext( _rDevice, aContentArea, _rStyle, i_column, _bSelected ); + impl_paintCellContent( aRenderContext ); - if ( _bSelected ) + if ( m_pImpl->bUseGridLines ) { - // if no line color is specified by the model, use the usual selection color for lines - if ( !aLineColor ) - lineColor = _rStyle.GetHighlightColor(); - } + ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() ); + ::Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; - m_pImpl->bUseGridLines ? _rDevice.SetLineColor( lineColor ) : _rDevice.SetLineColor(); - _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); - - Rectangle aRect( _rArea ); - lcl_convertCellToContentArea( aRect ); + if ( _bSelected && !aLineColor ) + { + // if no line color is specified by the model, use the usual selection color for lines in selected cells + lineColor = _rStyle.GetHighlightColor(); + } - const CellRenderContext aRenderContext( _rDevice, aRect, _rStyle, i_column, _bSelected ); - impl_paintCellContent( aRenderContext ); + _rDevice.SetLineColor( lineColor ); + _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); + _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() ); + } _rDevice.Pop(); @@ -452,9 +460,7 @@ namespace svt { namespace table break; } - Rectangle textRect( i_context.aContentArea ); - lcl_convertContentToTextRenderingArea( textRect ); - + Rectangle const textRect( lcl_getTextRenderingArea( i_context.aContentArea ) ); i_context.rDevice.DrawText( textRect, i_text, nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); } @@ -487,9 +493,7 @@ namespace svt { namespace table if ( sText.getLength() == 0 ) return true; - Rectangle aTargetArea( i_targetArea ); - lcl_convertCellToContentArea( aTargetArea ); - lcl_convertContentToTextRenderingArea( aTargetArea ); + Rectangle const aTargetArea( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, i_targetArea ) ) ); long const nTextHeight = i_targetDevice.GetTextHeight(); if ( nTextHeight > aTargetArea.GetHeight() ) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index feaf79c166fa..d528f46d8fe6 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1071,9 +1071,6 @@ namespace svt { namespace table TableRowGeometry aHeaderRow( *this, Rectangle( Point( 0, 0 ), aAllCellsWithHeaders.BottomRight() ), ROW_COL_HEADERS ); Rectangle aColRect(aHeaderRow.getRect()); - // to avoid double lines when scrolling horizontally - if ( m_nLeftColumn != 0 ) - --aColRect.Left(); pRenderer->PaintHeaderArea( *m_pDataWindow, aColRect, true, false, rStyle ); @@ -1101,31 +1098,20 @@ namespace svt { namespace table { aRowHeaderArea = aAllCellsWithHeaders; aRowHeaderArea.Right() = m_nRowHeaderWidthPixel - 1; - if(m_nTopRow+nActualRows>m_nRowCount) - aRowHeaderArea.Bottom() = m_nRowHeightPixel * (nActualRows -1)+ m_nColHeaderHeightPixel - 1; + if ( m_nTopRow + nActualRows > m_nRowCount ) + aRowHeaderArea.Bottom() = m_nRowHeightPixel * (nActualRows - 1 ) + m_nColHeaderHeightPixel - 1; else aRowHeaderArea.Bottom() = m_nRowHeightPixel * nActualRows + m_nColHeaderHeightPixel - 1; - //to avoid double lines when scrolling vertically - if(m_nTopRow != 0) - --aRowHeaderArea.Top(); - --aRowHeaderArea.Right(); - pRenderer->PaintHeaderArea(*m_pDataWindow, aRowHeaderArea, false, true, rStyle); + pRenderer->PaintHeaderArea( *m_pDataWindow, aRowHeaderArea, false, true, rStyle ); // Note that strictly, aRowHeaderArea also contains the intersection between column // and row header area. However, below we go to paint this intersection, again, // so this hopefully doesn't hurt if we already paint it here. if ( m_pModel->hasColumnHeaders() ) { - TableCellGeometry aIntersection( *this, Rectangle( Point( 0, 0 ), + TableCellGeometry const aIntersection( *this, Rectangle( Point( 0, 0 ), aAllCellsWithHeaders.BottomRight() ), COL_ROW_HEADERS, ROW_COL_HEADERS ); - Rectangle aInters(aIntersection.getRect()); - //to avoid double line when scrolling vertically - if( m_nTopRow != 0 ) - { - --aInters.Top(); - --aInters.Bottom(); - } - --aInters.Right(); + Rectangle const aInters( aIntersection.getRect() ); pRenderer->PaintHeaderArea( *m_pDataWindow, aInters, true, true, rStyle ); @@ -1146,28 +1132,12 @@ namespace svt { namespace table { if ( _rUpdateRect.GetIntersection( aRowIterator.getRect() ).IsEmpty() ) continue; - bool isActiveRow = ( aRowIterator.getRow() == getCurrentRow() ); - bool isSelectedRow = false; - if(!m_aSelectedRows.empty()) - { - for(std::vector::iterator itSel=m_aSelectedRows.begin(); - itSel!=m_aSelectedRows.end();++itSel) - { - if(*itSel == aRowIterator.getRow()) - isSelectedRow = true; - } - } - Rectangle aRect = aRowIterator.getRect().GetIntersection( aAllDataCellsArea ); - // to avoid double lines - if ( aRowIterator.getRow() != 0 ) - --aRect.Top(); - if ( m_nLeftColumn != 0 ) - --aRect.Left(); - else - { - if ( m_pModel->hasRowHeaders( )) - --aRect.Left(); - } + + bool const isActiveRow = ( aRowIterator.getRow() == getCurrentRow() ); + bool const isSelectedRow = isRowSelected( aRowIterator.getRow() ); + + Rectangle const aRect = aRowIterator.getRect().GetIntersection( aAllDataCellsArea ); + // give the redenderer a chance to prepare the row pRenderer->PrepareRow( aRowIterator.getRow(), isActiveRow, isSelectedRow, @@ -1181,6 +1151,7 @@ namespace svt { namespace table pRenderer->PaintRowHeader( isActiveRow, isSelectedRow, *m_pDataWindow, aCurrentRowHeader, rStyle ); } + if ( !colCount ) continue; -- cgit From c2718415ea6fdc1181e25168a8c394a60699384e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 14:09:38 +0100 Subject: gridsort: consolidated retrieval of text draw flags - on incarnation of those 10 lines of code is enough, isn't it? --- svtools/source/table/gridtablerenderer.cxx | 79 +++++++++++++----------------- 1 file changed, 33 insertions(+), 46 deletions(-) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index fa84e6be6fdf..35220576e5c0 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -92,6 +92,32 @@ namespace svt { namespace table ++aTextArea.Top(); --aTextArea.Bottom(); return aTextArea; } + + static ULONG lcl_getAlignmentTextDrawFlags( GridTableRenderer_Impl const & i_impl, ColPos const i_columnPos ) + { + ULONG nVertFlag = TEXT_DRAW_TOP; + VerticalAlignment const eVertAlign = i_impl.rModel.getVerticalAlign(); + switch ( eVertAlign ) + { + case VerticalAlignment_MIDDLE: nVertFlag = TEXT_DRAW_VCENTER; break; + case VerticalAlignment_BOTTOM: nVertFlag = TEXT_DRAW_BOTTOM; break; + default: + break; + } + + ULONG nHorzFlag = TEXT_DRAW_LEFT; + HorizontalAlignment const eHorzAlign = i_impl.rModel.getColumnModel( i_columnPos )->getHorizontalAlign(); + switch ( eHorzAlign ) + { + case HorizontalAlignment_CENTER: nHorzFlag = TEXT_DRAW_CENTER; break; + case HorizontalAlignment_RIGHT: nHorzFlag = TEXT_DRAW_RIGHT; break; + default: + break; + } + + return nVertFlag | nHorzFlag; + } + } //================================================================================================================== @@ -184,19 +210,9 @@ namespace svt { namespace table ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); _rDevice.SetTextColor( textColor ); - ULONG nHorFlag = TEXT_DRAW_LEFT; - ULONG nVerFlag = TEXT_DRAW_TOP; - if ( m_pImpl->rModel.getVerticalAlign() == 1 ) - nVerFlag = TEXT_DRAW_VCENTER; - else if ( m_pImpl->rModel.getVerticalAlign() == 2 ) - nVerFlag = TEXT_DRAW_BOTTOM; - if ( m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 1 ) - nHorFlag = TEXT_DRAW_CENTER; - else if ( m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 2 ) - nHorFlag = TEXT_DRAW_RIGHT; - Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); - _rDevice.DrawText( aTextRect, sHeaderText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); + ULONG const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, _nCol ) | TEXT_DRAW_CLIP; + _rDevice.DrawText( aTextRect, sHeaderText, nDrawTextFlags ); ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() ); ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; @@ -293,19 +309,10 @@ namespace svt { namespace table ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); _rDevice.SetTextColor( textColor ); - ULONG nHorFlag = TEXT_DRAW_LEFT; - ULONG nVerFlag = TEXT_DRAW_TOP; - if ( m_pImpl->rModel.getVerticalAlign() == 1 ) - nVerFlag = TEXT_DRAW_VCENTER; - else if ( m_pImpl->rModel.getVerticalAlign() == 2 ) - nVerFlag = TEXT_DRAW_BOTTOM; - if ( m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 1 ) - nHorFlag = TEXT_DRAW_CENTER; - else if ( m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 2 ) - nHorFlag = TEXT_DRAW_RIGHT; - Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); - _rDevice.DrawText( aTextRect, m_pImpl->rModel.getRowHeader( m_pImpl->nCurrentRow ), nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); + ULONG const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, 0 ) | TEXT_DRAW_CLIP; + // TODO: is using the horizontal alignment of the 0'th column a good idea here? This is pretty ... arbitray .. + _rDevice.DrawText( aTextRect, m_pImpl->rModel.getRowHeader( m_pImpl->nCurrentRow ), nDrawTextFlags ); // TODO: active? selected? (void)_bActive; @@ -439,29 +446,9 @@ namespace svt { namespace table i_context.rDevice.SetTextColor( textColor ); } - - ULONG nVerFlag = TEXT_DRAW_TOP; - const VerticalAlignment eVertAlign = m_pImpl->rModel.getVerticalAlign(); - switch ( eVertAlign ) - { - case VerticalAlignment_MIDDLE: nVerFlag = TEXT_DRAW_VCENTER; break; - case VerticalAlignment_BOTTOM: nVerFlag = TEXT_DRAW_BOTTOM; break; - default: - break; - } - - ULONG nHorFlag = TEXT_DRAW_LEFT; - const HorizontalAlignment eHorzAlign = m_pImpl->rModel.getColumnModel( i_context.nColumn )->getHorizontalAlign(); - switch ( eHorzAlign ) - { - case HorizontalAlignment_CENTER: nHorFlag = TEXT_DRAW_CENTER; break; - case HorizontalAlignment_RIGHT: nHorFlag = TEXT_DRAW_RIGHT; break; - default: - break; - } - Rectangle const textRect( lcl_getTextRenderingArea( i_context.aContentArea ) ); - i_context.rDevice.DrawText( textRect, i_text, nHorFlag | nVerFlag | TEXT_DRAW_CLIP ); + ULONG const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, i_context.nColumn ) | TEXT_DRAW_CLIP; + i_context.rDevice.DrawText( textRect, i_text, nDrawTextFlags ); } //------------------------------------------------------------------------------------------------------------------ -- cgit From c9eead1b9965c797cca47024d30cb7b8d00c7029 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 14:34:38 +0100 Subject: gridsort: impl_getCellRect: no need to adjust the rect as returned by the TableCellGeometry instance. If there are really situations which rely on this, there'y buggy, and need to be fixed properly. --- svtools/source/table/tablecontrol.cxx | 8 ++++---- svtools/source/table/tablecontrol_impl.cxx | 32 +++++++++++++++++------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 4c94be7f01f4..d58243405800 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -228,17 +228,17 @@ namespace svt { namespace table void TableControl::InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved) { Rectangle _rRect; - if(_bRemoved) + if ( _bRemoved ) m_pImpl->invalidateRows(); else { - if(m_bSelectionChanged) + if ( m_bSelectionChanged ) { - m_pImpl->invalidateSelectedRegion(_nRowStart, _nRowEnd, _rRect); + m_pImpl->invalidateSelectedRegion( _nRowStart, _nRowEnd, _rRect ); m_bSelectionChanged = false; } else - m_pImpl->invalidateRow(_nRowStart, _rRect); + m_pImpl->invalidateRow( _nRowStart, _rRect ); } } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index d528f46d8fe6..7176ba332a0b 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1573,12 +1573,10 @@ namespace svt { namespace table { Rectangle aCellRect; impl_getCellRect( m_nCurColumn, m_nCurRow, aCellRect ); - if(!m_pModel->hasRowHeaders() && m_nCurColumn == 0) - aCellRect.Left()++; if ( _bShow ) - pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect); + pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect ); else - pRenderer->HideCellCursor( *m_pDataWindow, aCellRect); + pRenderer->HideCellCursor( *m_pDataWindow, aCellRect ); } } @@ -1601,7 +1599,6 @@ namespace svt { namespace table TableCellGeometry aCell( *this, aAllCells, _nColumn, _nRow ); _rCellRect = aCell.getRect(); - _rCellRect.Top()--;_rCellRect.Left()--; } //------------------------------------------------------------------------------------------------------------------ @@ -1696,7 +1693,7 @@ namespace svt { namespace table { Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); - _rCellRect.Top() = --aCellRect.Top(); + _rCellRect.Top() = aCellRect.Top(); _rCellRect.Bottom() = aCellRect.Bottom(); } //if the region is above the current row @@ -1704,7 +1701,7 @@ namespace svt { namespace table { Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect ); - _rCellRect.Top() = --aCellRect.Top(); + _rCellRect.Top() = aCellRect.Top(); impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); _rCellRect.Bottom() = aCellRect.Bottom(); } @@ -1713,7 +1710,7 @@ namespace svt { namespace table { Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); - _rCellRect.Top() = --aCellRect.Top(); + _rCellRect.Top() = aCellRect.Top(); impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect ); _rCellRect.Bottom() = aCellRect.Bottom(); } @@ -1723,26 +1720,33 @@ namespace svt { namespace table //this method is to be called, when a new row is added void TableControl_Impl::invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect) { - if(m_nCurRow < 0) + if ( m_nCurRow < 0 ) + // hmm? Why this? Looks like a hack to me, working around some other problem. m_nCurRow = 0; - if(m_nCursorHidden == 2) + + if ( m_nCursorHidden == 2 ) + // WTF? what kind of hack is this? --m_nCursorHidden; + impl_getAllVisibleCellsArea( _rCellRect ); - TableRowGeometry _rRow( *this, _rCellRect, _nRowPos); impl_ni_updateScrollbars(); - m_pDataWindow->Invalidate(_rRow.getRect()); + + TableRowGeometry const aRow( *this, _rCellRect, _nRowPos); + m_pDataWindow->Invalidate( aRow.getRect() ); } //------------------------------------------------------------------------------------------------------------------ + std::vector& TableControl_Impl::getSelectedRows() { return m_aSelectedRows; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::clearSelection() { m_aSelectedRows.clear(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::removeSelectedRow(RowPos _nRowPos) { -- cgit From 0a4c6941671d13891aafec23778baabc38980a70 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 12 Jan 2011 17:11:03 +0100 Subject: vcl118: #i37400# implement Fax G4 encoding for 1bit images --- vcl/source/gdi/pdfwriter_impl.cxx | 64 +++-- vcl/source/gdi/pdfwriter_impl.hxx | 5 + vcl/source/gdi/pdfwriter_impl2.cxx | 473 +++++++++++++++++++++++++++++++++++++ 3 files changed, 519 insertions(+), 23 deletions(-) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 427b025f2051..5540a5f0c48e 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9660,15 +9660,24 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) aLine.append( " 0 obj\n" "<
          >\n" ); + } #endif if( ! bMask ) { @@ -9736,7 +9745,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) { if( aBitmap.GetBitCount() == 1 ) { - aLine.append( " /ImageMask true\n" ); + aLine.append( "/ImageMask true\n" ); sal_Int32 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color( COL_BLACK ) ) ); DBG_ASSERT( nBlackIndex == 0 || nBlackIndex == 1, "wrong black index" ); if( nBlackIndex ) @@ -9798,33 +9807,42 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, &nStartPos )) ); checkAndEnableStreamEncryption( rObject.m_nObject ); - beginCompression(); - if( ! bTrueColor || pAccess->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB ) +#ifndef DEBUG_DISABLE_PDFCOMPRESSION + if( nBitsPerComponent == 1 ) { - const int nScanLineBytes = 1 + ( pAccess->GetBitCount() * ( pAccess->Width() - 1 ) / 8U ); - - for( int i = 0; i < pAccess->Height(); i++ ) - { - CHECK_RETURN( writeBuffer( pAccess->GetScanline( i ), nScanLineBytes ) ); - } + writeG4Stream( pAccess ); } else +#endif { - const int nScanLineBytes = pAccess->Width()*3; - boost::shared_array pCol( new sal_uInt8[ nScanLineBytes ] ); - for( int y = 0; y < pAccess->Height(); y++ ) + beginCompression(); + if( ! bTrueColor || pAccess->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB ) + { + const int nScanLineBytes = 1 + ( pAccess->GetBitCount() * ( pAccess->Width() - 1 ) / 8U ); + + for( int i = 0; i < pAccess->Height(); i++ ) + { + CHECK_RETURN( writeBuffer( pAccess->GetScanline( i ), nScanLineBytes ) ); + } + } + else { - for( int x = 0; x < pAccess->Width(); x++ ) + const int nScanLineBytes = pAccess->Width()*3; + boost::shared_array pCol( new sal_uInt8[ nScanLineBytes ] ); + for( int y = 0; y < pAccess->Height(); y++ ) { - BitmapColor aColor = pAccess->GetColor( y, x ); - pCol[3*x+0] = aColor.GetRed(); - pCol[3*x+1] = aColor.GetGreen(); - pCol[3*x+2] = aColor.GetBlue(); + for( int x = 0; x < pAccess->Width(); x++ ) + { + BitmapColor aColor = pAccess->GetColor( y, x ); + pCol[3*x+0] = aColor.GetRed(); + pCol[3*x+1] = aColor.GetGreen(); + pCol[3*x+2] = aColor.GetBlue(); + } + CHECK_RETURN( writeBuffer( pCol.get(), nScanLineBytes ) ); } - CHECK_RETURN( writeBuffer( pCol.get(), nScanLineBytes ) ); } + endCompression(); } - endCompression(); disableStreamEncryption(); sal_uInt64 nEndPos = 0; diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 7b9096ea21eb..23d923b9990b 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -59,6 +59,7 @@ class ImplFontMetricData; class FontSubsetInfo; class ZCodec; class EncHashTransporter; +struct BitStreamState; // the maximum password length #define ENCRYPTED_PWD_SIZE 32 @@ -1055,6 +1056,10 @@ i12626 void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx, VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); + // helpers for CCITT 1bit bitmap stream + void putG4Bits( sal_uInt32 i_nLength, sal_uInt32 i_nCode, BitStreamState& io_rState ); + void putG4Span( long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState ); + void writeG4Stream( BitmapReadAccess* i_pBitmap ); public: PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >&, PDFWriter& ); ~PDFWriterImpl(); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 8a284e908922..1aa41af93a72 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -33,6 +33,7 @@ #include "vcl/virdev.hxx" #include "vcl/gdimtf.hxx" #include "vcl/metaact.hxx" +#include "vcl/bmpacc.hxx" #include "vcl/graph.hxx" #include "vcl/svdata.hxx" #include "unotools/streamwrap.hxx" @@ -1523,3 +1524,475 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter, /* end i12626 methods */ +static const long unsetRun[256] = +{ + 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0f */ + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x20 - 0x2f */ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x30 - 0x3f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40 - 0x4f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x50 - 0x5f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60 - 0x6f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x70 - 0x7f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0x8f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 - 0x9f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 - 0xaf */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 - 0xbf */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 - 0xcf */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 - 0xdf */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 - 0xef */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 - 0xff */ +}; + +static const long setRun[256] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 - 0x0f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 - 0x1f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 - 0x2f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 - 0x3f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 - 0x4f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 - 0x5f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 - 0x6f */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 - 0x7f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 - 0x8f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90 - 0x9f */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xa0 - 0xaf */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xb0 - 0xbf */ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0xc0 - 0xcf */ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0xd0 - 0xdf */ + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xe0 - 0xef */ + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, /* 0xf0 - 0xff */ +}; + +inline bool isSet( const Scanline i_pLine, long i_nIndex ) +{ + return (i_pLine[ i_nIndex/8 ] & (0x80 >> (i_nIndex&7))) != 0; +} + +long findBitRun( const Scanline i_pLine, long i_nStartIndex, long i_nW, bool i_bSet ) +{ + if( i_nStartIndex < 0 ) + return i_nW; + + long nIndex = i_nStartIndex; + if( nIndex < i_nW ) + { + const sal_uInt8 * pByte = static_cast(i_pLine) + (nIndex/8); + sal_uInt8 nByte = *pByte; + + // run up to byte boundary + long nBitInByte = (nIndex & 7); + if( nBitInByte ) + { + sal_uInt8 nMask = 0x80 >> nBitInByte; + while( nBitInByte != 8 ) + { + if( (nByte & nMask) != (i_bSet ? nMask : 0) ) + return nIndex < i_nW ? nIndex : i_nW; + nMask = nMask >> 1; + nBitInByte++; + nIndex++; + } + if( nIndex < i_nW ) + { + pByte++; + nByte = *pByte; + } + } + + sal_uInt8 nRunByte; + const long* pRunTable; + if( i_bSet ) + { + nRunByte = 0xff; + pRunTable = setRun; + } + else + { + nRunByte = 0; + pRunTable = unsetRun; + } + + while( nByte == nRunByte && nIndex < i_nW ) + { + nIndex += 8; + pByte++; + nByte = *pByte; + } + if( nIndex < i_nW ) + { + nIndex += pRunTable[nByte]; + } + } + return nIndex < i_nW ? nIndex : i_nW; +} + +struct BitStreamState +{ + sal_uInt8 mnBuffer; + sal_uInt32 mnNextBitPos; + + BitStreamState() + : mnBuffer( 0 ) + , mnNextBitPos( 8 ) + { + } + + const sal_uInt8* getByte() const { return &mnBuffer; } + void flush() { mnNextBitPos = 8; mnBuffer = 0; } +}; + +void PDFWriterImpl::putG4Bits( sal_uInt32 i_nLength, sal_uInt32 i_nCode, BitStreamState& io_rState ) +{ + while( i_nLength > io_rState.mnNextBitPos ) + { + io_rState.mnBuffer |= static_cast( i_nCode >> (i_nLength - io_rState.mnNextBitPos) ); + i_nLength -= io_rState.mnNextBitPos; + writeBuffer( io_rState.getByte(), 1 ); + io_rState.flush(); + } + OSL_ASSERT( i_nLength < 9 ); + static const unsigned int msbmask[9] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff }; + io_rState.mnBuffer |= static_cast( (i_nCode & msbmask[i_nLength]) << (io_rState.mnNextBitPos - i_nLength) ); + io_rState.mnNextBitPos -= i_nLength; + if( io_rState.mnNextBitPos == 0 ) + { + writeBuffer( io_rState.getByte(), 1 ); + io_rState.flush(); + } +} + +struct PixelCode +{ + sal_uInt32 mnEncodedPixels; + sal_uInt32 mnCodeBits; + sal_uInt32 mnCode; +}; + +static const PixelCode WhitePixelCodes[] = +{ + { 0, 8, 0x35 }, // 0011 0101 + { 1, 6, 0x7 }, // 0001 11 + { 2, 4, 0x7 }, // 0111 + { 3, 4, 0x8 }, // 1000 + { 4, 4, 0xB }, // 1011 + { 5, 4, 0xC }, // 1100 + { 6, 4, 0xE }, // 1110 + { 7, 4, 0xF }, // 1111 + { 8, 5, 0x13 }, // 1001 1 + { 9, 5, 0x14 }, // 1010 0 + { 10, 5, 0x7 }, // 0011 1 + { 11, 5, 0x8 }, // 0100 0 + { 12, 6, 0x8 }, // 0010 00 + { 13, 6, 0x3 }, // 0000 11 + { 14, 6, 0x34 }, // 1101 00 + { 15, 6, 0x35 }, // 1101 01 + { 16, 6, 0x2A }, // 1010 10 + { 17, 6, 0x2B }, // 1010 11 + { 18, 7, 0x27 }, // 0100 111 + { 19, 7, 0xC }, // 0001 100 + { 20, 7, 0x8 }, // 0001 000 + { 21, 7, 0x17 }, // 0010 111 + { 22, 7, 0x3 }, // 0000 011 + { 23, 7, 0x4 }, // 0000 100 + { 24, 7, 0x28 }, // 0101 000 + { 25, 7, 0x2B }, // 0101 011 + { 26, 7, 0x13 }, // 0010 011 + { 27, 7, 0x24 }, // 0100 100 + { 28, 7, 0x18 }, // 0011 000 + { 29, 8, 0x2 }, // 0000 0010 + { 30, 8, 0x3 }, // 0000 0011 + { 31, 8, 0x1A }, // 0001 1010 + { 32, 8, 0x1B }, // 0001 1011 + { 33, 8, 0x12 }, // 0001 0010 + { 34, 8, 0x13 }, // 0001 0011 + { 35, 8, 0x14 }, // 0001 0100 + { 36, 8, 0x15 }, // 0001 0101 + { 37, 8, 0x16 }, // 0001 0110 + { 38, 8, 0x17 }, // 0001 0111 + { 39, 8, 0x28 }, // 0010 1000 + { 40, 8, 0x29 }, // 0010 1001 + { 41, 8, 0x2A }, // 0010 1010 + { 42, 8, 0x2B }, // 0010 1011 + { 43, 8, 0x2C }, // 0010 1100 + { 44, 8, 0x2D }, // 0010 1101 + { 45, 8, 0x4 }, // 0000 0100 + { 46, 8, 0x5 }, // 0000 0101 + { 47, 8, 0xA }, // 0000 1010 + { 48, 8, 0xB }, // 0000 1011 + { 49, 8, 0x52 }, // 0101 0010 + { 50, 8, 0x53 }, // 0101 0011 + { 51, 8, 0x54 }, // 0101 0100 + { 52, 8, 0x55 }, // 0101 0101 + { 53, 8, 0x24 }, // 0010 0100 + { 54, 8, 0x25 }, // 0010 0101 + { 55, 8, 0x58 }, // 0101 1000 + { 56, 8, 0x59 }, // 0101 1001 + { 57, 8, 0x5A }, // 0101 1010 + { 58, 8, 0x5B }, // 0101 1011 + { 59, 8, 0x4A }, // 0100 1010 + { 60, 8, 0x4B }, // 0100 1011 + { 61, 8, 0x32 }, // 0011 0010 + { 62, 8, 0x33 }, // 0011 0011 + { 63, 8, 0x34 }, // 0011 0100 + { 64, 5, 0x1B }, // 1101 1 + { 128, 5, 0x12 }, // 1001 0 + { 192, 6, 0x17 }, // 0101 11 + { 256, 7, 0x37 }, // 0110 111 + { 320, 8, 0x36 }, // 0011 0110 + { 384, 8, 0x37 }, // 0011 0111 + { 448, 8, 0x64 }, // 0110 0100 + { 512, 8, 0x65 }, // 0110 0101 + { 576, 8, 0x68 }, // 0110 1000 + { 640, 8, 0x67 }, // 0110 0111 + { 704, 9, 0xCC }, // 0110 0110 0 + { 768, 9, 0xCD }, // 0110 0110 1 + { 832, 9, 0xD2 }, // 0110 1001 0 + { 896, 9, 0xD3 }, // 0110 1001 1 + { 960, 9, 0xD4 }, // 0110 1010 0 + { 1024, 9, 0xD5 }, // 0110 1010 1 + { 1088, 9, 0xD6 }, // 0110 1011 0 + { 1152, 9, 0xD7 }, // 0110 1011 1 + { 1216, 9, 0xD8 }, // 0110 1100 0 + { 1280, 9, 0xD9 }, // 0110 1100 1 + { 1344, 9, 0xDA }, // 0110 1101 0 + { 1408, 9, 0xDB }, // 0110 1101 1 + { 1472, 9, 0x98 }, // 0100 1100 0 + { 1536, 9, 0x99 }, // 0100 1100 1 + { 1600, 9, 0x9A }, // 0100 1101 0 + { 1664, 6, 0x18 }, // 0110 00 + { 1728, 9, 0x9B }, // 0100 1101 1 + { 1792, 11, 0x8 }, // 0000 0001 000 + { 1856, 11, 0xC }, // 0000 0001 100 + { 1920, 11, 0xD }, // 0000 0001 101 + { 1984, 12, 0x12 }, // 0000 0001 0010 + { 2048, 12, 0x13 }, // 0000 0001 0011 + { 2112, 12, 0x14 }, // 0000 0001 0100 + { 2176, 12, 0x15 }, // 0000 0001 0101 + { 2240, 12, 0x16 }, // 0000 0001 0110 + { 2304, 12, 0x17 }, // 0000 0001 0111 + { 2368, 12, 0x1C }, // 0000 0001 1100 + { 2432, 12, 0x1D }, // 0000 0001 1101 + { 2496, 12, 0x1E }, // 0000 0001 1110 + { 2560, 12, 0x1F } // 0000 0001 1111 +}; + +static const PixelCode BlackPixelCodes[] = +{ + { 0, 10, 0x37 }, // 0000 1101 11 + { 1, 3, 0x2 }, // 010 + { 2, 2, 0x3 }, // 11 + { 3, 2, 0x2 }, // 10 + { 4, 3, 0x3 }, // 011 + { 5, 4, 0x3 }, // 0011 + { 6, 4, 0x2 }, // 0010 + { 7, 5, 0x3 }, // 0001 1 + { 8, 6, 0x5 }, // 0001 01 + { 9, 6, 0x4 }, // 0001 00 + { 10, 7, 0x4 }, // 0000 100 + { 11, 7, 0x5 }, // 0000 101 + { 12, 7, 0x7 }, // 0000 111 + { 13, 8, 0x4 }, // 0000 0100 + { 14, 8, 0x7 }, // 0000 0111 + { 15, 9, 0x18 }, // 0000 1100 0 + { 16, 10, 0x17 }, // 0000 0101 11 + { 17, 10, 0x18 }, // 0000 0110 00 + { 18, 10, 0x8 }, // 0000 0010 00 + { 19, 11, 0x67 }, // 0000 1100 111 + { 20, 11, 0x68 }, // 0000 1101 000 + { 21, 11, 0x6C }, // 0000 1101 100 + { 22, 11, 0x37 }, // 0000 0110 111 + { 23, 11, 0x28 }, // 0000 0101 000 + { 24, 11, 0x17 }, // 0000 0010 111 + { 25, 11, 0x18 }, // 0000 0011 000 + { 26, 12, 0xCA }, // 0000 1100 1010 + { 27, 12, 0xCB }, // 0000 1100 1011 + { 28, 12, 0xCC }, // 0000 1100 1100 + { 29, 12, 0xCD }, // 0000 1100 1101 + { 30, 12, 0x68 }, // 0000 0110 1000 + { 31, 12, 0x69 }, // 0000 0110 1001 + { 32, 12, 0x6A }, // 0000 0110 1010 + { 33, 12, 0x6B }, // 0000 0110 1011 + { 34, 12, 0xD2 }, // 0000 1101 0010 + { 35, 12, 0xD3 }, // 0000 1101 0011 + { 36, 12, 0xD4 }, // 0000 1101 0100 + { 37, 12, 0xD5 }, // 0000 1101 0101 + { 38, 12, 0xD6 }, // 0000 1101 0110 + { 39, 12, 0xD7 }, // 0000 1101 0111 + { 40, 12, 0x6C }, // 0000 0110 1100 + { 41, 12, 0x6D }, // 0000 0110 1101 + { 42, 12, 0xDA }, // 0000 1101 1010 + { 43, 12, 0xDB }, // 0000 1101 1011 + { 44, 12, 0x54 }, // 0000 0101 0100 + { 45, 12, 0x55 }, // 0000 0101 0101 + { 46, 12, 0x56 }, // 0000 0101 0110 + { 47, 12, 0x57 }, // 0000 0101 0111 + { 48, 12, 0x64 }, // 0000 0110 0100 + { 49, 12, 0x65 }, // 0000 0110 0101 + { 50, 12, 0x52 }, // 0000 0101 0010 + { 51, 12, 0x53 }, // 0000 0101 0011 + { 52, 12, 0x24 }, // 0000 0010 0100 + { 53, 12, 0x37 }, // 0000 0011 0111 + { 54, 12, 0x38 }, // 0000 0011 1000 + { 55, 12, 0x27 }, // 0000 0010 0111 + { 56, 12, 0x28 }, // 0000 0010 1000 + { 57, 12, 0x58 }, // 0000 0101 1000 + { 58, 12, 0x59 }, // 0000 0101 1001 + { 59, 12, 0x2B }, // 0000 0010 1011 + { 60, 12, 0x2C }, // 0000 0010 1100 + { 61, 12, 0x5A }, // 0000 0101 1010 + { 62, 12, 0x66 }, // 0000 0110 0110 + { 63, 12, 0x67 }, // 0000 0110 0111 + { 64, 10, 0xF }, // 0000 0011 11 + { 128, 12, 0xC8 }, // 0000 1100 1000 + { 192, 12, 0xC9 }, // 0000 1100 1001 + { 256, 12, 0x5B }, // 0000 0101 1011 + { 320, 12, 0x33 }, // 0000 0011 0011 + { 384, 12, 0x34 }, // 0000 0011 0100 + { 448, 12, 0x35 }, // 0000 0011 0101 + { 512, 13, 0x6C }, // 0000 0011 0110 0 + { 576, 13, 0x6D }, // 0000 0011 0110 1 + { 640, 13, 0x4A }, // 0000 0010 0101 0 + { 704, 13, 0x4B }, // 0000 0010 0101 1 + { 768, 13, 0x4C }, // 0000 0010 0110 0 + { 832, 13, 0x4D }, // 0000 0010 0110 1 + { 896, 13, 0x72 }, // 0000 0011 1001 0 + { 960, 13, 0x73 }, // 0000 0011 1001 1 + { 1024, 13, 0x74 }, // 0000 0011 1010 0 + { 1088, 13, 0x75 }, // 0000 0011 1010 1 + { 1152, 13, 0x76 }, // 0000 0011 1011 0 + { 1216, 13, 0x77 }, // 0000 0011 1011 1 + { 1280, 13, 0x52 }, // 0000 0010 1001 0 + { 1344, 13, 0x53 }, // 0000 0010 1001 1 + { 1408, 13, 0x54 }, // 0000 0010 1010 0 + { 1472, 13, 0x55 }, // 0000 0010 1010 1 + { 1536, 13, 0x5A }, // 0000 0010 1101 0 + { 1600, 13, 0x5B }, // 0000 0010 1101 1 + { 1664, 13, 0x64 }, // 0000 0011 0010 0 + { 1728, 13, 0x65 }, // 0000 0011 0010 1 + { 1792, 11, 0x8 }, // 0000 0001 000 + { 1856, 11, 0xC }, // 0000 0001 100 + { 1920, 11, 0xD }, // 0000 0001 101 + { 1984, 12, 0x12 }, // 0000 0001 0010 + { 2048, 12, 0x13 }, // 0000 0001 0011 + { 2112, 12, 0x14 }, // 0000 0001 0100 + { 2176, 12, 0x15 }, // 0000 0001 0101 + { 2240, 12, 0x16 }, // 0000 0001 0110 + { 2304, 12, 0x17 }, // 0000 0001 0111 + { 2368, 12, 0x1C }, // 0000 0001 1100 + { 2432, 12, 0x1D }, // 0000 0001 1101 + { 2496, 12, 0x1E }, // 0000 0001 1110 + { 2560, 12, 0x1F } // 0000 0001 1111 +}; + + +void PDFWriterImpl::putG4Span( long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState ) +{ + const PixelCode* pTable = i_bWhitePixel ? WhitePixelCodes : BlackPixelCodes; + // maximum encoded span is 2560 consecutive pixels + while( i_nSpan > 2623 ) + { + // write 2560 bits, that is entry (63 + (2560 >> 6)) == 103 in the appropriate table + putG4Bits( pTable[103].mnCodeBits, pTable[103].mnCode, io_rState ); + i_nSpan -= pTable[103].mnEncodedPixels; + } + // write multiples of 64 pixels up to 2560 + if( i_nSpan > 63 ) + { + sal_uInt32 nTabIndex = 63 + (i_nSpan >> 6); + OSL_ASSERT( pTable[nTabIndex].mnEncodedPixels == static_cast(64*(i_nSpan >> 6)) ); + putG4Bits( pTable[nTabIndex].mnCodeBits, pTable[nTabIndex].mnCode, io_rState ); + i_nSpan -= pTable[nTabIndex].mnEncodedPixels; + } + putG4Bits( pTable[i_nSpan].mnCodeBits, pTable[i_nSpan].mnCode, io_rState ); +} + +void PDFWriterImpl::writeG4Stream( BitmapReadAccess* i_pBitmap ) +{ + long nW = i_pBitmap->Width(); + long nH = i_pBitmap->Height(); + if( nW <= 0 || nH <= 0 ) + return; + if( i_pBitmap->GetBitCount() != 1 ) + return; + + BitStreamState aBitState; + + // the first reference line is virtual and completely empty + const Scanline pFirstRefLine = (Scanline)rtl_allocateZeroMemory( nW/8 + 1 ); + Scanline pRefLine = pFirstRefLine; + for( long nY = 0; nY < nH; nY++ ) + { + const Scanline pCurLine = i_pBitmap->GetScanline( nY ); + long nLineIndex = 0; + bool bRunSet = (*pCurLine & 0x80) ? true : false; + bool bRefSet = (*pRefLine & 0x80) ? true : false; + long nRunIndex1 = bRunSet ? 0 : findBitRun( pCurLine, 0, nW, bRunSet ); + long nRefIndex1 = bRefSet ? 0 : findBitRun( pRefLine, 0, nW, bRefSet ); + for( ; nLineIndex < nW; ) + { + long nRefIndex2 = findBitRun( pRefLine, nRefIndex1, nW, isSet( pRefLine, nRefIndex1 ) ); + if( nRefIndex2 >= nRunIndex1 ) + { + long nDiff = nRefIndex1 - nRunIndex1; + if( -3 <= nDiff && nDiff <= 3 ) + { // vertical coding + static const struct + { + sal_uInt32 mnCodeBits; + sal_uInt32 mnCode; + } VerticalCodes[7] = { + { 7, 0x03 }, // 0000 011 + { 6, 0x03 }, // 0000 11 + { 3, 0x03 }, // 011 + { 1, 0x1 }, // 1 + { 3, 0x2 }, // 010 + { 6, 0x02 }, // 0000 10 + { 7, 0x02 } // 0000 010 + }; + // convert to index + nDiff += 3; + + // emit diff code + putG4Bits( VerticalCodes[nDiff].mnCodeBits, VerticalCodes[nDiff].mnCode, aBitState ); + nLineIndex = nRunIndex1; + } + else + { // difference too large, horizontal coding + // emit horz code 001 + putG4Bits( 3, 0x1, aBitState ); + long nRunIndex2 = findBitRun( pCurLine, nRunIndex1, nW, isSet( pCurLine, nRunIndex1 ) ); + bool bWhiteFirst = ( nLineIndex + nRunIndex1 == 0 || ! isSet( pCurLine, nLineIndex ) ); + putG4Span( nRunIndex1 - nLineIndex, bWhiteFirst, aBitState ); + putG4Span( nRunIndex2 - nRunIndex1, ! bWhiteFirst, aBitState ); + nLineIndex = nRunIndex2; + } + } + else + { // emit pass code 0001 + putG4Bits( 4, 0x1, aBitState ); + nLineIndex = nRefIndex2; + } + if( nLineIndex < nW ) + { + bool bSet = isSet( pCurLine, nLineIndex ); + nRunIndex1 = findBitRun( pCurLine, nLineIndex, nW, bSet ); + nRefIndex1 = findBitRun( pRefLine, nLineIndex, nW, ! bSet ); + nRefIndex1 = findBitRun( pRefLine, nRefIndex1, nW, bSet ); + } + } + + // the current line is the reference for the next line + pRefLine = pCurLine; + } + // terminate strip with EOFB + putG4Bits( 12, 1, aBitState ); + putG4Bits( 12, 1, aBitState ); + if( aBitState.mnNextBitPos != 8 ) + { + writeBuffer( aBitState.getByte(), 1 ); + aBitState.flush(); + } + + rtl_freeMemory( pFirstRefLine ); +} -- cgit From 8e393744a57878d48f7d18cbf4abb34ea0cc4109 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 21:42:50 +0100 Subject: gridsort: @raises is not recognized by autodoc, use @throws instead --- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 4 ++-- offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl | 6 +++--- offapi/com/sun/star/awt/tree/XTreeControl.idl | 2 +- offapi/com/sun/star/sdb/XSubDocument.idl | 8 ++++---- offapi/com/sun/star/view/XMultiSelectionSupplier.idl | 4 ++-- offapi/com/sun/star/xml/sax/XFastAttributeList.idl | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index 687b56e620fe..f62271d6acf3 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -66,7 +66,7 @@ interface XGridDataModel /** retrieves the data for a given cell - @raises ::com::sun::star::lang::IndexOutOfBoundsException + @throws ::com::sun::star::lang::IndexOutOfBoundsException if the column or row index do not denote a valid cell position. */ any getCellData( [in] long Column, [in] long Row ) @@ -76,7 +76,7 @@ interface XGridDataModel

          A grid control will usually paint a row's title in the header column of the respective row.

          - @raises ::com::sun::star::lang::IndexOutOfBoundsException + @throws ::com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row. */ string diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index fb011b30dfcc..9bffd3e396d4 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -111,9 +111,9 @@ interface XMutableGridDataModel : XGridDataModel contains the index of the row whose data is to be updated @param Values specifies the new values of the cells. - @raises ::com::sun::star::lang::IndexOutOfBoundsException + @throws ::com::sun::star::lang::IndexOutOfBoundsException if one of the row indexes or the column index is invalid - @raises ::com::sun::star::lang::IndexOutOfBoundsException + @throws ::com::sun::star::lang::IndexOutOfBoundsException if the lengths of the ColumnIndexes and Values sequences are not equal. */ void updateRow( [in] sequence< long > ColumnIndexes, [in] long RowIndex, [in] sequence< any > Values ) @@ -122,7 +122,7 @@ interface XMutableGridDataModel : XGridDataModel /** sets a new title for a given row. - @raises ::com::sun::star::lang::IndexOutOfBoundsException + @throws ::com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row. */ void diff --git a/offapi/com/sun/star/awt/tree/XTreeControl.idl b/offapi/com/sun/star/awt/tree/XTreeControl.idl index a5341257ba45..7a5e3c11af29 100644 --- a/offapi/com/sun/star/awt/tree/XTreeControl.idl +++ b/offapi/com/sun/star/awt/tree/XTreeControl.idl @@ -154,7 +154,7 @@ interface XTreeControl @throws ::com::sun::star::lang::IllegalArgumentException if Node is not a valid node of the corresponding XTreeDataModel. - @raises ExpandVetoException + @throws ExpandVetoException if collapsing Node failed because at least one of the registered XTreeExpansionListener raised a ExpandVetoException. */ diff --git a/offapi/com/sun/star/sdb/XSubDocument.idl b/offapi/com/sun/star/sdb/XSubDocument.idl index 0592c6cffa0a..120280fd7ef3 100644 --- a/offapi/com/sun/star/sdb/XSubDocument.idl +++ b/offapi/com/sun/star/sdb/XSubDocument.idl @@ -52,7 +52,7 @@ interface XSubDocument or an XController if the sub document does not have an own model. - @raises ::com::sun::star::lang::WrappedTargetException + @throws ::com::sun::star::lang::WrappedTargetException if an error occurs during opening the document */ ::com::sun::star::lang::XComponent @@ -66,7 +66,7 @@ interface XSubDocument or an XController if the sub document does not have an own model. - @raises ::com::sun::star::lang::WrappedTargetException + @throws ::com::sun::star::lang::WrappedTargetException if an error occurs during opening the document */ ::com::sun::star::lang::XComponent @@ -75,7 +75,7 @@ interface XSubDocument /** stores the sub document, if it had previously been opened in either mode - @raises ::com::sun::star::lang::WrappedTargetException + @throws ::com::sun::star::lang::WrappedTargetException if an error occurs during storing the document */ void store() @@ -86,7 +86,7 @@ interface XSubDocument @return if and only if the document could be closed, otherwise, e.g. if the closing has been vetoed by the user. - @raises ::com::sun::star::lang::WrappedTargetException + @throws ::com::sun::star::lang::WrappedTargetException if an error occurs during closing the document */ boolean close() diff --git a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl index 8d5d7e07fb52..3557b3c47fae 100644 --- a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl +++ b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl @@ -66,7 +66,7 @@ interface XMultiSelectionSupplier: XSelectionSupplier added to the current selection. For example, if the selection already contains objects that are forbidden to be selected together with Selection - @raises com::sun::star::lang::IllegalArgumentException + @throws com::sun::star::lang::IllegalArgumentException If Selection is not a selectable object for this XMultiSelectionSupplier.

          Adding an object to the selection that is already part of the selection should not raise this exception

          */ @@ -87,7 +87,7 @@ interface XMultiSelectionSupplier: XSelectionSupplier added to the current selection. For example, if the selection already contains objects that are forbidden to be selected together with Selection. - @raises com::sun::star::lang::IllegalArgumentException + @throws com::sun::star::lang::IllegalArgumentException If Selection is not a selectable object for this XMultiSelectionSupplier.

          Removing an object from the selection that is not part of the selection should not raise this exception

          */ diff --git a/offapi/com/sun/star/xml/sax/XFastAttributeList.idl b/offapi/com/sun/star/xml/sax/XFastAttributeList.idl index a48e0e5b9337..5fa78b81d393 100644 --- a/offapi/com/sun/star/xml/sax/XFastAttributeList.idl +++ b/offapi/com/sun/star/xml/sax/XFastAttributeList.idl @@ -92,7 +92,7 @@ interface XFastAttributeList: com::sun::star::uno::XInterface @returns The integer token of the value from the attribute or FastToken::Invalid - @raises SAXEXception + @throws SAXEXception if the attribute is not available */ @@ -137,7 +137,7 @@ interface XFastAttributeList: com::sun::star::uno::XInterface @returns The string value from the attribute. - @raises SAXEXception + @throws SAXEXception if the attribute is not available */ -- cgit From 6fba3904b909f7604a38e58e2a8ac3d2542a9410 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 21:59:36 +0100 Subject: gridsort: removed the XGridDataModel.removeRows flavour which took an arbitrary sequence of indexes - this makes the handling, in particular for listeners, unnecessarily complex, and has a questionable use only --- .../source/controls/grid/defaultgriddatamodel.cxx | 32 ---------------------- .../source/controls/grid/defaultgriddatamodel.hxx | 1 - 2 files changed, 33 deletions(-) diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 698e64c4429c..746be68d3b4e 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -249,38 +249,6 @@ namespace toolkit ); } - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::removeRows( const Sequence< ::sal_Int32 >& i_rowIndexes ) throw (IndexOutOfBoundsException, RuntimeException) - { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); - - sal_Int32 const rowCount = i_rowIndexes.getLength(); - if ( rowCount == 0 ) - return; - - for ( sal_Int32 row=0; row= m_aData.size() ) ) - throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - } - - Sequence< sal_Int32 > rowIndexes( i_rowIndexes ); - ::std::sort( stl_begin( rowIndexes ), stl_end( rowIndexes ) ); - - for ( sal_Int32 row = rowCount; row > 0; ) - { - sal_Int32 const rowIndex = rowIndexes[--row]; - m_aRowHeaders.erase( m_aRowHeaders.begin() + rowIndex ); - m_aData.erase( m_aData.begin() + rowIndex ); - } - - broadcast( - GridDataEvent( *this, Sequence< sal_Int32 >(), rowIndexes ), - &XGridDataListener::rowsRemoved, - aGuard - ); - } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::removeAllRows( ) throw (RuntimeException) { diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 6dd81b8453ae..842e714c904c 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -65,7 +65,6 @@ public: virtual void SAL_CALL addRow( const ::rtl::OUString& Title, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Data ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& Titles, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeRow( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeRows( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& RowIndexes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCell( ::sal_Int32 RowIndex, ::sal_Int32 ColumnIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRow( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); -- cgit From 1b1ba41c8b258ffe84d11eaac3948271a7c2cad8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 12 Jan 2011 21:59:36 +0100 Subject: gridsort: removed the XGridDataModel.removeRows flavour which took an arbitrary sequence of indexes - this makes the handling, in particular for listeners, unnecessarily complex, and has a questionable use only --- offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index 9bffd3e396d4..6edb91895e88 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -71,21 +71,6 @@ interface XMutableGridDataModel : XGridDataModel void removeRow( [in] long RowIndex ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); - /** removes multiple rows of data from the model - -

          Grid data listeners are notified of this change via the XGridDataListener::rowsRemoved - method. The GridDataEvent::Rows member contains the indexes of the rows before the removal. - This is important to take into account by the listener, as with every removed row, the index of all subsequent - rows changes - nonetheless, the Rows array contains the original row indexes.

          - - @param RowIndexes - the indexes of the rows that should be removed. - @throws ::com::sun::star::lang::IndexOutOfBoundsException - if one of the indexes given in RowIndexes is invalid. - */ - void removeRows( [in] sequence< long > RowIndexes ) - raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); - /** Removes all rows from the model. */ void removeAllRows(); -- cgit From c2a4c121445a7b0728f2cd0e34e585a2884fd5bc Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 13 Jan 2011 11:24:36 +0100 Subject: sb139: #i116441# wrong dependencies in solenv/inc/_cppunit.mk --- solenv/inc/_cppunit.mk | 20 ++++++++++---------- solenv/inc/cppunit.mk | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/solenv/inc/_cppunit.mk b/solenv/inc/_cppunit.mk index 8d9e45d33331..85804dd41ac6 100644 --- a/solenv/inc/_cppunit.mk +++ b/solenv/inc/_cppunit.mk @@ -1,7 +1,7 @@ # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL1TARGET)"!="" +.IF "$(SHL1TARGETN)"!="" ALLTAR : test1 test1 .PHONY : $(SHL1TARGETN) @echo ---------------------------------------------------------- @@ -13,7 +13,7 @@ test1 .PHONY : $(SHL1TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL2TARGET)"!="" +.IF "$(SHL2TARGETN)"!="" ALLTAR : test2 test2 .PHONY : $(SHL2TARGETN) @echo ---------------------------------------------------------- @@ -25,7 +25,7 @@ test2 .PHONY : $(SHL2TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL3TARGET)"!="" +.IF "$(SHL3TARGETN)"!="" ALLTAR : test3 test3 .PHONY : $(SHL3TARGETN) @echo ---------------------------------------------------------- @@ -37,7 +37,7 @@ test3 .PHONY : $(SHL3TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL4TARGET)"!="" +.IF "$(SHL4TARGETN)"!="" ALLTAR : test4 test4 .PHONY : $(SHL4TARGETN) @echo ---------------------------------------------------------- @@ -49,7 +49,7 @@ test4 .PHONY : $(SHL4TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL5TARGET)"!="" +.IF "$(SHL5TARGETN)"!="" ALLTAR : test5 test5 .PHONY : $(SHL5TARGETN) @echo ---------------------------------------------------------- @@ -61,7 +61,7 @@ test5 .PHONY : $(SHL5TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL6TARGET)"!="" +.IF "$(SHL6TARGETN)"!="" ALLTAR : test6 test6 .PHONY : $(SHL6TARGETN) @echo ---------------------------------------------------------- @@ -73,7 +73,7 @@ test6 .PHONY : $(SHL6TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL7TARGET)"!="" +.IF "$(SHL7TARGETN)"!="" ALLTAR : test7 test7 .PHONY : $(SHL7TARGETN) @echo ---------------------------------------------------------- @@ -85,7 +85,7 @@ test7 .PHONY : $(SHL7TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL8TARGET)"!="" +.IF "$(SHL8TARGETN)"!="" ALLTAR : test8 test8 .PHONY : $(SHL8TARGETN) @echo ---------------------------------------------------------- @@ -97,7 +97,7 @@ test8 .PHONY : $(SHL8TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL9TARGET)"!="" +.IF "$(SHL9TARGETN)"!="" ALLTAR : test9 test9 .PHONY : $(SHL9TARGETN) @echo ---------------------------------------------------------- @@ -109,7 +109,7 @@ test9 .PHONY : $(SHL9TARGETN) # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL10TARGET)"!="" +.IF "$(SHL10TARGETN)"!="" ALLTAR : test10 test10 .PHONY : $(SHL10TARGETN) @echo ---------------------------------------------------------- diff --git a/solenv/inc/cppunit.mk b/solenv/inc/cppunit.mk index 2173f1a9ff9a..b30ca7152700 100644 --- a/solenv/inc/cppunit.mk +++ b/solenv/inc/cppunit.mk @@ -44,7 +44,7 @@ # unroll begin # ---- create the test libraries ------------------------------------ -.IF "$(SHL$(TNR)TARGET)"!="" +.IF "$(SHL$(TNR)TARGETN)"!="" ALLTAR : test$(TNR) test$(TNR) .PHONY : $(SHL$(TNR)TARGETN) @echo ---------------------------------------------------------- -- cgit From 7bf5ab295e38ecdde42245ad8732cdf9c05ebcba Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 13 Jan 2011 12:50:28 +0100 Subject: sb139: #i116444# handle short reads in io_acceptor::PipeConnection::read --- io/source/acceptor/acc_pipe.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index 6d0b77484fef..63f688d32dca 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -101,11 +101,17 @@ namespace io_acceptor { if( ! m_nStatus ) { - if( aReadBytes.getLength() != nBytesToRead ) + if( aReadBytes.getLength() < nBytesToRead ) { aReadBytes.realloc( nBytesToRead ); } - return m_pipe.read( aReadBytes.getArray() , aReadBytes.getLength() ); + sal_Int32 n = m_pipe.read( aReadBytes.getArray(), nBytesToRead ); + OSL_ASSERT( n >= 0 && n <= aReadBytes.getLength() ); + if( n < aReadBytes.getLength() ) + { + aReadBytes.realloc( n ); + } + return n; } else { throw IOException(); -- cgit From d873a6df8039666186ec3850562d35d10ef60b5f Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 13 Jan 2011 12:57:42 +0100 Subject: sb139: #i116445# do not write to a disposed Java URP bridge --- .../lib/uno/bridges/java_remote/java_remote_bridge.java | 2 ++ .../sun/star/lib/uno/environments/remote/IProtocol.java | 2 ++ jurt/com/sun/star/lib/uno/protocols/urp/urp.java | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java index 267a84d7515f..e37273be6902 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java @@ -499,6 +499,8 @@ public class java_remote_bridge ((DisposeListener) i.next()).notifyDispose(this); } + _iProtocol.terminate(); + try { _messageDispatcher.terminate(); diff --git a/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java b/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java index 1fae45e9ca23..de581ea86c7b 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java @@ -51,6 +51,8 @@ public interface IProtocol { */ void init() throws IOException; + void terminate(); + /** * Reads a request or reply message. * diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java index da54bc7612a1..a158e1138db1 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java @@ -30,6 +30,7 @@ package com.sun.star.lib.uno.protocols.urp; import com.sun.star.bridge.InvalidProtocolChangeException; import com.sun.star.bridge.ProtocolProperty; import com.sun.star.bridge.XProtocolProperties; +import com.sun.star.lang.DisposedException; import com.sun.star.lib.uno.environments.remote.IProtocol; import com.sun.star.lib.uno.environments.remote.Message; import com.sun.star.lib.uno.environments.remote.ThreadId; @@ -79,6 +80,15 @@ public final class urp implements IProtocol { } } + // @see IProtocol#terminate + public void terminate() { + synchronized (monitor) { + state = STATE_TERMINATED; + initialized = true; + monitor.notifyAll(); + } + } + // @see IProtocol#readMessage public Message readMessage() throws IOException { for (;;) { @@ -125,6 +135,9 @@ public final class urp implements IProtocol { throw new RuntimeException(e.toString()); } } + if (state == STATE_TERMINATED) { + throw new DisposedException(); + } return writeRequest(false, oid, type, function, tid, arguments); } } @@ -375,7 +388,6 @@ public final class urp implements IProtocol { if ((header & HEADER_NEWTID) != 0) { inL1Tid = unmarshal.readThreadId(); } - //TODO: check HEADER_IGNORECACHE return readRequest(funId, sync); } @@ -684,7 +696,6 @@ public final class urp implements IProtocol { private static final int HEADER_NEWOID = 0x10; private static final int HEADER_NEWTID = 0x08; private static final int HEADER_FUNCTIONID16 = 0x04; - private static final int HEADER_IGNORECACHE = 0x02; private static final int HEADER_MOREFLAGS = 0x01; private static final int HEADER_MUSTREPLY = 0x80; private static final int HEADER_SYNCHRONOUS = 0x40; @@ -701,6 +712,7 @@ public final class urp implements IProtocol { private static final int STATE_REQUESTED = 2; private static final int STATE_COMMITTED = 3; private static final int STATE_WAIT = 4; + private static final int STATE_TERMINATED = 5; private static final int MAX_RELEASE_QUEUE_SIZE = 100; -- cgit From 9616f9f8306e88c42eda6141fd895cbaf67ba59b Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 13 Jan 2011 13:17:47 +0100 Subject: sb139: #i116447# osl_receivePipe triggers OSL_TRACE for non-error EOF --- sal/osl/unx/pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sal/osl/unx/pipe.c b/sal/osl/unx/pipe.c index ede4cd7e074f..069ea9990951 100644 --- a/sal/osl/unx/pipe.c +++ b/sal/osl/unx/pipe.c @@ -486,7 +486,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe, (sal_Char*)pBuffer, BytesToRead, 0); - if ( nRet <= 0 ) + if ( nRet < 0 ) { OSL_TRACE("osl_receivePipe failed : %i '%s'",nRet,strerror(errno)); } -- cgit From 4c08b4b3d3b5427ffa843868704e8dd44c8b1826 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 13 Jan 2011 14:08:36 +0100 Subject: gridsort: reworked the notification system for inserted/removed rows In this course, more code which was in SVTXGridControl was moved to the places it belongs to, effectively meaning that the TableControl has better chances than before to be used outside an SVTXGridControl (though we're not there, yet). Also, the selection-related methods in TableControl/_Impl got some refactoring love, so the implementation details are hidden in the Impl class now, instead of being exposed to an exploited by the TableControl. And while we were there ... The XGridSelection does not provide a |selectColumn| anymore (there was no preparation whatsoever for column selection, anywhere, thus it was a complete dummy.) Also, its de/selectRows methods have been removed: They have questionable use, and make implementation rather difficult, compared with multiple calls to de/selectRow. --- svtools/inc/svtools/table/tablecontrol.hxx | 15 +- svtools/inc/svtools/table/tablemodel.hxx | 23 +- svtools/source/table/tablecontrol.cxx | 45 +++- svtools/source/table/tablecontrol_impl.cxx | 256 ++++++++++++++++--- svtools/source/table/tablecontrol_impl.hxx | 36 ++- svtools/source/uno/svtxgridcontrol.cxx | 276 +++------------------ svtools/source/uno/svtxgridcontrol.hxx | 11 +- svtools/source/uno/unocontroltablemodel.cxx | 68 ++++- svtools/source/uno/unocontroltablemodel.hxx | 6 + .../source/controls/grid/defaultgriddatamodel.cxx | 49 ++-- toolkit/source/controls/grid/gridcontrol.cxx | 14 +- toolkit/source/controls/grid/gridcontrol.hxx | 5 +- .../source/controls/grid/grideventforwarder.cxx | 4 +- .../source/controls/grid/grideventforwarder.hxx | 2 +- 14 files changed, 445 insertions(+), 365 deletions(-) diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 259b390071bb..595ff5bae847 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -87,7 +87,7 @@ namespace svt { namespace table ~TableControl(); /// sets a new table model - SVT_DLLPRIVATE void SetModel( PTableModel _pModel ); + void SetModel( PTableModel _pModel ); /// retrieves the current table model PTableModel GetModel() const; @@ -159,17 +159,13 @@ namespace svt { namespace table SVT_DLLPRIVATE virtual void Resize(); virtual void Select(); - SVT_DLLPRIVATE void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; } - const Link& GetSelectHdl() const { return m_aSelectHdl; } + void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; } + const Link& GetSelectHdl() const { return m_aSelectHdl; } /**invalidates the table if table has been changed e.g. new row added */ void InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved); - /**gets the vector, which contains the selected rows - */ - std::vector& GetSelectedRows(); - /**after removing a row, updates the vector which contains the selected rows if the row, which should be removed, is selected, it will be erased from the vector */ @@ -221,13 +217,16 @@ namespace svt { namespace table virtual sal_Bool HasColHeader(); virtual sal_Bool isAccessibleAlive( ) const; virtual void commitGridControlEvent( sal_Int16 _nEventId, const com::sun::star::uno::Any& _rNewValue, const com::sun::star::uno::Any& _rOldValue ); + virtual ::std::vector< sal_Int32 >& GetSelectedRows(); virtual void RemoveSelectedRow(RowPos _nRowPos); virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; // ............................................................................................................. - void clearSelection(); void selectionChanged(bool _bChanged); + void SelectRow( RowPos const i_rowIndex, bool const i_select ); + void SelectAll( bool const i_select ); + protected: ::svt::IAccessibleFactory& getAccessibleFactory(); diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 50030de7a31d..83054b5d0a57 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -103,7 +103,8 @@ namespace svt { namespace table the table @param first - the old index of the first removed row + the old index of the first removed row. If this is -1, then all + rows have been removed from the model. @param last the old index of the last removed row. Must not be smaller than ->first @@ -119,27 +120,19 @@ namespace svt { namespace table the index of the last newly inserted row. Must not be smaller than ->first */ - virtual void columnsInserted( ColPos first, ColPos last ) = 0; + virtual void columnInserted( ColPos const i_colIndex ) = 0; /** notifies the listener that one or more columns have been removed from the table - @param first - the old index of the first removed column - @param last - the old index of the last removed column. Must not be smaller - than ->first + @param i_colIndex + the old index of the removed column */ - virtual void columnsRemoved( ColPos first, ColPos last ) = 0; - - /** notifies the listener that a column in the table has moved + virtual void columnRemoved( ColPos const i_colIndex ) = 0; - @param oldIndex - the old index of the column within the model - @param newIndex - the new index of the column within the model + /** notifies the listener that all columns have been removed form the model */ - virtual void columnMoved( ColPos oldIndex, ColPos newIndex ) = 0; + virtual void allColumnsRemoved() = 0; /** notifies the listener that a rectangular cell range in the table has been updated diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index d58243405800..757310ba224d 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -219,9 +219,48 @@ namespace svt { namespace table } // ----------------------------------------------------------------------------------------------------------------- - void TableControl::clearSelection() + void TableControl::SelectRow( RowPos const i_rowIndex, bool const i_select ) { - m_pImpl->clearSelection(); + ENSURE_OR_RETURN_VOID( ( i_rowIndex >= 0 ) && ( i_rowIndex < m_pImpl->getModel()->getRowCount() ), + "TableControl::SelectRow: no control (anymore)!" ); + + if ( i_select ) + { + if ( !m_pImpl->markRowAsSelected( i_rowIndex ) ) + // nothing to do + return; + } + else + { + m_pImpl->markRowAsDeselected( i_rowIndex ); + } + + selectionChanged( true ); + InvalidateDataWindow( i_rowIndex, i_rowIndex, false ); + Select(); + } + + // ----------------------------------------------------------------------------------------------------------------- + void TableControl::SelectAll( bool const i_select ) + { + if ( i_select ) + { + if ( !m_pImpl->markAllRowsAsSelected() ) + // nothing to do + return; + } + else + { + if ( !m_pImpl->markAllRowsAsDeselected() ) + // nothing to do + return; + } + + + selectionChanged( true ); + Invalidate(); + // TODO: can't we do better than this, and invalidate only the rows which changed? + Select(); } // ----------------------------------------------------------------------------------------------------------------- @@ -537,7 +576,7 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ sal_Int32 TableControl::GetSelectedRowCount() const { - return m_pImpl->getSelectedRows().size(); + return sal_Int32( m_pImpl->getSelectedRowCount() ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 7176ba332a0b..31078eb23ce7 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -36,6 +36,15 @@ #include "tablegeometry.hxx" #include "cellvalueconversion.hxx" +#include "accessibletableimp.hxx" + +/** === begin UNO includes === **/ +#include +#include +#include +#include +/** === end UNO includes === **/ + #include #include #include @@ -50,6 +59,14 @@ namespace svt { namespace table { //...................................................................................................................... + /** === begin UNO using === **/ + using ::com::sun::star::accessibility::AccessibleTableModelChange; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Any; + /** === end UNO using === **/ + namespace AccessibleEventId = ::com::sun::star::accessibility::AccessibleEventId; + namespace AccessibleTableModelChangeType = ::com::sun::star::accessibility::AccessibleTableModelChangeType; + //==================================================================== //= TempHideCursor //==================================================================== @@ -446,25 +463,125 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::rowsInserted( RowPos first, RowPos last ) + void TableControl_Impl::rowsInserted( RowPos i_first, RowPos i_last ) { - OSL_ENSURE( false, "TableControl_Impl::rowsInserted: not implemented!" ); - // there's no known implementation (yet) which calls this method - OSL_UNUSED( first ); - OSL_UNUSED( last ); + DBG_CHECK_ME(); + OSL_PRECOND( i_last >= i_first, "TableControl_Impl::rowsInserted: invalid row indexes!" ); + + TableSize const insertedRows = i_last - i_first + 1; + + // adjust selection, if necessary + bool selectionChanged = false; + for ( ::std::vector< RowPos >::iterator selPos = m_aSelectedRows.begin(); selPos != m_aSelectedRows.end(); ++selPos ) + { + if ( *selPos >= i_first ) + { + *selPos += insertedRows; + selectionChanged = true; + } + } + + // adjust our cached row count + m_nRowCount = m_pModel->getRowCount(); + + // if the rows have been inserted before the current row, adjust this + if ( i_first <= m_nCurRow ) + goTo( m_nCurColumn, m_nCurRow + insertedRows ); + + // notify A1YY events + if ( m_rAntiImpl.isAccessibleAlive() ) + { + m_rAntiImpl.commitGridControlEvent( AccessibleEventId::TABLE_MODEL_CHANGED, + makeAny( AccessibleTableModelChange( AccessibleTableModelChangeType::INSERT, i_first, i_last, 0, m_pModel->getColumnCount() ) ), + Any() + ); + m_rAntiImpl.commitGridControlEvent( AccessibleEventId::CHILD, + makeAny( m_rAntiImpl.m_pAccessTable->m_pAccessible->getTableHeader( TCTYPE_ROWHEADERBAR ) ), + Any() + ); + +// for ( sal_Int32 i = 0 ; i <= m_pModel->getColumnCount(); ++i ) +// { +// m_rAntiImpl.commitGridControlEvent( +// CHILD, +// makeAny( m_rAntiImpl.m_pAccessTable->m_pAccessible->getTable() ), +// Any()); +// } + // Huh? What's that? We're notifying |columnCount| CHILD events here, claiming the *table* itself + // has been inserted. Doesn't make much sense, does it? + } + + // schedule repaint + m_rAntiImpl.InvalidateDataWindow( i_first, i_last, false ); + + // call selection handlers, if necessary + if ( selectionChanged ) + m_rAntiImpl.Select(); } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::rowsRemoved( RowPos first, RowPos last ) + void TableControl_Impl::rowsRemoved( RowPos i_first, RowPos i_last ) { - OSL_ENSURE( false, "TableControl_Impl::rowsRemoved: not implemented!" ); - // there's no known implementation (yet) which calls this method - OSL_UNUSED( first ); - OSL_UNUSED( last ); + sal_Int32 firstRemovedRow = i_first; + sal_Int32 lastRemovedRow = i_last; + + // adjust selection, if necessary + bool selectionChanged = false; + if ( i_first == -1 ) + { + selectionChanged = markAllRowsAsDeselected(); + + firstRemovedRow = 0; + lastRemovedRow = m_nRowCount - 1; + } + else + { + ENSURE_OR_RETURN_VOID( i_last >= i_first, "TableControl_Impl::rowsRemoved: illegal indexes!" ); + + for ( sal_Int32 row = i_first; row < i_last; ++row ) + { + selectionChanged |= markRowAsDeselected( row ); + } + } + + // adjust cached row count + m_nRowCount = m_pModel->getRowCount(); + + // adjust the current row, if it is larger than the row count now + if ( m_nCurRow >= m_nRowCount ) + { + if ( m_nRowCount > 0 ) + goTo( m_nCurColumn, m_nRowCount - 1 ); + else + m_nCurRow = ROW_INVALID; + } + + // notify A11Y events + if ( m_rAntiImpl.isAccessibleAlive() ) + { + m_rAntiImpl.commitGridControlEvent( + AccessibleEventId::TABLE_MODEL_CHANGED, + makeAny( AccessibleTableModelChange( + AccessibleTableModelChangeType::DELETE, + firstRemovedRow, + lastRemovedRow, + 0, + m_pModel->getColumnCount() + ) ), + Any() + ); + } + + // schedule a repaint + m_rAntiImpl.InvalidateDataWindow( firstRemovedRow, lastRemovedRow, true ); + + // call selection handlers, if necessary + if ( selectionChanged ) + m_rAntiImpl.Select(); } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::columnsInserted( ColPos i_first, ColPos i_last ) + void TableControl_Impl::columnInserted( ColPos const i_colIndex ) { m_nColumnCount = m_pModel->getColumnCount(); impl_ni_updateColumnWidths(); @@ -472,12 +589,11 @@ namespace svt { namespace table m_rAntiImpl.Invalidate(); - OSL_UNUSED( i_first ); - OSL_UNUSED( i_last ); + OSL_UNUSED( i_colIndex ); } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::columnsRemoved( ColPos i_first, ColPos i_last ) + void TableControl_Impl::columnRemoved( ColPos const i_colIndex ) { m_nColumnCount = m_pModel->getColumnCount(); impl_ni_updateColumnWidths(); @@ -485,17 +601,17 @@ namespace svt { namespace table m_rAntiImpl.Invalidate(); - OSL_UNUSED( i_first ); - OSL_UNUSED( i_last ); + OSL_UNUSED( i_colIndex ); } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::columnMoved( ColPos oldIndex, ColPos newIndex ) + void TableControl_Impl::allColumnsRemoved() { - OSL_ENSURE( false, "TableControl_Impl::columnMoved: not implemented!" ); - // there's no known implementation (yet) which calls this method - OSL_UNUSED( oldIndex ); - OSL_UNUSED( newIndex ); + m_nColumnCount = m_pModel->getColumnCount(); + impl_ni_updateColumnWidths(); + impl_ni_updateScrollbars(); + + m_rAntiImpl.Invalidate(); } //------------------------------------------------------------------------------------------------------------------ @@ -1741,12 +1857,6 @@ namespace svt { namespace table return m_aSelectedRows; } - //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::clearSelection() - { - m_aSelectedRows.clear(); - } - //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::removeSelectedRow(RowPos _nRowPos) { @@ -1841,10 +1951,13 @@ namespace svt { namespace table // TODO: give veto listeners a chance - if ( ( _nColumn < -1 ) || ( _nColumn >= m_nColumnCount ) - || ( _nRow < -1 ) || ( _nRow >= m_nRowCount ) + if ( ( _nColumn < 0 ) || ( _nColumn >= m_nColumnCount ) + || ( _nRow < 0 ) || ( _nRow >= m_nRowCount ) ) + { + OSL_ENSURE( false, "TableControl_Impl::goTo: invalid row or column index!" ); return false; + } TempHideCursor aHideCursor( *this ); m_nCurColumn = _nColumn; @@ -2086,6 +2199,88 @@ namespace svt { namespace table return lowerBound - m_aColumnWidths.begin(); } + //-------------------------------------------------------------------- + bool TableControl_Impl::markRowAsDeselected( RowPos const i_rowIndex ) + { + DBG_CHECK_ME(); + + ::std::vector< RowPos >::iterator selPos = ::std::find( m_aSelectedRows.begin(), m_aSelectedRows.end(), i_rowIndex ); + if ( selPos == m_aSelectedRows.end() ) + return false; + + m_aSelectedRows.erase( selPos ); + return true; + } + + //-------------------------------------------------------------------- + bool TableControl_Impl::markRowAsSelected( RowPos const i_rowIndex ) + { + DBG_CHECK_ME(); + + if ( isRowSelected( i_rowIndex ) ) + return false; + + SelectionMode const eSelMode = getSelEngine()->GetSelectionMode(); + switch ( eSelMode ) + { + case SINGLE_SELECTION: + if ( !m_aSelectedRows.empty() ) + { + OSL_ENSURE( m_aSelectedRows.size() == 1, "TableControl::markRowAsSelected: SingleSelection with more than one selected element?" ); + m_aSelectedRows[0] = i_rowIndex; + break; + } + // fall through + + case MULTIPLE_SELECTION: + m_aSelectedRows.push_back( i_rowIndex ); + break; + + default: + OSL_ENSURE( false, "TableControl_Impl::markRowAsSelected: unsupported selection mode!" ); + return false; + } + + return true; + } + + //-------------------------------------------------------------------- + bool TableControl_Impl::markAllRowsAsDeselected() + { + if ( m_aSelectedRows.empty() ) + return false; + + m_aSelectedRows.clear(); + return true; + } + + //-------------------------------------------------------------------- + bool TableControl_Impl::markAllRowsAsSelected() + { + DBG_CHECK_ME(); + + SelectionMode const eSelMode = getSelEngine()->GetSelectionMode(); + ENSURE_OR_RETURN_FALSE( eSelMode == MULTIPLE_SELECTION, "TableControl_Impl::markAllRowsAsSelected: unsupported selection mode!" ); + + if ( m_aSelectedRows.size() == size_t( m_pModel->getRowCount() ) ) + { + #if OSL_DEBUG_LEVEL > 0 + for ( TableSize row = 0; row < m_pModel->getRowCount(); ++row ) + { + OSL_ENSURE( isRowSelected( row ), "TableControl_Impl::markAllRowsAsSelected: inconsistency in the selected rows!" ); + } + #endif + // already all rows marked as selected + return false; + } + + m_aSelectedRows.clear(); + for ( RowPos i=0; i < m_pModel->getRowCount(); ++i ) + m_aSelectedRows.push_back(i); + + return true; + } + //-------------------------------------------------------------------- void TableControl_Impl::resizeColumn( const Point& rPoint ) { @@ -2261,7 +2456,7 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ TableFunctionSet::TableFunctionSet(TableControl_Impl* _pTableControl) :m_pTableControl( _pTableControl) - ,m_nCurrentRow (-2) + ,m_nCurrentRow (-2) { } //------------------------------------------------------------------------------------------------------------------ @@ -2399,6 +2594,7 @@ namespace svt { namespace table } m_pTableControl->m_aSelectedRows.erase(m_pTableControl->m_aSelectedRows.begin()+pos); } + //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::DeselectAll() { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 1987dd96e6f5..c4b72889b07a 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -236,7 +236,35 @@ namespace svt { namespace table /** updates the vector, which contains the selected rows after removing the row nRowPos*/ void removeSelectedRow(RowPos _nRowPos); void invalidateRows(); - void clearSelection(); + + bool hasRowSelection() const { return !m_aSelectedRows.empty(); } + size_t getSelectedRowCount() const { return m_aSelectedRows.size(); } + + /** removes the given row index from m_aSelectedRows + + @return + if and only if the row was previously marked as selected + */ + bool markRowAsDeselected( RowPos const i_rowIndex ); + + /** marks the given row as selectged, by putting it into m_aSelectedRows + @return + if and only if the row was previously not marked as selected + */ + bool markRowAsSelected( RowPos const i_rowIndex ); + + /** marks all rows as deselected + @return + if and only if the selection actually changed by this operation + */ + bool markAllRowsAsDeselected(); + + /** marks all rows as selected + @return + if and only if all rows were selected already. + */ + bool markAllRowsAsSelected(); + // ITableControl virtual void hideCursor(); @@ -265,9 +293,9 @@ namespace svt { namespace table // ITableModelListener virtual void rowsInserted( RowPos first, RowPos last ); virtual void rowsRemoved( RowPos first, RowPos last ); - virtual void columnsInserted( ColPos first, ColPos last ); - virtual void columnsRemoved( ColPos first, ColPos last ); - virtual void columnMoved( ColPos oldIndex, ColPos newIndex ); + virtual void columnInserted( ColPos const i_colIndex ); + virtual void columnRemoved( ColPos const i_colIndex ); + virtual void allColumnsRemoved(); virtual void cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ); virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ); diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index ea0a41688355..b5d2a48026ea 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -64,12 +64,10 @@ using ::com::sun::star::accessibility::AccessibleTableModelChange; SVTXGridControl::SVTXGridControl() :m_pTableModel( new UnoControlTableModel() ) - ,m_xColumnModel( 0 ) ,m_bHasColumnHeaders( false ) ,m_bHasRowHeaders( false ) ,m_bTableModelInitCompleted( false ) ,m_nSelectedRowCount( 0 ) - ,m_nKnowRowCount( 0 ) ,m_aSelectionListeners( *this ) { } @@ -324,36 +322,29 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An { Reference< XGridDataModel > const xDataModel( aValue, UNO_QUERY ); if ( !xDataModel.is() ) - throw GridInvalidDataException( ::rtl::OUString::createFromAscii("The data model isn't set!"), *this ); + throw GridInvalidDataException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid data model." ) ), *this ); m_pTableModel->setDataModel( xDataModel ); impl_checkTableModelInit(); - - // ensure default columns exist, if they have not previously been added - sal_Int32 const nDataColumnCount = xDataModel->getColumnCount(); - if ( ( nDataColumnCount > 0 ) && ( m_xColumnModel->getColumnCount() == 0 ) ) - m_xColumnModel->setDefaultColumns( nDataColumnCount ); - // this will trigger notifications, which in turn will let us update our m_pTableModel } break; case BASEPROPERTY_GRID_COLUMNMODEL: { + // obtain new col model + Reference< XGridColumnModel > const xColumnModel( aValue, UNO_QUERY ); + if ( !xColumnModel.is() ) + throw GridInvalidModelException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid column model." ) ), *this ); + // remove all old columns m_pTableModel->removeAllColumns(); - // obtain new col model - m_xColumnModel = Reference< XGridColumnModel >( aValue, UNO_QUERY_THROW ); - // announce to the TableModel - m_pTableModel->setColumnModel( m_xColumnModel ); - - // announce the table model to the table control, if we have everything which is needed + m_pTableModel->setColumnModel( xColumnModel ); impl_checkTableModelInit(); // add new columns impl_updateColumnsFromModel_nothrow(); - break; } default: @@ -371,8 +362,17 @@ void SVTXGridControl::impl_checkTableModelInit() if ( pTable ) { pTable->SetModel( PTableModel( m_pTableModel ) ); - m_nKnowRowCount = m_pTableModel->getRowCount(); + m_bTableModelInitCompleted = true; + + // ensure default columns exist, if they have not previously been added + Reference< XGridDataModel > const xDataModel( m_pTableModel->getDataModel(), UNO_QUERY_THROW ); + Reference< XGridColumnModel > const xColumnModel( m_pTableModel->getColumnModel(), UNO_QUERY_THROW ); + + sal_Int32 const nDataColumnCount = xDataModel->getColumnCount(); + if ( ( nDataColumnCount > 0 ) && ( xColumnModel->getColumnCount() == 0 ) ) + xColumnModel->setDefaultColumns( nDataColumnCount ); + // this will trigger notifications, which in turn will let us update our m_pTableModel } } } @@ -429,7 +429,7 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru break; case BASEPROPERTY_GRID_COLUMNMODEL: - aPropertyValue <<= m_xColumnModel; + aPropertyValue <<= m_pTableModel->getColumnModel(); break; case BASEPROPERTY_HSCROLL: @@ -518,113 +518,17 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) } //---------------------------------------------------------------------------------------------------------------------- -void SAL_CALL SVTXGridControl::rowsAdded( const GridDataEvent& i_event ) throw (RuntimeException) +void SAL_CALL SVTXGridControl::rowsInserted( const GridDataEvent& i_event ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); - - sal_Int32 const affectedRows = i_event.Rows.getLength(); - ENSURE_OR_RETURN_VOID( affectedRows > 0, "SVTXGridControl::rowsAdded: invalid row count!" ); - - Reference< XGridDataModel > const xDataModel( m_pTableModel->getDataModel(), UNO_QUERY_THROW ); - sal_Int32 const affectedColumns = i_event.Columns.getLength() ? i_event.Columns.getLength() : xDataModel->getColumnCount(); - ENSURE_OR_RETURN_VOID( affectedColumns > 0, "SVTXGridControl::rowsAdded: no columns at all?" ); - TableSize const columnCount = m_xColumnModel->getColumnCount(); - if ( columnCount == 0 ) - { - m_xColumnModel->setDefaultColumns( affectedColumns ); - // this will trigger notifications, which in turn will let us update our m_pTableModel - } - - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowsAdded: no control (anymore)!" ); - - pTable->InvalidateDataWindow( m_pTableModel->getRowCount() - 1, 0, false ); - if ( pTable->isAccessibleAlive() ) - { - pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, - makeAny( AccessibleTableModelChange(INSERT, m_pTableModel->getRowCount()-1, m_pTableModel->getRowCount(), 0, m_pTableModel->getColumnCount())), - Any()); - pTable->commitGridControlEvent(CHILD, - makeAny( pTable->m_pAccessTable->m_pAccessible->getTableHeader(TCTYPE_ROWHEADERBAR)), - Any()); - for (sal_Int32 i = 0 ; i <= m_pTableModel->getColumnCount() ; ++i) - { - pTable->commitGridControlEvent( - CHILD, - makeAny( pTable->m_pAccessTable->m_pAccessible->getTable() ), - Any()); - } - } + m_pTableModel->notifyRowsInserted( i_event ); } //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); - - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowsRemoved: no control (anymore)!" ); - - if ( i_event.Rows.getLength() == 0 ) - { - if ( !isSelectionEmpty() ) - deselectAllRows(); - - pTable->clearSelection(); - - if ( pTable->isAccessibleAlive() ) - { - pTable->commitGridControlEvent( - TABLE_MODEL_CHANGED, - makeAny( AccessibleTableModelChange( DELETE, 0, m_pTableModel->getColumnCount(), 0, m_pTableModel->getColumnCount() ) ), - Any() - ); - } - } - else - { - #if OSL_DEBUG_LEVEL > 0 - for ( sal_Int32 row = 0; row < i_event.Rows.getLength() - 1; ++row ) - { - OSL_ENSURE( i_event.Rows[row] < i_event.Rows[row], "SVTXGridControl::rowsRemoved: row indexes not sorted!" ); - } - #endif - sal_Int32 removedRowCount = 0; - for ( sal_Int32 row = 0; row < i_event.Rows.getLength(); ++row ) - { - sal_Int32 const rowIndex = i_event.Rows[row]; - ENSURE_OR_CONTINUE( ( rowIndex >= 0 ) && ( rowIndex < m_nKnowRowCount ), - "SVTXGridControl::rowsRemoved: illegal row index!" ); - - if ( isSelectedIndex( rowIndex ) ) - { - Sequence< sal_Int32 > selected(1); - selected[0] = rowIndex; - deselectRows( selected ); - } - - if ( pTable->isAccessibleAlive() ) - { - pTable->commitGridControlEvent(TABLE_MODEL_CHANGED, - makeAny( AccessibleTableModelChange( - DELETE, rowIndex - removedRowCount, rowIndex - removedRowCount + 1, 0, m_pTableModel->getColumnCount() - // the adjustment via removedRowCount is necessary here, since with every removed row, the - // *actual* index of all subsequent rows changes, but i_event.Rows still contains the original row indexes - ) ), - Any() - ); - } - ++removedRowCount; - } - - // TODO: I don't think that the selected rows of the TableControl properly survive this - they might contain - // too large indexes now. - // Really, the ITableModel should broadcast the "rowsRemoved" event to its listeners, and the TableControl/_Impl - // should do all necessary adjustments, including for its selection, itself. - } - - m_nKnowRowCount = m_pTableModel->getRowCount(); - pTable->InvalidateDataWindow( 0, m_nKnowRowCount, true ); + m_pTableModel->notifyRowsRemoved( i_event ); } //---------------------------------------------------------------------------------------------------------------------- @@ -637,10 +541,10 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw // TODO: Our UnoControlTableModel should be a listener at the data model, and multiplex those events, // so the TableControl/_Impl can react on it. - if ( i_event.Rows.getLength() == 0 ) + if ( i_event.FirstRow == -1 ) pTable->InvalidateDataWindow( 0, m_pTableModel->getRowCount(), false ); else - pTable->InvalidateDataWindow( i_event.Rows[0], i_event.Rows[ i_event.Rows.getLength() - 1 ], false ); + pTable->InvalidateDataWindow( i_event.FirstRow, i_event.LastRow, false ); } //---------------------------------------------------------------------------------------------------------------------- @@ -730,46 +634,14 @@ void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObj } } -void SAL_CALL SVTXGridControl::selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL SVTXGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectRows: no control (anymore)!" ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectRow: no control (anymore)!" ); - SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode(); - if(eSelMode != NO_SELECTION) - { - sal_Int32 start = rangeOfRows[0]; - int seqSize = rangeOfRows.getLength(); - sal_Int32 end = rangeOfRows[seqSize-1]; - if((start >= 0 && start < m_pTableModel->getRowCount()) && (end >= 0 && end < m_pTableModel->getRowCount())) - { - std::vector& selectedRows = pTable->GetSelectedRows(); - if(eSelMode == SINGLE_SELECTION) - { - if(!selectedRows.empty()) - selectedRows.clear(); - if(rangeOfRows.getLength() == 1) - selectedRows.push_back(start); - else - return; - } - else - { - for(int i=0;iselectionChanged(true); - pTable->InvalidateDataWindow(start, end, false); - SetSynthesizingVCLEvent( sal_True ); - pTable->Select(); - SetSynthesizingVCLEvent( sal_False ); - } - } + pTable->SelectRow( i_rowIndex, true ); } void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::RuntimeException) @@ -779,41 +651,17 @@ void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::Run TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectAllRows: no control (anymore)!" ); - SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode(); - if(eSelMode != NO_SELECTION) - { - std::vector& selectedRows = pTable->GetSelectedRows(); - if(!selectedRows.empty()) - selectedRows.clear(); - for(int i=0;igetRowCount();i++) - selectedRows.push_back(i); - pTable->Invalidate(); - SetSynthesizingVCLEvent( sal_True ); - pTable->Select(); - SetSynthesizingVCLEvent( sal_False ); - } + pTable->SelectAll( true ); } -void SAL_CALL SVTXGridControl::deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectRows: no control (anymore)!" ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectRow: no control (anymore)!" ); - std::vector& selectedRows = pTable->GetSelectedRows(); - std::vector::iterator itStart = selectedRows.begin(); - std::vector::iterator itEnd = selectedRows.end(); - for(int i = 0; i < rangeOfRows.getLength(); i++ ) - { - std::vector::iterator iter = std::find(itStart, itEnd, rangeOfRows[i]); - selectedRows.erase(iter); - } - pTable->selectionChanged(true); - pTable->Invalidate(); - SetSynthesizingVCLEvent( sal_True ); - pTable->Select(); - SetSynthesizingVCLEvent( sal_False ); + pTable->SelectRow( i_rowIndex, false ); } void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException) @@ -823,13 +671,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectAllRows: no control (anymore)!" ); - std::vector& selectedRows = pTable->GetSelectedRows(); - if(!selectedRows.empty()) - selectedRows.clear(); - pTable->Invalidate(); - SetSynthesizingVCLEvent( sal_True ); - pTable->Select(); - SetSynthesizingVCLEvent( sal_False ); + pTable->SelectAll( false ); } ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL SVTXGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException) @@ -844,11 +686,6 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R return selectedRowsToSequence; } -::sal_Bool SAL_CALL SVTXGridControl::isCellEditable() throw (::com::sun::star::uno::RuntimeException) -{ - return sal_False; -} - ::sal_Bool SAL_CALL SVTXGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -870,53 +707,9 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable, "SVTXGridControl::isSelectedIndex: no control (anymore)!", sal_False ); - std::vector& selectedRows = pTable->GetSelectedRows(); - return std::find(selectedRows.begin(),selectedRows.end(), index) != selectedRows.end(); + return pTable->IsRowSelected( index ); } -void SAL_CALL SVTXGridControl::selectRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException) -{ - ::vos::OGuard aGuard( GetMutex() ); - - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::isSelectedIndex: no control (anymore)!" ); - - if(index<0 || index>=m_pTableModel->getRowCount()) - return; - SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode(); - if(eSelMode != NO_SELECTION) - { - std::vector& selectedRows = pTable->GetSelectedRows(); - if(eSelMode == MULTIPLE_SELECTION) - { - if(!isSelectedIndex(index)) - selectedRows.push_back(index); - else - return; - } - else if(eSelMode == SINGLE_SELECTION) - { - if(!selectedRows.empty()) - { - if(!isSelectedIndex(index)) - deselectRows(getSelection()); - else - return; - } - selectedRows.push_back(index); - } - pTable->selectionChanged(true); - pTable->InvalidateDataWindow(index, index, false); - SetSynthesizingVCLEvent( sal_True ); - pTable->Select(); - SetSynthesizingVCLEvent( sal_False ); - } -} - -void SAL_CALL SVTXGridControl::selectColumn(::sal_Int32 x) throw (::com::sun::star::uno::RuntimeException) -{ - (void)x; -} void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::lang::EventObject aObj; @@ -997,13 +790,14 @@ void SVTXGridControl::ImplCallItemListeners() void SVTXGridControl::impl_updateColumnsFromModel_nothrow() { - ENSURE_OR_RETURN_VOID( m_xColumnModel.is(), "no model!" ); + Reference< XGridColumnModel > const xColumnModel( m_pTableModel->getColumnModel() ); + ENSURE_OR_RETURN_VOID( xColumnModel.is(), "no model!" ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable != NULL, "no table!" ); try { - const Sequence< Reference< XGridColumn > > columns = m_xColumnModel->getColumns(); + const Sequence< Reference< XGridColumn > > columns = xColumnModel->getColumns(); for ( const Reference< XGridColumn >* colRef = columns.getConstArray(); colRef != columns.getConstArray() + columns.getLength(); ++colRef diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index 8ebeb09374ec..fa554664b2c0 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -56,12 +56,10 @@ class SVTXGridControl : public SVTXGridControl_Base { private: ::boost::shared_ptr< UnoControlTableModel > m_pTableModel; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > m_xColumnModel; bool m_bHasColumnHeaders; bool m_bHasRowHeaders; bool m_bTableModelInitCompleted; sal_Int32 m_nSelectedRowCount; - sal_Int32 m_nKnowRowCount; SelectionListenerMultiplexer m_aSelectionListeners; protected: @@ -73,7 +71,7 @@ public: ~SVTXGridControl(); // XGridDataListener - virtual void SAL_CALL rowsAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowsInserted( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL rowTitleChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); @@ -89,16 +87,13 @@ public: // XGridSelection virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL selectAllRows() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL deselectAllRows() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getSelection() throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isCellEditable() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL selectColumn(::sal_Int32 x) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 66f7f518dab4..653c2e46a427 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -70,6 +70,7 @@ namespace svt { namespace table using ::com::sun::star::style::HorizontalAlignment_LEFT; using ::com::sun::star::style::HorizontalAlignment; using ::com::sun::star::uno::WeakReference; + using ::com::sun::star::awt::grid::GridDataEvent; /** === end UNO using === **/ //================================================================================================================== @@ -263,7 +264,7 @@ namespace svt { namespace table ++loop ) { - (*loop)->columnsInserted( i_position, i_position ); + (*loop)->columnInserted( i_position ); } } @@ -286,7 +287,7 @@ namespace svt { namespace table ++loop ) { - (*loop)->columnsRemoved( i_position, i_position ); + (*loop)->columnRemoved( i_position ); } // dispose the column @@ -324,7 +325,7 @@ namespace svt { namespace table ++loop ) { - (*loop)->columnsRemoved( 0, nLastIndex ); + (*loop)->allColumnsRemoved(); } } @@ -487,10 +488,16 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - bool UnoControlTableModel::hasColumnModel() const + Reference< XGridColumnModel > UnoControlTableModel::getColumnModel() const { Reference< XGridColumnModel > const xColumnModel( m_pImpl->m_aColumnModel ); - return xColumnModel.is(); + return xColumnModel; + } + + //------------------------------------------------------------------------------------------------------------------ + bool UnoControlTableModel::hasColumnModel() const + { + return getColumnModel().is(); } //------------------------------------------------------------------------------------------------------------------ @@ -722,6 +729,57 @@ namespace svt { namespace table } } + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::notifyRowsInserted( GridDataEvent const & i_event ) + { + // check sanity of the event + ENSURE_OR_RETURN_VOID( i_event.FirstRow >= 0, "UnoControlTableModel::notifyRowsInserted: invalid first row!" ); + ENSURE_OR_RETURN_VOID( i_event.LastRow >= i_event.FirstRow, "UnoControlTableModel::notifyRowsInserted: invalid row indexes!" ); + + // check own sanity + Reference< XGridColumnModel > const xColumnModel( m_pImpl->m_aColumnModel ); + ENSURE_OR_RETURN_VOID( xColumnModel.is(), "UnoControlTableModel::notifyRowsInserted: no column model anymore!" ); + + Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); + ENSURE_OR_RETURN_VOID( xDataModel.is(), "UnoControlTableModel::notifyRowsInserted: no data model anymore!" ); + + // implicitly add columns to the column model + // TODO: is this really a good idea? + sal_Int32 const dataColumnCount = xDataModel->getColumnCount(); + OSL_ENSURE( dataColumnCount > 0, "UnoControlTableModel::notifyRowsInserted: no columns at all?" ); + + sal_Int32 const modelColumnCount = xColumnModel->getColumnCount(); + if ( ( modelColumnCount == 0 ) && ( dataColumnCount > 0 ) ) + { + // TODO: shouldn't we clear the mutexes guard for this call? + xColumnModel->setDefaultColumns( dataColumnCount ); + } + + // multiplex the event to our own listeners + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->rowsInserted( i_event.FirstRow, i_event.LastRow ); + } + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::notifyRowsRemoved( GridDataEvent const & i_event ) + { + // multiplex the event to our own listeners + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->rowsRemoved( i_event.FirstRow, i_event.LastRow ); + } + } + // ..................................................................................................................... } } // svt::table // ..................................................................................................................... diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index c1abe2c88e3a..c38d9ed694e2 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -131,6 +131,8 @@ namespace svt { namespace table getDataModel() const; void setColumnModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > const & i_gridColumnModel ); bool hasColumnModel() const; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > + getColumnModel() const; void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); @@ -144,6 +146,10 @@ namespace svt { namespace table void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); + // multiplexing of XGridDataListener events + void notifyRowsInserted( ::com::sun::star::awt::grid::GridDataEvent const & i_event ); + void notifyRowsRemoved( ::com::sun::star::awt::grid::GridDataEvent const & i_event ); + /// retrieves the index of a column within the model ColPos getColumnPos( UnoGridColumnFacade const & i_column ) const; diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 746be68d3b4e..3d9b8324de81 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -88,28 +88,6 @@ namespace toolkit { } - //------------------------------------------------------------------------------------------------------------------ - namespace - { - Sequence< sal_Int32 > lcl_buildSingleElementSequence( sal_Int32 const i_index ) - { - Sequence< sal_Int32 > aIndexes(1); - aIndexes[0] = i_index; - return aIndexes; - } - Sequence< sal_Int32 > lcl_buildIndexSequence( sal_Int32 const i_start, sal_Int32 const i_end ) - { - Sequence< sal_Int32 > aIndexes; - ENSURE_OR_RETURN( i_end >= i_start, "lcl_buildIndexSequence: illegal indexes!", aIndexes ); - - aIndexes.realloc( i_end - i_start + 1 ); - for ( sal_Int32 i = i_start; i <= i_end; ++i ) - aIndexes[ i - i_start ] = i; - - return aIndexes; - } - } - //------------------------------------------------------------------------------------------------------------------ void DefaultGridDataModel::broadcast( GridDataEvent const & i_event, void ( SAL_CALL XGridDataListener::*i_listenerMethod )( GridDataEvent const & ), ::osl::ClearableMutexGuard & i_instanceLock ) @@ -183,9 +161,10 @@ namespace toolkit if ( columnCount > m_nColumnCount ) m_nColumnCount = columnCount; + sal_Int32 const rowIndex = sal_Int32( m_aData.size() - 1 ); broadcast( - GridDataEvent( *this, Sequence< sal_Int32 >(), lcl_buildSingleElementSequence( m_aData.size() - 1 ) ), - &XGridDataListener::rowsAdded, + GridDataEvent( *this, -1, -1, rowIndex, rowIndex ), + &XGridDataListener::rowsInserted, aGuard ); } @@ -224,9 +203,11 @@ namespace toolkit if ( maxColCount > m_nColumnCount ) m_nColumnCount = maxColCount; + sal_Int32 const firstRow = sal_Int32( m_aData.size() - rowCount ); + sal_Int32 const lastRow = sal_Int32( m_aData.size() - 1 ); broadcast( - GridDataEvent( *this, Sequence< sal_Int32 >(), lcl_buildIndexSequence( m_aData.size() - rowCount, m_aData.size() - 1 ) ), - &XGridDataListener::rowsAdded, + GridDataEvent( *this, -1, -1, firstRow, lastRow ), + &XGridDataListener::rowsInserted, aGuard ); } @@ -243,7 +224,7 @@ namespace toolkit m_aData.erase( m_aData.begin() + i_rowIndex ); broadcast( - GridDataEvent( *this, Sequence< sal_Int32 >(), lcl_buildSingleElementSequence( i_rowIndex ) ), + GridDataEvent( *this, -1, -1, i_rowIndex, i_rowIndex ), &XGridDataListener::rowsRemoved, aGuard ); @@ -258,7 +239,7 @@ namespace toolkit m_aData.clear(); broadcast( - GridDataEvent( *this, Sequence< sal_Int32 >(), Sequence< sal_Int32 >() ), + GridDataEvent( *this, -1, -1, -1, -1 ), &XGridDataListener::rowsRemoved, aGuard ); @@ -280,7 +261,7 @@ namespace toolkit rRowData[ i_columnIndex ] = i_value; broadcast( - GridDataEvent( *this, lcl_buildSingleElementSequence( i_columnIndex ), lcl_buildSingleElementSequence( i_rowIndex ) ), + GridDataEvent( *this, i_columnIndex, i_columnIndex, i_rowIndex, i_rowIndex ), &XGridDataListener::dataChanged, aGuard ); @@ -317,12 +298,10 @@ namespace toolkit rDataRow[ columnIndex ] = i_values[ col ]; } - // by definition, the indexes in the notified sequences shall be sorted - Sequence< sal_Int32 > columnIndexes( i_columnIndexes ); - ::std::sort( stl_begin( columnIndexes ), stl_end( columnIndexes ) ); - + sal_Int32 const firstAffectedColumn = *::std::min_element( stl_begin( i_columnIndexes ), stl_end( i_columnIndexes ) ); + sal_Int32 const lastAffectedColumn = *::std::max_element( stl_begin( i_columnIndexes ), stl_end( i_columnIndexes ) ); broadcast( - GridDataEvent( *this, columnIndexes, lcl_buildSingleElementSequence( i_rowIndex ) ), + GridDataEvent( *this, firstAffectedColumn, lastAffectedColumn, i_rowIndex, i_rowIndex ), &XGridDataListener::dataChanged, aGuard ); @@ -339,7 +318,7 @@ namespace toolkit m_aRowHeaders[ i_rowIndex ] = i_title; broadcast( - GridDataEvent( *this, Sequence< sal_Int32 >(), lcl_buildSingleElementSequence( i_rowIndex ) ), + GridDataEvent( *this, -1, -1, i_rowIndex, i_rowIndex ), &XGridDataListener::rowTitleChanged, aGuard ); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 33d0bf048bfd..b9cab5a18cf0 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -372,9 +372,9 @@ sal_Bool SAL_CALL UnoGridControl::setModel( const Reference< XControlModel >& i_ } //---------------------------------------------------------------------------------------------------------------------- -void SAL_CALL UnoGridControl::selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL UnoGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { - Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRows( rangeOfRows); + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRow( i_rowIndex ); } //---------------------------------------------------------------------------------------------------------------------- @@ -384,9 +384,9 @@ void SAL_CALL UnoGridControl::selectAllRows() throw (::com::sun::star::uno::Runt } //---------------------------------------------------------------------------------------------------------------------- -void SAL_CALL UnoGridControl::deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException) +void SAL_CALL UnoGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { - Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->deselectRows( rangeOfRows); + Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->deselectRow( i_rowIndex ); } //---------------------------------------------------------------------------------------------------------------------- @@ -413,12 +413,6 @@ void SAL_CALL UnoGridControl::deselectAllRows() throw (::com::sun::star::uno::Ru return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectedIndex( index ); } -//---------------------------------------------------------------------------------------------------------------------- -void SAL_CALL UnoGridControl::selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) -{ - Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRow( y ); -} - //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException) { diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index cf832cb80705..5259711e97d6 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -105,14 +105,13 @@ public: // ::com::sun::star::awt::grid::XGridSelection virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL selectAllRows() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL deselectAllRows() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getSelection() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/grid/grideventforwarder.cxx b/toolkit/source/controls/grid/grideventforwarder.cxx index b3d17a897bad..68293025bd4e 100755 --- a/toolkit/source/controls/grid/grideventforwarder.cxx +++ b/toolkit/source/controls/grid/grideventforwarder.cxx @@ -81,11 +81,11 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridEventForwarder::rowsAdded( const GridDataEvent& i_event ) throw (RuntimeException) + void SAL_CALL GridEventForwarder::rowsInserted( const GridDataEvent& i_event ) throw (RuntimeException) { Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY ); if ( xPeer.is() ) - xPeer->rowsAdded( i_event ); + xPeer->rowsInserted( i_event ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/grideventforwarder.hxx b/toolkit/source/controls/grid/grideventforwarder.hxx index c0c09a7cc95d..0abdcc59fd85 100755 --- a/toolkit/source/controls/grid/grideventforwarder.hxx +++ b/toolkit/source/controls/grid/grideventforwarder.hxx @@ -61,7 +61,7 @@ namespace toolkit virtual void SAL_CALL release() throw(); // XGridDataListener - virtual void SAL_CALL rowsAdded( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowsInserted( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL rowTitleChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); -- cgit From c8030037c49842a8cbda8345a4f0f24a50822a3f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 13 Jan 2011 14:08:36 +0100 Subject: gridsort: reworked the notification system for inserted/removed rows In this course, more code which was in SVTXGridControl was moved to the places it belongs to, effectively meaning that the TableControl has better chances than before to be used outside an SVTXGridControl (though we're not there, yet). Also, the selection-related methods in TableControl/_Impl got some refactoring love, so the implementation details are hidden in the Impl class now, instead of being exposed to an exploited by the TableControl. And while we were there ... The XGridSelection does not provide a |selectColumn| anymore (there was no preparation whatsoever for column selection, anywhere, thus it was a complete dummy.) Also, its de/selectRows methods have been removed: They have questionable use, and make implementation rather difficult, compared with multiple calls to de/selectRow. --- offapi/com/sun/star/awt/grid/GridDataEvent.idl | 26 ++++++++++------ offapi/com/sun/star/awt/grid/XGridDataListener.idl | 4 +-- offapi/com/sun/star/awt/grid/XGridSelection.idl | 36 +++++++++------------- .../sun/star/awt/grid/XMutableGridDataModel.idl | 5 +++ 4 files changed, 38 insertions(+), 33 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/GridDataEvent.idl b/offapi/com/sun/star/awt/grid/GridDataEvent.idl index 9afadfd3df7e..3ac05f0ec1ae 100644 --- a/offapi/com/sun/star/awt/grid/GridDataEvent.idl +++ b/offapi/com/sun/star/awt/grid/GridDataEvent.idl @@ -37,29 +37,37 @@ module com { module sun { module star { module awt { module grid { /** used to notify changes in the data represented by an XMutableGridDataModel. +

          Effectively, a GridDataEvent denotes a continuous two-dimensional cell range + within a grid's data model, which is affected by a certain change.

          + @see XMutableGridDataModel - @see XGridControl @see XGridDataListener @since OOo 3.3.0 */ struct GridDataEvent: com::sun::star::lang::EventObject { - /** denotes the columns affected by the data change + /** denotes the first column affected by a change. -

          The array contains the indexes of the affected columns, in ascending order.

          +

          If FirstColumn is -1, the listener should assume that all rows of a grid's data model + are affected.

          + */ + long FirstColumn; -

          If this sequence is empty, the callee should all assume all columns to be affected.

          + /** denotes the last column affected by a change */ - sequence< long > Columns; + long LastColumn; - /** denotes the rows affected by the data change + /** denotes the first row affected by a change. -

          The array contains the indexes of the affected rows, in ascending order.

          +

          If FirstRow is -1, the listener should assume that all rows of a grid's data model + are affected.

          + */ + long FirstRow; -

          If this sequence is empty, the callee should all assume all rows to be affected.

          + /** denotes the last row affected by a change */ - sequence< long > Rows; + long LastRow; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XGridDataListener.idl b/offapi/com/sun/star/awt/grid/XGridDataListener.idl index 1e5573cef2b7..ef21ea96ec9f 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataListener.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataListener.idl @@ -52,9 +52,9 @@ module com { module sun { module star { module awt { module grid { interface XGridDataListener: com::sun::star::lang::XEventListener { - /** is called when one or more rows of data have been added to a grid control's data model. + /** is called when one or more rows of data have been inserted into a grid control's data model. */ - void rowsAdded( [in] GridDataEvent Event ); + void rowsInserted( [in] GridDataEvent Event ); /** is called when one or more rows of data have been removed from a grid control's data model. */ diff --git a/offapi/com/sun/star/awt/grid/XGridSelection.idl b/offapi/com/sun/star/awt/grid/XGridSelection.idl index 5049426018b0..e07acb39a057 100644 --- a/offapi/com/sun/star/awt/grid/XGridSelection.idl +++ b/offapi/com/sun/star/awt/grid/XGridSelection.idl @@ -55,23 +55,25 @@ interface XGridSelection /** Selects all rows. */ - [oneway] void selectAllRows(); + void selectAllRows(); - /** Selects multiple rows. Previous selections will be removed. - @param rangeOfRows - array of rows indexes, which will be selected. + /** selects a given row + + @param RowIndex + denotes the index of the row to select */ - [oneway] void selectRows( [in] sequence< long > rangeOfRows); + void selectRow( [in] long RowIndex ); /** Deselects all selected rows. */ - [oneway] void deselectAllRows(); + void deselectAllRows(); + + /** removes the selection for a given row - /** Deselects selected rows. Selected rows, which aren't in the range remain selected. - @param rangeOfRows - array of rows indexes, which will be deselected. + @param RowIndex + denotes the index of the row to deselect */ - [oneway] void deselectRows( [in] sequence< long > rangeOfRows); + void deselectRow( [in] long RowIndex ); /** Returns the indicies of all selected rows. @returns @@ -93,21 +95,11 @@ interface XGridSelection */ boolean isSelectedIndex( [in] long index); - /** Marks a row as selected. - @param index - the index of a row. - */ - [oneway] void selectRow( [in] long index); - - /* - [oneway] void selectColumn( [in] long x); - */ - /** Adds a listener for the GridSelectionEvent posted after the grid changes. @param listener the listener to add. */ - [oneway] void addSelectionListener( [in] XGridSelectionListener listener); + void addSelectionListener( [in] XGridSelectionListener listener); //------------------------------------------------------------------------- @@ -115,7 +107,7 @@ interface XGridSelection @param listener the listener to remove. */ - [oneway] void removeSelectionListener( [in] XGridSelectionListener listener); + void removeSelectionListener( [in] XGridSelectionListener listener); }; diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index 6edb91895e88..58023cadc7b7 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -90,6 +90,11 @@ interface XMutableGridDataModel : XGridDataModel /** updates the content of a given row. +

          The change in the data model will be notified to registered listeners via + XGridDataListener::dataChanged. The GridDataEvent::FirstColumn and + GridDataEvent::LastColumn will denote the smallest respectively largest column + index from .

          + @param ColumnIndexes contains the column indexes of the cells, which should be updated @param RowIndex -- cgit From 37a550ad7f196f3fc66a95ed2dea80a9f18213d4 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 13 Jan 2011 15:07:15 +0100 Subject: vcl118: solve a namespace conflict --- vcl/win/source/gdi/salprn.cxx | 9 +++++---- vcl/win/source/window/salframe.cxx | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) mode change 100644 => 100755 vcl/win/source/gdi/salprn.cxx diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx old mode 100644 new mode 100755 index 702ff639ed84..1d36a35c7171 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -93,6 +93,7 @@ #endif +using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::ui::dialogs; @@ -2084,16 +2085,16 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName, if( mpInfoPrinter->maPortName.EqualsIgnoreCaseAscii( "FILE:" ) && !(pFileName && pFileName->Len()) ) { - Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); if( xFactory.is() ) { - Reference< XFilePicker > xFilePicker( xFactory->createInstance( + uno::Reference< XFilePicker > xFilePicker( xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ) ), UNO_QUERY ); DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" ); - Reference< XInitialization > xInit( xFilePicker, UNO_QUERY ); - Reference< XFilterManager > xFilterMgr( xFilePicker, UNO_QUERY ); + uno::Reference< XInitialization > xInit( xFilePicker, UNO_QUERY ); + uno::Reference< XFilterManager > xFilterMgr( xFilePicker, UNO_QUERY ); if( xInit.is() && xFilePicker.is() && xFilterMgr.is() ) { Sequence< Any > aServiceType( 1 ); diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 89a191c99ef6..019ffa76bc27 100755 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -104,6 +104,7 @@ using ::std::max; #include using ::rtl::OUString; +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; @@ -875,11 +876,11 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame, try { - Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); - Reference< XIndexAccess > xMultiMon( xFactory->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.DisplayAccess" ) ) ), UNO_QUERY_THROW ); + uno::Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); + uno::Reference< XIndexAccess > xMultiMon( xFactory->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.DisplayAccess" ) ) ), UNO_QUERY_THROW ); if( (pFrame->mnDisplay >= 0) && (pFrame->mnDisplay < xMultiMon->getCount()) ) { - Reference< XPropertySet > xMonitor( xMultiMon->getByIndex( pFrame->mnDisplay ), UNO_QUERY_THROW ); + uno::Reference< XPropertySet > xMonitor( xMultiMon->getByIndex( pFrame->mnDisplay ), UNO_QUERY_THROW ); com::sun::star::awt::Rectangle aRect; if( xMonitor->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "ScreenArea" ) ) ) >>= aRect ) { -- cgit From 2702fbdf06551b8f8ddbd9bb2ae5f6589939139d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 13 Jan 2011 15:07:42 +0100 Subject: gridsort: moved *all* members from TableControl to TableControl_Impl - this is what the PIMPL pattern is good for, right? (Removed the AccessibleTableControl_Impl class in this course, not needed anymore) --- svtools/inc/svtools/table/tablecontrol.hxx | 29 +++---- svtools/source/inc/accessibletableimp.hxx | 62 --------------- svtools/source/table/tablecontrol.cxx | 121 +++++++++-------------------- svtools/source/table/tablecontrol_impl.cxx | 108 ++++++++++++++++++------- svtools/source/table/tablecontrol_impl.hxx | 39 ++++++++-- svtools/source/uno/svtxgridcontrol.cxx | 5 +- 6 files changed, 161 insertions(+), 203 deletions(-) delete mode 100644 svtools/source/inc/accessibletableimp.hxx diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 595ff5bae847..336e56a2b01a 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -36,6 +36,7 @@ #include #include +#include //........................................................................ @@ -45,7 +46,6 @@ namespace svt { namespace table class TableControl_Impl; class TableDataWindow; - class AccessibleTableControl_Impl; //==================================================================== //= TableControl @@ -71,18 +71,10 @@ namespace svt { namespace table class SVT_DLLPUBLIC TableControl : public Control, public IAccessibleTable { private: - DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* ); - DECL_DLLPRIVATE_LINK( ImplMouseButtonUpHdl, MouseEvent* ); - - DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); + ::boost::shared_ptr< TableControl_Impl > m_pImpl; - ::boost::shared_ptr< TableControl_Impl > m_pImpl; - Link m_aSelectHdl; - bool m_bSelectionChanged; public: - ::std::auto_ptr< AccessibleTableControl_Impl > m_pAccessTable; - TableControl( Window* _pParent, WinBits _nStyle ); ~TableControl(); @@ -159,8 +151,8 @@ namespace svt { namespace table SVT_DLLPRIVATE virtual void Resize(); virtual void Select(); - void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; } - const Link& GetSelectHdl() const { return m_aSelectHdl; } + void SetSelectHdl( const Link& rLink ); + const Link& GetSelectHdl() const; /**invalidates the table if table has been changed e.g. new row added */ @@ -170,7 +162,7 @@ namespace svt { namespace table if the row, which should be removed, is selected, it will be erased from the vector */ SelectionEngine* getSelEngine(); - TableDataWindow* getDataWindow(); + TableDataWindow& getDataWindow(); // Window overridables virtual void GetFocus(); @@ -215,20 +207,19 @@ namespace svt { namespace table virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const; virtual sal_Bool HasRowHeader(); virtual sal_Bool HasColHeader(); - virtual sal_Bool isAccessibleAlive( ) const; - virtual void commitGridControlEvent( sal_Int16 _nEventId, const com::sun::star::uno::Any& _rNewValue, const com::sun::star::uno::Any& _rOldValue ); virtual ::std::vector< sal_Int32 >& GetSelectedRows(); virtual void RemoveSelectedRow(RowPos _nRowPos); virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; // ............................................................................................................. - void selectionChanged(bool _bChanged); - void SelectRow( RowPos const i_rowIndex, bool const i_select ); void SelectAll( bool const i_select ); - protected: - ::svt::IAccessibleFactory& getAccessibleFactory(); + private: + DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* ); + DECL_DLLPRIVATE_LINK( ImplMouseButtonUpHdl, MouseEvent* ); + + DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); private: TableControl(); // never implemented diff --git a/svtools/source/inc/accessibletableimp.hxx b/svtools/source/inc/accessibletableimp.hxx deleted file mode 100644 index 3a01c01567d3..000000000000 --- a/svtools/source/inc/accessibletableimp.hxx +++ /dev/null @@ -1,62 +0,0 @@ -/************************************************************************* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * -************************************************************************/ - -#ifndef SVTOOLS_SOURCE_INC_ACCESSIBLETABLEIMP_HXX -#define SVTOOLS_SOURCE_INC_ACCESSIBLETABLEIMP_HXX - -#include "svtaccessiblefactory.hxx" - -namespace svt { namespace table -{ -//........................................................................ - - - class AccessibleTableControl_Impl - { - public: - AccessibleFactoryAccess m_aFactoryAccess; - IAccessibleTableControl* m_pAccessible; - - public: - AccessibleTableControl_Impl() : m_pAccessible(NULL) - { - } - - - /// @see AccessibleTableControl::getTableRowHeader - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - getAccessibleTableHeader( AccessibleTableControlObjType _eObjType ); - /// @see AccessibleTableControl::getTable - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - getAccessibleTable( ); - - }; - -//........................................................................ -} } // namespace svt::table -//........................................................................ - -#endif // SVTOOLS_SOURCE_INC_ACCESSIBLETABLEIMP_HXX diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 757310ba224d..f493983789ef 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -29,8 +29,6 @@ #include "tablegeometry.hxx" #include "tablecontrol_impl.hxx" -#include "accessibletableimp.hxx" - #include "svtools/table/tablecontrol.hxx" #include "svtools/table/tabledatawindow.hxx" @@ -50,24 +48,6 @@ namespace svt { namespace table { //...................................................................................................................... - //================================================================================================================== - //= AccessibleTableControl_Impl - //================================================================================================================== - // ----------------------------------------------------------------------------------------------------------------- - Reference< XAccessible > AccessibleTableControl_Impl::getAccessibleTableHeader( AccessibleTableControlObjType _eObjType ) - { - if ( m_pAccessible && m_pAccessible->isAlive() ) - return m_pAccessible->getTableHeader( _eObjType ); - return NULL; - } - // ----------------------------------------------------------------------------------------------------------------- - Reference< XAccessible > AccessibleTableControl_Impl::getAccessibleTable( ) - { - if ( m_pAccessible && m_pAccessible->isAlive() ) - return m_pAccessible->getTable( ); - return NULL; - } - //================================================================================================================== //= TableControl //================================================================================================================== @@ -75,13 +55,11 @@ namespace svt { namespace table TableControl::TableControl( Window* _pParent, WinBits _nStyle ) :Control( _pParent, _nStyle ) ,m_pImpl( new TableControl_Impl( *this ) ) - ,m_bSelectionChanged(false) { - TableDataWindow* aTableData = m_pImpl->getDataWindow(); - aTableData->SetMouseButtonDownHdl( LINK( this, TableControl, ImplMouseButtonDownHdl ) ); - aTableData->SetMouseButtonUpHdl( LINK( this, TableControl, ImplMouseButtonUpHdl ) ); - aTableData->SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) ); - m_pAccessTable.reset(new ::svt::table::AccessibleTableControl_Impl()); + TableDataWindow& rDataWindow = m_pImpl->getDataWindow(); + rDataWindow.SetMouseButtonDownHdl( LINK( this, TableControl, ImplMouseButtonDownHdl ) ); + rDataWindow.SetMouseButtonUpHdl( LINK( this, TableControl, ImplMouseButtonUpHdl ) ); + rDataWindow.SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) ); // by default, use the background as determined by the style settings const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); @@ -95,10 +73,8 @@ namespace svt { namespace table ImplCallEventListeners( VCLEVENT_OBJECT_DYING ); m_pImpl->setModel( PTableModel() ); + m_pImpl->disposeAccessible(); m_pImpl.reset(); - - if ( m_pAccessTable->m_pAccessible ) - m_pAccessTable->m_pAccessible->dispose(); } // ----------------------------------------------------------------------------------------------------------------- @@ -122,10 +98,10 @@ namespace svt { namespace table Control::KeyInput( rKEvt ); else { - if(m_bSelectionChanged) + if ( m_pImpl->didSelectionChange() ) { Select(); - m_bSelectionChanged = false; + m_pImpl->setSelectionChanged( false ); } } } @@ -141,23 +117,23 @@ namespace svt { namespace table { case STATE_CHANGE_CONTROLBACKGROUND: if ( IsControlBackground() ) - getDataWindow()->SetControlBackground( GetControlBackground() ); + getDataWindow().SetControlBackground( GetControlBackground() ); else - getDataWindow()->SetControlBackground(); + getDataWindow().SetControlBackground(); break; case STATE_CHANGE_CONTROLFOREGROUND: if ( IsControlForeground() ) - getDataWindow()->SetControlForeground( GetControlForeground() ); + getDataWindow().SetControlForeground( GetControlForeground() ); else - getDataWindow()->SetControlForeground(); + getDataWindow().SetControlForeground(); break; case STATE_CHANGE_CONTROLFONT: if ( IsControlFont() ) - getDataWindow()->SetControlFont( GetControlFont() ); + getDataWindow().SetControlFont( GetControlFont() ); else - getDataWindow()->SetControlFont(); + getDataWindow().SetControlFont(); break; } } @@ -235,7 +211,7 @@ namespace svt { namespace table m_pImpl->markRowAsDeselected( i_rowIndex ); } - selectionChanged( true ); + m_pImpl->setSelectionChanged(); InvalidateDataWindow( i_rowIndex, i_rowIndex, false ); Select(); } @@ -257,7 +233,7 @@ namespace svt { namespace table } - selectionChanged( true ); + m_pImpl->setSelectionChanged(); Invalidate(); // TODO: can't we do better than this, and invalidate only the rows which changed? Select(); @@ -271,10 +247,10 @@ namespace svt { namespace table m_pImpl->invalidateRows(); else { - if ( m_bSelectionChanged ) + if ( m_pImpl->didSelectionChange() ) { m_pImpl->invalidateSelectedRegion( _nRowStart, _nRowEnd, _rRect ); - m_bSelectionChanged = false; + m_pImpl->setSelectionChanged( false ); } else m_pImpl->invalidateRow( _nRowStart, _rRect ); @@ -306,7 +282,7 @@ namespace svt { namespace table } // ----------------------------------------------------------------------------------------------------------------- - TableDataWindow* TableControl::getDataWindow() + TableDataWindow& TableControl::getDataWindow() { return m_pImpl->getDataWindow(); } @@ -315,29 +291,20 @@ namespace svt { namespace table Reference< XAccessible > TableControl::CreateAccessible() { Window* pParent = GetAccessibleParentWindow(); - DBG_ASSERT( pParent, "TableControl::CreateAccessible - parent not found" ); + ENSURE_OR_RETURN( pParent, "TableControl::CreateAccessible - parent not found", NULL ); - if( pParent && !m_pAccessTable->m_pAccessible) - { - Reference< XAccessible > xAccParent = pParent->GetAccessible(); - if( xAccParent.is() ) - { - m_pAccessTable->m_pAccessible = getAccessibleFactory().createAccessibleTableControl( - xAccParent, *this - ); - } - } - Reference< XAccessible > xAccessible; - if ( m_pAccessTable->m_pAccessible ) - xAccessible = m_pAccessTable->m_pAccessible->getMyself(); - return xAccessible; + return m_pImpl->getAccessible( *pParent ); } + + // ----------------------------------------------------------------------------------------------------------------- Reference TableControl::CreateAccessibleControl( sal_Int32 _nIndex ) { (void)_nIndex; DBG_ASSERT( FALSE, "TableControl::CreateAccessibleControl: to be overwritten!" ); return NULL; } + + // ----------------------------------------------------------------------------------------------------------------- ::rtl::OUString TableControl::GetAccessibleObjectName( AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const { ::rtl::OUString aRetText; @@ -616,26 +583,6 @@ namespace svt { namespace table (void)_nRow; (void)_nColumnPos; return GetIndexForPoint(_rPoint); - ; - } - - //------------------------------------------------------------------------------------------------------------------ - sal_Bool TableControl::isAccessibleAlive( ) const - { - return ( NULL != m_pAccessTable->m_pAccessible ) && m_pAccessTable->m_pAccessible->isAlive(); - } - - //------------------------------------------------------------------------------------------------------------------ - ::svt::IAccessibleFactory& TableControl::getAccessibleFactory() - { - return m_pAccessTable->m_aFactoryAccess.getFactory(); - } - - //------------------------------------------------------------------------------------------------------------------ - void TableControl::commitGridControlEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue ) - { - if ( isAccessibleAlive() ) - m_pAccessTable->m_pAccessible->commitEvent( _nEventId, _rNewValue, _rOldValue); } //------------------------------------------------------------------------------------------------------------------ @@ -652,12 +599,6 @@ namespace svt { namespace table return m_pImpl->calcTableRect(); } - //------------------------------------------------------------------------------------------------------------------ - void TableControl::selectionChanged(bool _bChanged) - { - m_bSelectionChanged = _bChanged; - } - //------------------------------------------------------------------------------------------------------------------ IMPL_LINK( TableControl, ImplSelectHdl, void*, EMPTYARG ) { @@ -682,7 +623,19 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ void TableControl::Select() { - ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_aSelectHdl, this ); + ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_pImpl->getSelectHandler(), this ); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl::SetSelectHdl( const Link& i_selectHandler ) + { + m_pImpl->setSelectHandler( i_selectHandler ); + } + + //------------------------------------------------------------------------------------------------------------------ + const Link& TableControl::GetSelectHdl() const + { + return m_pImpl->getSelectHandler(); } //...................................................................................................................... diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 31078eb23ce7..a147e2801696 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -36,8 +36,6 @@ #include "tablegeometry.hxx" #include "cellvalueconversion.hxx" -#include "accessibletableimp.hxx" - /** === begin UNO includes === **/ #include #include @@ -63,6 +61,8 @@ namespace svt { namespace table using ::com::sun::star::accessibility::AccessibleTableModelChange; using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Any; + using ::com::sun::star::accessibility::XAccessible; + using ::com::sun::star::uno::Reference; /** === end UNO using === **/ namespace AccessibleEventId = ::com::sun::star::accessibility::AccessibleEventId; namespace AccessibleTableModelChangeType = ::com::sun::star::accessibility::AccessibleTableModelChangeType; @@ -402,17 +402,19 @@ namespace svt { namespace table ,m_pSelEngine ( ) ,m_aSelectedRows ( ) ,m_pTableFunctionSet ( new TableFunctionSet( this ) ) - ,m_nAnchor (-1 ) + ,m_nAnchor ( -1 ) ,m_bResizingColumn ( false ) ,m_nResizingColumn ( 0 ) ,m_bResizingGrid ( false ) ,m_bUpdatingColWidths ( false ) + ,m_bSelectionChanged ( false ) + ,m_pAccessibleTable ( NULL ) #if DBG_UTIL ,m_nRequiredInvariants ( INV_SCROLL_POSITION ) #endif { DBG_CTOR( TableControl_Impl, TableControl_Impl_checkInvariants ); - m_pSelEngine = new SelectionEngine(m_pDataWindow, m_pTableFunctionSet); + m_pSelEngine = new SelectionEngine( m_pDataWindow.get(), m_pTableFunctionSet ); m_pSelEngine->SetSelectionMode(SINGLE_SELECTION); m_pDataWindow->SetPosPixel( Point( 0, 0 ) ); m_pDataWindow->Show(); @@ -428,7 +430,6 @@ namespace svt { namespace table DELETEZ( m_pScrollCorner ); DELETEZ( m_pTableFunctionSet ); DELETEZ( m_pSelEngine ); - DELETEZ( m_pDataWindow ); } //------------------------------------------------------------------------------------------------------------------ @@ -489,22 +490,22 @@ namespace svt { namespace table goTo( m_nCurColumn, m_nCurRow + insertedRows ); // notify A1YY events - if ( m_rAntiImpl.isAccessibleAlive() ) + if ( impl_isAccessibleAlive() ) { - m_rAntiImpl.commitGridControlEvent( AccessibleEventId::TABLE_MODEL_CHANGED, + impl_commitAccessibleEvent( AccessibleEventId::TABLE_MODEL_CHANGED, makeAny( AccessibleTableModelChange( AccessibleTableModelChangeType::INSERT, i_first, i_last, 0, m_pModel->getColumnCount() ) ), Any() ); - m_rAntiImpl.commitGridControlEvent( AccessibleEventId::CHILD, - makeAny( m_rAntiImpl.m_pAccessTable->m_pAccessible->getTableHeader( TCTYPE_ROWHEADERBAR ) ), + impl_commitAccessibleEvent( AccessibleEventId::CHILD, + makeAny( m_pAccessibleTable->getTableHeader( TCTYPE_ROWHEADERBAR ) ), Any() ); // for ( sal_Int32 i = 0 ; i <= m_pModel->getColumnCount(); ++i ) // { -// m_rAntiImpl.commitGridControlEvent( +// impl_commitAccessibleEvent( // CHILD, -// makeAny( m_rAntiImpl.m_pAccessTable->m_pAccessible->getTable() ), +// makeAny( m_pAccessibleTable->getTable() ), // Any()); // } // Huh? What's that? We're notifying |columnCount| CHILD events here, claiming the *table* itself @@ -557,9 +558,9 @@ namespace svt { namespace table } // notify A11Y events - if ( m_rAntiImpl.isAccessibleAlive() ) + if ( impl_isAccessibleAlive() ) { - m_rAntiImpl.commitGridControlEvent( + impl_commitAccessibleEvent( AccessibleEventId::TABLE_MODEL_CHANGED, makeAny( AccessibleTableModelChange( AccessibleTableModelChangeType::DELETE, @@ -1333,7 +1334,7 @@ namespace svt { namespace table m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); ensureVisible(m_nCurColumn,m_nCurRow,false); - m_rAntiImpl.selectionChanged(true); + setSelectionChanged(); bSuccess = true; } else @@ -1367,7 +1368,7 @@ namespace svt { namespace table invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } ensureVisible(m_nCurColumn,m_nCurRow,false); - m_rAntiImpl.selectionChanged(true); + setSelectionChanged(); bSuccess = true; } else @@ -1446,7 +1447,7 @@ namespace svt { namespace table else m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); - m_rAntiImpl.selectionChanged(true); + setSelectionChanged(); bSuccess = true; } break; @@ -1534,7 +1535,7 @@ namespace svt { namespace table m_pSelEngine->SetAnchor(TRUE); m_nAnchor = m_nCurRow; ensureVisible(m_nCurColumn, m_nCurRow, false); - m_rAntiImpl.selectionChanged(true); + setSelectionChanged(); bSuccess = true; } } @@ -1619,7 +1620,7 @@ namespace svt { namespace table m_pSelEngine->SetAnchor(TRUE); m_nAnchor = m_nCurRow; ensureVisible(m_nCurColumn, m_nCurRow, false); - m_rAntiImpl.selectionChanged(true); + setSelectionChanged(); bSuccess = true; } } @@ -1646,11 +1647,12 @@ namespace svt { namespace table m_nAnchor = m_nCurRow; m_pSelEngine->SetAnchor(TRUE); ensureVisible(m_nCurColumn, 0, false); - m_rAntiImpl.selectionChanged(true); + setSelectionChanged(); bSuccess = true; } } - break; + break; + case cursorSelectRowAreaBottom: { if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) @@ -1671,14 +1673,16 @@ namespace svt { namespace table m_nAnchor = m_nCurRow; m_pSelEngine->SetAnchor(TRUE); ensureVisible(m_nCurColumn, m_nRowCount-1, false); - m_rAntiImpl.selectionChanged(true); + setSelectionChanged(); bSuccess = true; } + break; + default: + DBG_ERROR( "TableControl_Impl::dispatchAction: unsupported action!" ); break; - default: - DBG_ERROR( "TableControl_Impl::dispatchAction: unsupported action!" ); - } - return bSuccess; + } + + return bSuccess; } //------------------------------------------------------------------------------------------------------------------ @@ -2140,11 +2144,7 @@ namespace svt { namespace table { return m_pSelEngine; } - //------------------------------------------------------------------------------------------------------------------ - TableDataWindow* TableControl_Impl::getDataWindow() - { - return m_pDataWindow; - } + //------------------------------------------------------------------------------------------------------------------ ScrollBar* TableControl_Impl::getHorzScrollbar() { @@ -2453,6 +2453,54 @@ namespace svt { namespace table return 0L; } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XAccessible > TableControl_Impl::getAccessible( Window& i_parentWindow ) + { + DBG_TESTSOLARMUTEX(); + if ( m_pAccessibleTable == NULL ) + { + Reference< XAccessible > const xAccParent = i_parentWindow.GetAccessible(); + if ( xAccParent.is() ) + { + m_pAccessibleTable = m_aFactoryAccess.getFactory().createAccessibleTableControl( + xAccParent, m_rAntiImpl + ); + } + } + + Reference< XAccessible > xAccessible; + if ( m_pAccessibleTable ) + xAccessible = m_pAccessibleTable->getMyself(); + return xAccessible; + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::disposeAccessible() + { + if ( m_pAccessibleTable ) + m_pAccessibleTable->dispose(); + m_pAccessibleTable = NULL; + } + + //------------------------------------------------------------------------------------------------------------------ + bool TableControl_Impl::impl_isAccessibleAlive() const + { + DBG_CHECK_ME(); + return ( NULL != m_pAccessibleTable ) && m_pAccessibleTable->isAlive(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::impl_commitAccessibleEvent( sal_Int16 const i_eventID, Any const & i_newValue, Any const & i_oldValue ) + { + DBG_CHECK_ME(); + if ( impl_isAccessibleAlive() ) + m_pAccessibleTable->commitEvent( i_eventID, i_newValue, i_oldValue ); + } + + //================================================================================================================== + //= TableFunctionSet + //================================================================================================================== //------------------------------------------------------------------------------------------------------------------ TableFunctionSet::TableFunctionSet(TableControl_Impl* _pTableControl) :m_pTableControl( _pTableControl) diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index c4b72889b07a..de045ed5674b 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -27,14 +27,18 @@ #ifndef SVTOOLS_TABLECONTROL_IMPL_HXX #define SVTOOLS_TABLECONTROL_IMPL_HXX -#include -#include -#include +#include "svtools/table/tablemodel.hxx" +#include "svtools/table/tablecontrolinterface.hxx" +#include "svtools/table/tablemodel.hxx" + +#include "svtaccessiblefactory.hxx" #include #include +#include + class ScrollBar; class ScrollBarBox; @@ -141,7 +145,8 @@ namespace svt { namespace table The window's upper left corner is at position (0,0), relative to the table control, which is the direct parent of the data window. */ - TableDataWindow* m_pDataWindow; + ::boost::scoped_ptr< TableDataWindow > + m_pDataWindow; /// the vertical scrollbar, if any ScrollBar* m_pVScroll; /// the horizontal scrollbar, if any @@ -160,6 +165,12 @@ namespace svt { namespace table bool m_bResizingGrid; bool m_bUpdatingColWidths; + Link m_aSelectHdl; + bool m_bSelectionChanged; + + AccessibleFactoryAccess m_aFactoryAccess; + IAccessibleTableControl* m_pAccessibleTable; + #if DBG_UTIL #define INV_SCROLL_POSITION 1 /** represents a bitmask of invariants to check @@ -265,6 +276,11 @@ namespace svt { namespace table */ bool markAllRowsAsSelected(); + void setSelectHandler( Link const & i_selectHandler ) { m_aSelectHdl = i_selectHandler; } + Link const& getSelectHandler() const { return m_aSelectHdl; } + + void setSelectionChanged( bool const i_changed = true ) { m_bSelectionChanged = i_changed; } + bool didSelectionChange() const { return m_bSelectionChanged; } // ITableControl virtual void hideCursor(); @@ -283,13 +299,19 @@ namespace svt { namespace table virtual bool isRowSelected( RowPos i_row ) const; - TableDataWindow* getDataWindow(); + TableDataWindow& getDataWindow() { return *m_pDataWindow; } + const TableDataWindow& getDataWindow() const { return *m_pDataWindow; } ScrollBar* getHorzScrollbar(); ScrollBar* getVertScrollbar(); Rectangle calcHeaderRect(bool bColHeader); Rectangle calcTableRect(); + // A11Y + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + getAccessible( Window& i_parentWindow ); + void disposeAccessible(); + // ITableModelListener virtual void rowsInserted( RowPos first, RowPos last ); virtual void rowsRemoved( RowPos first, RowPos last ); @@ -300,6 +322,13 @@ namespace svt { namespace table virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ); private: + bool impl_isAccessibleAlive() const; + void impl_commitAccessibleEvent( + sal_Int16 const i_eventID, + ::com::sun::star::uno::Any const & i_newValue, + ::com::sun::star::uno::Any const & i_oldValue + ); + /** toggles the cursor visibility The method is not bound to the classes public invariants, as it's used in diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index b5d2a48026ea..84185ce071a8 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -28,7 +28,6 @@ #include "precompiled_svtools.hxx" #include "svtxgridcontrol.hxx" -#include "accessibletableimp.hxx" #include #include "svtools/table/tablecontrolinterface.hxx" #include "svtools/table/gridtablerenderer.hxx" @@ -219,9 +218,9 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An VCLXWindow::setProperty( PropertyName, aValue ); // and forward to the grid control's data window if ( pTable->IsBackground() ) - pTable->getDataWindow()->SetBackground( pTable->GetBackground() ); + pTable->getDataWindow().SetBackground( pTable->GetBackground() ); else - pTable->getDataWindow()->SetBackground(); + pTable->getDataWindow().SetBackground(); } break; -- cgit From 3fbbc7662deb5d5758667b51e24a2ac9b1b4bb34 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 13 Jan 2011 16:28:06 +0100 Subject: gridsort: cleaned up (parts of) the selection-related code --- svtools/inc/svtools/table/tablecontrol.hxx | 5 +- svtools/source/table/tablecontrol.cxx | 28 +- svtools/source/table/tablecontrol_impl.cxx | 492 +++++++++++++++-------------- svtools/source/table/tablecontrol_impl.hxx | 13 +- svtools/source/uno/svtxgridcontrol.cxx | 4 +- 5 files changed, 276 insertions(+), 266 deletions(-) diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 336e56a2b01a..5671c7607281 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -154,9 +154,8 @@ namespace svt { namespace table void SetSelectHdl( const Link& rLink ); const Link& GetSelectHdl() const; - /**invalidates the table if table has been changed e.g. new row added - */ - void InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved); + /// invalidates those areas of the data window which are covered by the given rows + void InvalidateDataWindow( RowPos const i_firstRow, RowPos const i_lastRow ); /**after removing a row, updates the vector which contains the selected rows if the row, which should be removed, is selected, it will be erased from the vector diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index f493983789ef..7a1b9f450e09 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -96,14 +96,6 @@ namespace svt { namespace table { if ( !m_pImpl->getInputHandler()->KeyInput( *m_pImpl, rKEvt ) ) Control::KeyInput( rKEvt ); - else - { - if ( m_pImpl->didSelectionChange() ) - { - Select(); - m_pImpl->setSelectionChanged( false ); - } - } } @@ -211,8 +203,7 @@ namespace svt { namespace table m_pImpl->markRowAsDeselected( i_rowIndex ); } - m_pImpl->setSelectionChanged(); - InvalidateDataWindow( i_rowIndex, i_rowIndex, false ); + m_pImpl->invalidateRowRange( i_rowIndex, i_rowIndex ); Select(); } @@ -233,28 +224,15 @@ namespace svt { namespace table } - m_pImpl->setSelectionChanged(); Invalidate(); // TODO: can't we do better than this, and invalidate only the rows which changed? Select(); } // ----------------------------------------------------------------------------------------------------------------- - void TableControl::InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved) + void TableControl::InvalidateDataWindow( RowPos const i_firstRow, RowPos const i_lastRow ) { - Rectangle _rRect; - if ( _bRemoved ) - m_pImpl->invalidateRows(); - else - { - if ( m_pImpl->didSelectionChange() ) - { - m_pImpl->invalidateSelectedRegion( _nRowStart, _nRowEnd, _rRect ); - m_pImpl->setSelectionChanged( false ); - } - else - m_pImpl->invalidateRow( _nRowStart, _rRect ); - } + m_pImpl->invalidateRowRange( i_firstRow, i_lastRow ); } // ----------------------------------------------------------------------------------------------------------------- diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index a147e2801696..da05d1f51fcd 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -407,7 +407,6 @@ namespace svt { namespace table ,m_nResizingColumn ( 0 ) ,m_bResizingGrid ( false ) ,m_bUpdatingColWidths ( false ) - ,m_bSelectionChanged ( false ) ,m_pAccessibleTable ( NULL ) #if DBG_UTIL ,m_nRequiredInvariants ( INV_SCROLL_POSITION ) @@ -463,6 +462,26 @@ namespace svt { namespace table if ( m_nColumnCount ) m_nCurColumn = 0; } + //------------------------------------------------------------------------------------------------------------------ + namespace + { + bool lcl_adjustSelectedRows( ::std::vector< RowPos >& io_selectionIndexes, RowPos const i_firstAffectedRowIndex, TableSize const i_offset ) + { + bool didChanges = false; + for ( ::std::vector< RowPos >::iterator selPos = io_selectionIndexes.begin(); + selPos != io_selectionIndexes.end(); + ++selPos + ) + { + if ( *selPos < i_firstAffectedRowIndex ) + continue; + *selPos += i_offset; + didChanges = true; + } + return didChanges; + } + } + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::rowsInserted( RowPos i_first, RowPos i_last ) { @@ -472,15 +491,7 @@ namespace svt { namespace table TableSize const insertedRows = i_last - i_first + 1; // adjust selection, if necessary - bool selectionChanged = false; - for ( ::std::vector< RowPos >::iterator selPos = m_aSelectedRows.begin(); selPos != m_aSelectedRows.end(); ++selPos ) - { - if ( *selPos >= i_first ) - { - *selPos += insertedRows; - selectionChanged = true; - } - } + bool const selectionChanged = lcl_adjustSelectedRows( m_aSelectedRows, i_first, insertedRows ); // adjust our cached row count m_nRowCount = m_pModel->getRowCount(); @@ -513,7 +524,7 @@ namespace svt { namespace table } // schedule repaint - m_rAntiImpl.InvalidateDataWindow( i_first, i_last, false ); + invalidateRowRange( i_first, m_pModel->getRowCount() - 1 ); // call selection handlers, if necessary if ( selectionChanged ) @@ -539,10 +550,14 @@ namespace svt { namespace table { ENSURE_OR_RETURN_VOID( i_last >= i_first, "TableControl_Impl::rowsRemoved: illegal indexes!" ); - for ( sal_Int32 row = i_first; row < i_last; ++row ) + for ( sal_Int32 row = i_first; row <= i_last; ++row ) { - selectionChanged |= markRowAsDeselected( row ); + if ( markRowAsDeselected( row ) ) + selectionChanged = true; } + + if ( lcl_adjustSelectedRows( m_aSelectedRows, i_last + 1, i_first - i_last - 1 ) ) + selectionChanged = true; } // adjust cached row count @@ -574,7 +589,7 @@ namespace svt { namespace table } // schedule a repaint - m_rAntiImpl.InvalidateDataWindow( firstRemovedRow, lastRemovedRow, true ); + invalidateRowRange( firstRemovedRow, m_pModel->getRowCount() - 1 ); // call selection handlers, if necessary if ( selectionChanged ) @@ -1134,7 +1149,8 @@ namespace svt { namespace table { if ( m_bResizingGrid ) impl_ni_updateColumnWidths(); - invalidateRows(); + impl_ni_updateScrollbars(); + checkCursorPosition(); m_bResizingGrid = true; } } @@ -1309,6 +1325,8 @@ namespace svt { namespace table DBG_CHECK_ME(); bool bSuccess = false; + bool selectionChanged = false; + Rectangle rCells; switch ( _eAction ) { @@ -1334,7 +1352,7 @@ namespace svt { namespace table m_aSelectedRows.push_back(m_nCurRow); invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); ensureVisible(m_nCurColumn,m_nCurRow,false); - setSelectionChanged(); + selectionChanged = true; bSuccess = true; } else @@ -1368,7 +1386,7 @@ namespace svt { namespace table invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); } ensureVisible(m_nCurColumn,m_nCurRow,false); - setSelectionChanged(); + selectionChanged = true; bSuccess = true; } else @@ -1430,259 +1448,266 @@ namespace svt { namespace table case cursorBottomRight: bSuccess = goTo( m_nColumnCount - 1, m_nRowCount - 1 ); break; - case cursorSelectRow: - { - if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) - return bSuccess = false; - //pos is the position of the current row in the vector of selected rows, if current row is selected - int pos = getRowSelectedNumber(m_aSelectedRows, m_nCurRow); - //if current row is selected, it should be deselected, when ALT+SPACE are pressed - if(pos>-1) - { - m_aSelectedRows.erase(m_aSelectedRows.begin()+pos); - if(m_aSelectedRows.empty() && m_nAnchor != -1) - m_nAnchor = -1; - } - //else select the row->put it in the vector - else - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); - setSelectionChanged(); - bSuccess = true; - } - break; - case cursorSelectRowUp: - { - if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) - return bSuccess = false; - else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) + + case cursorSelectRow: { - //if there are other selected rows, deselect them - return false; + if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) + return bSuccess = false; + //pos is the position of the current row in the vector of selected rows, if current row is selected + int pos = getRowSelectedNumber(m_aSelectedRows, m_nCurRow); + //if current row is selected, it should be deselected, when ALT+SPACE are pressed + if(pos>-1) + { + m_aSelectedRows.erase(m_aSelectedRows.begin()+pos); + if(m_aSelectedRows.empty() && m_nAnchor != -1) + m_nAnchor = -1; + } + //else select the row->put it in the vector + else + m_aSelectedRows.push_back(m_nCurRow); + invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + selectionChanged = true; + bSuccess = true; } - else + break; + case cursorSelectRowUp: { - //there are other selected rows - if(m_aSelectedRows.size()>0) + if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) + return bSuccess = false; + else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) + { + //if there are other selected rows, deselect them + return false; + } + else { - //the anchor wasn't set -> a region is not selected, that's why clear all selection - //and select the current row - if(m_nAnchor==-1) + //there are other selected rows + if(m_aSelectedRows.size()>0) { - for(std::vector::iterator it=m_aSelectedRows.begin(); - it!=m_aSelectedRows.end();++it) + //the anchor wasn't set -> a region is not selected, that's why clear all selection + //and select the current row + if(m_nAnchor==-1) { - invalidateSelectedRegion(*it, *it, rCells); - } - m_aSelectedRows.clear(); - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); - } - else - { - //a region is already selected, prevRow is last selected row and the row above - nextRow - should be selected - int prevRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow); - int nextRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow-1); - if(prevRow>-1) - { - //if m_nCurRow isn't the upper one, can move up, otherwise not - if(m_nCurRow>0) - m_nCurRow--; - else - return bSuccess = true; - //if nextRow already selected, deselect it, otherwise select it - if(nextRow>-1 && m_aSelectedRows[nextRow] == m_nCurRow) - { - m_aSelectedRows.erase(m_aSelectedRows.begin()+prevRow); - invalidateSelectedRegion(m_nCurRow+1, m_nCurRow+1, rCells); - } - else + for(std::vector::iterator it=m_aSelectedRows.begin(); + it!=m_aSelectedRows.end();++it) { - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); - } - } + invalidateSelectedRegion(*it, *it, rCells); + } + m_aSelectedRows.clear(); + m_aSelectedRows.push_back(m_nCurRow); + invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + } else { - if(m_nCurRow>0) + //a region is already selected, prevRow is last selected row and the row above - nextRow - should be selected + int prevRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow); + int nextRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow-1); + if(prevRow>-1) + { + //if m_nCurRow isn't the upper one, can move up, otherwise not + if(m_nCurRow>0) + m_nCurRow--; + else + return bSuccess = true; + //if nextRow already selected, deselect it, otherwise select it + if(nextRow>-1 && m_aSelectedRows[nextRow] == m_nCurRow) + { + m_aSelectedRows.erase(m_aSelectedRows.begin()+prevRow); + invalidateSelectedRegion(m_nCurRow+1, m_nCurRow+1, rCells); + } + else + { + m_aSelectedRows.push_back(m_nCurRow); + invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + } + } + else { - m_aSelectedRows.push_back(m_nCurRow); - m_nCurRow--; - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells); + if(m_nCurRow>0) + { + m_aSelectedRows.push_back(m_nCurRow); + m_nCurRow--; + m_aSelectedRows.push_back(m_nCurRow); + invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells); + } } } } - } - else - { - //if nothing is selected and the current row isn't the upper one - //select the current and one row above - //otherwise select only the upper row - if(m_nCurRow>0) - { - m_aSelectedRows.push_back(m_nCurRow); - m_nCurRow--; - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells); - } else { - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + //if nothing is selected and the current row isn't the upper one + //select the current and one row above + //otherwise select only the upper row + if(m_nCurRow>0) + { + m_aSelectedRows.push_back(m_nCurRow); + m_nCurRow--; + m_aSelectedRows.push_back(m_nCurRow); + invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells); + } + else + { + m_aSelectedRows.push_back(m_nCurRow); + invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + } } + m_pSelEngine->SetAnchor(TRUE); + m_nAnchor = m_nCurRow; + ensureVisible(m_nCurColumn, m_nCurRow, false); + selectionChanged = true; + bSuccess = true; } - m_pSelEngine->SetAnchor(TRUE); - m_nAnchor = m_nCurRow; - ensureVisible(m_nCurColumn, m_nCurRow, false); - setSelectionChanged(); - bSuccess = true; - } - } - break; - case cursorSelectRowDown: - { - if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) - bSuccess = false; - else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) - { - bSuccess = false; } - else + break; + case cursorSelectRowDown: { - if(m_aSelectedRows.size()>0) + if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) + bSuccess = false; + else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) { - //the anchor wasn't set -> a region is not selected, that's why clear all selection - //and select the current row - if(m_nAnchor==-1) + bSuccess = false; + } + else + { + if(m_aSelectedRows.size()>0) { - for(std::vector::iterator it=m_aSelectedRows.begin(); - it!=m_aSelectedRows.end();++it) + //the anchor wasn't set -> a region is not selected, that's why clear all selection + //and select the current row + if(m_nAnchor==-1) { - invalidateSelectedRegion(*it, *it, rCells); - } - m_aSelectedRows.clear(); - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + for(std::vector::iterator it=m_aSelectedRows.begin(); + it!=m_aSelectedRows.end();++it) + { + invalidateSelectedRegion(*it, *it, rCells); + } + m_aSelectedRows.clear(); + m_aSelectedRows.push_back(m_nCurRow); + invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + } + else + { + //a region is already selected, prevRow is last selected row and the row beneath - nextRow - should be selected + int prevRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow); + int nextRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow+1); + if(prevRow>-1) + { + //if m_nCurRow isn't the last one, can move down, otherwise not + if(m_nCurRow-1 && m_aSelectedRows[nextRow] == m_nCurRow) + { + m_aSelectedRows.erase(m_aSelectedRows.begin()+prevRow); + invalidateSelectedRegion(m_nCurRow-1, m_nCurRow-1, rCells); + } + else + { + m_aSelectedRows.push_back(m_nCurRow); + invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + } + } + else + { + if(m_nCurRow-1) - { - //if m_nCurRow isn't the last one, can move down, otherwise not - if(m_nCurRow-1 && m_aSelectedRows[nextRow] == m_nCurRow) - { - m_aSelectedRows.erase(m_aSelectedRows.begin()+prevRow); - invalidateSelectedRegion(m_nCurRow-1, m_nCurRow-1, rCells); - } - else - { - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); - } + //there wasn't any selection, select current and row beneath, otherwise only row beneath + if(m_nCurRowSetAnchor(TRUE); + m_nAnchor = m_nCurRow; + ensureVisible(m_nCurColumn, m_nCurRow, false); + selectionChanged = true; + bSuccess = true; } + } + break; + + case cursorSelectRowAreaTop: + { + if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) + bSuccess = false; + else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) + bSuccess = false; else { - //there wasn't any selection, select current and row beneath, otherwise only row beneath - if(m_nCurRow=0) { - m_aSelectedRows.push_back(m_nCurRow); - m_nCurRow++; - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow-1, m_nCurRow, rCells); - } - else - { - m_aSelectedRows.push_back(m_nCurRow); - invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells); + if ( !isRowSelected( iter ) ) + m_aSelectedRows.push_back(iter); + --iter; } + m_nCurRow = 0; + m_nAnchor = m_nCurRow; + m_pSelEngine->SetAnchor(TRUE); + ensureVisible(m_nCurColumn, 0, false); + selectionChanged = true; + bSuccess = true; } - m_pSelEngine->SetAnchor(TRUE); - m_nAnchor = m_nCurRow; - ensureVisible(m_nCurColumn, m_nCurRow, false); - setSelectionChanged(); - bSuccess = true; } - } break; - case cursorSelectRowAreaTop: - { - if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) - bSuccess = false; - else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) - bSuccess = false; - else + + case cursorSelectRowAreaBottom: { - //select the region between the current and the upper row + if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) + return bSuccess = false; + else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) + return bSuccess = false; + //select the region between the current and the last row RowPos iter = m_nCurRow; - invalidateSelectedRegion(m_nCurRow, 0, rCells); - //put the rows in vector - while(iter>=0) + invalidateSelectedRegion(m_nCurRow, m_nRowCount-1, rCells); + //put the rows in the vector + while(iter<=m_nRowCount) { if ( !isRowSelected( iter ) ) m_aSelectedRows.push_back(iter); - --iter; + ++iter; } - m_nCurRow = 0; + m_nCurRow = m_nRowCount-1; m_nAnchor = m_nCurRow; m_pSelEngine->SetAnchor(TRUE); - ensureVisible(m_nCurColumn, 0, false); - setSelectionChanged(); + ensureVisible(m_nCurColumn, m_nRowCount-1, false); + selectionChanged = true; bSuccess = true; } - } - break; + break; + default: + DBG_ERROR( "TableControl_Impl::dispatchAction: unsupported action!" ); + break; + } - case cursorSelectRowAreaBottom: - { - if(m_pSelEngine->GetSelectionMode() == NO_SELECTION) - return bSuccess = false; - else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION) - return bSuccess = false; - //select the region between the current and the last row - RowPos iter = m_nCurRow; - invalidateSelectedRegion(m_nCurRow, m_nRowCount-1, rCells); - //put the rows in the vector - while(iter<=m_nRowCount) + if ( bSuccess && selectionChanged ) { - if ( !isRowSelected( iter ) ) - m_aSelectedRows.push_back(iter); - ++iter; + m_rAntiImpl.Select(); } - m_nCurRow = m_nRowCount-1; - m_nAnchor = m_nCurRow; - m_pSelEngine->SetAnchor(TRUE); - ensureVisible(m_nCurColumn, m_nRowCount-1, false); - setSelectionChanged(); - bSuccess = true; - } - break; - default: - DBG_ERROR( "TableControl_Impl::dispatchAction: unsupported action!" ); - break; - } - return bSuccess; + return bSuccess; } //------------------------------------------------------------------------------------------------------------------ @@ -1838,21 +1863,29 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ //this method is to be called, when a new row is added - void TableControl_Impl::invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect) + void TableControl_Impl::invalidateRowRange( RowPos const i_firstRow, RowPos const i_lastRow ) { - if ( m_nCurRow < 0 ) - // hmm? Why this? Looks like a hack to me, working around some other problem. - m_nCurRow = 0; - if ( m_nCursorHidden == 2 ) // WTF? what kind of hack is this? --m_nCursorHidden; - impl_getAllVisibleCellsArea( _rCellRect ); - impl_ni_updateScrollbars(); + RowPos const firstRow = i_firstRow < m_nTopRow ? m_nTopRow : i_firstRow; + RowPos const lastVisibleRow = m_nTopRow + impl_getVisibleRows( true ) - 1; + RowPos const lastRow = i_lastRow > lastVisibleRow ? lastVisibleRow : i_lastRow; - TableRowGeometry const aRow( *this, _rCellRect, _nRowPos); - m_pDataWindow->Invalidate( aRow.getRect() ); + Rectangle aInvalidateRect; + + Rectangle aVisibleCellsArea; + impl_getAllVisibleCellsArea( aVisibleCellsArea ); + + TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow ); + while ( aRow.isValid() && ( aRow.getRow() <= lastRow ) ) + { + aInvalidateRect.Union( aRow.getRect() ); + aRow.moveDown(); + } + + m_pDataWindow->Invalidate( aInvalidateRect ); } //------------------------------------------------------------------------------------------------------------------ @@ -1889,9 +1922,10 @@ namespace svt { namespace table m_nCurRow = _nRowPos-1; } //------------------------------------------------------------------------------ - void TableControl_Impl::invalidateRows() + void TableControl_Impl::checkCursorPosition() { - impl_ni_updateScrollbars(); + DBG_CHECK_ME(); + TableSize nVisibleRows = impl_getVisibleRows(true); TableSize nVisibleCols = impl_getVisibleColumns(true); if ( ( m_nTopRow + nVisibleRows > m_nRowCount ) diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index de045ed5674b..63a297d612da 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -166,7 +166,6 @@ namespace svt { namespace table bool m_bUpdatingColWidths; Link m_aSelectHdl; - bool m_bSelectionChanged; AccessibleFactoryAccess m_aFactoryAccess; IAccessibleTableControl* m_pAccessibleTable; @@ -238,15 +237,18 @@ namespace svt { namespace table /** _rCellRect contains the region, which should be invalidate after some action e.g. selecting row*/ void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect ); - /** to be called when a new row is added to the control*/ - void invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect ); + /** invalidates the part of the data window which is covered by the given row + */ + void invalidateRowRange( RowPos const i_firstRow, RowPos const i_lastRow ); /** returns the vector, which contains the selected rows*/ std::vector& getSelectedRows(); /** updates the vector, which contains the selected rows after removing the row nRowPos*/ void removeSelectedRow(RowPos _nRowPos); - void invalidateRows(); + + + void checkCursorPosition(); bool hasRowSelection() const { return !m_aSelectedRows.empty(); } size_t getSelectedRowCount() const { return m_aSelectedRows.size(); } @@ -279,9 +281,6 @@ namespace svt { namespace table void setSelectHandler( Link const & i_selectHandler ) { m_aSelectHdl = i_selectHandler; } Link const& getSelectHandler() const { return m_aSelectHdl; } - void setSelectionChanged( bool const i_changed = true ) { m_bSelectionChanged = i_changed; } - bool didSelectionChange() const { return m_bSelectionChanged; } - // ITableControl virtual void hideCursor(); virtual void showCursor(); diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 84185ce071a8..123662da0221 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -541,9 +541,9 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw // TODO: Our UnoControlTableModel should be a listener at the data model, and multiplex those events, // so the TableControl/_Impl can react on it. if ( i_event.FirstRow == -1 ) - pTable->InvalidateDataWindow( 0, m_pTableModel->getRowCount(), false ); + pTable->InvalidateDataWindow( 0, m_pTableModel->getRowCount() ); else - pTable->InvalidateDataWindow( i_event.FirstRow, i_event.LastRow, false ); + pTable->InvalidateDataWindow( i_event.FirstRow, i_event.LastRow ); } //---------------------------------------------------------------------------------------------------------------------- -- cgit From efd8adea09c07035875f8bdb18f8959ea603e898 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 13 Jan 2011 16:49:07 +0100 Subject: gridsort: added runtime (non-pro) consistency checks for TableControl_Impl::m_aSelectedRows --- svtools/source/table/tablecontrol_impl.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index da05d1f51fcd..db3600390771 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -312,6 +312,20 @@ namespace svt { namespace table if ( m_pInputHandler != m_pModel->getInputHandler() ) return "input handler is not the model-provided one!"; + // m_aSelectedRows should have reasonable content + { + if ( m_aSelectedRows.size() > m_pModel->getRowCount() ) + return "there are more rows selected than actually exist"; + for ( ::std::vector< RowPos >::const_iterator selRow = m_aSelectedRows.begin(); + selRow != m_aSelectedRows.end(); + ++selRow + ) + { + if ( ( *selRow < 0 ) || ( *selRow >= m_pModel->getRowCount() ) ) + return "a non-existent row is selected"; + } + } + // m_nColHeaderHeightPixel consistent with the model's value? { TableMetrics nHeaderHeight = m_pModel->hasColumnHeaders() ? m_pModel->getColumnHeaderHeight() : 0; -- cgit From 3d914bead0bbe44781c13ae2957475971b773b4d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 13 Jan 2011 16:52:06 +0100 Subject: gridsort: rowsRemoved/Inserted: update scrollbars --- svtools/source/table/tablecontrol_impl.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index db3600390771..a6e99fc5700e 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -514,6 +514,9 @@ namespace svt { namespace table if ( i_first <= m_nCurRow ) goTo( m_nCurColumn, m_nCurRow + insertedRows ); + // adjust scrollbars + impl_ni_updateScrollbars(); + // notify A1YY events if ( impl_isAccessibleAlive() ) { @@ -586,6 +589,9 @@ namespace svt { namespace table m_nCurRow = ROW_INVALID; } + // adjust scrollbars + impl_ni_updateScrollbars(); + // notify A11Y events if ( impl_isAccessibleAlive() ) { -- cgit From 09d66c1f31b05a8bbd06f88a2af8ae2d9ddb2eff Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 13 Jan 2011 17:05:56 +0100 Subject: vcl118: ImplControlValue is needed outside vcl after all --- vcl/inc/vcl/salnativewidgets.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx index 31fdb769cc1a..64e120b54257 100755 --- a/vcl/inc/vcl/salnativewidgets.hxx +++ b/vcl/inc/vcl/salnativewidgets.hxx @@ -269,7 +269,7 @@ enum ButtonValue { * Generic value container for all control parts. */ -class VCL_PLUGIN_PUBLIC ImplControlValue +class VCL_DLLPUBLIC ImplControlValue { friend class SalFrame; @@ -307,7 +307,7 @@ class VCL_PLUGIN_PUBLIC ImplControlValue * * Value container for scrollbars. */ - class VCL_PLUGIN_PUBLIC ScrollbarValue : public ImplControlValue +class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue { public: long mnMin; @@ -333,7 +333,7 @@ class VCL_PLUGIN_PUBLIC ImplControlValue virtual ~ScrollbarValue(); }; -class VCL_PLUGIN_PUBLIC SliderValue : public ImplControlValue +class VCL_DLLPUBLIC SliderValue : public ImplControlValue { public: long mnMin; @@ -361,7 +361,7 @@ class VCL_PLUGIN_PUBLIC SliderValue : public ImplControlValue #define TABITEM_FIRST_IN_GROUP 0x004 // the tabitem is the first in group of tabitems #define TABITEM_LAST_IN_GROUP 0x008 // the tabitem is the last in group of tabitems -class VCL_PLUGIN_PUBLIC TabitemValue : public ImplControlValue +class VCL_DLLPUBLIC TabitemValue : public ImplControlValue { public: unsigned int mnAlignment; @@ -387,7 +387,7 @@ class VCL_PLUGIN_PUBLIC TabitemValue : public ImplControlValue * Note: the other parameters of DrawNativeControl will have no meaning * all parameters for spinbuttons are carried here */ -class VCL_PLUGIN_PUBLIC SpinbuttonValue : public ImplControlValue +class VCL_DLLPUBLIC SpinbuttonValue : public ImplControlValue { public: Rectangle maUpperRect; -- cgit From 4394d293a5cebb453590bbed775551a3c30c2ec9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 09:32:50 +0100 Subject: gridsort: fixed invalidateRowRange for some edge cases --- svtools/source/table/tablecontrol_impl.cxx | 11 ++++-- svtools/source/table/tablecontrol_impl.hxx | 6 ++- svtools/source/table/tablegeometry.cxx | 59 ++++++++++++++++++------------ svtools/source/table/tablegeometry.hxx | 42 +++++++++++---------- 4 files changed, 71 insertions(+), 47 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index a6e99fc5700e..3c7cb555f374 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -541,7 +541,7 @@ namespace svt { namespace table } // schedule repaint - invalidateRowRange( i_first, m_pModel->getRowCount() - 1 ); + invalidateRowRange( i_first, ROW_INVALID ); // call selection handlers, if necessary if ( selectionChanged ) @@ -609,7 +609,7 @@ namespace svt { namespace table } // schedule a repaint - invalidateRowRange( firstRemovedRow, m_pModel->getRowCount() - 1 ); + invalidateRowRange( firstRemovedRow, ROW_INVALID ); // call selection handlers, if necessary if ( selectionChanged ) @@ -1891,20 +1891,23 @@ namespace svt { namespace table RowPos const firstRow = i_firstRow < m_nTopRow ? m_nTopRow : i_firstRow; RowPos const lastVisibleRow = m_nTopRow + impl_getVisibleRows( true ) - 1; - RowPos const lastRow = i_lastRow > lastVisibleRow ? lastVisibleRow : i_lastRow; + RowPos const lastRow = ( ( i_lastRow == ROW_INVALID ) || ( i_lastRow > lastVisibleRow ) ) ? lastVisibleRow : i_lastRow; Rectangle aInvalidateRect; Rectangle aVisibleCellsArea; impl_getAllVisibleCellsArea( aVisibleCellsArea ); - TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow ); + TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow, true ); while ( aRow.isValid() && ( aRow.getRow() <= lastRow ) ) { aInvalidateRect.Union( aRow.getRect() ); aRow.moveDown(); } + if ( i_lastRow == ROW_INVALID ) + aInvalidateRect.Bottom() = m_pDataWindow->GetOutputSizePixel().Height(); + m_pDataWindow->Invalidate( aInvalidateRect ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 63a297d612da..9dfdaedc29f8 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -29,7 +29,6 @@ #include "svtools/table/tablemodel.hxx" #include "svtools/table/tablecontrolinterface.hxx" -#include "svtools/table/tablemodel.hxx" #include "svtaccessiblefactory.hxx" @@ -238,6 +237,11 @@ namespace svt { namespace table void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect ); /** invalidates the part of the data window which is covered by the given row + @param i_firstRow + the index of the first row to include in the invalidation + @param i_lastRow + the index of the last row to include in the invalidation, or ROW_INVALID if the invalidation + should happen down to the bottom of the data window. */ void invalidateRowRange( RowPos const i_firstRow, RowPos const i_lastRow ); diff --git a/svtools/source/table/tablegeometry.cxx b/svtools/source/table/tablegeometry.cxx index 01425f3bb292..661079775daa 100644 --- a/svtools/source/table/tablegeometry.cxx +++ b/svtools/source/table/tablegeometry.cxx @@ -27,25 +27,25 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" - #include "tablegeometry.hxx" #include "tablecontrol_impl.hxx" #include -//........................................................................ +//...................................................................................................................... namespace svt { namespace table { -//........................................................................ +//...................................................................................................................... - //==================================================================== + //================================================================================================================== //= TableRowGeometry - //==================================================================== - //-------------------------------------------------------------------- - TableRowGeometry::TableRowGeometry( const TableControl_Impl& _rControl, const Rectangle& _rBoundaries, - RowPos _nRow ) + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + TableRowGeometry::TableRowGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries, + RowPos const _nRow, bool const i_allowVirtualRows ) :TableGeometry( _rControl, _rBoundaries ) ,m_nRowPos( _nRow ) + ,m_bAllowVirtualRows( i_allowVirtualRows ) { if ( m_nRowPos == ROW_COL_HEADERS ) { @@ -58,10 +58,10 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableRowGeometry::impl_initRect() { - if ( ( m_nRowPos >= m_rControl.m_nTopRow ) && ( m_nRowPos < m_rControl.m_pModel->getRowCount() ) ) + if ( ( m_nRowPos >= m_rControl.m_nTopRow ) && impl_isValidRow( m_nRowPos ) ) { m_aRect.Top() = m_rControl.m_nColHeaderHeightPixel + ( m_nRowPos - m_rControl.m_nTopRow ) * m_rControl.m_nRowHeightPixel; m_aRect.Bottom() = m_aRect.Top() + m_rControl.m_nRowHeightPixel - 1; @@ -70,7 +70,13 @@ namespace svt { namespace table m_aRect.SetEmpty(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + bool TableRowGeometry::impl_isValidRow( RowPos const i_row ) const + { + return m_bAllowVirtualRows || ( i_row < m_rControl.m_pModel->getRowCount() ); + } + + //------------------------------------------------------------------------------------------------------------------ bool TableRowGeometry::moveDown() { if ( m_nRowPos == ROW_COL_HEADERS ) @@ -80,7 +86,7 @@ namespace svt { namespace table } else { - if ( ++m_nRowPos < m_rControl.m_pModel->getRowCount() ) + if ( impl_isValidRow( ++m_nRowPos ) ) m_aRect.Move( 0, m_rControl.m_nRowHeightPixel ); else m_aRect.SetEmpty(); @@ -88,14 +94,15 @@ namespace svt { namespace table return isValid(); } - //==================================================================== + //================================================================================================================== //= TableColumnGeometry - //==================================================================== - //-------------------------------------------------------------------- - TableColumnGeometry::TableColumnGeometry( const TableControl_Impl& _rControl, const Rectangle& _rBoundaries, - ColPos _nCol ) + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + TableColumnGeometry::TableColumnGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries, + ColPos const _nCol, bool const i_allowVirtualColumns ) :TableGeometry( _rControl, _rBoundaries ) ,m_nColPos( _nCol ) + ,m_bAllowVirtualColumns( i_allowVirtualColumns ) { if ( m_nColPos == COL_ROW_HEADERS ) { @@ -108,11 +115,11 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableColumnGeometry::impl_initRect() { ColPos nLeftColumn = m_rControl.m_nLeftColumn; - if ( ( m_nColPos >= nLeftColumn ) && ( m_nColPos < (ColPos)m_rControl.m_aColumnWidths.size() ) ) + if ( ( m_nColPos >= nLeftColumn ) && impl_isValidColumn( m_nColPos ) ) { m_aRect.Left() = m_rControl.m_nRowHeaderWidthPixel; // TODO: take into account any possibly frozen columns @@ -125,7 +132,13 @@ namespace svt { namespace table m_aRect.SetEmpty(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + bool TableColumnGeometry::impl_isValidColumn( ColPos const i_column ) const + { + return m_bAllowVirtualColumns || ( i_column < ColPos( m_rControl.m_aColumnWidths.size() ) ); + } + + //------------------------------------------------------------------------------------------------------------------ bool TableColumnGeometry::moveRight() { if ( m_nColPos == COL_ROW_HEADERS ) @@ -135,7 +148,7 @@ namespace svt { namespace table } else { - if ( ++m_nColPos < (ColPos)m_rControl.m_aColumnWidths.size() ) + if ( impl_isValidColumn( ++m_nColPos ) ) { m_aRect.Left() = m_aRect.Right() + 1; m_aRect.Right() += m_rControl.m_aColumnWidths[ m_nColPos ].getWidth(); @@ -147,6 +160,6 @@ namespace svt { namespace table return isValid(); } -//........................................................................ +//...................................................................................................................... } } // namespace svt::table -//........................................................................ +//...................................................................................................................... diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx index 7bfc2527d5fc..fedc7cb2f24f 100644 --- a/svtools/source/table/tablegeometry.hxx +++ b/svtools/source/table/tablegeometry.hxx @@ -27,13 +27,9 @@ #ifndef SVTOOLS_TABLEGEOMETRY_HXX #define SVTOOLS_TABLEGEOMETRY_HXX -#ifndef SVTOOLS_INC_TABLE_TABLETYPES_HXX -#include -#endif +#include "svtools/table/tabletypes.hxx" -#ifndef _SV_GEN_HXX #include -#endif //........................................................................ namespace svt { namespace table @@ -79,12 +75,15 @@ namespace svt { namespace table { protected: RowPos m_nRowPos; + bool m_bAllowVirtualRows; public: TableRowGeometry( - const TableControl_Impl& _rControl, - const Rectangle& _rBoundaries, - RowPos _nRow + TableControl_Impl const & _rControl, + Rectangle const & _rBoundaries, + RowPos const _nRow, + bool const i_allowVirtualRows = false + // allow rows >= getRowCount()? ); // status @@ -93,7 +92,8 @@ namespace svt { namespace table bool moveDown(); private: - void impl_initRect(); + void impl_initRect(); + bool impl_isValidRow( RowPos const i_row ) const; }; //==================================================================== @@ -103,12 +103,14 @@ namespace svt { namespace table { protected: ColPos m_nColPos; + bool m_bAllowVirtualColumns; public: TableColumnGeometry( - const TableControl_Impl& _rControl, - const Rectangle& _rBoundaries, - ColPos _nCol + TableControl_Impl const & _rControl, + Rectangle const & _rBoundaries, + ColPos const _nCol, + bool const i_allowVirtualColumns = false ); // status @@ -117,7 +119,8 @@ namespace svt { namespace table bool moveRight(); private: - void impl_initRect(); + void impl_initRect(); + bool impl_isValidColumn( ColPos const i_column ) const; }; //==================================================================== @@ -133,13 +136,14 @@ namespace svt { namespace table public: TableCellGeometry( - const TableControl_Impl& _rControl, - const Rectangle& _rBoundaries, - ColPos _nCol, - RowPos _nRow + TableControl_Impl const & _rControl, + Rectangle const & _rBoundaries, + ColPos const _nCol, + RowPos const _nRow, + bool const i_alllowVirtualCells = false ) - :m_aRow( _rControl, _rBoundaries, _nRow ) - ,m_aCol( _rControl, _rBoundaries, _nCol ) + :m_aRow( _rControl, _rBoundaries, _nRow, i_alllowVirtualCells ) + ,m_aCol( _rControl, _rBoundaries, _nCol, i_alllowVirtualCells ) { } -- cgit From d41461c3de4108c5e09c64e30a38079b01217e96 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 09:50:02 +0100 Subject: gridsort: replaced RemoveSelectedRow by ClearSelection - the first implementation was buggy, anyway, and ClearSelection is the same as SelectAll( false ) (which was the only use case) --- svtools/inc/svtools/accessiblefactory.hxx | 15 ++++++++------- svtools/inc/svtools/accessibletable.hxx | 2 +- svtools/inc/svtools/table/tablecontrol.hxx | 13 ++++++------- svtools/source/table/tablecontrol.cxx | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) mode change 100755 => 100644 svtools/inc/svtools/accessibletable.hxx diff --git a/svtools/inc/svtools/accessiblefactory.hxx b/svtools/inc/svtools/accessiblefactory.hxx index 9606e93a2fa0..372af4fdca25 100755 --- a/svtools/inc/svtools/accessiblefactory.hxx +++ b/svtools/inc/svtools/accessiblefactory.hxx @@ -28,16 +28,12 @@ #ifndef SVTOOLS_ACCESSIBLE_FACTORY_HXX #define SVTOOLS_ACCESSIBLE_FACTORY_HXX -#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX +#include "AccessibleBrowseBoxObjType.hxx" +#include "accessibletableprovider.hxx" + #include -#endif -#ifndef _RTL_REF_HXX #include -#endif -#include "AccessibleBrowseBoxObjType.hxx" -#include "accessibletableprovider.hxx" -#include "accessibletable.hxx" namespace com { namespace sun { namespace star { namespace accessibility { @@ -64,6 +60,11 @@ namespace svt class ToolPanelDeck; class IToolPanelDeck; class PanelTabBar; + namespace table + { + class IAccessibleTable; + class IAccessibleTableControl; + } /** a function which is able to create a factory for the standard Accessible/Context components needed for standard toolkit controls diff --git a/svtools/inc/svtools/accessibletable.hxx b/svtools/inc/svtools/accessibletable.hxx old mode 100755 new mode 100644 index 8ff17a2b71c7..e332c8a46ad5 --- a/svtools/inc/svtools/accessibletable.hxx +++ b/svtools/inc/svtools/accessibletable.hxx @@ -123,7 +123,7 @@ public: virtual ::rtl::OUString GetColumnName( sal_Int32 _nIndex ) const = 0; virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0; virtual std::vector& GetSelectedRows() = 0; - virtual void RemoveSelectedRow(sal_Int32 _nRowPos) = 0; + virtual void ClearSelection() = 0; virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0; }; diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 5671c7607281..2ba571542de4 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -28,12 +28,13 @@ #define SVTOOLS_INC_TABLE_TABLECONTROL_HXX #include "svtools/svtdllapi.h" -#include +#include "svtools/table/tablemodel.hxx" +#include "svtools/table/tabledatawindow.hxx" +#include "svtools/accessibletable.hxx" +#include "svtools/accessiblefactory.hxx" + #include #include -#include -#include -#include #include #include @@ -65,8 +66,6 @@ namespace svt { namespace table The control supports the concept of a current (or active cell). The control supports accessibility, this is encapsulated in IAccessibleTable - - // TODO: scrolling? */ class SVT_DLLPUBLIC TableControl : public Control, public IAccessibleTable { @@ -207,7 +206,7 @@ namespace svt { namespace table virtual sal_Bool HasRowHeader(); virtual sal_Bool HasColHeader(); virtual ::std::vector< sal_Int32 >& GetSelectedRows(); - virtual void RemoveSelectedRow(RowPos _nRowPos); + virtual void ClearSelection(); virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; // ............................................................................................................. diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 7a1b9f450e09..4fb3c8efc117 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -242,9 +242,9 @@ namespace svt { namespace table } // ----------------------------------------------------------------------------------------------------------------- - void TableControl::RemoveSelectedRow(RowPos _nRowPos) + void TableControl::ClearSelection() { - m_pImpl->removeSelectedRow(_nRowPos); + SelectAll( false ); } // ----------------------------------------------------------------------------------------------------------------- -- cgit From a05b122758abf6e692fb63a87a75a585213338f9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 09:50:02 +0100 Subject: gridsort: replaced RemoveSelectedRow by ClearSelection - the first implementation was buggy, anyway, and ClearSelection is the same as SelectAll( false ) (which was the only use case) --- accessibility/source/extended/AccessibleGridControlTable.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100755 => 100644 accessibility/source/extended/AccessibleGridControlTable.cxx diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx old mode 100755 new mode 100644 index 461e776f1392..513056877967 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -265,8 +265,7 @@ void SAL_CALL AccessibleGridControlTable::clearAccessibleSelection() TCSolarGuard aSolarGuard; ::osl::MutexGuard aGuard( getOslMutex() ); ensureIsAlive(); - for(unsigned int i=0;i Date: Fri, 14 Jan 2011 11:04:24 +0100 Subject: gridsort: ouch. Removed IAccessibleTable::GetSelectedRows. It exposed an internal implementation detail, and in fact some clients (the A11Y API implementation) exploited this, e.g. by simply adding elements to the array, without the owner (the TableControl/_Impl) ever noticing it. Replaced that with a working API. In this course, removed XGridSelection::getMin/MaxSelectionIndex. Pretty useless IMO, unused, and ugly to implement. --- svtools/inc/svtools/accessibletable.hxx | 10 +++-- svtools/inc/svtools/table/tablecontrol.hxx | 13 +++--- svtools/source/table/tablecontrol.cxx | 44 +++++++++---------- svtools/source/table/tablecontrol_impl.cxx | 41 ++++-------------- svtools/source/table/tablecontrol_impl.hxx | 8 +--- svtools/source/table/tabledatawindow.cxx | 5 +-- svtools/source/uno/svtxgridcontrol.cxx | 63 ++++++---------------------- svtools/source/uno/svtxgridcontrol.hxx | 2 - toolkit/source/controls/grid/gridcontrol.cxx | 12 ------ toolkit/source/controls/grid/gridcontrol.hxx | 2 - 10 files changed, 53 insertions(+), 147 deletions(-) diff --git a/svtools/inc/svtools/accessibletable.hxx b/svtools/inc/svtools/accessibletable.hxx index e332c8a46ad5..dfa5a603fc5d 100644 --- a/svtools/inc/svtools/accessibletable.hxx +++ b/svtools/inc/svtools/accessibletable.hxx @@ -109,8 +109,6 @@ public: virtual long GetRowCount() const= 0; virtual long GetColumnCount() const= 0; virtual sal_Bool HasRowHeader() const= 0; - virtual sal_Int32 GetSelectedRowCount() const= 0; - virtual bool IsRowSelected( long _nRow ) const= 0; virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0; virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE ) = 0; virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE ) = 0; @@ -122,9 +120,13 @@ public: virtual ::rtl::OUString GetColumnDescription( sal_uInt16 _nColumnPos ) const = 0; virtual ::rtl::OUString GetColumnName( sal_Int32 _nIndex ) const = 0; virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0; - virtual std::vector& GetSelectedRows() = 0; - virtual void ClearSelection() = 0; virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0; + + virtual sal_Int32 GetSelectedRowCount() const = 0; + virtual sal_Int32 GetSelectedRowIndex( sal_Int32 const i_selectionIndex ) const = 0; + virtual bool IsRowSelected( sal_Int32 const i_rowIndex ) const = 0; + virtual void SelectRow( sal_Int32 const i_rowIndex, bool const i_select ) = 0; + virtual void SelectAllRows( bool const i_select ) = 0; }; // ---------------------------------------------------------------------------- diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 2ba571542de4..4077f9fc053a 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -190,8 +190,6 @@ namespace svt { namespace table virtual long GetRowCount() const; virtual long GetColumnCount() const; virtual sal_Bool HasRowHeader() const; - virtual sal_Int32 GetSelectedRowCount() const; - virtual bool IsRowSelected( long _nRow ) const; virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ); virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE ); virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE ); @@ -205,13 +203,14 @@ namespace svt { namespace table virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const; virtual sal_Bool HasRowHeader(); virtual sal_Bool HasColHeader(); - virtual ::std::vector< sal_Int32 >& GetSelectedRows(); - virtual void ClearSelection(); virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const; - // ............................................................................................................. - void SelectRow( RowPos const i_rowIndex, bool const i_select ); - void SelectAll( bool const i_select ); + virtual sal_Int32 GetSelectedRowCount() const; + virtual sal_Int32 GetSelectedRowIndex( sal_Int32 const i_selectionIndex ) const; + virtual bool IsRowSelected( sal_Int32 const i_rowIndex ) const; + virtual void SelectRow( sal_Int32 const i_rowIndex, bool const i_select ); + virtual void SelectAllRows( bool const i_select ); + // ............................................................................................................. private: DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* ); diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 4fb3c8efc117..46f3735e054c 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -186,6 +186,24 @@ namespace svt { namespace table return m_pImpl->goTo( _nColPos, _nRowPos ); } + //------------------------------------------------------------------------------------------------------------------ + sal_Int32 TableControl::GetSelectedRowCount() const + { + return sal_Int32( m_pImpl->getSelectedRowCount() ); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Int32 TableControl::GetSelectedRowIndex( sal_Int32 const i_selectionIndex ) const + { + return sal_Int32( m_pImpl->getSelectedRowIndex( i_selectionIndex ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + bool TableControl::IsRowSelected( sal_Int32 const i_rowIndex ) const + { + return m_pImpl->isRowSelected( i_rowIndex ); + } + // ----------------------------------------------------------------------------------------------------------------- void TableControl::SelectRow( RowPos const i_rowIndex, bool const i_select ) { @@ -208,7 +226,7 @@ namespace svt { namespace table } // ----------------------------------------------------------------------------------------------------------------- - void TableControl::SelectAll( bool const i_select ) + void TableControl::SelectAllRows( bool const i_select ) { if ( i_select ) { @@ -235,18 +253,6 @@ namespace svt { namespace table m_pImpl->invalidateRowRange( i_firstRow, i_lastRow ); } - // ----------------------------------------------------------------------------------------------------------------- - std::vector& TableControl::GetSelectedRows() - { - return m_pImpl->getSelectedRows(); - } - - // ----------------------------------------------------------------------------------------------------------------- - void TableControl::ClearSelection() - { - SelectAll( false ); - } - // ----------------------------------------------------------------------------------------------------------------- ITableControl& TableControl::getTableControlInterface() { @@ -518,18 +524,6 @@ namespace svt { namespace table return GetModel()->hasRowHeaders(); } - //------------------------------------------------------------------------------------------------------------------ - sal_Int32 TableControl::GetSelectedRowCount() const - { - return sal_Int32( m_pImpl->getSelectedRowCount() ); - } - - //------------------------------------------------------------------------------------------------------------------ - bool TableControl::IsRowSelected( long _nRow ) const - { - return m_pImpl->isRowSelected( _nRow ); - } - //------------------------------------------------------------------------------------------------------------------ sal_Bool TableControl::ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) { diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 3c7cb555f374..932dde9a23e7 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1910,40 +1910,7 @@ namespace svt { namespace table m_pDataWindow->Invalidate( aInvalidateRect ); } - //------------------------------------------------------------------------------------------------------------------ - - std::vector& TableControl_Impl::getSelectedRows() - { - return m_aSelectedRows; - } - //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::removeSelectedRow(RowPos _nRowPos) - { - int i =0; - //if the row is selected, remove it from the selection vector - if ( isRowSelected( _nRowPos ) ) - { - if(m_aSelectedRows.size()>1) - m_aSelectedRows.erase(m_aSelectedRows.begin()+_nRowPos); - else - m_aSelectedRows.clear(); - } - //after removing a row, row positions must be updated, so selected rows could stay selected - if(m_aSelectedRows.size()>1) - { - for(std::vector::iterator it=m_aSelectedRows.begin();it!=m_aSelectedRows.end();++it) - { - if(*it > _nRowPos) - m_aSelectedRows[i]=*it-1; - ++i; - } - } - if(_nRowPos == 0) - m_nCurRow = 0; - else - m_nCurRow = _nRowPos-1; - } //------------------------------------------------------------------------------ void TableControl_Impl::checkCursorPosition() { @@ -2220,6 +2187,14 @@ namespace svt { namespace table return ::std::find( m_aSelectedRows.begin(), m_aSelectedRows.end(), i_row ) != m_aSelectedRows.end(); } + //------------------------------------------------------------------------------------------------------------------ + RowPos TableControl_Impl::getSelectedRowIndex( size_t const i_selectionIndex ) const + { + if ( i_selectionIndex < m_aSelectedRows.size() ) + return m_aSelectedRows[ i_selectionIndex ]; + return ROW_INVALID; + } + //------------------------------------------------------------------------------------------------------------------ int TableControl_Impl::getRowSelectedNumber(const ::std::vector& selectedRows, RowPos current) { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 9dfdaedc29f8..bebe6e2e18ef 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -245,17 +245,11 @@ namespace svt { namespace table */ void invalidateRowRange( RowPos const i_firstRow, RowPos const i_lastRow ); - /** returns the vector, which contains the selected rows*/ - std::vector& getSelectedRows(); - - /** updates the vector, which contains the selected rows after removing the row nRowPos*/ - void removeSelectedRow(RowPos _nRowPos); - - void checkCursorPosition(); bool hasRowSelection() const { return !m_aSelectedRows.empty(); } size_t getSelectedRowCount() const { return m_aSelectedRows.size(); } + RowPos getSelectedRowIndex( size_t const i_selectionIndex ) const; /** removes the given row index from m_aSelectedRows diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index ed7b3f8478b3..920fb3fcaada 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -168,16 +168,13 @@ namespace svt { namespace table { const Point aPoint = rMEvt.GetPosPixel(); const RowPos nCurRow = m_rTableControl.getRowAtPoint( aPoint ); - std::vector selectedRows(m_rTableControl.getSelectedRows()); if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) ) Window::MouseButtonDown( rMEvt ); else { if(nCurRow >= 0 && m_rTableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION) { - bool found = std::find(selectedRows.begin(),selectedRows.end(), nCurRow) != selectedRows.end(); - - if( !found ) + if( !m_rTableControl.isRowSelected( nCurRow ) ) { m_aSelectHdl.Call( NULL ); } diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 123662da0221..e95becad8876 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -597,42 +597,6 @@ void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObj } //---------------------------------------------------------------------------------------------------------------------- -::sal_Int32 SAL_CALL SVTXGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException) -{ - ::vos::OGuard aGuard( GetMutex() ); - - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN( pTable, "SVTXGridControl::getMinSelectionIndex: no control (anymore)!", -1 ); - - std::vector& selectedRows = pTable->GetSelectedRows(); - if(selectedRows.empty()) - return -1; - else - { - std::vector::iterator itStart = selectedRows.begin(); - std::vector::iterator itEnd = selectedRows.end(); - return *(std::min_element(itStart, itEnd)); - } -} - -::sal_Int32 SAL_CALL SVTXGridControl::getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException) -{ - ::vos::OGuard aGuard( GetMutex() ); - - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN( pTable, "SVTXGridControl::getMaxSelectionIndex: no control (anymore)!", -1 ); - - std::vector& selectedRows = pTable->GetSelectedRows(); - if(selectedRows.empty()) - return -1; - else - { - std::vector::iterator itStart = selectedRows.begin(); - std::vector::iterator itEnd = selectedRows.end(); - return *(std::max_element(itStart, itEnd)); - } -} - void SAL_CALL SVTXGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -650,7 +614,7 @@ void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::Run TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectAllRows: no control (anymore)!" ); - pTable->SelectAll( true ); + pTable->SelectAllRows( true ); } void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) @@ -670,7 +634,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectAllRows: no control (anymore)!" ); - pTable->SelectAll( false ); + pTable->SelectAllRows( false ); } ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL SVTXGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException) @@ -680,9 +644,11 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", Sequence< sal_Int32 >() ); - std::vector& selectedRows = pTable->GetSelectedRows(); - Sequence selectedRowsToSequence(comphelper::containerToSequence(selectedRows)); - return selectedRowsToSequence; + sal_Int32 selectionCount = pTable->GetSelectedRowCount(); + Sequence< sal_Int32 > selectedRows( selectionCount ); + for ( sal_Int32 i=0; iGetSelectedRowIndex(i); + return selectedRows; } ::sal_Bool SAL_CALL SVTXGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException) @@ -692,11 +658,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", sal_True ); - std::vector& selectedRows = pTable->GetSelectedRows(); - if(selectedRows.empty()) - return sal_True; - else - return sal_False; + return pTable->GetSelectedRowCount() > 0; } ::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex( ::sal_Int32 index ) throw (::com::sun::star::uno::RuntimeException) @@ -746,23 +708,22 @@ void SVTXGridControl::ImplCallItemListeners() if ( m_aSelectionListeners.getLength() ) { - ::std::vector selRows = pTable->GetSelectedRows(); + sal_Int32 const actSelRowCount = pTable->GetSelectedRowCount(); ::com::sun::star::awt::grid::GridSelectionEvent aEvent; aEvent.Source = (::cppu::OWeakObject*)this; aEvent.Column = 0; - sal_Int32 actSelRowCount = selRows.size(); sal_Int32 diff = actSelRowCount - m_nSelectedRowCount; //row added to selection if(diff >= 1) { aEvent.Action = com::sun::star::awt::grid::SelectionEventType(0); - aEvent.Row = selRows[actSelRowCount-1]; + aEvent.Row = pTable->GetSelectedRowIndex( actSelRowCount - 1 ); aEvent.Range = diff; } //selected row changed else if(diff == 0 && actSelRowCount != 0) { - aEvent.Row = selRows[actSelRowCount-1]; + aEvent.Row = pTable->GetSelectedRowIndex( actSelRowCount - 1 ); aEvent.Action = com::sun::star::awt::grid::SelectionEventType(2); aEvent.Range = 0; } @@ -771,7 +732,7 @@ void SVTXGridControl::ImplCallItemListeners() //selection changed: multiple row deselected, only 1 row is selected if(actSelRowCount == 1) { - aEvent.Row = selRows[actSelRowCount-1]; + aEvent.Row = pTable->GetSelectedRowIndex( actSelRowCount - 1 ); aEvent.Action = com::sun::star::awt::grid::SelectionEventType(2); } //row is deselected diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index fa554664b2c0..7ac53ecd4cba 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -85,8 +85,6 @@ public: virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); // XGridSelection - virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL selectAllRows() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index b9cab5a18cf0..14faa851400a 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -359,18 +359,6 @@ sal_Bool SAL_CALL UnoGridControl::setModel( const Reference< XControlModel >& i_ return xGrid->getCurrentRow(); } -//---------------------------------------------------------------------------------------------------------------------- -::sal_Int32 SAL_CALL UnoGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException) -{ - return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getMinSelectionIndex(); -} - -//---------------------------------------------------------------------------------------------------------------------- -::sal_Int32 SAL_CALL UnoGridControl::getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException) -{ - return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getMaxSelectionIndex(); -} - //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL UnoGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index 5259711e97d6..61d9f8fc0232 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -103,8 +103,6 @@ public: virtual ::sal_Int32 SAL_CALL getCurrentRow( ) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::grid::XGridSelection - virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL selectAllRows() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException); -- cgit From f26a7965ee65bf50754fa8f4cd8e88b965727528 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 11:04:24 +0100 Subject: gridsort: ouch. Removed IAccessibleTable::GetSelectedRows. It exposed an internal implementation detail, and in fact some clients (the A11Y API implementation) exploited this, e.g. by simply adding elements to the array, without the owner (the TableControl/_Impl) ever noticing it. Replaced that with a working API. In this course, removed XGridSelection::getMin/MaxSelectionIndex. Pretty useless IMO, unused, and ugly to implement. --- offapi/com/sun/star/awt/grid/XGridSelection.idl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridSelection.idl b/offapi/com/sun/star/awt/grid/XGridSelection.idl index e07acb39a057..aa7fd5e42b4b 100644 --- a/offapi/com/sun/star/awt/grid/XGridSelection.idl +++ b/offapi/com/sun/star/awt/grid/XGridSelection.idl @@ -41,18 +41,6 @@ module com { module sun { module star { module awt { module grid { */ interface XGridSelection { - /** Returns the lowest index of the selection. - @returns - the lowest index. - */ - long getMinSelectionIndex(); - - /** Returns the highest index of the selection. - @returns - the highest index. - */ - long getMaxSelectionIndex(); - /** Selects all rows. */ void selectAllRows(); -- cgit From 3862204a208143119d3304ef891d591b6da831de Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 11:04:24 +0100 Subject: gridsort: ouch. Removed IAccessibleTable::GetSelectedRows. It exposed an internal implementation detail, and in fact some clients (the A11Y API implementation) exploited this, e.g. by simply adding elements to the array, without the owner (the TableControl/_Impl) ever noticing it. Replaced that with a working API. In this course, removed XGridSelection::getMin/MaxSelectionIndex. Pretty useless IMO, unused, and ugly to implement. --- accessibility/source/extended/AccessibleGridControlTable.cxx | 3 +-- accessibility/source/extended/AccessibleGridControlTableBase.cxx | 5 ++++- automation/source/server/statemnt.cxx | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) mode change 100755 => 100644 accessibility/source/extended/AccessibleGridControlTableBase.cxx diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 513056877967..49e469675cef 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -245,8 +245,7 @@ void SAL_CALL AccessibleGridControlTable::selectAccessibleChild( sal_Int32 nChil ensureIsValidIndex( nChildIndex ); sal_Int32 nColumns = m_aTable.GetColumnCount(); sal_Int32 nRow = (nChildIndex / nColumns); - std::vector< sal_Int32 > selectedRows = m_aTable.GetSelectedRows(); - selectedRows.push_back(nRow); + m_aTable.SelectRow( nRow, TRUE ); } sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx old mode 100755 new mode 100644 index f6d1147ad309..d97feb1277ec --- a/accessibility/source/extended/AccessibleGridControlTableBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx @@ -245,7 +245,10 @@ sal_Int32 AccessibleGridControlTableBase::implGetChildIndex( void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >& rSeq ) { - rSeq = comphelper::containerToSequence(m_aTable.GetSelectedRows()); + sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() ); + rSeq.realloc( selectionCount ); + for ( sal_Int32 i=0; iGenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRows().size() )); + pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowCount() )); break; case M_GetSelIndex : if ( ! (nParams & PARAM_USHORT_1) ) nNr1 = 1; - if ( ValueOK( aUId, CUniString("GetSelIndex"), nNr1, pTC->GetSelectedRows().size() ) ) - pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRows()[nNr1-1] +1 ) ); + if ( ValueOK( aUId, CUniString("GetSelIndex"), nNr1, pTC->GetSelectedRowCount() ) ) + pRet->GenReturn ( RET_Value, aUId, comm_USHORT( pTC->GetSelectedRowIndex( nNr1-1 ) +1 ) ); break; /* case M_GetSelText : if ( ! (nParams & PARAM_USHORT_1) ) -- cgit From b7f4e6a2d6725a6a0b9c415996d035da7e37cb7b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 11:07:02 +0100 Subject: gridsort: respect runtime-changes of the table metrics (in the UNO control model) --- svtools/inc/svtools/table/tablemodel.hxx | 7 +++++ svtools/source/table/tablecontrol_impl.cxx | 28 ++++++++++++----- svtools/source/table/tablecontrol_impl.hxx | 5 +++ svtools/source/uno/unocontroltablemodel.cxx | 49 +++++++++++++++++++---------- svtools/source/uno/unocontroltablemodel.hxx | 26 +++++---------- 5 files changed, 72 insertions(+), 43 deletions(-) diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 83054b5d0a57..026b792c39e8 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -153,6 +153,13 @@ namespace svt { namespace table */ virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ) = 0; + /** notifies the listener that the metrics of the table changed. + + Metrics here include the column header height, the row header width, the row height, and the presence + of both the row and column header. + */ + virtual void tableMetricsChanged() = 0; + /// deletes the listener instance virtual ~ITableModelListener(){}; }; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 932dde9a23e7..af3f1c768273 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -661,6 +661,14 @@ namespace svt { namespace table OSL_UNUSED( lastRow ); } + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::tableMetricsChanged() + { + impl_ni_updateCachedTableMetrics(); + impl_ni_updateScrollbars(); + m_rAntiImpl.Invalidate(); + } + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_invalidateColumn( ColPos const i_column ) { @@ -744,20 +752,26 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::impl_ni_updateCachedModelValues() + void TableControl_Impl::impl_ni_updateCachedTableMetrics() { - m_nRowHeightPixel = 15; - m_nColHeaderHeightPixel = 0; - m_nRowHeaderWidthPixel = 0; - m_pInputHandler.reset(); - m_nColumnCount = m_nRowCount = 0; - m_nRowHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getRowHeight() ), MAP_APPFONT ).Height(); + + m_nColHeaderHeightPixel = 0; if ( m_pModel->hasColumnHeaders() ) m_nColHeaderHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getColumnHeaderHeight() ), MAP_APPFONT ).Height(); + + m_nRowHeaderWidthPixel = 0; if ( m_pModel->hasRowHeaders() ) m_nRowHeaderWidthPixel = m_rAntiImpl.LogicToPixel( Size( m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT).Width(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::impl_ni_updateCachedModelValues() + { + m_pInputHandler.reset(); + m_nColumnCount = m_nRowCount = 0; + impl_ni_updateCachedTableMetrics(); impl_ni_updateColumnWidths(); m_pInputHandler = m_pModel->getInputHandler(); diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index bebe6e2e18ef..721847caaf7b 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -317,6 +317,7 @@ namespace svt { namespace table virtual void allColumnsRemoved(); virtual void cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ); virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ); + virtual void tableMetricsChanged(); private: bool impl_isAccessibleAlive() const; @@ -366,6 +367,10 @@ namespace svt { namespace table */ void impl_ni_updateCachedModelValues(); + /** updates the cached table metrics (row height etc.) + */ + void impl_ni_updateCachedTableMetrics(); + /** updates ->m_aColumnWidthsPixel with the current pixel widths of all model columns The method takes into account the current zoom factor and map mode of the table diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 653c2e46a427..75e58bcdf03c 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -212,14 +212,22 @@ namespace svt { namespace table void UnoControlTableModel::setRowHeaders(bool _bRowHeaders) { DBG_CHECK_ME(); + if ( m_pImpl->bHasRowHeaders == _bRowHeaders ) + return; + m_pImpl->bHasRowHeaders = _bRowHeaders; + impl_notifyTableMetricsChanged(); } //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setColumnHeaders(bool _bColumnHeaders) { DBG_CHECK_ME(); + if ( m_pImpl->bHasColumnHeaders == _bColumnHeaders ) + return; + m_pImpl->bHasColumnHeaders = _bColumnHeaders; + impl_notifyTableMetricsChanged(); } //------------------------------------------------------------------------------------------------------------------ @@ -329,6 +337,19 @@ namespace svt { namespace table } } + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::impl_notifyTableMetricsChanged() const + { + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->tableMetricsChanged(); + } + } + //------------------------------------------------------------------------------------------------------------------ PTableRenderer UnoControlTableModel::getRenderer() const { @@ -354,7 +375,11 @@ namespace svt { namespace table void UnoControlTableModel::setRowHeight(TableMetrics _nRowHeight) { DBG_CHECK_ME(); + if ( m_pImpl->nRowHeight == _nRowHeight ) + return; + m_pImpl->nRowHeight = _nRowHeight; + impl_notifyTableMetricsChanged(); } //------------------------------------------------------------------------------------------------------------------ @@ -376,32 +401,22 @@ namespace svt { namespace table void UnoControlTableModel::setColumnHeaderHeight(TableMetrics _nHeight) { DBG_CHECK_ME(); + if ( m_pImpl->nColumnHeaderHeight == _nHeight ) + return; + m_pImpl->nColumnHeaderHeight = _nHeight; + impl_notifyTableMetricsChanged(); } //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::setRowHeaderWidth(TableMetrics _nWidth) { DBG_CHECK_ME(); - m_pImpl->nRowHeaderWidth = _nWidth; - } - - //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::SetTitleHeight( TableMetrics _nHeight ) - { - DBG_CHECK_ME(); - DBG_ASSERT( _nHeight > 0, "DefaultTableModel::SetTitleHeight: invalid height value!" ); - m_pImpl->nColumnHeaderHeight = _nHeight; - // TODO: notification - } + if ( m_pImpl->nRowHeaderWidth == _nWidth ) + return; - //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::SetHandleWidth( TableMetrics _nWidth ) - { - DBG_CHECK_ME(); - DBG_ASSERT( _nWidth > 0, "DefaultTableModel::SetHandleWidth: invalid width value!" ); m_pImpl->nRowHeaderWidth = _nWidth; - // TODO: notification + impl_notifyTableMetricsChanged(); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index c38d9ed694e2..f89419ac071f 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -66,25 +66,6 @@ namespace svt { namespace table UnoControlTableModel(); ~UnoControlTableModel(); - /// returns the current row height, in 1/100 millimeters - inline TableMetrics GetRowHeight() const { return getRowHeight(); } - /// sets a new row height. - void setRowHeight( TableMetrics _nHeight ); - /// sets a new row header width. - void setRowHeaderWidth( TableMetrics _nWidth ); - /// sets a new column header height. - void setColumnHeaderHeight( TableMetrics _nHeight ); - - /// returns the height of the title row (containing the column headers) - inline TableMetrics GetTitleHeight() const { return getColumnHeaderHeight(); } - /// sets a new height for the title row (containing the column headers) - void SetTitleHeight( TableMetrics _nHeight ); - - /// returns the width of the handle column (containing the row headers) - inline TableMetrics GetHandleWidth() const { return getRowHeaderWidth(); } - /// sets a new width for the handle column (containing the row headers) - void SetHandleWidth( TableMetrics _nWidth ); - public: // ITableModel overridables virtual TableSize getColumnCount() const; @@ -137,6 +118,10 @@ namespace svt { namespace table void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); + void setRowHeight( TableMetrics _nHeight ); + void setRowHeaderWidth( TableMetrics _nWidth ); + void setColumnHeaderHeight( TableMetrics _nHeight ); + void setLineColor( ::com::sun::star::uno::Any const & i_color ); void setHeaderBackgroundColor( ::com::sun::star::uno::Any const & i_color ); void setHeaderTextColor( ::com::sun::star::uno::Any const & i_color ); @@ -159,6 +144,9 @@ namespace svt { namespace table #ifdef DBG_UTIL const char* checkInvariants() const; #endif + + private: + void impl_notifyTableMetricsChanged() const; }; // ..................................................................................................................... -- cgit From b6d8855706f5048082ab60467d1460ee3658ce19 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 11:28:11 +0100 Subject: gridsort: added runtime-checks (non-pro only) for consistency of m_aColumnWidths --- svtools/source/table/tablecontrol_impl.cxx | 35 ++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index af3f1c768273..484a3e3ca248 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -351,10 +351,27 @@ namespace svt { namespace table return "row header widths are inconsistent!"; } - // TODO: check m_aColumnWidths - // - for each element, getStart <= getEnd() - // - for each i: col[ i ].getEnd() == col[ i+1 ].getStart() - // - col[ m_nLeftColumn ].getStart == m_nRowHeaderWidthPixel + // m_aColumnWidths consistency + if ( size_t( m_nColumnCount ) != m_aColumnWidths.size() ) + return "wrong number of cached column widths"; + + for ( ColumnPositions::const_iterator col = m_aColumnWidths.begin(); + col != m_aColumnWidths.end(); + ) + { + if ( col->getEnd() < col->getStart() ) + return "column widths: 'end' is expected to not be smaller than start"; + + ColumnPositions::const_iterator nextCol = col + 1; + if ( nextCol != m_aColumnWidths.end() ) + if ( col->getEnd() != nextCol->getStart() ) + return "column widths: one column's end should be the next column's start"; + col = nextCol; + } + + if ( m_nLeftColumn < m_nColumnCount ) + if ( m_aColumnWidths[ m_nLeftColumn ].getStart() != m_nRowHeaderWidthPixel ) + return "the left-most column should start immediately after the row header"; if ( m_nCursorHidden < 0 ) return "invalid hidden count for the cursor!"; @@ -1128,14 +1145,14 @@ namespace svt { namespace table // position it if ( m_pHScroll ) { - TableSize nVisibleUnits = lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ); - int nRange = m_nColumnCount; - if( m_nLeftColumn + nVisibleUnits == nRange-1) + TableSize const nVisibleUnits = lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ); + TableMetrics const nRange = m_nColumnCount; + if( m_nLeftColumn + nVisibleUnits == nRange - 1 ) { - if ( m_aColumnWidths[ nRange-2 ].getEnd() - m_aColumnWidths[ m_nLeftColumn ].getEnd() + m_aColumnWidths[ nRange-1 ].getWidth() > aDataCellPlayground.GetWidth() ) + if ( m_aColumnWidths[ nRange - 1 ].getStart() - m_aColumnWidths[ m_nLeftColumn ].getEnd() + m_aColumnWidths[ nRange-1 ].getWidth() > aDataCellPlayground.GetWidth() ) { m_pHScroll->SetVisibleSize( nVisibleUnits -1 ); - m_pHScroll->SetPageSize(nVisibleUnits -1); + m_pHScroll->SetPageSize( nVisibleUnits - 1 ); } } Rectangle aScrollbarArea( -- cgit From 13cbe08da83e43ab876418f9eb6061b67416002c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 11:31:43 +0100 Subject: gridsort: fix calculation of auto-alternating-color: Do not adjust towards WHITE, but towards the color of the other rows --- svtools/source/table/gridtablerenderer.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 35220576e5c0..8fc95c203b7a 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -256,17 +256,17 @@ namespace svt { namespace table if ( !aRowColors ) { // use alternating default colors - if ( ( m_pImpl->nCurrentRow % 2 ) == 0 ) + Color const fieldColor = _rStyle.GetFieldColor(); + if ( _rStyle.GetHighContrastMode() || ( ( m_pImpl->nCurrentRow % 2 ) == 0 ) ) { - backgroundColor = _rStyle.GetFieldColor(); + backgroundColor = fieldColor; } else { Color hilightColor = _rStyle.GetHighlightColor(); - USHORT const luminance = hilightColor.GetLuminance(); - hilightColor.SetRed( 9 * ( 255 - hilightColor.GetRed() ) / 10 + hilightColor.GetRed() ); - hilightColor.SetGreen( 9 * ( 255 - hilightColor.GetGreen() ) / 10 + hilightColor.GetGreen() ); - hilightColor.SetBlue( 9 * ( 255 - hilightColor.GetBlue() ) / 10 + hilightColor.GetBlue() ); + hilightColor.SetRed( 9 * ( fieldColor.GetRed() - hilightColor.GetRed() ) / 10 + hilightColor.GetRed() ); + hilightColor.SetGreen( 9 * ( fieldColor.GetGreen() - hilightColor.GetGreen() ) / 10 + hilightColor.GetGreen() ); + hilightColor.SetBlue( 9 * ( fieldColor.GetBlue() - hilightColor.GetBlue() ) / 10 + hilightColor.GetBlue() ); backgroundColor = hilightColor; } } -- cgit From acaf4f1d75540acd79b7380c7f0ade4e04b75bd8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 11:44:35 +0100 Subject: gridsort: moved tabledatawindow from svtools/inc/svtools to svtools/source/table - this is not a public file, after all --- svtools/inc/svtools/table/tablecontrol.hxx | 6 +- svtools/inc/svtools/table/tabledatawindow.hxx | 87 --------------------------- svtools/source/table/defaultinputhandler.cxx | 3 +- svtools/source/table/tablecontrol.cxx | 7 ++- svtools/source/table/tablecontrol_impl.cxx | 2 +- svtools/source/table/tabledatawindow.cxx | 2 +- svtools/source/table/tabledatawindow.hxx | 87 +++++++++++++++++++++++++++ 7 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 svtools/inc/svtools/table/tabledatawindow.hxx create mode 100644 svtools/source/table/tabledatawindow.hxx diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 4077f9fc053a..a5360145bc46 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -29,7 +29,6 @@ #include "svtools/svtdllapi.h" #include "svtools/table/tablemodel.hxx" -#include "svtools/table/tabledatawindow.hxx" #include "svtools/accessibletable.hxx" #include "svtools/accessiblefactory.hxx" @@ -46,7 +45,6 @@ namespace svt { namespace table //........................................................................ class TableControl_Impl; - class TableDataWindow; //==================================================================== //= TableControl @@ -159,8 +157,8 @@ namespace svt { namespace table /**after removing a row, updates the vector which contains the selected rows if the row, which should be removed, is selected, it will be erased from the vector */ - SelectionEngine* getSelEngine(); - TableDataWindow& getDataWindow(); + SelectionEngine* getSelEngine(); + Window& getDataWindow(); // Window overridables virtual void GetFocus(); diff --git a/svtools/inc/svtools/table/tabledatawindow.hxx b/svtools/inc/svtools/table/tabledatawindow.hxx deleted file mode 100644 index 1cc030be512b..000000000000 --- a/svtools/inc/svtools/table/tabledatawindow.hxx +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************************* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * -************************************************************************/ - -#ifndef SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX -#define SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX - -#ifndef _SV_WINDOW_HXX -#include -#endif -#include - -//........................................................................ -namespace svt { namespace table -{ -//........................................................................ - - class TableControl_Impl; - class TableFunctionSet; - - - //==================================================================== - //= TableDataWindow - //==================================================================== - /** the window containing the content area (including headers) of - a table control - */ - class TableDataWindow : public Window - { - friend class TableFunctionSet; - private: - TableControl_Impl& m_rTableControl; - Link m_aMouseButtonDownHdl; - Link m_aMouseButtonUpHdl; - Link m_aSelectHdl; - public: - TableDataWindow( TableControl_Impl& _rTableControl ); - inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; } - inline const Link& GetMouseButtonDownHdl() const { return m_aMouseButtonDownHdl; } - inline void SetMouseButtonUpHdl( const Link& rLink ) { m_aMouseButtonUpHdl = rLink; } - inline const Link& GetMouseButtonUpHdl() const { return m_aMouseButtonUpHdl; } - inline void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; } - inline const Link& GetSelectHdl() const { return m_aSelectHdl; } - - // Window overridables - virtual void Paint( const Rectangle& rRect ); - virtual void MouseMove( const MouseEvent& rMEvt); - virtual void MouseButtonDown( const MouseEvent& rMEvt); - virtual void MouseButtonUp( const MouseEvent& rMEvt); - virtual void SetPointer( const Pointer& rPointer ); - virtual void CaptureMouse(); - virtual void ReleaseMouse(); - virtual long Notify(NotifyEvent& rNEvt); - virtual void SetControlBackground(const Color& rColor); - virtual void SetControlBackground(); - virtual void RequestHelp( const HelpEvent& rHEvt ); - - void SetBackground(const Wallpaper& rColor); - void SetBackground(); - }; -//........................................................................ -} } // namespace svt::table -//........................................................................ - -#endif // SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index e8e4c3e178d0..9b28860ca0ae 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -30,10 +30,11 @@ #include "svtools/table/defaultinputhandler.hxx" #include "svtools/table/tablecontrolinterface.hxx" +#include "tabledatawindow.hxx" + #include #include #include -#include "svtools/table/tabledatawindow.hxx" //........................................................................ namespace svt { namespace table diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 46f3735e054c..500b2ca423e9 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -27,10 +27,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" +#include "svtools/table/tablecontrol.hxx" + #include "tablegeometry.hxx" #include "tablecontrol_impl.hxx" -#include "svtools/table/tablecontrol.hxx" -#include "svtools/table/tabledatawindow.hxx" +#include "tabledatawindow.hxx" #include #include @@ -266,7 +267,7 @@ namespace svt { namespace table } // ----------------------------------------------------------------------------------------------------------------- - TableDataWindow& TableControl::getDataWindow() + Window& TableControl::getDataWindow() { return m_pImpl->getDataWindow(); } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 484a3e3ca248..e7d781018f34 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -30,8 +30,8 @@ #include "svtools/table/tablecontrol.hxx" #include "svtools/table/defaultinputhandler.hxx" #include "svtools/table/tablemodel.hxx" -#include "svtools/table/tabledatawindow.hxx" +#include "tabledatawindow.hxx" #include "tablecontrol_impl.hxx" #include "tablegeometry.hxx" #include "cellvalueconversion.hxx" diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 920fb3fcaada..1b2106f6d7e0 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -28,8 +28,8 @@ #include "precompiled_svtools.hxx" #include "svtools/table/tablecontrol.hxx" -#include "svtools/table/tabledatawindow.hxx" +#include "tabledatawindow.hxx" #include "tablecontrol_impl.hxx" #include "tablegeometry.hxx" #include "cellvalueconversion.hxx" diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx new file mode 100644 index 000000000000..1cc030be512b --- /dev/null +++ b/svtools/source/table/tabledatawindow.hxx @@ -0,0 +1,87 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX +#define SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX + +#ifndef _SV_WINDOW_HXX +#include +#endif +#include + +//........................................................................ +namespace svt { namespace table +{ +//........................................................................ + + class TableControl_Impl; + class TableFunctionSet; + + + //==================================================================== + //= TableDataWindow + //==================================================================== + /** the window containing the content area (including headers) of + a table control + */ + class TableDataWindow : public Window + { + friend class TableFunctionSet; + private: + TableControl_Impl& m_rTableControl; + Link m_aMouseButtonDownHdl; + Link m_aMouseButtonUpHdl; + Link m_aSelectHdl; + public: + TableDataWindow( TableControl_Impl& _rTableControl ); + inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; } + inline const Link& GetMouseButtonDownHdl() const { return m_aMouseButtonDownHdl; } + inline void SetMouseButtonUpHdl( const Link& rLink ) { m_aMouseButtonUpHdl = rLink; } + inline const Link& GetMouseButtonUpHdl() const { return m_aMouseButtonUpHdl; } + inline void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; } + inline const Link& GetSelectHdl() const { return m_aSelectHdl; } + + // Window overridables + virtual void Paint( const Rectangle& rRect ); + virtual void MouseMove( const MouseEvent& rMEvt); + virtual void MouseButtonDown( const MouseEvent& rMEvt); + virtual void MouseButtonUp( const MouseEvent& rMEvt); + virtual void SetPointer( const Pointer& rPointer ); + virtual void CaptureMouse(); + virtual void ReleaseMouse(); + virtual long Notify(NotifyEvent& rNEvt); + virtual void SetControlBackground(const Color& rColor); + virtual void SetControlBackground(); + virtual void RequestHelp( const HelpEvent& rHEvt ); + + void SetBackground(const Wallpaper& rColor); + void SetBackground(); + }; +//........................................................................ +} } // namespace svt::table +//........................................................................ + +#endif // SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX -- cgit From d0cdc38a6771473b81f002da6769b7b723d657ff Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 12:23:42 +0100 Subject: gridsort: TableDataWindow: use Help::ShowTip instead of Help::ShowQuickHelp. This means it doesn't interfere with the "normal" quick help (which is a singleton really dedicated to, well, quickly displaying help). Also, it means we do not need the QUICKHELP_NO_DELAY flag. To prevent flickering when repeatedly showing such a tip, introduced Help::UpdateTip, which updates an existing tip, instead of destroying the old tip window, and creating a new one. Used this new UpdateTip also in the BrowseBox, means means some less flickering there, too. --- svtools/source/brwbox/datwin.cxx | 9 ++-- svtools/source/table/tabledatawindow.cxx | 73 +++++++++++++++++++++----------- svtools/source/table/tabledatawindow.hxx | 7 +++ vcl/inc/vcl/help.hxx | 4 ++ vcl/inc/vcl/helpwin.hxx | 1 + vcl/source/app/help.cxx | 23 +++++++--- 6 files changed, 84 insertions(+), 33 deletions(-) diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index cb43e4989355..2c771f778d92 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -752,17 +752,18 @@ void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt ) ULONG nPos = GetThumbPos(); if ( nPos != _nLastPos ) { - if ( _nTip ) - Help::HideTip( _nTip ); - String aTip( String::CreateFromInt32(nPos) ); aTip += '/'; if ( _pDataWin->GetRealRowCount().Len() ) aTip += _pDataWin->GetRealRowCount(); else aTip += String::CreateFromInt32(GetRangeMax()); + Rectangle aRect( GetPointerPosPixel(), Size( GetTextHeight(), GetTextWidth( aTip ) ) ); - _nTip = Help::ShowTip( this, aRect, aTip ); + if ( _nTip ) + Help::UpdateTip( _nTip, this, aRect, aTip ); + else + _nTip = Help::ShowTip( this, aRect, aTip ); _nLastPos = nPos; } diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 1b2106f6d7e0..56be34897fe2 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -36,22 +36,23 @@ #include -//........................................................................ +//...................................................................................................................... namespace svt { namespace table { -//........................................................................ +//...................................................................................................................... /** === begin UNO using === **/ using ::com::sun::star::uno::Any; /** === end UNO using === **/ - //==================================================================== + //================================================================================================================== //= TableDataWindow - //==================================================================== - //-------------------------------------------------------------------- + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ TableDataWindow::TableDataWindow( TableControl_Impl& _rTableControl ) :Window( &_rTableControl.getAntiImpl() ) ,m_rTableControl( _rTableControl ) + ,m_nTipWindowHandle( 0 ) { // by default, use the background as determined by the style settings const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); @@ -59,33 +60,39 @@ namespace svt { namespace table SetFillColor( aWindowColor ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + TableDataWindow::~TableDataWindow() + { + impl_hideTipWindow(); + } + + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::Paint( const Rectangle& rUpdateRect ) { m_rTableControl.doPaintContent( rUpdateRect ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::SetBackground( const Wallpaper& rColor ) { Window::SetBackground( rColor ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::SetControlBackground( const Color& rColor ) { Window::SetControlBackground( rColor ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::SetBackground() { Window::SetBackground(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::SetControlBackground() { Window::SetControlBackground(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::RequestHelp( const HelpEvent& rHEvt ) { USHORT const nHelpMode = rHEvt.GetMode(); @@ -99,10 +106,10 @@ namespace svt { namespace table RowPos const hitRow = rTableControl.getRowAtPoint( aMousePos ); ColPos const hitCol = rTableControl.getColAtPoint( aMousePos ); + ::rtl::OUString sHelpText; + if ( ( hitCol >= 0 ) && ( hitCol < pTableModel->getColumnCount() ) ) { - ::rtl::OUString sHelpText; - if ( hitRow == ROW_COL_HEADERS ) { sHelpText = pTableModel->getColumnModel( hitCol )->getHelpText(); @@ -131,14 +138,19 @@ namespace svt { namespace table sHelpText = CellValueConversion::convertToString( aCellToolTip ); } + } + if ( sHelpText.getLength() ) + { Rectangle const aControlScreenRect( OutputToScreenPixel( Point( 0, 0 ) ), GetOutputSizePixel() ); - Help::ShowQuickHelp( this, aControlScreenRect, sHelpText, String(), QUICKHELP_FORCE_REPOSITION | QUICKHELP_NO_DELAY ); - // also do this when the help text is empty - in this case, a previously active tip help window - // (possible displaying the tooltip for another cell) will be hidden, which is intended here. + + if ( m_nTipWindowHandle ) + Help::UpdateTip( m_nTipWindowHandle, this, aControlScreenRect, sHelpText ); + else + m_nTipWindowHandle = Help::ShowTip( this, aControlScreenRect, sHelpText ); } } else @@ -147,9 +159,22 @@ namespace svt { namespace table } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ + void TableDataWindow::impl_hideTipWindow() + { + if ( m_nTipWindowHandle != 0 ) + { + Help::HideTip( m_nTipWindowHandle ); + m_nTipWindowHandle = 0; + } + } + + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::MouseMove( const MouseEvent& rMEvt ) { + if ( rMEvt.IsLeaveWindow() ) + impl_hideTipWindow(); + Point aPoint = rMEvt.GetPosPixel(); if ( !m_rTableControl.getInputHandler()->MouseMove( m_rTableControl, rMEvt ) ) { @@ -163,7 +188,7 @@ namespace svt { namespace table } } } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::MouseButtonDown( const MouseEvent& rMEvt ) { const Point aPoint = rMEvt.GetPosPixel(); @@ -182,7 +207,7 @@ namespace svt { namespace table } m_aMouseButtonDownHdl.Call((MouseEvent*) &rMEvt); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::MouseButtonUp( const MouseEvent& rMEvt ) { if ( !m_rTableControl.getInputHandler()->MouseButtonUp( m_rTableControl, rMEvt ) ) @@ -190,17 +215,17 @@ namespace svt { namespace table m_aMouseButtonUpHdl.Call((MouseEvent*) &rMEvt); m_rTableControl.getAntiImpl().GrabFocus(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::SetPointer( const Pointer& rPointer ) { Window::SetPointer(rPointer); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::CaptureMouse() { Window::CaptureMouse(); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::ReleaseMouse( ) { Window::ReleaseMouse(); @@ -223,6 +248,6 @@ namespace svt { namespace table } return nDone ? nDone : Window::Notify( rNEvt ); } -//........................................................................ +//...................................................................................................................... } } // namespace svt::table -//........................................................................ +//...................................................................................................................... diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx index 1cc030be512b..45ffec92c286 100644 --- a/svtools/source/table/tabledatawindow.hxx +++ b/svtools/source/table/tabledatawindow.hxx @@ -55,8 +55,12 @@ namespace svt { namespace table Link m_aMouseButtonDownHdl; Link m_aMouseButtonUpHdl; Link m_aSelectHdl; + ULONG m_nTipWindowHandle; + public: TableDataWindow( TableControl_Impl& _rTableControl ); + ~TableDataWindow(); + inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; } inline const Link& GetMouseButtonDownHdl() const { return m_aMouseButtonDownHdl; } inline void SetMouseButtonUpHdl( const Link& rLink ) { m_aMouseButtonUpHdl = rLink; } @@ -79,6 +83,9 @@ namespace svt { namespace table void SetBackground(const Wallpaper& rColor); void SetBackground(); + + private: + void impl_hideTipWindow(); }; //........................................................................ } } // namespace svt::table diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx index 4fb039b25bec..a43b0fe84862 100644 --- a/vcl/inc/vcl/help.hxx +++ b/vcl/inc/vcl/help.hxx @@ -118,6 +118,10 @@ public: static ULONG ShowTip( Window* pParent, const Rectangle& rScreenRect, const XubString& rText, USHORT nStyle = 0 ); + static void UpdateTip( ULONG nId, + Window* pParent, + const Rectangle& rScreenRect, + const XubString& rText ); static void HideTip( ULONG nId ); }; diff --git a/vcl/inc/vcl/helpwin.hxx b/vcl/inc/vcl/helpwin.hxx index 244ae1b7d846..799685251e02 100644 --- a/vcl/inc/vcl/helpwin.hxx +++ b/vcl/inc/vcl/helpwin.hxx @@ -66,6 +66,7 @@ public: const String& GetHelpText() const { return maHelpText; } void SetHelpText( const String& rHelpText ); USHORT GetWinStyle() const { return mnHelpWinStyle; } + USHORT GetStyle() const { return mnStyle; } // Nur merken: void SetStatusText( const String& rStatusText ) { maStatusText = rStatusText; } diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 46f5e2132e5c..09650cee9231 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -36,6 +36,7 @@ #include "vcl/help.hxx" #include "vcl/helpwin.hxx" #include "tools/debug.hxx" +#include "tools/diagnose_ex.h" #include "tools/time.hxx" // ======================================================================= @@ -274,18 +275,30 @@ BOOL Help::ShowQuickHelp( Window* pParent, // ----------------------------------------------------------------------- -ULONG Help::ShowTip( Window* pParent, const Rectangle& rRect, +ULONG Help::ShowTip( Window* pParent, const Rectangle& rScreenRect, const XubString& rText, USHORT nStyle ) { USHORT nHelpWinStyle = HELPWINSTYLE_QUICK; HelpTextWindow* pHelpWin = new HelpTextWindow( pParent, rText, nHelpWinStyle, nStyle ); + ULONG nId = reinterpret_cast< ULONG >( pHelpWin ); + UpdateTip( nId, pParent, rScreenRect, rText ); + + pHelpWin->ShowHelp( HELPDELAY_NONE ); + return nId; +} + +// ----------------------------------------------------------------------- + +void Help::UpdateTip( ULONG nId, Window* pParent, const Rectangle& rScreenRect, const XubString& rText ) +{ + HelpTextWindow* pHelpWin = reinterpret_cast< HelpTextWindow* >( nId ); + ENSURE_OR_RETURN_VOID( pHelpWin != NULL, "Help::UpdateTip: invalid ID!" ); + Size aSz = pHelpWin->CalcOutSize(); pHelpWin->SetOutputSizePixel( aSz ); - ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle, - pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), &rRect ); - pHelpWin->ShowHelp( HELPDELAY_NONE ); - return (ULONG)pHelpWin; + ImplSetHelpWindowPos( pHelpWin, pHelpWin->GetWinStyle(), pHelpWin->GetStyle(), + pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), &rScreenRect ); } // ----------------------------------------------------------------------- -- cgit From f30518cc978f4f74a7e61d03872b913124e82f76 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 13:19:09 +0100 Subject: gridsort: re-add tooltip support to X(Mutable)GridDataModel, this time more explicit, and less magical --- svtools/source/uno/unocontroltablemodel.cxx | 14 +++- .../source/controls/grid/defaultgriddatamodel.cxx | 86 +++++++++++++++------- .../source/controls/grid/defaultgriddatamodel.hxx | 19 ++++- 3 files changed, 87 insertions(+), 32 deletions(-) diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 75e58bcdf03c..17aac65c0dfb 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -554,9 +554,17 @@ namespace svt { namespace table void UnoControlTableModel::getCellToolTip( ColPos const i_col, RowPos const i_row, Any& o_cellToolTip ) { DBG_CHECK_ME(); - OSL_UNUSED( i_col ); - OSL_UNUSED( i_row ); - OSL_UNUSED( o_cellToolTip ); + try + { + Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); + ENSURE_OR_THROW( xDataModel.is(), "no data model anymore!" ); + + o_cellToolTip = xDataModel->getCellToolTip( i_col, i_row ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 3d9b8324de81..693f86e187d9 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -115,20 +115,47 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - Any SAL_CALL DefaultGridDataModel::getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) + DefaultGridDataModel::CellData const & DefaultGridDataModel::impl_getCellData_throw( sal_Int32 const i_column, sal_Int32 const i_row ) const { - ::osl::MutexGuard aGuard( GetMutex() ); - if ( ( i_row < 0 ) || ( size_t( i_row ) > m_aData.size() ) || ( i_column < 0 ) || ( i_column > m_nColumnCount ) ) - throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + throw IndexOutOfBoundsException( ::rtl::OUString(), *const_cast< DefaultGridDataModel* >( this ) ); - ::std::vector< Any > const & rRow( m_aData[ i_row ] ); + RowData const & rRow( m_aData[ i_row ] ); if ( size_t( i_column ) < rRow.size() ) return rRow[ i_column ]; - return Any(); + static CellData s_aEmpty; + return s_aEmpty; + } + + //------------------------------------------------------------------------------------------------------------------ + DefaultGridDataModel::CellData& DefaultGridDataModel::impl_getCellDataAccess_throw( sal_Int32 const i_column, sal_Int32 const i_row ) + { + if ( ( i_row < 0 ) || ( size_t( i_row ) >= m_aData.size() ) + || ( i_column < 0 ) || ( i_column >= m_nColumnCount ) + ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + + RowData& rRowData( m_aData[ i_row ] ); + if ( size_t( i_column ) >= rRowData.size() ) + rRowData.resize( i_column + 1 ); + return rRowData[ i_column ]; + } + + //------------------------------------------------------------------------------------------------------------------ + Any SAL_CALL DefaultGridDataModel::getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) + { + ::osl::MutexGuard aGuard( GetMutex() ); + return impl_getCellData_throw( i_column, i_row ).first; + } + + //------------------------------------------------------------------------------------------------------------------ + Any SAL_CALL DefaultGridDataModel::getCellToolTip( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) + { + ::osl::MutexGuard aGuard( GetMutex() ); + return impl_getCellData_throw( i_column, i_row ).second; } //------------------------------------------------------------------------------------------------------------------ @@ -153,9 +180,7 @@ namespace toolkit m_aRowHeaders.push_back( i_title ); // store row m_aData - ::std::vector< Any > newRow( columnCount ); - ::std::copy( i_data.getConstArray(), i_data.getConstArray() + columnCount, newRow.begin() ); - m_aData.push_back( newRow ); + impl_addRow( i_data ); // update column count if ( columnCount > m_nColumnCount ) @@ -169,6 +194,20 @@ namespace toolkit ); } + //------------------------------------------------------------------------------------------------------------------ + void DefaultGridDataModel::impl_addRow( Sequence< Any > const & i_rowData, sal_Int32 const i_assumedColCount ) + { + OSL_PRECOND( ( i_assumedColCount <= 0 ) || ( i_assumedColCount >= i_rowData.getLength() ), + "DefaultGridDataModel::impl_addRow: invalid column count!" ); + + RowData newRow( i_assumedColCount > 0 ? i_assumedColCount : i_rowData.getLength() ); + RowData::iterator cellData = newRow.begin(); + for ( const Any* pData = stl_begin( i_rowData ); pData != stl_end( i_rowData ); ++pData, ++cellData ) + cellData->first = *pData; + + m_aData.push_back( newRow ); + } + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::addRows( const Sequence< ::rtl::OUString >& i_titles, const Sequence< Sequence< Any > >& i_data ) throw (IllegalArgumentException, RuntimeException) { @@ -193,11 +232,7 @@ namespace toolkit for ( sal_Int32 row=0; row newRow( maxColCount ); - Sequence< Any > const & rRowData = i_data[row]; - ::std::copy( rRowData.getConstArray(), rRowData.getConstArray() + rRowData.getLength(), newRow.begin() ); - m_aData.push_back( newRow ); + impl_addRow( i_data[row], maxColCount ); } if ( maxColCount > m_nColumnCount ) @@ -250,15 +285,7 @@ namespace toolkit { ::osl::ClearableMutexGuard aGuard( GetMutex() ); - if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) - || ( i_columnIndex < 0 ) || ( i_columnIndex >= m_nColumnCount ) - ) - throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - - ::std::vector< Any >& rRowData( m_aData[ i_rowIndex ] ); - if ( size_t( i_columnIndex ) >= rRowData.size() ) - rRowData.resize( i_columnIndex + 1 ); - rRowData[ i_columnIndex ] = i_value; + impl_getCellDataAccess_throw( i_columnIndex, i_rowIndex ).first = i_value; broadcast( GridDataEvent( *this, i_columnIndex, i_columnIndex, i_rowIndex, i_rowIndex ), @@ -288,14 +315,14 @@ namespace toolkit throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); } - ::std::vector< Any >& rDataRow = m_aData[ i_rowIndex ]; + RowData& rDataRow = m_aData[ i_rowIndex ]; for ( sal_Int32 col = 0; col < columnCount; ++col ) { sal_Int32 const columnIndex = i_columnIndexes[ col ]; if ( size_t( columnIndex ) >= rDataRow.size() ) rDataRow.resize( columnIndex + 1 ); - rDataRow[ columnIndex ] = i_values[ col ]; + rDataRow[ columnIndex ].first = i_values[ col ]; } sal_Int32 const firstAffectedColumn = *::std::min_element( stl_begin( i_columnIndexes ), stl_end( i_columnIndexes ) ); @@ -312,7 +339,7 @@ namespace toolkit { ::osl::ClearableMutexGuard aGuard( GetMutex() ); - if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) ) + if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aRowHeaders.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); m_aRowHeaders[ i_rowIndex ] = i_title; @@ -324,6 +351,13 @@ namespace toolkit ); } + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::setCellToolTip( ::sal_Int32 i_rowIndex, ::sal_Int32 i_columnIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) + { + ::osl::MutexGuard aGuard( GetMutex() ); + impl_getCellDataAccess_throw( i_columnIndex, i_rowIndex ).second = i_value; + } + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< grid::XGridDataListener >& i_listener ) throw (RuntimeException) { diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 842e714c904c..acfb777ef5b0 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -69,6 +69,7 @@ public: virtual void SAL_CALL updateCell( ::sal_Int32 RowIndex, ::sal_Int32 ColumnIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRow( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setRowTitle( ::sal_Int32 RowIndex, const ::rtl::OUString& Title ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setCellToolTip( ::sal_Int32 RowIndex, ::sal_Int32 ColumnIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); @@ -76,6 +77,7 @@ public: virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getCellToolTip( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getRowTitle( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); // XComponent @@ -92,15 +94,26 @@ public: virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException); private: + typedef ::std::pair< Any, Any > CellData; + typedef ::std::vector< CellData > RowData; + typedef ::std::vector< RowData > GridData; + void broadcast( GridDataEvent const & i_event, void ( SAL_CALL ::com::sun::star::awt::grid::XGridDataListener::*i_listenerMethod )( ::com::sun::star::awt::grid::GridDataEvent const & ), ::osl::ClearableMutexGuard & i_instanceLock ); - ::std::vector< ::std::vector < Any > > m_aData; - ::std::vector< ::rtl::OUString > m_aRowHeaders; - sal_Int32 m_nColumnCount; + void impl_addRow( Sequence< Any > const & i_rowData, sal_Int32 const i_assumedColCount = -1 ); + + CellData const & + impl_getCellData_throw( sal_Int32 const i_column, sal_Int32 const i_row ) const; + CellData& + impl_getCellDataAccess_throw( sal_Int32 const i_column, sal_Int32 const i_row ); + + GridData m_aData; + ::std::vector< ::rtl::OUString > m_aRowHeaders; + sal_Int32 m_nColumnCount; }; } -- cgit From fda5c8a28a2601df5a2dcab0f30ac5ac64cbccf0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 13:19:09 +0100 Subject: gridsort: re-add tooltip support to X(Mutable)GridDataModel, this time more explicit, and less magical --- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 13 +++++++++++++ offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index f62271d6acf3..d686a04f2028 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -72,10 +72,23 @@ interface XGridDataModel any getCellData( [in] long Column, [in] long Row ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** retrieves the tool tip to be displayed when the mouse hovers over a given cell + +

          At the moment, only string tool tips are supported.

          + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the column or row index do not denote a valid cell position. + */ + any getCellToolTip( [in] long Column, [in] long Row ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** retrieves the title of the given row

          A grid control will usually paint a row's title in the header column of the respective row.

          +

          If is returned here, the cell's content will be displayed as tip, but only if it does + not fit into the cell.

          + @throws ::com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row. */ diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index 58023cadc7b7..e593cc1a7c27 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -85,7 +85,7 @@ interface XMutableGridDataModel : XGridDataModel @throws ::com::sun::star::lang::IndexOutOfBoundsException if the row or column index is invalid */ - void updateCell([in] long RowIndex, [in] long ColumnIndex, [in] any Value ) + void updateCell( [in] long RowIndex, [in] long ColumnIndex, [in] any Value ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** updates the content of a given row. @@ -119,6 +119,13 @@ interface XMutableGridDataModel : XGridDataModel setRowTitle( [in] long RowIndex, [in] string Title ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** updates the tooltip to be displayed for a given cell + + @see XGridDataModel::getCellToolTip + */ + void setCellToolTip( [in] long RowIndex, [in] long ColumnIndex, [in] any Value ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + //------------------------------------------------------------------------- /** registers listener to be notified of data changes in the model -- cgit From f64fd0b4a2b5c1e8fe4f5742d8ef530b02cd9f22 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 13:56:26 +0100 Subject: gridsort: +QUICKHELP_TIP_STYLE_BALLOON, to be used with ShowTip, to force a tip to appear in balloon-style --- vcl/inc/vcl/help.hxx | 4 ++++ vcl/source/app/help.cxx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx index a43b0fe84862..9a1afad5618b 100644 --- a/vcl/inc/vcl/help.hxx +++ b/vcl/inc/vcl/help.hxx @@ -48,8 +48,12 @@ class Window; #define QUICKHELP_BOTTOM ((USHORT)0x0020) #define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM) #define QUICKHELP_CTRLTEXT ((USHORT)0x0040) +/// force the existent tip window to be re-positioned, even if the previous incarnation has the same text. Applies to ShowBallon and ShowQuickHelp. #define QUICKHELP_FORCE_REPOSITION ((USHORT)0x0080) +/// no delay when opening the quick help. Applies to ShowBallon and ShowQuickHelp #define QUICKHELP_NO_DELAY ((USHORT)0x0100) +/// force balloon-style in ShowTip +#define QUICKHELP_TIP_STYLE_BALLOON ((USHORT)0x0200) #define QUICKHELP_NOEVADEPOINTER ((USHORT)0x4000) #define QUICKHELP_BIDI_RTL ((USHORT)0x8000) diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 09650cee9231..7e58a7cc4dc8 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -278,7 +278,7 @@ BOOL Help::ShowQuickHelp( Window* pParent, ULONG Help::ShowTip( Window* pParent, const Rectangle& rScreenRect, const XubString& rText, USHORT nStyle ) { - USHORT nHelpWinStyle = HELPWINSTYLE_QUICK; + USHORT nHelpWinStyle = ( ( nStyle & QUICKHELP_TIP_STYLE_BALLOON ) != 0 ) ? HELPWINSTYLE_BALLOON : HELPWINSTYLE_QUICK; HelpTextWindow* pHelpWin = new HelpTextWindow( pParent, rText, nHelpWinStyle, nStyle ); ULONG nId = reinterpret_cast< ULONG >( pHelpWin ); -- cgit From db9388daa6f997ea54b7637c761bf0664b68ff6f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 13:59:11 +0100 Subject: gridsort: if the tooltip text contains line breaks, force the tip style to be 'balloon' - the 'normal' style doesn't support line breaks --- svtools/source/table/tabledatawindow.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 56be34897fe2..36966d92aea5 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -107,6 +107,7 @@ namespace svt { namespace table ColPos const hitCol = rTableControl.getColAtPoint( aMousePos ); ::rtl::OUString sHelpText; + USHORT nHelpStyle = 0; if ( ( hitCol >= 0 ) && ( hitCol < pTableModel->getColumnCount() ) ) { @@ -137,6 +138,9 @@ namespace svt { namespace table } sHelpText = CellValueConversion::convertToString( aCellToolTip ); + + if ( sHelpText.indexOf( '\n' ) >= 0 ) + nHelpStyle = QUICKHELP_TIP_STYLE_BALLOON; } } @@ -150,7 +154,7 @@ namespace svt { namespace table if ( m_nTipWindowHandle ) Help::UpdateTip( m_nTipWindowHandle, this, aControlScreenRect, sHelpText ); else - m_nTipWindowHandle = Help::ShowTip( this, aControlScreenRect, sHelpText ); + m_nTipWindowHandle = Help::ShowTip( this, aControlScreenRect, sHelpText, nHelpStyle ); } } else -- cgit From 7af54f5dfe1aa651cfec80727c18a83de6737762 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 14:20:49 +0100 Subject: gridsort: updateCell->updateCellData, setCellToolTip->updateCellToolTip; in both methods, have (Col,Row) params instead of (Row,Col), for consistency reasons --- offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index e593cc1a7c27..75b8944b8ef3 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -76,16 +76,16 @@ interface XMutableGridDataModel : XGridDataModel void removeAllRows(); /** updates the content of the given cell - @param RowIndex - the row index of the to-be-updated cell @param ColumnIndex the column index of the to-be-updated cell + @param RowIndex + the row index of the to-be-updated cell @param Value the new value of the cell. @throws ::com::sun::star::lang::IndexOutOfBoundsException if the row or column index is invalid */ - void updateCell( [in] long RowIndex, [in] long ColumnIndex, [in] any Value ) + void updateCellData( [in] long ColumnIndex, [in] long RowIndex, [in] any Value ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** updates the content of a given row. @@ -123,7 +123,7 @@ interface XMutableGridDataModel : XGridDataModel @see XGridDataModel::getCellToolTip */ - void setCellToolTip( [in] long RowIndex, [in] long ColumnIndex, [in] any Value ) + void updateCellToolTip( [in] long ColumnIndex, [in] long RowIndex, [in] any Value ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); //------------------------------------------------------------------------- -- cgit From d35c316d001426d263d9389f8f8df5e5839e1779 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 15:13:23 +0100 Subject: gridsort: XMutableGridData: renamed updateRow to updateRowData for consistency; introduced updateRowToolTip as shortcut for multiple updateCellToolTip calls --- .../source/controls/grid/defaultgriddatamodel.cxx | 40 ++++++++++++++++------ .../source/controls/grid/defaultgriddatamodel.hxx | 14 ++++---- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 693f86e187d9..d5cba70c8700 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -131,17 +131,26 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - DefaultGridDataModel::CellData& DefaultGridDataModel::impl_getCellDataAccess_throw( sal_Int32 const i_column, sal_Int32 const i_row ) + DefaultGridDataModel::RowData& DefaultGridDataModel::impl_getRowDataAccess_throw( sal_Int32 const i_rowIndex, size_t const i_requiredColumnCount ) { - if ( ( i_row < 0 ) || ( size_t( i_row ) >= m_aData.size() ) - || ( i_column < 0 ) || ( i_column >= m_nColumnCount ) - ) + OSL_ENSURE( i_requiredColumnCount <= size_t( m_nColumnCount ), "DefaultGridDataModel::impl_getRowDataAccess_throw: invalid column count!" ); + if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - RowData& rRowData( m_aData[ i_row ] ); - if ( size_t( i_column ) >= rRowData.size() ) - rRowData.resize( i_column + 1 ); - return rRowData[ i_column ]; + RowData& rRowData( m_aData[ i_rowIndex ] ); + if ( rRowData.size() < i_requiredColumnCount ) + rRowData.resize( i_requiredColumnCount ); + return rRowData; + } + + //------------------------------------------------------------------------------------------------------------------ + DefaultGridDataModel::CellData& DefaultGridDataModel::impl_getCellDataAccess_throw( sal_Int32 const i_columnIndex, sal_Int32 const i_rowIndex ) + { + if ( ( i_columnIndex < 0 ) || ( i_columnIndex >= m_nColumnCount ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + + RowData& rRowData( impl_getRowDataAccess_throw( i_rowIndex, size_t( i_columnIndex + 1 ) ) ); + return rRowData[ i_columnIndex ]; } //------------------------------------------------------------------------------------------------------------------ @@ -281,7 +290,7 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::updateCell( ::sal_Int32 i_rowIndex, ::sal_Int32 i_columnIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) + void SAL_CALL DefaultGridDataModel::updateCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); @@ -295,7 +304,7 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::updateRow( const Sequence< ::sal_Int32 >& i_columnIndexes, ::sal_Int32 i_rowIndex, const Sequence< Any >& i_values ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) + void SAL_CALL DefaultGridDataModel::updateRowData( const Sequence< ::sal_Int32 >& i_columnIndexes, ::sal_Int32 i_rowIndex, const Sequence< Any >& i_values ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); @@ -352,12 +361,21 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::setCellToolTip( ::sal_Int32 i_rowIndex, ::sal_Int32 i_columnIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) + void SAL_CALL DefaultGridDataModel::updateCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard( GetMutex() ); impl_getCellDataAccess_throw( i_columnIndex, i_rowIndex ).second = i_value; } + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL DefaultGridDataModel::updateRowToolTip( ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) + { + ::osl::MutexGuard aGuard( GetMutex() ); + RowData& rRowData = impl_getRowDataAccess_throw( i_rowIndex, m_nColumnCount ); + for ( RowData::iterator cell = rRowData.begin(); cell != rRowData.end(); ++cell ) + cell->second = i_value; + } + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< grid::XGridDataListener >& i_listener ) throw (RuntimeException) { diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index acfb777ef5b0..e67b5c937c95 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -66,10 +66,11 @@ public: virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& Titles, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeRow( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateCell( ::sal_Int32 RowIndex, ::sal_Int32 ColumnIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateRow( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateRowData( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setRowTitle( ::sal_Int32 RowIndex, const ::rtl::OUString& Title ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setCellToolTip( ::sal_Int32 RowIndex, ::sal_Int32 ColumnIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); @@ -106,10 +107,9 @@ private: void impl_addRow( Sequence< Any > const & i_rowData, sal_Int32 const i_assumedColCount = -1 ); - CellData const & - impl_getCellData_throw( sal_Int32 const i_column, sal_Int32 const i_row ) const; - CellData& - impl_getCellDataAccess_throw( sal_Int32 const i_column, sal_Int32 const i_row ); + CellData const & impl_getCellData_throw( sal_Int32 const i_columnIndex, sal_Int32 const i_rowIndex ) const; + CellData& impl_getCellDataAccess_throw( sal_Int32 const i_columnIndex, sal_Int32 const i_rowIndex ); + RowData& impl_getRowDataAccess_throw( sal_Int32 const i_rowIndex, size_t const i_requiredColumnCount ); GridData m_aData; ::std::vector< ::rtl::OUString > m_aRowHeaders; -- cgit From 43379fbdaea4c5a2d50495910126540584bc807e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 15:13:23 +0100 Subject: gridsort: XMutableGridData: renamed updateRow to updateRowData for consistency; introduced updateRowToolTip as shortcut for multiple updateCellToolTip calls --- offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index 75b8944b8ef3..8764fa705c7f 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -106,7 +106,7 @@ interface XMutableGridDataModel : XGridDataModel @throws ::com::sun::star::lang::IndexOutOfBoundsException if the lengths of the ColumnIndexes and Values sequences are not equal. */ - void updateRow( [in] sequence< long > ColumnIndexes, [in] long RowIndex, [in] sequence< any > Values ) + void updateRowData( [in] sequence< long > ColumnIndexes, [in] long RowIndex, [in] sequence< any > Values ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException , ::com::sun::star::lang::IllegalArgumentException); @@ -126,6 +126,17 @@ interface XMutableGridDataModel : XGridDataModel void updateCellToolTip( [in] long ColumnIndex, [in] long RowIndex, [in] any Value ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** updates the tooltip for all cells of a given row + +

          Effectively this method is a shortcut for calling updateCellToolTip multiple + times in a row, for all cells of a given row.

          + + @see XGridDataModel::getCellToolTip + @see updateCellToolTip + */ + void updateRowToolTip( [in] long RowIndex, [in] any Value ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + //------------------------------------------------------------------------- /** registers listener to be notified of data changes in the model -- cgit From 94e7f1d15d1e9eefadbfe8e5912fee0ebccba0ca Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 15 Jan 2011 22:08:33 +0100 Subject: locales34: #i116429# ensure shutdown of the CachedTextSearch global before the things it needs in its dtor are destructed; patch from --- unotools/inc/unotools/textsearch.hxx | 9 --------- unotools/source/i18n/textsearch.cxx | 37 ++++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/unotools/inc/unotools/textsearch.hxx b/unotools/inc/unotools/textsearch.hxx index e4cd095fcc14..800bf025d5a9 100644 --- a/unotools/inc/unotools/textsearch.hxx +++ b/unotools/inc/unotools/textsearch.hxx @@ -127,15 +127,6 @@ public: class UNOTOOLS_DLLPUBLIC TextSearch { - struct CachedTextSearch - { - ::osl::Mutex mutex; - ::com::sun::star::util::SearchOptions Options; - ::com::sun::star::uno::Reference< ::com::sun::star::util::XTextSearch > xTextSearch; - }; - - static CachedTextSearch maCache; - static ::com::sun::star::uno::Reference< ::com::sun::star::util::XTextSearch > getXTextSearch( const ::com::sun::star::util::SearchOptions& rPara ); diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx index 3f722adb0dba..1254ddc983d8 100644 --- a/unotools/source/i18n/textsearch.cxx +++ b/unotools/source/i18n/textsearch.cxx @@ -40,6 +40,7 @@ #include #include #include +#include using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; @@ -90,13 +91,6 @@ SearchParam::SearchParam( const SearchParam& rParam ) nTransliterationFlags = rParam.nTransliterationFlags; } -// Klasse zum Suchen eines Strings in einem Text. Es wird genau nach -// dem String gesucht. -// ( Die Unterscheidung der Gross/Klein-Schreibung kann mit einen Flag -// unterdrueckt werden ) - -TextSearch::CachedTextSearch TextSearch::maCache; - static bool lcl_Equals( const SearchOptions& rSO1, const SearchOptions& rSO2 ) { return rSO1.algorithmType == rSO2.algorithmType && @@ -112,27 +106,42 @@ static bool lcl_Equals( const SearchOptions& rSO1, const SearchOptions& rSO2 ) rSO1.transliterateFlags == rSO2.transliterateFlags; } +namespace +{ + struct CachedTextSearch + { + ::osl::Mutex mutex; + ::com::sun::star::util::SearchOptions Options; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XTextSearch > xTextSearch; + }; + + struct theCachedTextSearch + : public rtl::Static< CachedTextSearch, theCachedTextSearch > {}; +} + Reference TextSearch::getXTextSearch( const SearchOptions& rPara ) { - osl::MutexGuard aGuard(maCache.mutex); + CachedTextSearch &rCache = theCachedTextSearch::get(); + + osl::MutexGuard aGuard(rCache.mutex); - if ( lcl_Equals(maCache.Options, rPara) ) - return maCache.xTextSearch; + if ( lcl_Equals(rCache.Options, rPara) ) + return rCache.xTextSearch; try { Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - maCache.xTextSearch.set( xMSF->createInstance( + rCache.xTextSearch.set( xMSF->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.TextSearch" ) ) ), UNO_QUERY_THROW ); - maCache.xTextSearch->setOptions( rPara ); - maCache.Options = rPara; + rCache.xTextSearch->setOptions( rPara ); + rCache.Options = rPara; } catch ( Exception& ) { DBG_ERRORFILE( "TextSearch ctor: Exception caught!" ); } - return maCache.xTextSearch; + return rCache.xTextSearch; } TextSearch::TextSearch(const SearchParam & rParam, LanguageType eLang ) -- cgit From 9fc093617f4b2d7340a0130c8497dd3be4609c58 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 15 Jan 2011 23:15:40 +0100 Subject: locales34: #i113504# add Sorbian,Lower [dsb-DE] locale data; contributed by --- i18npool/source/localedata/data/dsb_DE.xml | 350 +++++++++++++++++++++ .../source/localedata/data/localedata_euro.map | 17 + i18npool/source/localedata/data/makefile.mk | 1 + i18npool/source/localedata/localedata.cxx | 1 + 4 files changed, 369 insertions(+) create mode 100644 i18npool/source/localedata/data/dsb_DE.xml diff --git a/i18npool/source/localedata/data/dsb_DE.xml b/i18npool/source/localedata/data/dsb_DE.xml new file mode 100644 index 000000000000..fe953ec807c1 --- /dev/null +++ b/i18npool/source/localedata/data/dsb_DE.xml @@ -0,0 +1,350 @@ + + + + + + dsb + Sorbian, Lower + + + DE + Germany + + + + + . +   + , + : + , + ; + , + . + + + + + + + + + + dopołdnja + wótpołdnja + metric + + + + Standard + + + 0 + + + 0,00 + + + # ##0 + + + # ##0,00 + + + # ###,00 + + + 0,00E+000 + + + 0,00E+00 + + + 0% + + + 0,00% + + + # ##0 [CURRENCY];-# ##0 [CURRENCY] + + + # ##0,00 [CURRENCY];-# ##0,00 [CURRENCY] + + + # ##0 [CURRENCY];[RED]-# ##0 [CURRENCY] + + + # ##0,00 [CURRENCY];[RED]-# ##0,00 [CURRENCY] + + + CCC# ##0,00 + + + # ##0,-- [CURRENCY];[RED]-# ##0,-- [CURRENCY] + + + D.MM.YY + + + NNNND. MMMM YYYY + + + DD.MM.YY + + + DD.MM.YYYY + + + D. MMM YY + + + D. MMM YYYY + + + D. MMM YYYY + + + D. MMMM YYYY + + + D. MMMM YY + + + NN, DD. MMM YY + + + NN, D. MMM YY + + + NN, D. MMMM YYYY + + + NNNND. MMMM YYYY + + + MM.DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + MM.YY + + + D. MMM + + + MMMM + + + QQ YY + + + WW + + + H:MM + + + H:MM:SS + + + H:MM AM/PM + + + H:MM:SS AM/PM + + + [H]:MM:SS + + + MM:SS,00 + + + [H]:MM:SS,00 + + + DD.MM.YY H:MM + + + DD.MM.YYYY H:MM:SS AM/PM + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + A-C Č Ć D E Ě F-H {Ch} I-K Ł L-N Ń O Ó P-R Ŕ S Š Ś T-Z Ž Ź + 0 + 1 + 2 + bok + boki + + + + + + sun + nje. + njeźela + + + mon + pón. + pónjeźela + + + tue + wał. + wałtora + + + wed + srj. + srjoda + + + thu + stw. + stwórtk + + + fri + pět. + pětk + + + sat + sob. + sobota + + + + + jan + jan. + januar + + + feb + feb. + februar + + + mar + měr. + měrc + + + apr + apr. + apryl + + + may + maj + maj + + + jun + jun. + junij + + + jul + jul. + julij + + + aug + awg. + awgust + + + sep + sep. + september + + + oct + okt. + oktober + + + nov + now. + nowember + + + dec + dec. + december + + + + + bc + pś. Kr. + pśed Kristusom + + + ad + pó Kr. + pó Kristusu + + + + mon + + 4 + + + + + EUR + + EUR + euro + 2 + + + + + + + + + + wěrno + njewěrno + prědny kwartal + drugi kwartal + tśeśi kwartal + stwórty kwartal + nad + pód + K1 + K2 + K3 + K4 + + + + + + diff --git a/i18npool/source/localedata/data/localedata_euro.map b/i18npool/source/localedata/data/localedata_euro.map index e0564b85ea25..b9dd20c724d7 100644 --- a/i18npool/source/localedata/data/localedata_euro.map +++ b/i18npool/source/localedata/data/localedata_euro.map @@ -16,6 +16,7 @@ getAllCalendars_de_CH; getAllCalendars_de_DE; getAllCalendars_de_LI; getAllCalendars_de_LU; +getAllCalendars_dsb_DE; getAllCalendars_el_GR; getAllCalendars_et_EE; getAllCalendars_eu; @@ -86,6 +87,7 @@ getAllCurrencies_de_CH; getAllCurrencies_de_DE; getAllCurrencies_de_LI; getAllCurrencies_de_LU; +getAllCurrencies_dsb_DE; getAllCurrencies_el_GR; getAllCurrencies_et_EE; getAllCurrencies_eu; @@ -156,6 +158,7 @@ getAllFormats0_de_CH; getAllFormats0_de_DE; getAllFormats0_de_LI; getAllFormats0_de_LU; +getAllFormats0_dsb_DE; getAllFormats0_el_GR; getAllFormats0_et_EE; getAllFormats0_eu; @@ -226,6 +229,7 @@ getBreakIteratorRules_de_CH; getBreakIteratorRules_de_DE; getBreakIteratorRules_de_LI; getBreakIteratorRules_de_LU; +getBreakIteratorRules_dsb_DE; getBreakIteratorRules_el_GR; getBreakIteratorRules_et_EE; getBreakIteratorRules_eu; @@ -296,6 +300,7 @@ getCollationOptions_de_CH; getCollationOptions_de_DE; getCollationOptions_de_LI; getCollationOptions_de_LU; +getCollationOptions_dsb_DE; getCollationOptions_el_GR; getCollationOptions_et_EE; getCollationOptions_eu; @@ -366,6 +371,7 @@ getCollatorImplementation_de_CH; getCollatorImplementation_de_DE; getCollatorImplementation_de_LI; getCollatorImplementation_de_LU; +getCollatorImplementation_dsb_DE; getCollatorImplementation_el_GR; getCollatorImplementation_et_EE; getCollatorImplementation_eu; @@ -436,6 +442,7 @@ getContinuousNumberingLevels_de_CH; getContinuousNumberingLevels_de_DE; getContinuousNumberingLevels_de_LI; getContinuousNumberingLevels_de_LU; +getContinuousNumberingLevels_dsb_DE; getContinuousNumberingLevels_el_GR; getContinuousNumberingLevels_et_EE; getContinuousNumberingLevels_eu; @@ -506,6 +513,7 @@ getFollowPageWords_de_CH; getFollowPageWords_de_DE; getFollowPageWords_de_LI; getFollowPageWords_de_LU; +getFollowPageWords_dsb_DE; getFollowPageWords_el_GR; getFollowPageWords_et_EE; getFollowPageWords_eu; @@ -576,6 +584,7 @@ getForbiddenCharacters_de_CH; getForbiddenCharacters_de_DE; getForbiddenCharacters_de_LI; getForbiddenCharacters_de_LU; +getForbiddenCharacters_dsb_DE; getForbiddenCharacters_el_GR; getForbiddenCharacters_et_EE; getForbiddenCharacters_eu; @@ -646,6 +655,7 @@ getIndexAlgorithm_de_CH; getIndexAlgorithm_de_DE; getIndexAlgorithm_de_LI; getIndexAlgorithm_de_LU; +getIndexAlgorithm_dsb_DE; getIndexAlgorithm_el_GR; getIndexAlgorithm_et_EE; getIndexAlgorithm_eu; @@ -716,6 +726,7 @@ getLCInfo_de_CH; getLCInfo_de_DE; getLCInfo_de_LI; getLCInfo_de_LU; +getLCInfo_dsb_DE; getLCInfo_el_GR; getLCInfo_et_EE; getLCInfo_eu; @@ -786,6 +797,7 @@ getLocaleItem_de_CH; getLocaleItem_de_DE; getLocaleItem_de_LI; getLocaleItem_de_LU; +getLocaleItem_dsb_DE; getLocaleItem_el_GR; getLocaleItem_et_EE; getLocaleItem_eu; @@ -856,6 +868,7 @@ getOutlineNumberingLevels_de_CH; getOutlineNumberingLevels_de_DE; getOutlineNumberingLevels_de_LI; getOutlineNumberingLevels_de_LU; +getOutlineNumberingLevels_dsb_DE; getOutlineNumberingLevels_el_GR; getOutlineNumberingLevels_et_EE; getOutlineNumberingLevels_eu; @@ -926,6 +939,7 @@ getReservedWords_de_CH; getReservedWords_de_DE; getReservedWords_de_LI; getReservedWords_de_LU; +getReservedWords_dsb_DE; getReservedWords_el_GR; getReservedWords_et_EE; getReservedWords_eu; @@ -996,6 +1010,7 @@ getSearchOptions_de_CH; getSearchOptions_de_DE; getSearchOptions_de_LI; getSearchOptions_de_LU; +getSearchOptions_dsb_DE; getSearchOptions_el_GR; getSearchOptions_et_EE; getSearchOptions_eu; @@ -1066,6 +1081,7 @@ getTransliterations_de_CH; getTransliterations_de_DE; getTransliterations_de_LI; getTransliterations_de_LU; +getTransliterations_dsb_DE; getTransliterations_el_GR; getTransliterations_et_EE; getTransliterations_eu; @@ -1136,6 +1152,7 @@ getUnicodeScripts_de_CH; getUnicodeScripts_de_DE; getUnicodeScripts_de_LI; getUnicodeScripts_de_LU; +getUnicodeScripts_dsb_DE; getUnicodeScripts_el_GR; getUnicodeScripts_et_EE; getUnicodeScripts_eu; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index 1034de7f11bf..23dc4d44a9fd 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -167,6 +167,7 @@ SHL3OBJS= \ $(SLO)$/localedata_de_DE.obj \ $(SLO)$/localedata_de_LI.obj \ $(SLO)$/localedata_de_LU.obj \ + $(SLO)$/localedata_dsb_DE.obj \ $(SLO)$/localedata_el_GR.obj \ $(SLO)$/localedata_et_EE.obj \ $(SLO)$/localedata_eu.obj \ diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 34f4f6bbb520..b668cfb8d751 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -169,6 +169,7 @@ static const struct { { "ast_ES", lcl_DATA_EURO }, { "ltg_LV", lcl_DATA_EURO }, { "hsb_DE", lcl_DATA_EURO }, + { "dsb_DE", lcl_DATA_EURO }, { "rue_SK", lcl_DATA_EURO }, { "ja_JP", lcl_DATA_OTHERS }, -- cgit From 89b55ff550abcefa477a8175986250469f2050a5 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 15 Jan 2011 23:23:13 +0100 Subject: locales34: removed leading zero from 042E, as the number formatter generated yet another set of currency formats --- i18npool/source/localedata/data/hsb_DE.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18npool/source/localedata/data/hsb_DE.xml b/i18npool/source/localedata/data/hsb_DE.xml index 6513dad5f57e..1e4c70a26fd3 100644 --- a/i18npool/source/localedata/data/hsb_DE.xml +++ b/i18npool/source/localedata/data/hsb_DE.xml @@ -34,7 +34,7 @@ popołdnju metric - + Standard -- cgit From 0f3d6394017700f441a7be18acce08dba5e08db0 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 16 Jan 2011 00:25:19 +0100 Subject: locales34: #i113937# added Yiddish_USA [yi-US] locale data; contributed by --- i18npool/inc/i18npool/lang.h | 1 + i18npool/source/isolang/isolang.cxx | 1 + i18npool/source/isolang/mslangid.cxx | 1 + .../source/localedata/data/localedata_others.map | 17 +++ i18npool/source/localedata/data/makefile.mk | 1 + i18npool/source/localedata/data/yi_US.xml | 163 +++++++++++++++++++++ i18npool/source/localedata/localedata.cxx | 1 + svtools/source/misc/langtab.src | 3 +- 8 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 i18npool/source/localedata/data/yi_US.xml diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index 52e4e51d7a41..717facd02502 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -515,6 +515,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_GIKUYU 0x0655 #define LANGUAGE_USER_RUSYN_UKRAINE 0x0656 #define LANGUAGE_USER_RUSYN_SLOVAKIA 0x8256 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_USER_RUSYN_UKRAINE)) */ +#define LANGUAGE_USER_YIDDISH_US 0x083D /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_YIDDISH)) */ #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 357be80a69ea..35d2ba63f549 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -353,6 +353,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_PAPIAMENTU, "pap", "AN" }, { LANGUAGE_USER_PAPIAMENTU_ARUBA, "pap", "AW" }, { LANGUAGE_ENGLISH_SINGAPORE, "en", "SG" }, + { LANGUAGE_USER_YIDDISH_US, "yi", "US" }, { LANGUAGE_YIDDISH, "yi", "IL" }, // new: old was "ji" { LANGUAGE_YIDDISH, "ji", "IL" }, // old: new is "yi" { LANGUAGE_SYRIAC, "syr", "TR" }, // "TR" according to http://www.ethnologue.com/show_language.asp?code=SYC diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index a03d24e6fcdb..36cdddbdd27f 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -339,6 +339,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) case LANGUAGE_FARSI: case LANGUAGE_HEBREW: case LANGUAGE_YIDDISH: + case LANGUAGE_USER_YIDDISH_US: case LANGUAGE_MARATHI: case LANGUAGE_PUNJABI: case LANGUAGE_GUJARATI: diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index e5de10cb68e5..d278095e4bc9 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -72,6 +72,7 @@ getAllCalendars_uz_UZ; getAllCalendars_ve_ZA; getAllCalendars_vi_VN; getAllCalendars_xh_ZA; +getAllCalendars_yi_US; getAllCalendars_zh_CN; getAllCalendars_zh_HK; getAllCalendars_zh_MO; @@ -150,6 +151,7 @@ getAllCurrencies_uz_UZ; getAllCurrencies_ve_ZA; getAllCurrencies_vi_VN; getAllCurrencies_xh_ZA; +getAllCurrencies_yi_US; getAllCurrencies_zh_CN; getAllCurrencies_zh_HK; getAllCurrencies_zh_MO; @@ -228,6 +230,7 @@ getAllFormats0_uz_UZ; getAllFormats0_ve_ZA; getAllFormats0_vi_VN; getAllFormats0_xh_ZA; +getAllFormats0_yi_US; getAllFormats0_zh_CN; getAllFormats0_zh_HK; getAllFormats0_zh_MO; @@ -306,6 +309,7 @@ getBreakIteratorRules_uz_UZ; getBreakIteratorRules_ve_ZA; getBreakIteratorRules_vi_VN; getBreakIteratorRules_xh_ZA; +getBreakIteratorRules_yi_US; getBreakIteratorRules_zh_CN; getBreakIteratorRules_zh_HK; getBreakIteratorRules_zh_MO; @@ -384,6 +388,7 @@ getCollationOptions_uz_UZ; getCollationOptions_ve_ZA; getCollationOptions_vi_VN; getCollationOptions_xh_ZA; +getCollationOptions_yi_US; getCollationOptions_zh_CN; getCollationOptions_zh_HK; getCollationOptions_zh_MO; @@ -462,6 +467,7 @@ getCollatorImplementation_uz_UZ; getCollatorImplementation_ve_ZA; getCollatorImplementation_vi_VN; getCollatorImplementation_xh_ZA; +getCollatorImplementation_yi_US; getCollatorImplementation_zh_CN; getCollatorImplementation_zh_HK; getCollatorImplementation_zh_MO; @@ -540,6 +546,7 @@ getContinuousNumberingLevels_uz_UZ; getContinuousNumberingLevels_ve_ZA; getContinuousNumberingLevels_vi_VN; getContinuousNumberingLevels_xh_ZA; +getContinuousNumberingLevels_yi_US; getContinuousNumberingLevels_zh_CN; getContinuousNumberingLevels_zh_HK; getContinuousNumberingLevels_zh_MO; @@ -618,6 +625,7 @@ getFollowPageWords_uz_UZ; getFollowPageWords_ve_ZA; getFollowPageWords_vi_VN; getFollowPageWords_xh_ZA; +getFollowPageWords_yi_US; getFollowPageWords_zh_CN; getFollowPageWords_zh_HK; getFollowPageWords_zh_MO; @@ -696,6 +704,7 @@ getForbiddenCharacters_uz_UZ; getForbiddenCharacters_ve_ZA; getForbiddenCharacters_vi_VN; getForbiddenCharacters_xh_ZA; +getForbiddenCharacters_yi_US; getForbiddenCharacters_zh_CN; getForbiddenCharacters_zh_HK; getForbiddenCharacters_zh_MO; @@ -774,6 +783,7 @@ getIndexAlgorithm_uz_UZ; getIndexAlgorithm_ve_ZA; getIndexAlgorithm_vi_VN; getIndexAlgorithm_xh_ZA; +getIndexAlgorithm_yi_US; getIndexAlgorithm_zh_CN; getIndexAlgorithm_zh_HK; getIndexAlgorithm_zh_MO; @@ -852,6 +862,7 @@ getLCInfo_uz_UZ; getLCInfo_ve_ZA; getLCInfo_vi_VN; getLCInfo_xh_ZA; +getLCInfo_yi_US; getLCInfo_zh_CN; getLCInfo_zh_HK; getLCInfo_zh_MO; @@ -930,6 +941,7 @@ getLocaleItem_uz_UZ; getLocaleItem_ve_ZA; getLocaleItem_vi_VN; getLocaleItem_xh_ZA; +getLocaleItem_yi_US; getLocaleItem_zh_CN; getLocaleItem_zh_HK; getLocaleItem_zh_MO; @@ -1008,6 +1020,7 @@ getOutlineNumberingLevels_uz_UZ; getOutlineNumberingLevels_ve_ZA; getOutlineNumberingLevels_vi_VN; getOutlineNumberingLevels_xh_ZA; +getOutlineNumberingLevels_yi_US; getOutlineNumberingLevels_zh_CN; getOutlineNumberingLevels_zh_HK; getOutlineNumberingLevels_zh_MO; @@ -1086,6 +1099,7 @@ getReservedWords_uz_UZ; getReservedWords_ve_ZA; getReservedWords_vi_VN; getReservedWords_xh_ZA; +getReservedWords_yi_US; getReservedWords_zh_CN; getReservedWords_zh_HK; getReservedWords_zh_MO; @@ -1164,6 +1178,7 @@ getSearchOptions_uz_UZ; getSearchOptions_ve_ZA; getSearchOptions_vi_VN; getSearchOptions_xh_ZA; +getSearchOptions_yi_US; getSearchOptions_zh_CN; getSearchOptions_zh_HK; getSearchOptions_zh_MO; @@ -1242,6 +1257,7 @@ getTransliterations_uz_UZ; getTransliterations_ve_ZA; getTransliterations_vi_VN; getTransliterations_xh_ZA; +getTransliterations_yi_US; getTransliterations_zh_CN; getTransliterations_zh_HK; getTransliterations_zh_MO; @@ -1320,6 +1336,7 @@ getUnicodeScripts_uz_UZ; getUnicodeScripts_ve_ZA; getUnicodeScripts_vi_VN; getUnicodeScripts_xh_ZA; +getUnicodeScripts_yi_US; getUnicodeScripts_zh_CN; getUnicodeScripts_zh_HK; getUnicodeScripts_zh_MO; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index 23dc4d44a9fd..13979b343226 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -313,6 +313,7 @@ SHL4OBJS= \ $(SLO)$/localedata_ve_ZA.obj \ $(SLO)$/localedata_vi_VN.obj \ $(SLO)$/localedata_xh_ZA.obj \ + $(SLO)$/localedata_yi_US.obj \ $(SLO)$/localedata_zh_CN.obj \ $(SLO)$/localedata_zh_HK.obj \ $(SLO)$/localedata_zh_MO.obj \ diff --git a/i18npool/source/localedata/data/yi_US.xml b/i18npool/source/localedata/data/yi_US.xml new file mode 100644 index 000000000000..cf52c1ae1fdf --- /dev/null +++ b/i18npool/source/localedata/data/yi_US.xml @@ -0,0 +1,163 @@ + + + + + + yi + Yiddish + + + US + United States + + + + + + + + א-י כ ל מ נ ס ע פ צ-ת + 10 + ז“ + ז“ + + + + + + sun + זונ' + זונטיק + + + mon + מאָנ' + מאָנטיק + + + tue + דינ' + דינסטיק + + + wed + מיט' + מיטװאָך + + + thu + דאָנ' + דאָנערשטיק + + + fri + פֿרײַ' + פֿרײַטיק + + + sat + שבת + שבת + + + + + jan + יאַנ + יאַנואַר + + + feb + פֿעב + פֿעברואַר + + + mar + מאַר + מאַרץ + + + apr + אַפּר + אַפּריל + + + may + מײַ + מײַ + + + jun + יונ + יוני + + + jul + יול + יולי + + + aug + אױג + אױגוסט + + + sep + סעפּ + סעפּטעמבער + + + oct + אָקט + אָקטאָבער + + + nov + נאָװ + נאָװעמבער + + + dec + דעצ + דעצעמבער + + + + + bc + פֿ"ק + פֿ"ק + + + ad + אצ“ר + אצ“ר + + + + sun + + 1 + + + + + + + אמת + פֿאַלש + ערשט יאָרפֿערטל + צװײט יאָרפֿערטל + דריט יאָרפֿערטל + פֿערט יאָרפֿערטל + אױבן + אונטן + י“פֿ1 + י“פֿ2 + י“פֿ3 + י“פֿ4 + + + + + diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index b668cfb8d751..6ef2c495d5ce 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -252,6 +252,7 @@ static const struct { { "om_ET", lcl_DATA_OTHERS }, { "plt_MG", lcl_DATA_OTHERS }, { "mai_IN", lcl_DATA_OTHERS }, + { "yi_US", lcl_DATA_OTHERS } }; static const sal_Unicode under = sal_Unicode('_'); diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 067eb601a5af..493502b5da1b 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -301,7 +301,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Shuswap" ; LANGUAGE_USER_SHUSWAP ; > ; < "Oromo" ; LANGUAGE_OROMO ; > ; < "Greek, Ancient" ; LANGUAGE_USER_ANCIENT_GREEK ; > ; - < "Yiddish" ; LANGUAGE_YIDDISH ; > ; + < "Yiddish (Israel)" ; LANGUAGE_YIDDISH ; > ; < "Quechua (Ecuador)" ; LANGUAGE_QUECHUA_ECUADOR ; > ; < "Uyghur" ; LANGUAGE_UIGHUR_CHINA ; > ; < "Asturian" ; LANGUAGE_USER_ASTURIAN ; > ; @@ -323,6 +323,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Yoruba" ; LANGUAGE_YORUBA ; > ; < "Rusyn (Ukraine)" ; LANGUAGE_USER_RUSYN_UKRAINE ; > ; < "Rusyn (Slovakia)" ; LANGUAGE_USER_RUSYN_SLOVAKIA ; > ; + < "Yiddish (USA)" ; LANGUAGE_USER_YIDDISH_US ; > ; }; }; -- cgit From 7ceae11c48100014251861393679ce5cd5de6239 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 16 Jan 2011 02:12:27 +0100 Subject: locales34: more checks on quotation marks --- i18npool/source/localedata/LocaleNode.cxx | 77 +++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 9 deletions(-) diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 7a520047637d..275fdf006d9f 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -160,9 +160,11 @@ LocaleNode* LocaleNode::createNode (const OUString& name, const Reference< XAttr // printf(" name: '%s'\n", p->getName().pData->buffer ); // printf("value: '%s'\n", p->getValue().pData->buffer ); +#define OSTR(s) (OUStringToOString( (s), RTL_TEXTENCODING_UTF8).getStr()) + void print_OUString( const OUString& s ) { - printf( "%s", OUStringToOString( s, RTL_TEXTENCODING_UTF8).getStr()); + printf( "%s", OSTR(s)); } bool is_empty( const OUString& s ) @@ -266,16 +268,16 @@ void LocaleNode :: generateCode (const OFileWriter &of) const fprintf( stderr, "Error: less than %ld character%s (%ld) in %s '%s'.\n", sal::static_int_cast< long >(nMinLen), (nMinLen > 1 ? "s" : ""), sal::static_int_cast< long >(nLen), - (pNode ? OUStringToOString( pNode->getName(), RTL_TEXTENCODING_UTF8).getStr() : ""), - OUStringToOString( aVal, RTL_TEXTENCODING_UTF8).getStr()); + (pNode ? OSTR( pNode->getName()) : ""), + OSTR( aVal)); } else if (nLen > nMaxLen && nMaxLen >= 0) fprintf( stderr, "Warning: more than %ld character%s (%ld) in %s %s not supported by application.\n", sal::static_int_cast< long >(nMaxLen), (nMaxLen > 1 ? "s" : ""), sal::static_int_cast< long >(nLen), - (pNode ? OUStringToOString( pNode->getName(), RTL_TEXTENCODING_UTF8).getStr() : ""), - OUStringToOString( aVal, RTL_TEXTENCODING_UTF8).getStr()); + (pNode ? OSTR( pNode->getName()) : ""), + OSTR( aVal)); return aVal; } @@ -306,7 +308,7 @@ void LocaleNode::incError( const char* pStr ) const void LocaleNode::incError( const ::rtl::OUString& rStr ) const { - incError( OUStringToOString( rStr, RTL_TEXTENCODING_UTF8).getStr()); + incError( OSTR( rStr)); } char* LocaleNode::prepareErrorFormat( const char* pFormat, const char* pDefaultConversion ) const @@ -332,8 +334,7 @@ void LocaleNode::incErrorInt( const char* pStr, int nVal ) const void LocaleNode::incErrorStr( const char* pStr, const ::rtl::OUString& rVal ) const { ++nError; - fprintf( stderr, prepareErrorFormat( pStr, ": %s"), OUStringToOString( - rVal, RTL_TEXTENCODING_UTF8).getStr()); + fprintf( stderr, prepareErrorFormat( pStr, ": %s"), OSTR( rVal)); } void LCInfoNode::generateCode (const OFileWriter &of) const @@ -501,6 +502,64 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const if (aQuoteEnd == aDoubleQuoteEnd) fprintf( stderr, "Warning: %s\n", "QuotationEnd equals DoubleQuotationEnd. Not necessarily an error, but unusual."); + // Known good values, exclude ASCII single (U+0027, ') and double (U+0022, ") quotes. + int ic; + switch (ic = aQuoteStart.toChar()) + { + case 0x2018: // LEFT SINGLE QUOTATION MARK + case 0x201a: // SINGLE LOW-9 QUOTATION MARK + case 0x201b: // SINGLE HIGH-REVERSED-9 QUOTATION MARK + case 0x2039: // SINGLE LEFT-POINTING ANGLE QUOTATION MARK + case 0x203a: // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + case 0x300c: // LEFT CORNER BRACKET (Chinese) + ; + break; + default: + fprintf( stderr, "Warning: %s U+%04X %s\n", + "QuotationStart may be wrong:", ic, OSTR( aQuoteStart)); + } + switch (ic = aQuoteEnd.toChar()) + { + case 0x2019: // RIGHT SINGLE QUOTATION MARK + case 0x201a: // SINGLE LOW-9 QUOTATION MARK + case 0x201b: // SINGLE HIGH-REVERSED-9 QUOTATION MARK + case 0x2039: // SINGLE LEFT-POINTING ANGLE QUOTATION MARK + case 0x203a: // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + case 0x300d: // RIGHT CORNER BRACKET (Chinese) + ; + break; + default: + fprintf( stderr, "Warning: %s U+%04X %s\n", + "QuotationEnd may be wrong:", ic, OSTR( aQuoteEnd)); + } + switch (ic = aDoubleQuoteStart.toChar()) + { + case 0x00ab: // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + case 0x00bb: // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + case 0x201c: // LEFT DOUBLE QUOTATION MARK + case 0x201e: // DOUBLE LOW-9 QUOTATION MARK + case 0x201f: // DOUBLE HIGH-REVERSED-9 QUOTATION MARK + case 0x300e: // LEFT WHITE CORNER BRACKET (Chinese) + ; + break; + default: + fprintf( stderr, "Warning: %s U+%04X %s\n", + "DoubleQuotationStart may be wrong:", ic, OSTR( aDoubleQuoteStart)); + } + switch (ic = aDoubleQuoteEnd.toChar()) + { + case 0x00ab: // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + case 0x00bb: // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + case 0x201d: // RIGHT DOUBLE QUOTATION MARK + case 0x201e: // DOUBLE LOW-9 QUOTATION MARK + case 0x201f: // DOUBLE HIGH-REVERSED-9 QUOTATION MARK + case 0x300f: // RIGHT WHITE CORNER BRACKET (Chinese) + ; + break; + default: + fprintf( stderr, "Warning: %s U+%04X %s\n", + "DoubleQuotationEnd may be wrong:", ic, OSTR( aDoubleQuoteEnd)); + } writeParameterCheckLen( of, "TimeAM", "timeAM", 1, -1); writeParameterCheckLen( of, "TimePM", "timePM", 1, -1); @@ -640,7 +699,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const fprintf( stderr, "Warning: Can't check separators used in FormatCode due to LC_CTYPE ref=\"%s\".\n" "If these two locales use identical format codes, you should consider to use the ref= mechanism also for the LC_FORMAT element, together with replaceFrom= and replaceTo= for the currency.\n", - OUStringToOString( aRef, RTL_TEXTENCODING_UTF8).getStr()); + OSTR( aRef)); bCtypeIsRef = true; pCtype = 0; } -- cgit From 4fe4d999103c9d0c8dafd785d4a77ff6aa95d555 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 16 Jan 2011 19:21:42 +0100 Subject: locales34: #i116240# added Hawaiian [haw-US] locale data; contributed by via it46 localegen --- i18npool/source/localedata/data/haw_US.xml | 358 +++++++++++++++++++++ .../source/localedata/data/localedata_others.map | 19 +- i18npool/source/localedata/data/makefile.mk | 1 + i18npool/source/localedata/localedata.cxx | 3 +- svtools/source/misc/langtab.src | 1 + 5 files changed, 380 insertions(+), 2 deletions(-) create mode 100644 i18npool/source/localedata/data/haw_US.xml diff --git a/i18npool/source/localedata/data/haw_US.xml b/i18npool/source/localedata/data/haw_US.xml new file mode 100644 index 000000000000..b9fd553e24ef --- /dev/null +++ b/i18npool/source/localedata/data/haw_US.xml @@ -0,0 +1,358 @@ + + + + + + haw + Hawaiian + + + US + United States + + + + + / + , + . + : + . + ; + , + + + + + + + + + + + AM + PM + metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+00 + + + 0.00E+000 + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;([CURRENCY]#,##0) + + + [CURRENCY]#,##0.00;([CURRENCY]#,##0.00) + + + [CURRENCY]#,##0;[RED]([CURRENCY]#,##0) + + + [CURRENCY]#,##0.00;[RED]([CURRENCY]#,##0.00) + + + CCC#,##0.00 + + + [CURRENCY]#,##0.--;[RED]([CURRENCY]#,##0.--) + + + YY/MM/DD + + + NNNNDD MMMM YYYY + + + YY/MM/DD + + + YYYY/MM/DD + + + D MMM YY + + + D MMM YYYY + + + D MMM YYYY + + + D MMMM YYYY + + + D MMMM YYYY + + + NN, DD/MMM/YY + + + NN, D MMM YY + + + NN, D MMMM YYYY + + + NNNND MMMM YYYY + + + MM/DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + YY/MM + + + MMM/DD + + + MMMM + + + QQ YY + + + WW + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + YY/MM/DD HH:MM + + + YYYY/MM/DD HH:MM:SS AM/PM + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + A E I O U H K L M N P W + 0 + 1 + p. + pp. + + + + + + sun + LP + Lāpule + + + mon + P1 + Poʻakahi + + + tue + P2 + Poʻalua + + + wed + P3 + Poʻakolu + + + thu + P4 + Poʻahā + + + fri + P5 + Poʻalima + + + sat + P6 + Poʻaono + + + + + jan + Ian. + Ianuali + + + feb + Pep. + Pepeluali + + + mar + Mal. + Malaki + + + apr + ʻAp. + ʻApelila + + + may + Mei + Mei + + + jun + Iun. + Iune + + + jul + Iul. + Iulai + + + aug + ʻAuk. + ʻAukake + + + sep + Kep. + Kepakemapa + + + oct + ʻOk. + ʻOkakopa + + + nov + Now. + Nowemapa + + + dec + Kek. + Kekemapa + + + + + bc + BC + BC + + + ad + CE + CE + + + + mon + + 1 + + + + + USD + $ + USD + Kālā ʻAmelika + 2 + + + + + + + + + + ʻOiaʻiʻo + Hewa + Kau Hapahā 1 + Kau Hapaha 2 + Kau Hapahā 3 + Kau Hapahā 4 + Luna + Lalo + KH1 + KH2 + KH3 + KH4 + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index d278095e4bc9..e194b38cbf07 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -1,5 +1,6 @@ UDK_3_0_0 { global: +GetVersionInfo; getAllCalendars_af_NA; getAllCalendars_af_ZA; getAllCalendars_ak_GH; @@ -21,6 +22,7 @@ getAllCalendars_fa_IR; getAllCalendars_gug_PY; getAllCalendars_gu_IN; getAllCalendars_ha_GH; +getAllCalendars_haw_US; getAllCalendars_he_IL; getAllCalendars_hi_IN; getAllCalendars_hil_PH; @@ -100,6 +102,7 @@ getAllCurrencies_fa_IR; getAllCurrencies_gug_PY; getAllCurrencies_gu_IN; getAllCurrencies_ha_GH; +getAllCurrencies_haw_US; getAllCurrencies_he_IL; getAllCurrencies_hi_IN; getAllCurrencies_hil_PH; @@ -179,6 +182,7 @@ getAllFormats0_fa_IR; getAllFormats0_gug_PY; getAllFormats0_gu_IN; getAllFormats0_ha_GH; +getAllFormats0_haw_US; getAllFormats0_he_IL; getAllFormats0_hi_IN; getAllFormats0_hil_PH; @@ -258,6 +262,7 @@ getBreakIteratorRules_fa_IR; getBreakIteratorRules_gug_PY; getBreakIteratorRules_gu_IN; getBreakIteratorRules_ha_GH; +getBreakIteratorRules_haw_US; getBreakIteratorRules_he_IL; getBreakIteratorRules_hi_IN; getBreakIteratorRules_hil_PH; @@ -337,6 +342,7 @@ getCollationOptions_fa_IR; getCollationOptions_gug_PY; getCollationOptions_gu_IN; getCollationOptions_ha_GH; +getCollationOptions_haw_US; getCollationOptions_he_IL; getCollationOptions_hi_IN; getCollationOptions_hil_PH; @@ -416,6 +422,7 @@ getCollatorImplementation_fa_IR; getCollatorImplementation_gug_PY; getCollatorImplementation_gu_IN; getCollatorImplementation_ha_GH; +getCollatorImplementation_haw_US; getCollatorImplementation_he_IL; getCollatorImplementation_hi_IN; getCollatorImplementation_hil_PH; @@ -495,6 +502,7 @@ getContinuousNumberingLevels_fa_IR; getContinuousNumberingLevels_gug_PY; getContinuousNumberingLevels_gu_IN; getContinuousNumberingLevels_ha_GH; +getContinuousNumberingLevels_haw_US; getContinuousNumberingLevels_he_IL; getContinuousNumberingLevels_hi_IN; getContinuousNumberingLevels_hil_PH; @@ -574,6 +582,7 @@ getFollowPageWords_fa_IR; getFollowPageWords_gug_PY; getFollowPageWords_gu_IN; getFollowPageWords_ha_GH; +getFollowPageWords_haw_US; getFollowPageWords_he_IL; getFollowPageWords_hi_IN; getFollowPageWords_hil_PH; @@ -653,6 +662,7 @@ getForbiddenCharacters_fa_IR; getForbiddenCharacters_gug_PY; getForbiddenCharacters_gu_IN; getForbiddenCharacters_ha_GH; +getForbiddenCharacters_haw_US; getForbiddenCharacters_he_IL; getForbiddenCharacters_hi_IN; getForbiddenCharacters_hil_PH; @@ -732,6 +742,7 @@ getIndexAlgorithm_fa_IR; getIndexAlgorithm_gug_PY; getIndexAlgorithm_gu_IN; getIndexAlgorithm_ha_GH; +getIndexAlgorithm_haw_US; getIndexAlgorithm_he_IL; getIndexAlgorithm_hi_IN; getIndexAlgorithm_hil_PH; @@ -811,6 +822,7 @@ getLCInfo_fa_IR; getLCInfo_gug_PY; getLCInfo_gu_IN; getLCInfo_ha_GH; +getLCInfo_haw_US; getLCInfo_he_IL; getLCInfo_hi_IN; getLCInfo_hil_PH; @@ -890,6 +902,7 @@ getLocaleItem_fa_IR; getLocaleItem_gug_PY; getLocaleItem_gu_IN; getLocaleItem_ha_GH; +getLocaleItem_haw_US; getLocaleItem_he_IL; getLocaleItem_hi_IN; getLocaleItem_hil_PH; @@ -969,6 +982,7 @@ getOutlineNumberingLevels_fa_IR; getOutlineNumberingLevels_gug_PY; getOutlineNumberingLevels_gu_IN; getOutlineNumberingLevels_ha_GH; +getOutlineNumberingLevels_haw_US; getOutlineNumberingLevels_he_IL; getOutlineNumberingLevels_hi_IN; getOutlineNumberingLevels_hil_PH; @@ -1048,6 +1062,7 @@ getReservedWords_fa_IR; getReservedWords_gug_PY; getReservedWords_gu_IN; getReservedWords_ha_GH; +getReservedWords_haw_US; getReservedWords_he_IL; getReservedWords_hi_IN; getReservedWords_hil_PH; @@ -1127,6 +1142,7 @@ getSearchOptions_fa_IR; getSearchOptions_gug_PY; getSearchOptions_gu_IN; getSearchOptions_ha_GH; +getSearchOptions_haw_US; getSearchOptions_he_IL; getSearchOptions_hi_IN; getSearchOptions_hil_PH; @@ -1206,6 +1222,7 @@ getTransliterations_fa_IR; getTransliterations_gug_PY; getTransliterations_gu_IN; getTransliterations_ha_GH; +getTransliterations_haw_US; getTransliterations_he_IL; getTransliterations_hi_IN; getTransliterations_hil_PH; @@ -1285,6 +1302,7 @@ getUnicodeScripts_fa_IR; getUnicodeScripts_gug_PY; getUnicodeScripts_gu_IN; getUnicodeScripts_ha_GH; +getUnicodeScripts_haw_US; getUnicodeScripts_he_IL; getUnicodeScripts_hi_IN; getUnicodeScripts_hil_PH; @@ -1343,7 +1361,6 @@ getUnicodeScripts_zh_MO; getUnicodeScripts_zh_SG; getUnicodeScripts_zh_TW; getUnicodeScripts_zu_ZA; -GetVersionInfo; local: *; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index 13979b343226..d1f68b269dd0 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -261,6 +261,7 @@ SHL4OBJS= \ $(SLO)$/localedata_fa_IR.obj \ $(SLO)$/localedata_gu_IN.obj \ $(SLO)$/localedata_gug_PY.obj \ + $(SLO)$/localedata_haw_US.obj \ $(SLO)$/localedata_ha_GH.obj \ $(SLO)$/localedata_he_IL.obj \ $(SLO)$/localedata_hi_IN.obj \ diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 6ef2c495d5ce..30b56c0d9f7f 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -252,7 +252,8 @@ static const struct { { "om_ET", lcl_DATA_OTHERS }, { "plt_MG", lcl_DATA_OTHERS }, { "mai_IN", lcl_DATA_OTHERS }, - { "yi_US", lcl_DATA_OTHERS } + { "yi_US", lcl_DATA_OTHERS }, + { "haw_US", lcl_DATA_OTHERS } }; static const sal_Unicode under = sal_Unicode('_'); diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 493502b5da1b..b40dc16ddc30 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -324,6 +324,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Rusyn (Ukraine)" ; LANGUAGE_USER_RUSYN_UKRAINE ; > ; < "Rusyn (Slovakia)" ; LANGUAGE_USER_RUSYN_SLOVAKIA ; > ; < "Yiddish (USA)" ; LANGUAGE_USER_YIDDISH_US ; > ; + < "Hawaiian" ; LANGUAGE_HAWAIIAN_UNITED_STATES ; > ; }; }; -- cgit From 2a40932afc49617f08f7e52c017710ddefb889ce Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 16 Jan 2011 20:19:23 +0100 Subject: locales34: #i116241# added Limbu (Nepal) [lif-NP] locale data; contributed by via it46 localegen --- i18npool/inc/i18npool/lang.h | 1 + i18npool/source/isolang/isolang.cxx | 1 + i18npool/source/isolang/mslangid.cxx | 1 + i18npool/source/localedata/data/lif_NP.xml | 357 +++++++++++++++++++++ .../source/localedata/data/localedata_others.map | 17 + i18npool/source/localedata/data/makefile.mk | 1 + i18npool/source/localedata/localedata.cxx | 3 +- svtools/source/misc/langtab.src | 1 + 8 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 i18npool/source/localedata/data/lif_NP.xml diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index 717facd02502..0fd4f38f0f6d 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -516,6 +516,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_RUSYN_UKRAINE 0x0656 #define LANGUAGE_USER_RUSYN_SLOVAKIA 0x8256 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_USER_RUSYN_UKRAINE)) */ #define LANGUAGE_USER_YIDDISH_US 0x083D /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_YIDDISH)) */ +#define LANGUAGE_USER_LIMBU 0x0657 #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 35d2ba63f549..dffc38873282 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -462,6 +462,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_GIKUYU, "ki", "KE" }, { LANGUAGE_USER_RUSYN_UKRAINE, "rue", "UA" }, { LANGUAGE_USER_RUSYN_SLOVAKIA, "rue", "SK" }, + { LANGUAGE_USER_LIMBU, "lif", "NP" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW, "", "" } // marks end of table }; diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index 36cdddbdd27f..599299951164 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -375,6 +375,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) case LANGUAGE_USER_DOGRI_INDIA: case LANGUAGE_USER_MAITHILI_INDIA: case LANGUAGE_UIGHUR_CHINA: + case LANGUAGE_USER_LIMBU: nScript = ::com::sun::star::i18n::ScriptType::COMPLEX; break; diff --git a/i18npool/source/localedata/data/lif_NP.xml b/i18npool/source/localedata/data/lif_NP.xml new file mode 100644 index 000000000000..fadbfad11ff3 --- /dev/null +++ b/i18npool/source/localedata/data/lif_NP.xml @@ -0,0 +1,357 @@ + + + + + + lif + Limbu + + + NP + Nepal + + + + + / + , + . + : + . + ; + , + , + + + + + + + + + + पूर्वान्ह + अपरान्ह + metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+00 + + + 0.00E+000 + + + 0% + + + 0.00% + + + [CURRENCY] #,##0;-[CURRENCY] #,##0 + + + [CURRENCY] #,##0.00;-[CURRENCY] #,##0.00 + + + [CURRENCY] #,##0;[RED]-[CURRENCY] #,##0 + + + [CURRENCY] #,##0.00;[RED]-[CURRENCY] #,##0.00 + + + CCC#,##0.00 + + + [CURRENCY] #,##0.--;[RED]-[CURRENCY] #,##0.-- + + + YY/MM/DD + + + NNNNDD, MMMM YYYY + + + YY/MM/DD + + + YYYY/MM/DD + + + D, MMM YY + + + D, MMM YYYY + + + D, MMM YYYY + + + D, MMMM YYYY + + + D, MMMM YYYY + + + NN, DD/MMM/YY + + + NN, D, MMM YY + + + NN, D, MMMM YYYY + + + NNNND, MMMM YYYY + + + MM/DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + YY/MM + + + MMM/DD + + + MMMM + + + QQ YY + + + WW + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + YY/MM/DD HH:MM + + + YYYY/MM/DD HH:MM:SS AM/PM + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + ᤁ-ᤜ + 85 + p. + pp. + + + + + + sun + ᤋᤧᤏᤧᤒᤠ + ᤋᤧᤏᤧᤒᤠ + + + mon + ᤑᤥᤖᤠᤒᤠ + ᤑᤥᤖᤠᤒᤠ + + + tue + ᤔᤡᤰᤜᤠᤱᤒᤠ + ᤔᤡᤰᤜᤠᤱᤒᤠ + + + wed + ᤂᤧᤰᤛᤢᤒᤠ + ᤂᤧᤰᤛᤢᤒᤠ + + + thu + ᤁᤢᤖᤢ᤺ᤵᤐᤠ + ᤁᤢᤖᤢ᤺ᤵᤐᤠ + + + fri + ᤑᤛᤢ᤺ᤵᤐᤠ + ᤑᤛᤢ᤺ᤵᤐᤠ + + + sat + ᤛᤧᤴᤇᤪᤧᤱᤒᤠ + ᤛᤧᤴᤇᤪᤧᤱᤒᤠ + + + + + jan + जन + जनवरी + + + feb + फेब + फेब्रुअरी + + + mar + मार्च + मार्च + + + apr + अप्रि + अप्रिल + + + may + मे + मे + + + jun + जुन + जुन + + + jul + जुला + जुलाई + + + aug + अग + अगस्त + + + sep + सेप्ट + सेप्टेम्बर + + + oct + अक्टो + अक्टोबर + + + nov + नोभे + नोभेम्बर + + + dec + डिसे + डिसेम्बर + + + + + bc + ईसापूर्व + ईसापूर्व + + + ad + सन् + सन् + + + + sun + + 1 + + + + + NPR + रू + NPR + Nepalese Rupee + 2 + + + + + + + + + + ठीक + बेठीक + पहिलो सत्र + दोस्रो सत्र + तेस्रो सत्र + चौथो सत्र + माथि + तल + Q1 + Q2 + Q3 + Q4 + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index e194b38cbf07..003c7ed30a77 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -38,6 +38,7 @@ getAllCalendars_ko_KR; getAllCalendars_ku_TR; getAllCalendars_ky_KG; getAllCalendars_lg_UG; +getAllCalendars_lif_NP; getAllCalendars_ln_CD; getAllCalendars_lo_LA; getAllCalendars_mai_IN; @@ -118,6 +119,7 @@ getAllCurrencies_ko_KR; getAllCurrencies_ku_TR; getAllCurrencies_ky_KG; getAllCurrencies_lg_UG; +getAllCurrencies_lif_NP; getAllCurrencies_ln_CD; getAllCurrencies_lo_LA; getAllCurrencies_mai_IN; @@ -198,6 +200,7 @@ getAllFormats0_ko_KR; getAllFormats0_ku_TR; getAllFormats0_ky_KG; getAllFormats0_lg_UG; +getAllFormats0_lif_NP; getAllFormats0_ln_CD; getAllFormats0_lo_LA; getAllFormats0_mai_IN; @@ -278,6 +281,7 @@ getBreakIteratorRules_ko_KR; getBreakIteratorRules_ku_TR; getBreakIteratorRules_ky_KG; getBreakIteratorRules_lg_UG; +getBreakIteratorRules_lif_NP; getBreakIteratorRules_ln_CD; getBreakIteratorRules_lo_LA; getBreakIteratorRules_mai_IN; @@ -358,6 +362,7 @@ getCollationOptions_ko_KR; getCollationOptions_ku_TR; getCollationOptions_ky_KG; getCollationOptions_lg_UG; +getCollationOptions_lif_NP; getCollationOptions_ln_CD; getCollationOptions_lo_LA; getCollationOptions_mai_IN; @@ -438,6 +443,7 @@ getCollatorImplementation_ko_KR; getCollatorImplementation_ku_TR; getCollatorImplementation_ky_KG; getCollatorImplementation_lg_UG; +getCollatorImplementation_lif_NP; getCollatorImplementation_ln_CD; getCollatorImplementation_lo_LA; getCollatorImplementation_mai_IN; @@ -518,6 +524,7 @@ getContinuousNumberingLevels_ko_KR; getContinuousNumberingLevels_ku_TR; getContinuousNumberingLevels_ky_KG; getContinuousNumberingLevels_lg_UG; +getContinuousNumberingLevels_lif_NP; getContinuousNumberingLevels_ln_CD; getContinuousNumberingLevels_lo_LA; getContinuousNumberingLevels_mai_IN; @@ -598,6 +605,7 @@ getFollowPageWords_ko_KR; getFollowPageWords_ku_TR; getFollowPageWords_ky_KG; getFollowPageWords_lg_UG; +getFollowPageWords_lif_NP; getFollowPageWords_ln_CD; getFollowPageWords_lo_LA; getFollowPageWords_mai_IN; @@ -678,6 +686,7 @@ getForbiddenCharacters_ko_KR; getForbiddenCharacters_ku_TR; getForbiddenCharacters_ky_KG; getForbiddenCharacters_lg_UG; +getForbiddenCharacters_lif_NP; getForbiddenCharacters_ln_CD; getForbiddenCharacters_lo_LA; getForbiddenCharacters_mai_IN; @@ -758,6 +767,7 @@ getIndexAlgorithm_ko_KR; getIndexAlgorithm_ku_TR; getIndexAlgorithm_ky_KG; getIndexAlgorithm_lg_UG; +getIndexAlgorithm_lif_NP; getIndexAlgorithm_ln_CD; getIndexAlgorithm_lo_LA; getIndexAlgorithm_mai_IN; @@ -838,6 +848,7 @@ getLCInfo_ko_KR; getLCInfo_ku_TR; getLCInfo_ky_KG; getLCInfo_lg_UG; +getLCInfo_lif_NP; getLCInfo_ln_CD; getLCInfo_lo_LA; getLCInfo_mai_IN; @@ -918,6 +929,7 @@ getLocaleItem_ko_KR; getLocaleItem_ku_TR; getLocaleItem_ky_KG; getLocaleItem_lg_UG; +getLocaleItem_lif_NP; getLocaleItem_ln_CD; getLocaleItem_lo_LA; getLocaleItem_mai_IN; @@ -998,6 +1010,7 @@ getOutlineNumberingLevels_ko_KR; getOutlineNumberingLevels_ku_TR; getOutlineNumberingLevels_ky_KG; getOutlineNumberingLevels_lg_UG; +getOutlineNumberingLevels_lif_NP; getOutlineNumberingLevels_ln_CD; getOutlineNumberingLevels_lo_LA; getOutlineNumberingLevels_mai_IN; @@ -1078,6 +1091,7 @@ getReservedWords_ko_KR; getReservedWords_ku_TR; getReservedWords_ky_KG; getReservedWords_lg_UG; +getReservedWords_lif_NP; getReservedWords_ln_CD; getReservedWords_lo_LA; getReservedWords_mai_IN; @@ -1158,6 +1172,7 @@ getSearchOptions_ko_KR; getSearchOptions_ku_TR; getSearchOptions_ky_KG; getSearchOptions_lg_UG; +getSearchOptions_lif_NP; getSearchOptions_ln_CD; getSearchOptions_lo_LA; getSearchOptions_mai_IN; @@ -1238,6 +1253,7 @@ getTransliterations_ko_KR; getTransliterations_ku_TR; getTransliterations_ky_KG; getTransliterations_lg_UG; +getTransliterations_lif_NP; getTransliterations_ln_CD; getTransliterations_lo_LA; getTransliterations_mai_IN; @@ -1318,6 +1334,7 @@ getUnicodeScripts_ko_KR; getUnicodeScripts_ku_TR; getUnicodeScripts_ky_KG; getUnicodeScripts_lg_UG; +getUnicodeScripts_lif_NP; getUnicodeScripts_ln_CD; getUnicodeScripts_lo_LA; getUnicodeScripts_mai_IN; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index d1f68b269dd0..87ee3a2dc997 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -278,6 +278,7 @@ SHL4OBJS= \ $(SLO)$/localedata_ku_TR.obj \ $(SLO)$/localedata_ky_KG.obj \ $(SLO)$/localedata_lg_UG.obj \ + $(SLO)$/localedata_lif_NP.obj \ $(SLO)$/localedata_ln_CD.obj \ $(SLO)$/localedata_lo_LA.obj \ $(SLO)$/localedata_mai_IN.obj \ diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 30b56c0d9f7f..8e3ce2544db0 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -253,7 +253,8 @@ static const struct { { "plt_MG", lcl_DATA_OTHERS }, { "mai_IN", lcl_DATA_OTHERS }, { "yi_US", lcl_DATA_OTHERS }, - { "haw_US", lcl_DATA_OTHERS } + { "haw_US", lcl_DATA_OTHERS }, + { "lif_NP", lcl_DATA_OTHERS } }; static const sal_Unicode under = sal_Unicode('_'); diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index b40dc16ddc30..f0d63077d69b 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -325,6 +325,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Rusyn (Slovakia)" ; LANGUAGE_USER_RUSYN_SLOVAKIA ; > ; < "Yiddish (USA)" ; LANGUAGE_USER_YIDDISH_US ; > ; < "Hawaiian" ; LANGUAGE_HAWAIIAN_UNITED_STATES ; > ; + < "Limbu" ; LANGUAGE_USER_LIMBU ; > ; }; }; -- cgit From 9555e0bc6d421672ec9b9d4ac37a135277734a14 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 16 Jan 2011 20:54:45 +0100 Subject: locales34: #i108182# added Urdu_Pakistan [ur-PK] locale data; contributed by via it46 localegen --- .../source/localedata/data/localedata_others.map | 17 + i18npool/source/localedata/data/makefile.mk | 1 + i18npool/source/localedata/data/ur_PK.xml | 358 +++++++++++++++++++++ i18npool/source/localedata/localedata.cxx | 3 +- 4 files changed, 378 insertions(+), 1 deletion(-) create mode 100644 i18npool/source/localedata/data/ur_PK.xml diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index 003c7ed30a77..d644fa1607cd 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -71,6 +71,7 @@ getAllCalendars_tn_ZA; getAllCalendars_tpi_PG; getAllCalendars_ts_ZA; getAllCalendars_ug_CN; +getAllCalendars_ur_PK; getAllCalendars_uz_UZ; getAllCalendars_ve_ZA; getAllCalendars_vi_VN; @@ -152,6 +153,7 @@ getAllCurrencies_tn_ZA; getAllCurrencies_tpi_PG; getAllCurrencies_ts_ZA; getAllCurrencies_ug_CN; +getAllCurrencies_ur_PK; getAllCurrencies_uz_UZ; getAllCurrencies_ve_ZA; getAllCurrencies_vi_VN; @@ -233,6 +235,7 @@ getAllFormats0_tn_ZA; getAllFormats0_tpi_PG; getAllFormats0_ts_ZA; getAllFormats0_ug_CN; +getAllFormats0_ur_PK; getAllFormats0_uz_UZ; getAllFormats0_ve_ZA; getAllFormats0_vi_VN; @@ -314,6 +317,7 @@ getBreakIteratorRules_tn_ZA; getBreakIteratorRules_tpi_PG; getBreakIteratorRules_ts_ZA; getBreakIteratorRules_ug_CN; +getBreakIteratorRules_ur_PK; getBreakIteratorRules_uz_UZ; getBreakIteratorRules_ve_ZA; getBreakIteratorRules_vi_VN; @@ -395,6 +399,7 @@ getCollationOptions_tn_ZA; getCollationOptions_tpi_PG; getCollationOptions_ts_ZA; getCollationOptions_ug_CN; +getCollationOptions_ur_PK; getCollationOptions_uz_UZ; getCollationOptions_ve_ZA; getCollationOptions_vi_VN; @@ -476,6 +481,7 @@ getCollatorImplementation_tn_ZA; getCollatorImplementation_tpi_PG; getCollatorImplementation_ts_ZA; getCollatorImplementation_ug_CN; +getCollatorImplementation_ur_PK; getCollatorImplementation_uz_UZ; getCollatorImplementation_ve_ZA; getCollatorImplementation_vi_VN; @@ -557,6 +563,7 @@ getContinuousNumberingLevels_tn_ZA; getContinuousNumberingLevels_tpi_PG; getContinuousNumberingLevels_ts_ZA; getContinuousNumberingLevels_ug_CN; +getContinuousNumberingLevels_ur_PK; getContinuousNumberingLevels_uz_UZ; getContinuousNumberingLevels_ve_ZA; getContinuousNumberingLevels_vi_VN; @@ -638,6 +645,7 @@ getFollowPageWords_tn_ZA; getFollowPageWords_tpi_PG; getFollowPageWords_ts_ZA; getFollowPageWords_ug_CN; +getFollowPageWords_ur_PK; getFollowPageWords_uz_UZ; getFollowPageWords_ve_ZA; getFollowPageWords_vi_VN; @@ -719,6 +727,7 @@ getForbiddenCharacters_tn_ZA; getForbiddenCharacters_tpi_PG; getForbiddenCharacters_ts_ZA; getForbiddenCharacters_ug_CN; +getForbiddenCharacters_ur_PK; getForbiddenCharacters_uz_UZ; getForbiddenCharacters_ve_ZA; getForbiddenCharacters_vi_VN; @@ -800,6 +809,7 @@ getIndexAlgorithm_tn_ZA; getIndexAlgorithm_tpi_PG; getIndexAlgorithm_ts_ZA; getIndexAlgorithm_ug_CN; +getIndexAlgorithm_ur_PK; getIndexAlgorithm_uz_UZ; getIndexAlgorithm_ve_ZA; getIndexAlgorithm_vi_VN; @@ -881,6 +891,7 @@ getLCInfo_tn_ZA; getLCInfo_tpi_PG; getLCInfo_ts_ZA; getLCInfo_ug_CN; +getLCInfo_ur_PK; getLCInfo_uz_UZ; getLCInfo_ve_ZA; getLCInfo_vi_VN; @@ -962,6 +973,7 @@ getLocaleItem_tn_ZA; getLocaleItem_tpi_PG; getLocaleItem_ts_ZA; getLocaleItem_ug_CN; +getLocaleItem_ur_PK; getLocaleItem_uz_UZ; getLocaleItem_ve_ZA; getLocaleItem_vi_VN; @@ -1043,6 +1055,7 @@ getOutlineNumberingLevels_tn_ZA; getOutlineNumberingLevels_tpi_PG; getOutlineNumberingLevels_ts_ZA; getOutlineNumberingLevels_ug_CN; +getOutlineNumberingLevels_ur_PK; getOutlineNumberingLevels_uz_UZ; getOutlineNumberingLevels_ve_ZA; getOutlineNumberingLevels_vi_VN; @@ -1124,6 +1137,7 @@ getReservedWords_tn_ZA; getReservedWords_tpi_PG; getReservedWords_ts_ZA; getReservedWords_ug_CN; +getReservedWords_ur_PK; getReservedWords_uz_UZ; getReservedWords_ve_ZA; getReservedWords_vi_VN; @@ -1205,6 +1219,7 @@ getSearchOptions_tn_ZA; getSearchOptions_tpi_PG; getSearchOptions_ts_ZA; getSearchOptions_ug_CN; +getSearchOptions_ur_PK; getSearchOptions_uz_UZ; getSearchOptions_ve_ZA; getSearchOptions_vi_VN; @@ -1286,6 +1301,7 @@ getTransliterations_tn_ZA; getTransliterations_tpi_PG; getTransliterations_ts_ZA; getTransliterations_ug_CN; +getTransliterations_ur_PK; getTransliterations_uz_UZ; getTransliterations_ve_ZA; getTransliterations_vi_VN; @@ -1367,6 +1383,7 @@ getUnicodeScripts_tn_ZA; getUnicodeScripts_tpi_PG; getUnicodeScripts_ts_ZA; getUnicodeScripts_ug_CN; +getUnicodeScripts_ur_PK; getUnicodeScripts_uz_UZ; getUnicodeScripts_ve_ZA; getUnicodeScripts_vi_VN; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index 87ee3a2dc997..b1c324695a27 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -311,6 +311,7 @@ SHL4OBJS= \ $(SLO)$/localedata_tpi_PG.obj \ $(SLO)$/localedata_ts_ZA.obj \ $(SLO)$/localedata_ug_CN.obj \ + $(SLO)$/localedata_ur_PK.obj \ $(SLO)$/localedata_uz_UZ.obj \ $(SLO)$/localedata_ve_ZA.obj \ $(SLO)$/localedata_vi_VN.obj \ diff --git a/i18npool/source/localedata/data/ur_PK.xml b/i18npool/source/localedata/data/ur_PK.xml new file mode 100644 index 000000000000..53002e931068 --- /dev/null +++ b/i18npool/source/localedata/data/ur_PK.xml @@ -0,0 +1,358 @@ + + + + + + ur + Urdu + + + PK + Pakistan + + + + + / + , + . + : + . + ; + , + , + + + + + + + + + + قبل دوپہر + بعد دوپہر + metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+00 + + + 0.00E+000 + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;-[CURRENCY]#,##0.00 + + + [CURRENCY]#,##0;[RED]-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00 + + + CCC#,##0.00 + + + [CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.-- + + + D/MM/YY + + + NNNNDD, MMMM YYYY + + + DD/MM/YY + + + DD/MM/YYYY + + + D, MMM YY + + + D, MMM YYYY + + + D, MMM YYYY + + + D, MMMM YYYY + + + D, MMMM YY + + + NN, DD/MMM/YY + + + NN, D, MMM YY + + + NN, D, MMMM YYYY + + + NNNND, MMMM YYYY + + + MM/DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + MM/YY + + + MMM/DD + + + MMMM + + + QQ YY + + + WW + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + DD/MM/YY HH:MM + + + DD/MM/YYYY HH:MM:SS AM/PM + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + أ ؤ ا آ ب پ ت ٹ ث ج چ ح خ د ڈ ذ ر ڑ ز ژ س ش ص ض ط ظ ع غ ف ق ک گ ل م ن ں و ہ ی ء ئ ے ٻ ة ٺ ټ ٽ ه ھ ي + 0 + 1 + صفحہ + صفحے + + + + + + sun + ا + اتوار + + + mon + پ + پير + + + tue + م + منگل + + + wed + ب + بده + + + thu + ج + جمعرات + + + fri + ج + جمعہ + + + sat + ہ + ہفتہ + + + + + jan + ج + جنوری + + + feb + ف + فروری + + + mar + م + مار چ + + + apr + ا + اپريل + + + may + م + مئ + + + jun + ج + جون + + + jul + ج + جولائ + + + aug + ا + اگست + + + sep + س + ستمبر + + + oct + ا + اکتوبر + + + nov + ن + نومبر + + + dec + د + دسمبر + + + + + bc + ق م + قبل مسيح + + + ad + ء + عيسوی سن + + + + sun + + 1 + + + + + PKR + + PKR + پاکستانی روپیہ + 2 + + + + + + + + + + راست + غلط + ایک چوتھائی + دو چوتھائی + تین چوتھائی + چار چوتھائی + اوپر + نیچے + چوتھائی 1 + چوتھائی 2 + چوتھائی 3 + چوتھائی 4 + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 8e3ce2544db0..9af043b5457b 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -254,7 +254,8 @@ static const struct { { "mai_IN", lcl_DATA_OTHERS }, { "yi_US", lcl_DATA_OTHERS }, { "haw_US", lcl_DATA_OTHERS }, - { "lif_NP", lcl_DATA_OTHERS } + { "lif_NP", lcl_DATA_OTHERS }, + { "ur_PK", lcl_DATA_OTHERS } }; static const sal_Unicode under = sal_Unicode('_'); -- cgit From 2ecf0e5d2ac9f0573191514ffb637a905377bab7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sun, 16 Jan 2011 20:59:12 +0100 Subject: gridsort: ComponentGuard class, encapsulating the 'lock mutex and check for disposal' patern --- comphelper/inc/comphelper/componentguard.hxx | 70 ++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100755 comphelper/inc/comphelper/componentguard.hxx diff --git a/comphelper/inc/comphelper/componentguard.hxx b/comphelper/inc/comphelper/componentguard.hxx new file mode 100755 index 000000000000..820b901a5c55 --- /dev/null +++ b/comphelper/inc/comphelper/componentguard.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef COMPHELPER_COMPONENTGUARD_HXX +#define COMPHELPER_COMPONENTGUARD_HXX + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +#include +#include + +//...................................................................................................................... +namespace comphelper +{ +//...................................................................................................................... + + //================================================================================================================== + //= ComponentGuard + //================================================================================================================== + class ComponentGuard + { + public: + ComponentGuard( ::cppu::OWeakObject& i_component, ::cppu::OBroadcastHelper & i_broadcastHelper ) + :m_aGuard( i_broadcastHelper.rMutex ) + { + if ( i_broadcastHelper.bDisposed ) + throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), &i_component ); + } + + ~ComponentGuard() + { + } + + void clear() { m_aGuard.clear(); } + void reset() { m_aGuard.reset(); } + + private: + ::osl::ResettableMutexGuard m_aGuard; + }; + +//...................................................................................................................... +} // namespace comphelper +//...................................................................................................................... + +#endif // COMPHELPER_COMPONENTGUARD_HXX -- cgit From 91b997afa63df0e47f13f2693970200c2e3172e0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sun, 16 Jan 2011 20:59:30 +0100 Subject: gridsort: add disposal checks and some rudimentary mutex locking --- .../controls/grid/defaultgridcolumnmodel.cxx | 40 +++++----- .../controls/grid/defaultgridcolumnmodel.hxx | 5 ++ .../source/controls/grid/defaultgriddatamodel.cxx | 86 ++++++++++------------ .../source/controls/grid/defaultgriddatamodel.hxx | 39 +++++----- toolkit/source/controls/grid/gridcolumn.cxx | 48 +++++------- toolkit/source/controls/grid/gridcolumn.hxx | 25 +++---- 6 files changed, 113 insertions(+), 130 deletions(-) diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 04ecf93d9bc5..1339d9c198b4 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -36,6 +36,7 @@ /** === end UNO includes === **/ #include +#include #include #include #include @@ -119,13 +120,14 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::createColumn( ) throw (RuntimeException) { + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return new GridColumn(); } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException, IllegalArgumentException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); GridColumn* const pGridColumn = GridColumn::getImplementation( i_column ); if ( pGridColumn == NULL ) @@ -150,7 +152,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridColumnModel::removeColumn( ::sal_Int32 i_columnIndex ) throw (RuntimeException, IndexOutOfBoundsException) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); if ( ( i_columnIndex < 0 ) || ( size_t( i_columnIndex ) >= m_aColumns.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); @@ -172,14 +174,14 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ Sequence< Reference< XGridColumn > > SAL_CALL DefaultGridColumnModel::getColumns() throw (RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return ::comphelper::containerToSequence( m_aColumns ); } //------------------------------------------------------------------------------------------------------------------ Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (IndexOutOfBoundsException, RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); if ( index >=0 && index < ((sal_Int32)m_aColumns.size())) return m_aColumns[index]; @@ -194,7 +196,7 @@ namespace toolkit ::std::vector< ContainerEvent > aInsertedColumns; { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); // remove existing columns while ( !m_aColumns.empty() ) @@ -315,31 +317,31 @@ namespace toolkit m_aContainerListeners.disposeAndClear( aEvent ); ::osl::MutexGuard aGuard( m_aMutex ); + // remove, dispose and clear columns + while ( !m_aColumns.empty() ) { - while ( !m_aColumns.empty() ) + try { - try - { - const Reference< XComponent > xColComponent( m_aColumns[ 0 ], UNO_QUERY_THROW ); - xColComponent->dispose(); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - - m_aColumns.erase( m_aColumns.begin() ); + const Reference< XComponent > xColComponent( m_aColumns[ 0 ], UNO_QUERY_THROW ); + xColComponent->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); } - Columns aEmpty; - m_aColumns.swap( aEmpty ); + m_aColumns.erase( m_aColumns.begin() ); } + + Columns aEmpty; + m_aColumns.swap( aEmpty ); } //------------------------------------------------------------------------------------------------------------------ Reference< XCloneable > SAL_CALL DefaultGridColumnModel::createClone( ) throw (RuntimeException) { + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return new DefaultGridColumnModel( *this ); } diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx index 31b3c45afd67..da0ef20e3287 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx @@ -40,6 +40,11 @@ #include #include +namespace comphelper +{ + class ComponentGuard; +} + namespace toolkit { diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index d5cba70c8700..ab0ba1734e53 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -27,24 +27,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_toolkit.hxx" + #include "defaultgriddatamodel.hxx" #include +#include #include #include #include #include -using ::rtl::OUString; -using ::comphelper::stl_begin; -using ::comphelper::stl_end; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::awt::grid; -using namespace ::com::sun::star::lang; - //...................................................................................................................... namespace toolkit //...................................................................................................................... @@ -62,13 +55,15 @@ namespace toolkit using ::com::sun::star::util::XCloneable; /** === end UNO using === **/ + using ::comphelper::stl_begin; + using ::comphelper::stl_end; + //================================================================================================================== //= DefaultGridDataModel //================================================================================================================== //------------------------------------------------------------------------------------------------------------------ DefaultGridDataModel::DefaultGridDataModel() - :DefaultGridDataModel_Base() - ,MutexAndBroadcastHelper() + :DefaultGridDataModel_Base( m_aMutex ) ,m_aRowHeaders() ,m_nColumnCount(0) { @@ -76,10 +71,10 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ DefaultGridDataModel::DefaultGridDataModel( DefaultGridDataModel const & i_copySource ) - :DefaultGridDataModel_Base() - ,MutexAndBroadcastHelper() + :DefaultGridDataModel_Base( m_aMutex ) ,m_aData( i_copySource.m_aData ) ,m_aRowHeaders( i_copySource.m_aRowHeaders ) + ,m_nColumnCount( i_copySource.m_nColumnCount ) { } @@ -90,9 +85,9 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void DefaultGridDataModel::broadcast( GridDataEvent const & i_event, - void ( SAL_CALL XGridDataListener::*i_listenerMethod )( GridDataEvent const & ), ::osl::ClearableMutexGuard & i_instanceLock ) + void ( SAL_CALL XGridDataListener::*i_listenerMethod )( GridDataEvent const & ), ::comphelper::ComponentGuard & i_instanceLock ) { - ::cppu::OInterfaceContainerHelper* pListeners = BrdcstHelper.getContainer( XGridDataListener::static_type() ); + ::cppu::OInterfaceContainerHelper* pListeners = rBHelper.getContainer( XGridDataListener::static_type() ); if ( !pListeners ) return; @@ -103,14 +98,14 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_aData.size(); } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL DefaultGridDataModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_nColumnCount; } @@ -156,21 +151,21 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ Any SAL_CALL DefaultGridDataModel::getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) { - ::osl::MutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return impl_getCellData_throw( i_column, i_row ).first; } //------------------------------------------------------------------------------------------------------------------ Any SAL_CALL DefaultGridDataModel::getCellToolTip( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) { - ::osl::MutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return impl_getCellData_throw( i_column, i_row ).second; } //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL DefaultGridDataModel::getRowTitle( ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) { - ::osl::MutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); if ( ( i_row < 0 ) || ( size_t( i_row ) >= m_aRowHeaders.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); @@ -181,7 +176,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::addRow( const ::rtl::OUString& i_title, const Sequence< Any >& i_data ) throw (RuntimeException) { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); sal_Int32 const columnCount = i_data.getLength(); @@ -223,7 +218,7 @@ namespace toolkit if ( i_titles.getLength() != i_data.getLength() ) throw IllegalArgumentException( ::rtl::OUString(), *this, -1 ); - ::osl::ClearableMutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); sal_Int32 const rowCount = i_titles.getLength(); if ( rowCount == 0 ) @@ -259,7 +254,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::removeRow( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); @@ -277,7 +272,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::removeAllRows( ) throw (RuntimeException) { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); m_aRowHeaders.clear(); m_aData.clear(); @@ -292,7 +287,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::updateCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); impl_getCellDataAccess_throw( i_columnIndex, i_rowIndex ).first = i_value; @@ -306,7 +301,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::updateRowData( const Sequence< ::sal_Int32 >& i_columnIndexes, ::sal_Int32 i_rowIndex, const Sequence< Any >& i_values ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); @@ -346,7 +341,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::setRowTitle( ::sal_Int32 i_rowIndex, const ::rtl::OUString& i_title ) throw (IndexOutOfBoundsException, RuntimeException) { - ::osl::ClearableMutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aRowHeaders.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); @@ -363,14 +358,15 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::updateCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { - ::osl::MutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); impl_getCellDataAccess_throw( i_columnIndex, i_rowIndex ).second = i_value; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::updateRowToolTip( ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { - ::osl::MutexGuard aGuard( GetMutex() ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); + RowData& rRowData = impl_getRowDataAccess_throw( i_rowIndex, m_nColumnCount ); for ( RowData::iterator cell = rRowData.begin(); cell != rRowData.end(); ++cell ) cell->second = i_value; @@ -379,40 +375,36 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< grid::XGridDataListener >& i_listener ) throw (RuntimeException) { - BrdcstHelper.addListener( XGridDataListener::static_type(), i_listener ); + rBHelper.addListener( XGridDataListener::static_type(), i_listener ); } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL DefaultGridDataModel::removeGridDataListener( const Reference< grid::XGridDataListener >& i_listener ) throw (RuntimeException) { - BrdcstHelper.removeListener( XGridDataListener::static_type(), i_listener ); + rBHelper.removeListener( XGridDataListener::static_type(), i_listener ); } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::dispose() throw (RuntimeException) + void SAL_CALL DefaultGridDataModel::disposing() { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); - BrdcstHelper.aLC.disposeAndClear( aEvent ); + aEvent.Source.set( *this ); + rBHelper.aLC.disposeAndClear( aEvent ); - } + ::osl::MutexGuard aGuard( m_aMutex ); + GridData aEmptyData; + m_aData.swap( aEmptyData ); - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) - { - BrdcstHelper.addListener( XEventListener::static_type(), xListener ); - } + ::std::vector< ::rtl::OUString > aEmptyRowHeaders; + m_aRowHeaders.swap( aEmptyRowHeaders ); - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) - { - BrdcstHelper.removeListener( XEventListener::static_type(), xListener ); + m_nColumnCount = 0; } //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException) { - static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) ); + static const ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) ); return aImplName; } @@ -425,8 +417,8 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException) { - static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridDataModel ) ); - static const Sequence< OUString > aSeq( &aServiceName, 1 ); + static const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( szServiceName_DefaultGridDataModel ) ); + static const Sequence< ::rtl::OUString > aSeq( &aServiceName, 1 ); return aSeq; } diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index e67b5c937c95..7f87aa16cfa7 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -25,36 +25,37 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_toolkit.hxx" #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include + +#include +#include #include -using ::rtl::OUString; +#include + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::awt::grid; using namespace ::com::sun::star::lang; +namespace comphelper +{ + class ComponentGuard; +} + namespace toolkit { enum broadcast_type { row_added, row_removed, data_changed}; -typedef ::cppu::WeakImplHelper2< XMutableGridDataModel, XServiceInfo > DefaultGridDataModel_Base; -class DefaultGridDataModel : public DefaultGridDataModel_Base, - public MutexAndBroadcastHelper +typedef ::cppu::WeakComponentImplHelper2 < XMutableGridDataModel + , XServiceInfo + > DefaultGridDataModel_Base; + +class DefaultGridDataModel :public ::cppu::BaseMutex + ,public DefaultGridDataModel_Base { public: DefaultGridDataModel(); @@ -81,10 +82,8 @@ public: virtual ::com::sun::star::uno::Any SAL_CALL getCellToolTip( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getRowTitle( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - // XComponent - virtual void SAL_CALL dispose( ) throw (RuntimeException); - virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException); - virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException); + // OComponentHelper + virtual void SAL_CALL disposing(); // XCloneable virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); @@ -102,7 +101,7 @@ private: void broadcast( GridDataEvent const & i_event, void ( SAL_CALL ::com::sun::star::awt::grid::XGridDataListener::*i_listenerMethod )( ::com::sun::star::awt::grid::GridDataEvent const & ), - ::osl::ClearableMutexGuard & i_instanceLock + ::comphelper::ComponentGuard & i_instanceLock ); void impl_addRow( Sequence< Any > const & i_rowData, sal_Int32 const i_assumedColCount = -1 ); diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 09fb053ce152..99ea4e68ce8d 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -80,7 +80,8 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void GridColumn::broadcast_changed( sal_Char const * const i_asciiAttributeName, Any i_oldValue, Any i_newValue, ::osl::ClearableMutexGuard& i_Guard ) + void GridColumn::broadcast_changed( sal_Char const * const i_asciiAttributeName, Any i_oldValue, Any i_newValue, + ::comphelper::ComponentGuard& i_Guard ) { Reference< XInterface > const xSource( static_cast< ::cppu::OWeakObject* >( this ) ); GridColumnEvent const aEvent( @@ -98,21 +99,21 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::uno::Any SAL_CALL GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_aIdentifier; } //------------------------------------------------------------------------------------------------------------------ void SAL_CALL GridColumn::setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); m_aIdentifier = value; } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_nColumnWidth; } @@ -125,7 +126,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getPreferredWidth() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_nPreferredWidth; } @@ -138,7 +139,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getMaxWidth() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_nMaxWidth; } @@ -151,7 +152,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getMinWidth() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_nMinWidth; } @@ -164,7 +165,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_sTitle; } @@ -177,7 +178,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL GridColumn::getHelpText() throw (RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_sHelpText; } @@ -190,7 +191,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ sal_Bool SAL_CALL GridColumn::getResizeable() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_bResizeable; } @@ -203,7 +204,7 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_eHorizontalAlign; } @@ -226,37 +227,24 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridColumn::dispose() throw (RuntimeException) + void SAL_CALL GridColumn::disposing() { - // simply disambiguate, the base class handles this - GridColumn_Base::dispose(); - } - - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridColumn::addEventListener( const Reference< XEventListener >& i_listener ) throw (RuntimeException) - { - // simply disambiguate, the base class handles this - GridColumn_Base::addEventListener( i_listener ); - } - - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridColumn::removeEventListener( const Reference< XEventListener >& i_listener ) throw (RuntimeException) - { - // simply disambiguate, the base class handles this - GridColumn_Base::removeEventListener( i_listener ); + ::osl::MutexGuard aGuard( m_aMutex ); + m_aIdentifier.clear(); + m_sTitle = m_sHelpText = ::rtl::OUString(); } //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getIndex() throw (RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); return m_nIndex; } //------------------------------------------------------------------------------------------------------------------ void GridColumn::setIndex( sal_Int32 const i_index ) { - ::osl::MutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); m_nIndex = i_index; } diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index a46b18a84fce..4fbaddb3151b 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -25,20 +25,20 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_toolkit.hxx" + #include -#include -#include #include #include #include -#include +#include + #include +#include +#include #include -#include #include -#include + +#include namespace toolkit { @@ -78,10 +78,8 @@ public: virtual void SAL_CALL addGridColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeGridColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - // XComponent (base of XGridColumn) - virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + // OComponentHelper + virtual void SAL_CALL disposing(); // XCloneable (base of XGridColumn) virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); @@ -104,13 +102,13 @@ private: sal_Char const * const i_asciiAttributeName, ::com::sun::star::uno::Any i_oldValue, ::com::sun::star::uno::Any i_newValue, - ::osl::ClearableMutexGuard& i_Guard + ::comphelper::ComponentGuard& i_Guard ); template< class TYPE > void impl_set( TYPE & io_attribute, TYPE const & i_newValue, sal_Char const * i_attributeName ) { - ::osl::ClearableMutexGuard aGuard( m_aMutex ); + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); if ( io_attribute == i_newValue ) return; @@ -119,7 +117,6 @@ private: broadcast_changed( i_attributeName, ::com::sun::star::uno::makeAny( aOldValue ), ::com::sun::star::uno::makeAny( io_attribute ), aGuard ); } - ::com::sun::star::uno::Any m_aIdentifier; sal_Int32 m_nIndex; sal_Int32 m_nColumnWidth; -- cgit From 622c6ecd2f1c3a5724ef4b615cc9de5bc880699c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sun, 16 Jan 2011 21:09:59 +0100 Subject: gridsort: adjust column indexes when inserting columns --- toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 1339d9c198b4..80d1c9c136d3 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -161,6 +161,18 @@ namespace toolkit Reference< XGridColumn > const xColumn( *pos ); m_aColumns.erase( pos ); + // update indexes of all subsequent columns + sal_Int32 columnIndex( i_columnIndex ); + for ( Columns::iterator updatePos = m_aColumns.begin() + columnIndex; + updatePos != m_aColumns.end(); + ++updatePos, ++columnIndex + ) + { + GridColumn* pColumnImpl = GridColumn::getImplementation( *updatePos ); + ENSURE_OR_CONTINUE( pColumnImpl, "DefaultGridColumnModel::removeColumn: invalid column implementation!" ); + pColumnImpl->setIndex( columnIndex ); + } + // fire removal notifications ContainerEvent aEvent; aEvent.Source = *this; -- cgit From 00abb7e08b1a2de2200878ec58c968bc8717565a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sun, 16 Jan 2011 21:18:35 +0100 Subject: gridsort: GCC WaE --- svtools/inc/svtools/table/tablemodel.hxx | 2 +- svtools/source/table/gridtablerenderer.cxx | 2 ++ svtools/source/uno/svtxgridcontrol.cxx | 4 +++- svtools/source/uno/unocontroltablemodel.cxx | 2 -- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 026b792c39e8..be2d21fff42c 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -77,7 +77,7 @@ namespace svt { namespace table /// denotes column attributes related to the appearance of the column, i.e. those relevant for rendering #define COL_ATTRS_APPEARANCE (0x00000002) /// denotes the entirety of column attributes - #define COL_ATTRS_ALL (0xFFFFFFFF) + #define COL_ATTRS_ALL (0x7FFFFFFF) //==================================================================== //= ITableModelListener diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 8fc95c203b7a..201c128855e6 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -492,6 +492,8 @@ namespace svt { namespace table OSL_UNUSED( i_active ); OSL_UNUSED( i_selected ); + OSL_UNUSED( i_rowPos ); + OSL_UNUSED( i_colPos ); return true; } diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index e95becad8876..fe6c8fee5119 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -547,9 +547,10 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw } //---------------------------------------------------------------------------------------------------------------------- -void SAL_CALL SVTXGridControl::rowTitleChanged( const GridDataEvent& Event ) throw (RuntimeException) +void SAL_CALL SVTXGridControl::rowTitleChanged( const GridDataEvent& i_event ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); + OSL_UNUSED( i_event ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowTitleChanged: no control (anymore)!" ); @@ -586,6 +587,7 @@ void SAL_CALL SVTXGridControl::elementReplaced( const ContainerEvent& i_event ) { OSL_ENSURE( false, "SVTXGridControl::elementReplaced: not implemented!" ); // at the moment, the XGridColumnModel API does not allow replacing columns + OSL_UNUSED( i_event ); // TODO: replace the respective column in our table model } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 17aac65c0dfb..e2881eb22fc6 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -312,8 +312,6 @@ namespace svt { namespace table if ( m_pImpl->aColumns.empty() ) return; - const ColPos nLastIndex = m_pImpl->aColumns.size() - 1; - // dispose the column instances for ( ColumnModels::const_iterator col = m_pImpl->aColumns.begin(); col != m_pImpl->aColumns.end(); -- cgit From 7d8bdf3acc166a2816e501b6a8c0b8ec126703de Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 16 Jan 2011 21:50:59 +0100 Subject: locales34: #i115482# added Lojban [jbo] to language list --- i18npool/inc/i18npool/lang.h | 1 + i18npool/source/isolang/isolang.cxx | 3 +++ svtools/source/misc/langtab.src | 1 + 3 files changed, 5 insertions(+) diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index 0fd4f38f0f6d..cc236cef103d 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -517,6 +517,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_RUSYN_SLOVAKIA 0x8256 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_USER_RUSYN_UKRAINE)) */ #define LANGUAGE_USER_YIDDISH_US 0x083D /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_YIDDISH)) */ #define LANGUAGE_USER_LIMBU 0x0657 +#define LANGUAGE_USER_LOJBAN 0x0658 /* no locale */ #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index dffc38873282..02b2d266e106 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -463,6 +463,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_RUSYN_UKRAINE, "rue", "UA" }, { LANGUAGE_USER_RUSYN_SLOVAKIA, "rue", "SK" }, { LANGUAGE_USER_LIMBU, "lif", "NP" }, + { LANGUAGE_USER_LOJBAN, "jbo", "" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW, "", "" } // marks end of table }; @@ -687,6 +688,7 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry( LanguageType nLan case LANGUAGE_BASQUE: case LANGUAGE_USER_ESPERANTO: case LANGUAGE_USER_INTERLINGUA: + case LANGUAGE_USER_LOJBAN: return *pEntry; default: ; // nothing @@ -767,6 +769,7 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry( case LANGUAGE_BASQUE: case LANGUAGE_USER_ESPERANTO: case LANGUAGE_USER_INTERLINGUA: + case LANGUAGE_USER_LOJBAN: return *pEntry; default: ; // nothing diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index f0d63077d69b..5e7295bb7a5d 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -326,6 +326,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Yiddish (USA)" ; LANGUAGE_USER_YIDDISH_US ; > ; < "Hawaiian" ; LANGUAGE_HAWAIIAN_UNITED_STATES ; > ; < "Limbu" ; LANGUAGE_USER_LIMBU ; > ; + < "Lojban" ; LANGUAGE_USER_LOJBAN ; > ; }; }; -- cgit From 4f92c0948774b3e85642699b38ee1d560515e271 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 16 Jan 2011 22:18:56 +0100 Subject: locales34: #i115633# added Kabyle [kab-DZ] to language list --- i18npool/inc/i18npool/lang.h | 1 + i18npool/source/isolang/isolang.cxx | 1 + svtools/source/misc/langtab.src | 1 + 3 files changed, 3 insertions(+) diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index cc236cef103d..91da0e3ec78f 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -518,6 +518,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_YIDDISH_US 0x083D /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_YIDDISH)) */ #define LANGUAGE_USER_LIMBU 0x0657 #define LANGUAGE_USER_LOJBAN 0x0658 /* no locale */ +#define LANGUAGE_USER_KABYLE 0x0659 #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 02b2d266e106..f174ad431a57 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -464,6 +464,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_RUSYN_SLOVAKIA, "rue", "SK" }, { LANGUAGE_USER_LIMBU, "lif", "NP" }, { LANGUAGE_USER_LOJBAN, "jbo", "" }, + { LANGUAGE_USER_KABYLE, "kab", "DZ" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW, "", "" } // marks end of table }; diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 5e7295bb7a5d..effe6506cb1f 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -327,6 +327,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Hawaiian" ; LANGUAGE_HAWAIIAN_UNITED_STATES ; > ; < "Limbu" ; LANGUAGE_USER_LIMBU ; > ; < "Lojban" ; LANGUAGE_USER_LOJBAN ; > ; + < "Kabyle" ; LANGUAGE_USER_KABYLE ; > ; }; }; -- cgit From 70315564786969decd1ee9eeb2549ce6545be1f3 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sun, 16 Jan 2011 22:18:58 +0100 Subject: gridsort: made the row title a row heading, being an Any instead of a string --- svtools/inc/svtools/table/tablemodel.hxx | 2 +- svtools/source/table/gridtablerenderer.cxx | 17 +++++++++++------ svtools/source/table/tablecontrol.cxx | 4 +++- svtools/source/table/tablecontrol_impl.cxx | 4 ++-- svtools/source/uno/svtxgridcontrol.cxx | 4 ++-- svtools/source/uno/svtxgridcontrol.hxx | 2 +- svtools/source/uno/unocontroltablemodel.cxx | 10 +++++----- svtools/source/uno/unocontroltablemodel.hxx | 2 +- .../source/controls/grid/defaultgriddatamodel.cxx | 22 +++++++++++----------- .../source/controls/grid/defaultgriddatamodel.hxx | 14 +++++++------- .../source/controls/grid/grideventforwarder.cxx | 4 ++-- .../source/controls/grid/grideventforwarder.hxx | 2 +- 12 files changed, 47 insertions(+), 40 deletions(-) diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index be2d21fff42c..c5855414db97 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -460,7 +460,7 @@ namespace svt { namespace table /** retrieves title of a given row */ - virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const = 0; + virtual ::com::sun::star::uno::Any getRowHeading( RowPos const i_rowPos ) const = 0; /** returns the color to be used for rendering the grid lines. diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 201c128855e6..ef3ef711267c 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -306,13 +306,18 @@ namespace svt { namespace table _rDevice.SetLineColor( lineColor ); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); - ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); - _rDevice.SetTextColor( textColor ); + Any const rowHeading( m_pImpl->rModel.getRowHeading( m_pImpl->nCurrentRow ) ); + ::rtl::OUString const rowTitle( CellValueConversion::convertToString( rowHeading ) ); + if ( rowTitle.getLength() ) + { + ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); + _rDevice.SetTextColor( textColor ); - Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); - ULONG const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, 0 ) | TEXT_DRAW_CLIP; - // TODO: is using the horizontal alignment of the 0'th column a good idea here? This is pretty ... arbitray .. - _rDevice.DrawText( aTextRect, m_pImpl->rModel.getRowHeader( m_pImpl->nCurrentRow ), nDrawTextFlags ); + Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); + ULONG const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, 0 ) | TEXT_DRAW_CLIP; + // TODO: is using the horizontal alignment of the 0'th column a good idea here? This is pretty ... arbitray .. + _rDevice.DrawText( aTextRect, rowTitle, nDrawTextFlags ); + } // TODO: active? selected? (void)_bActive; diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 500b2ca423e9..c448af323b8b 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -364,7 +364,9 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString TableControl::GetRowName( sal_Int32 _nIndex) const { - return GetModel()->getRowHeader( _nIndex ); + ::rtl::OUString sRowName; + GetModel()->getRowHeading( _nIndex ) >>= sRowName; + return sRowName; } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index e7d781018f34..26a11fd7049d 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -209,10 +209,10 @@ namespace svt { namespace table virtual void getCellToolTip( ColPos const, RowPos const, ::com::sun::star::uno::Any& ) { } - virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const + virtual Any getRowHeading( RowPos const i_rowPos ) const { (void)i_rowPos; - return ::rtl::OUString(); + return Any(); } }; diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index fe6c8fee5119..57c0040935cc 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -547,13 +547,13 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw } //---------------------------------------------------------------------------------------------------------------------- -void SAL_CALL SVTXGridControl::rowTitleChanged( const GridDataEvent& i_event ) throw (RuntimeException) +void SAL_CALL SVTXGridControl::rowHeadingChanged( const GridDataEvent& i_event ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); OSL_UNUSED( i_event ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowTitleChanged: no control (anymore)!" ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowHeadingChanged: no control (anymore)!" ); // TODO: we could do better than this - invalidate the header area only pTable->Invalidate(); diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index 7ac53ecd4cba..525327b3c760 100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -74,7 +74,7 @@ public: virtual void SAL_CALL rowsInserted( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rowTitleChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowHeadingChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); // XContainerListener virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index e2881eb22fc6..a47b798c7d59 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -566,24 +566,24 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - ::rtl::OUString UnoControlTableModel::getRowHeader( RowPos const i_rowPos ) const + Any UnoControlTableModel::getRowHeading( RowPos const i_rowPos ) const { DBG_CHECK_ME(); - ::rtl::OUString sRowHeader; + Any aRowHeading; Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); - ENSURE_OR_RETURN( xDataModel.is(), "UnoControlTableModel::getRowHeader: no data model anymore!", sRowHeader ); + ENSURE_OR_RETURN( xDataModel.is(), "UnoControlTableModel::getRowHeading: no data model anymore!", aRowHeading ); try { - sRowHeader = xDataModel->getRowTitle( i_rowPos ); + aRowHeading = xDataModel->getRowHeading( i_rowPos ); } catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); } - return sRowHeader; + return aRowHeading; } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index f89419ac071f..85a4b9480370 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -85,7 +85,7 @@ namespace svt { namespace table virtual void removeTableModelListener( const PTableModelListener& i_listener ); virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ); virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip ); - virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const; + virtual ::com::sun::star::uno::Any getRowHeading( RowPos const i_rowPos ) const; virtual ::boost::optional< ::Color > getLineColor() const; virtual ::boost::optional< ::Color > getHeaderBackgroundColor() const; virtual ::boost::optional< ::Color > getHeaderTextColor() const; diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index ab0ba1734e53..d113415ccf79 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -163,7 +163,7 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - ::rtl::OUString SAL_CALL DefaultGridDataModel::getRowTitle( ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) + Any SAL_CALL DefaultGridDataModel::getRowHeading( ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException) { ::comphelper::ComponentGuard aGuard( *this, rBHelper ); @@ -174,14 +174,14 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::addRow( const ::rtl::OUString& i_title, const Sequence< Any >& i_data ) throw (RuntimeException) + void SAL_CALL DefaultGridDataModel::addRow( const Any& i_heading, const Sequence< Any >& i_data ) throw (RuntimeException) { ::comphelper::ComponentGuard aGuard( *this, rBHelper ); sal_Int32 const columnCount = i_data.getLength(); // store header name - m_aRowHeaders.push_back( i_title ); + m_aRowHeaders.push_back( i_heading ); // store row m_aData impl_addRow( i_data ); @@ -213,14 +213,14 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::addRows( const Sequence< ::rtl::OUString >& i_titles, const Sequence< Sequence< Any > >& i_data ) throw (IllegalArgumentException, RuntimeException) + void SAL_CALL DefaultGridDataModel::addRows( const Sequence< Any >& i_headings, const Sequence< Sequence< Any > >& i_data ) throw (IllegalArgumentException, RuntimeException) { - if ( i_titles.getLength() != i_data.getLength() ) + if ( i_headings.getLength() != i_data.getLength() ) throw IllegalArgumentException( ::rtl::OUString(), *this, -1 ); ::comphelper::ComponentGuard aGuard( *this, rBHelper ); - sal_Int32 const rowCount = i_titles.getLength(); + sal_Int32 const rowCount = i_headings.getLength(); if ( rowCount == 0 ) return; @@ -235,7 +235,7 @@ namespace toolkit for ( sal_Int32 row=0; row= m_aRowHeaders.size() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); - m_aRowHeaders[ i_rowIndex ] = i_title; + m_aRowHeaders[ i_rowIndex ] = i_heading; broadcast( GridDataEvent( *this, -1, -1, i_rowIndex, i_rowIndex ), - &XGridDataListener::rowTitleChanged, + &XGridDataListener::rowHeadingChanged, aGuard ); } @@ -395,7 +395,7 @@ namespace toolkit GridData aEmptyData; m_aData.swap( aEmptyData ); - ::std::vector< ::rtl::OUString > aEmptyRowHeaders; + ::std::vector< Any > aEmptyRowHeaders; m_aRowHeaders.swap( aEmptyRowHeaders ); m_nColumnCount = 0; diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 7f87aa16cfa7..13a31277e533 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -63,13 +63,13 @@ public: virtual ~DefaultGridDataModel(); // XMutableGridDataModel - virtual void SAL_CALL addRow( const ::rtl::OUString& Title, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Data ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& Titles, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addRow( const Any& i_heading, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Data ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& Headings, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeRow( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRowData( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRowTitle( ::sal_Int32 RowIndex, const ::rtl::OUString& Title ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); @@ -80,7 +80,7 @@ public: virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL getCellToolTip( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getRowTitle( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getRowHeading( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); // OComponentHelper virtual void SAL_CALL disposing(); @@ -110,9 +110,9 @@ private: CellData& impl_getCellDataAccess_throw( sal_Int32 const i_columnIndex, sal_Int32 const i_rowIndex ); RowData& impl_getRowDataAccess_throw( sal_Int32 const i_rowIndex, size_t const i_requiredColumnCount ); - GridData m_aData; - ::std::vector< ::rtl::OUString > m_aRowHeaders; - sal_Int32 m_nColumnCount; + GridData m_aData; + ::std::vector< ::com::sun::star::uno::Any > m_aRowHeaders; + sal_Int32 m_nColumnCount; }; } diff --git a/toolkit/source/controls/grid/grideventforwarder.cxx b/toolkit/source/controls/grid/grideventforwarder.cxx index 68293025bd4e..c3760b8315a3 100755 --- a/toolkit/source/controls/grid/grideventforwarder.cxx +++ b/toolkit/source/controls/grid/grideventforwarder.cxx @@ -105,11 +105,11 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridEventForwarder::rowTitleChanged( const GridDataEvent& i_event ) throw (RuntimeException) + void SAL_CALL GridEventForwarder::rowHeadingChanged( const GridDataEvent& i_event ) throw (RuntimeException) { Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY ); if ( xPeer.is() ) - xPeer->rowTitleChanged( i_event ); + xPeer->rowHeadingChanged( i_event ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/grideventforwarder.hxx b/toolkit/source/controls/grid/grideventforwarder.hxx index 0abdcc59fd85..5a8b03f57037 100755 --- a/toolkit/source/controls/grid/grideventforwarder.hxx +++ b/toolkit/source/controls/grid/grideventforwarder.hxx @@ -64,7 +64,7 @@ namespace toolkit virtual void SAL_CALL rowsInserted( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rowTitleChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowHeadingChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); // XContainerListener virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); -- cgit From adb41f92c67c562e628cfa5ea0517bfd1613e520 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sun, 16 Jan 2011 22:18:58 +0100 Subject: gridsort: made the row title a row heading, being an Any instead of a string --- offapi/com/sun/star/awt/grid/XGridDataListener.idl | 2 +- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 12 +++++++----- offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl | 14 +++++++------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridDataListener.idl b/offapi/com/sun/star/awt/grid/XGridDataListener.idl index ef21ea96ec9f..709f048c08ce 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataListener.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataListener.idl @@ -66,7 +66,7 @@ interface XGridDataListener: com::sun::star::lang::XEventListener /** is called when the title of one or more rows changed. */ - void rowTitleChanged( [in] GridDataEvent Event ); + void rowHeadingChanged( [in] GridDataEvent Event ); }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index d686a04f2028..1ff15e1310e0 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -76,24 +76,26 @@ interface XGridDataModel

          At the moment, only string tool tips are supported.

          +

          If is returned here, the cell's content will be displayed as tip, but only if it does + not fit into the cell.

          + @throws ::com::sun::star::lang::IndexOutOfBoundsException if the column or row index do not denote a valid cell position. */ any getCellToolTip( [in] long Column, [in] long Row ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); - /** retrieves the title of the given row + /** retrieves the heading of a given row

          A grid control will usually paint a row's title in the header column of the respective row.

          -

          If is returned here, the cell's content will be displayed as tip, but only if it does - not fit into the cell.

          +

          At the moment, only strings are supported as row headings.

          @throws ::com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row. */ - string - getRowTitle( [in] long RowIndex ) + any + getRowHeading( [in] long RowIndex ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); }; diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index 8764fa705c7f..57409bbdedfd 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -43,22 +43,22 @@ interface XMutableGridDataModel : XGridDataModel { /** adds a row to the model. - @param Title - is the header title of the row. + @param Heading + denotes the heading of the row. @param Data specifies the content of the row. */ - void addRow( [in] string Title, [in] sequence< any > Data ); + void addRow( [in] any Heading, [in] sequence< any > Data ); /** adds multiple rows of data to the model. - @param Titles - specifies the header titles of the to-be-added rows. + @param Headings + denotes the headings of the to-be-added rows. @param Data specifies the data of the rows to be added. @throws ::com::sun::star::lang::IllegalArgumentException if Titles and Data are of different length. */ - void addRows( [in] sequence< string > Titles, [in] sequence< sequence< any > > Data ) + void addRows( [in] sequence< any > Headings, [in] sequence< sequence< any > > Data ) raises ( ::com::sun::star::lang::IllegalArgumentException ); /** removes a row of data from the model @@ -116,7 +116,7 @@ interface XMutableGridDataModel : XGridDataModel if the given index does not denote a valid row. */ void - setRowTitle( [in] long RowIndex, [in] string Title ) + setRowHeading( [in] long RowIndex, [in] any Heading ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** updates the tooltip to be displayed for a given cell -- cgit From f0d96ab85b324fc1ed3823a64e185b8ebe50c5c0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 17 Jan 2011 09:11:08 +0100 Subject: gridsort: ClearSelection -> SelectAllRows (forgot this client during a previous change) --- accessibility/source/extended/AccessibleGridControlTable.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 49e469675cef..e070426f29a4 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -264,7 +264,7 @@ void SAL_CALL AccessibleGridControlTable::clearAccessibleSelection() TCSolarGuard aSolarGuard; ::osl::MutexGuard aGuard( getOslMutex() ); ensureIsAlive(); - m_aTable.ClearSelection(); + m_aTable.SelectAllRows( false ); } void SAL_CALL AccessibleGridControlTable::selectAllAccessibleChildren() throw ( uno::RuntimeException ) -- cgit From 9c169fd0b2c6dc4961177b49d21d6e51dcb40701 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 17 Jan 2011 09:13:00 +0100 Subject: gridsort: UpdateTip: don't ignore the given text --- vcl/source/app/help.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 7e58a7cc4dc8..6f432e046a3b 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -299,6 +299,8 @@ void Help::UpdateTip( ULONG nId, Window* pParent, const Rectangle& rScreenRect, pHelpWin->SetOutputSizePixel( aSz ); ImplSetHelpWindowPos( pHelpWin, pHelpWin->GetWinStyle(), pHelpWin->GetStyle(), pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), &rScreenRect ); + + pHelpWin->SetHelpText( rText ); } // ----------------------------------------------------------------------- -- cgit From dbff9efb818fa543dac91591930d75bfee429a11 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 17 Jan 2011 12:19:05 +0100 Subject: gridsort: delegated the column resize functionality to the DefaultInputHandler implementation --- svtools/inc/svtools/table/defaultinputhandler.hxx | 5 +- .../inc/svtools/table/tablecontrolinterface.hxx | 103 +++++++-- svtools/source/table/defaultinputhandler.cxx | 131 +++++++++--- svtools/source/table/gridtablerenderer.cxx | 4 +- svtools/source/table/tablecontrol_impl.cxx | 233 ++++++++------------- svtools/source/table/tablecontrol_impl.hxx | 44 ++-- svtools/source/table/tabledatawindow.cxx | 129 +++++------- svtools/source/table/tabledatawindow.hxx | 3 - 8 files changed, 360 insertions(+), 292 deletions(-) diff --git a/svtools/inc/svtools/table/defaultinputhandler.hxx b/svtools/inc/svtools/table/defaultinputhandler.hxx index 31b5db319290..5be517d2c623 100644 --- a/svtools/inc/svtools/table/defaultinputhandler.hxx +++ b/svtools/inc/svtools/table/defaultinputhandler.hxx @@ -27,7 +27,8 @@ #ifndef SVTOOLS_INC_TABLE_DEFAULTINPUTHANDLER_HXX #define SVTOOLS_INC_TABLE_DEFAULTINPUTHANDLER_HXX -#include +#include "svtools/table/tableinputhandler.hxx" +#include "svtools/table/tabletypes.hxx" //........................................................................ namespace svt { namespace table @@ -44,7 +45,7 @@ namespace svt { namespace table friend class TableDataWindow; private: DefaultInputHandler_Impl* m_pImpl; - bool m_bResize; + ColPos m_nResizingColumn; public: DefaultInputHandler(); diff --git a/svtools/inc/svtools/table/tablecontrolinterface.hxx b/svtools/inc/svtools/table/tablecontrolinterface.hxx index 359fd65815ef..038a701173be 100644 --- a/svtools/inc/svtools/table/tablecontrolinterface.hxx +++ b/svtools/inc/svtools/table/tablecontrolinterface.hxx @@ -34,11 +34,16 @@ #include "svtools/table/tabletypes.hxx" #include "svtools/table/tablemodel.hxx" -//........................................................................ +class Pointer; + +//...................................................................................................................... namespace svt { namespace table { -//........................................................................ +//...................................................................................................................... + //================================================================================================================== + //= TableControlAction + //================================================================================================================== enum TableControlAction { /// moves the cursor in the table control one row up, if possible, by keeping the current column @@ -80,9 +85,70 @@ namespace svt { namespace table invalidTableControlAction }; - //==================================================================== + //================================================================================================================== + //= TableCellArea + //================================================================================================================== + enum TableCellArea + { + CellContent, + ColumnDivider + }; + + //================================================================================================================== + //= TableCell + //================================================================================================================== + struct TableCell + { + ColPos nColumn; + RowPos nRow; + TableCellArea eArea; + + TableCell() + :nColumn( COL_INVALID ) + ,nRow( ROW_INVALID ) + ,eArea( CellContent ) + { + } + + TableCell( ColPos const i_column, RowPos const i_row ) + :nColumn( i_column ) + ,nRow( i_row ) + ,eArea( CellContent ) + { + } + }; + + //================================================================================================================== + //= ColumnMetrics + //================================================================================================================== + struct ColumnMetrics + { + /** the start of the column, in pixels. Might be negative, in case the column is scrolled out of the visible + area. + */ + long nStartPixel; + + /** the end of the column, in pixels, plus 1. Effectively, this is the accumulated width of a all columns + up to the current one. + */ + long nEndPixel; + + ColumnMetrics() + :nStartPixel(0) + ,nEndPixel(0) + { + } + + ColumnMetrics( long const i_start, long const i_end ) + :nStartPixel( i_start ) + ,nEndPixel( i_end ) + { + } + }; + + //================================================================================================================== //= ITableControl - //==================================================================== + //================================================================================================================== /** defines a callback interface to be implemented by a concrete table control */ class SAL_NO_VTABLE ITableControl @@ -126,24 +192,35 @@ namespace svt { namespace table virtual PTableModel getModel() const = 0; /// returns the index of the currently active column - virtual ColPos getCurrentColumn() const = 0; + virtual ColPos getCurrentColumn() const = 0; /// returns the index of the currently active row - virtual RowPos getCurrentRow() const = 0; + virtual RowPos getCurrentRow() const = 0; + + virtual ::Size getTableSizePixel() const = 0; + virtual void setPointer( Pointer const & i_pointer ) = 0; + virtual void captureMouse() = 0; + virtual void releaseMouse() = 0; + virtual void invalidate() = 0; + virtual long pixelWidthToAppFont( long const i_pixels ) const = 0; + + virtual void hideTracking() = 0; + virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) = 0; virtual void activateCellAt( const Point& rPoint ) = 0; - virtual RowPos getRowAtPoint( const Point& rPoint ) const = 0; - virtual ColPos getColAtPoint( const Point& rPoint ) const = 0; - virtual void resizeColumn(const Point& rPoint ) = 0; - virtual bool checkResizeColumn(const Point& rPoint) = 0; - virtual bool endResizeColumn(const Point& rPoint) = 0; + + virtual RowPos getRowAtPoint( const Point& rPoint ) const = 0; + virtual ColPos getColAtPoint( const Point& rPoint ) const = 0; + virtual TableCell hitTest( const Point& rPoint ) const = 0; + virtual ColumnMetrics getColumnMetrics( ColPos const i_column ) const = 0; + virtual bool isRowSelected( RowPos _nRow ) const = 0; virtual ~ITableControl() {}; }; -//........................................................................ +//...................................................................................................................... } } // namespace svt::table -//........................................................................ +//...................................................................................................................... #endif // SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index 9b28860ca0ae..add92e850c4f 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -51,7 +51,7 @@ namespace svt { namespace table //-------------------------------------------------------------------- DefaultInputHandler::DefaultInputHandler() :m_pImpl( new DefaultInputHandler_Impl ) - ,m_bResize(false) + ,m_nResizingColumn( COL_INVALID ) { } @@ -62,40 +62,84 @@ namespace svt { namespace table } //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseMove( ITableControl& _rControl, const MouseEvent& _rMEvt ) + bool DefaultInputHandler::MouseMove( ITableControl& i_control, const MouseEvent& _rMEvt ) { - Point aPoint = _rMEvt.GetPosPixel(); - if ( m_bResize ) + Point const aPoint = _rMEvt.GetPosPixel(); + + // resize test + if ( m_nResizingColumn != COL_INVALID ) { - _rControl.resizeColumn( aPoint ); + ::Size const tableSize = i_control.getTableSizePixel(); + + // set proper pointer + Pointer aNewPointer( POINTER_ARROW ); + ColumnMetrics const & columnMetrics( i_control.getColumnMetrics( m_nResizingColumn ) ); + if ( ( aPoint.X() > tableSize.Width() ) + || ( aPoint.X() < columnMetrics.nStartPixel ) + ) + { + aNewPointer = Pointer( POINTER_NOTALLOWED ); + } + else + { + aNewPointer = Pointer( POINTER_HSPLIT ); + } + i_control.setPointer( aNewPointer ); + + // show tracking line + i_control.hideTracking(); + i_control.showTracking( + Rectangle( + Point( aPoint.X(), 0 ), + Size( 1, tableSize.Height() ) + ), + SHOWTRACK_SPLIT | SHOWTRACK_WINDOW + ); return true; } - return false; + + // test for column divider, adjust the mouse pointer, if necessary + Pointer aNewPointer( POINTER_ARROW ); + + TableCell const tableCell = i_control.hitTest( aPoint ); + if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.eArea == ColumnDivider ) ) + { + aNewPointer = Pointer( POINTER_HSPLIT ); + } + + i_control.setPointer( aNewPointer ); + return true; } //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseButtonDown( ITableControl& _rControl, const MouseEvent& _rMEvt ) + bool DefaultInputHandler::MouseButtonDown( ITableControl& i_tableControl, const MouseEvent& _rMEvt ) { bool bHandled = false; - Point aPoint = _rMEvt.GetPosPixel(); - RowPos nRow = _rControl.getRowAtPoint( aPoint ); - if ( nRow == ROW_COL_HEADERS ) + Point const aPoint = _rMEvt.GetPosPixel(); + TableCell const tableCell( i_tableControl.hitTest( aPoint ) ); + if ( tableCell.nRow == ROW_COL_HEADERS ) { - m_bResize = _rControl.checkResizeColumn(aPoint); + if ( ( tableCell.nColumn != COL_INVALID ) + && ( tableCell.eArea == ColumnDivider ) + ) + { + m_nResizingColumn = tableCell.nColumn; + i_tableControl.captureMouse(); + } bHandled = true; } - else if(nRow >= 0) + else if ( tableCell.nRow >= 0 ) { bool bSetCursor = false; - if ( _rControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) + if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) { bSetCursor = true; } else { - if ( !_rControl.isRowSelected( nRow ) ) + if ( !i_tableControl.isRowSelected( tableCell.nRow ) ) { - bHandled = _rControl.getSelEngine()->SelMouseButtonDown( _rMEvt ); + bHandled = i_tableControl.getSelEngine()->SelMouseButtonDown( _rMEvt ); } else { @@ -105,32 +149,71 @@ namespace svt { namespace table if ( bSetCursor ) { - _rControl.activateCellAt( aPoint ); + i_tableControl.activateCellAt( aPoint ); bHandled = true; } } return bHandled; } //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseButtonUp( ITableControl& _rControl, const MouseEvent& _rMEvt ) + bool DefaultInputHandler::MouseButtonUp( ITableControl& i_tableControl, const MouseEvent& _rMEvt ) { bool bHandled = false; - const Point aPoint = _rMEvt.GetPosPixel(); - - if ( m_bResize ) + Point const aPoint = _rMEvt.GetPosPixel(); + if ( m_nResizingColumn != COL_INVALID ) { - m_bResize = _rControl.endResizeColumn( aPoint ); + i_tableControl.hideTracking(); + PColumnModel const pColumn = i_tableControl.getModel()->getColumnModel( m_nResizingColumn ); + long const maxWidthLogical = pColumn->getMaxWidth(); + long const minWidthLogical = pColumn->getMinWidth(); + + // new position of mouse + long const requestedEnd = aPoint.X(); + + // old position of right border + long const oldEnd = i_tableControl.getColumnMetrics( m_nResizingColumn ).nEndPixel; + + // position of left border if cursor in the to-be-resized column + long const columnStart = i_tableControl.getColumnMetrics( m_nResizingColumn ).nStartPixel; + long const requestedWidth = requestedEnd - columnStart; + // TODO: this is not correct, strictly: It assumes that the mouse was pressed exactly on the "end" pos, + // but for a while now, we have relaxed this, and allow clicking a few pixels aside, too + + if ( requestedEnd >= columnStart ) + { + long requestedWidthLogical = i_tableControl.pixelWidthToAppFont( requestedWidth ); + // respect column width limits + if ( oldEnd > requestedEnd ) + { + // column has become smaller, check against minimum width + if ( ( minWidthLogical != 0 ) && ( requestedWidthLogical < minWidthLogical ) ) + requestedWidthLogical = minWidthLogical; + } + else if ( oldEnd < requestedEnd ) + { + // column has become larger, check against max width + if ( ( maxWidthLogical != 0 ) && ( requestedWidthLogical >= maxWidthLogical ) ) + requestedWidthLogical = maxWidthLogical; + } + pColumn->setWidth( requestedWidthLogical ); + i_tableControl.invalidate(); + } + + i_tableControl.setPointer( Pointer() ); + i_tableControl.releaseMouse(); + + m_nResizingColumn = COL_INVALID; bHandled = true; } - else if ( _rControl.getRowAtPoint( aPoint ) >= 0 ) + else if ( i_tableControl.getRowAtPoint( aPoint ) >= 0 ) { - if ( _rControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) + if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) { bHandled = true; } else { - bHandled = _rControl.getSelEngine()->SelMouseButtonUp( _rMEvt ); + bHandled = i_tableControl.getSelEngine()->SelMouseButtonUp( _rMEvt ); } } return bHandled; diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index ef3ef711267c..5fa7e0ab6f8d 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -202,7 +202,7 @@ namespace svt { namespace table _rDevice.Push( PUSH_LINECOLOR); String sHeaderText; - PColumnModel pColumn = m_pImpl->rModel.getColumnModel( _nCol ); + PColumnModel const pColumn = m_pImpl->rModel.getColumnModel( _nCol ); DBG_ASSERT( !!pColumn, "GridTableRenderer::PaintColumnHeader: invalid column model object!" ); if ( !!pColumn ) sHeaderText = pColumn->getName(); @@ -214,7 +214,7 @@ namespace svt { namespace table ULONG const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, _nCol ) | TEXT_DRAW_CLIP; _rDevice.DrawText( aTextRect, sHeaderText, nDrawTextFlags ); - ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() ); + ::boost::optional< ::Color > const aLineColor( m_pImpl->rModel.getLineColor() ); ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; _rDevice.SetLineColor( lineColor ); _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight()); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 26a11fd7049d..cdae26548a43 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -434,8 +434,6 @@ namespace svt { namespace table ,m_aSelectedRows ( ) ,m_pTableFunctionSet ( new TableFunctionSet( this ) ) ,m_nAnchor ( -1 ) - ,m_bResizingColumn ( false ) - ,m_nResizingColumn ( 0 ) ,m_bResizingGrid ( false ) ,m_bUpdatingColWidths ( false ) ,m_pAccessibleTable ( NULL ) @@ -712,7 +710,10 @@ namespace svt { namespace table if ( nGroup & COL_ATTRS_WIDTH ) { if ( !m_bUpdatingColWidths ) + { impl_ni_updateColumnWidths(); + impl_ni_updateScrollbars(); + } nGroup &= ~COL_ATTRS_WIDTH; } @@ -901,7 +902,7 @@ namespace svt { namespace table const long columnStart = accumulatedPixelWidth; const long columnEnd = columnStart + aPrePixelWidths[i]; - m_aColumnWidths.push_back( ColumnWidthInfo( columnStart, columnEnd ) ); + m_aColumnWidths.push_back( MutableColumnMetrics( columnStart, columnEnd ) ); accumulatedPixelWidth = columnEnd; } @@ -925,7 +926,7 @@ namespace svt { namespace table ) { // make the last resizable column wider - ColumnWidthInfo& rResizeColInfo( m_aColumnWidths[ lastResizableCol ] ); + MutableColumnMetrics& rResizeColInfo( m_aColumnWidths[ lastResizableCol ] ); rResizeColInfo.setEnd( rResizeColInfo.getEnd() + freeSpaceRight ); // update the column model @@ -1198,8 +1199,7 @@ namespace svt { namespace table { if ( m_nColumnCount != 0 ) { - if ( m_bResizingGrid ) - impl_ni_updateColumnWidths(); + impl_ni_updateColumnWidths(); impl_ni_updateScrollbars(); checkCursorPosition(); m_bResizingGrid = true; @@ -1207,16 +1207,15 @@ namespace svt { namespace table } else { - //In the case that column headers are defined but data hasn't yet been set, - //only column headers will be shown + // In the case that column headers are defined but data hasn't yet been set, + // only column headers will be shown if ( m_pModel->hasColumnHeaders() ) { if ( m_nColHeaderHeightPixel > 1 ) { m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel() ); - if ( m_bResizingGrid ) - //update column widths to fit in grid - impl_ni_updateColumnWidths(); + // update column widths to fit in grid + impl_ni_updateColumnWidths(); m_bResizingGrid = true; } } @@ -1826,18 +1825,36 @@ namespace svt { namespace table if ( ( rPoint.X() >= 0 ) && ( rPoint.X() < m_nRowHeaderWidthPixel ) ) return COL_ROW_HEADERS; - Rectangle aAllCellsArea; - impl_getAllVisibleCellsArea( aAllCellsArea ); + return impl_getColumnForOrdinate( rPoint.X() ); + } - TableColumnGeometry aHitTest( *this, aAllCellsArea, COL_ROW_HEADERS ); - while ( aHitTest.isValid() ) + //------------------------------------------------------------------------------------------------------------------ + TableCell TableControl_Impl::hitTest( Point const & i_point ) const + { + TableCell aCell( getColAtPoint( i_point ), getRowAtPoint( i_point ) ); + if ( aCell.nColumn > COL_ROW_HEADERS ) { - if ( aHitTest.getRect().IsInside( rPoint ) ) - return aHitTest.getCol(); - aHitTest.moveRight(); + PColumnModel const pColumn = m_pModel->getColumnModel( aCell.nColumn ); + MutableColumnMetrics const & rColInfo( m_aColumnWidths[ aCell.nColumn ] ); + if ( ( rColInfo.getEnd() - 3 <= i_point.X() ) + && ( rColInfo.getEnd() >= i_point.X() ) + && pColumn->isResizable() + ) + { + aCell.eArea = ColumnDivider; + } } + return aCell; + } + + //------------------------------------------------------------------------------------------------------------------ + ColumnMetrics TableControl_Impl::getColumnMetrics( ColPos const i_column ) const + { + DBG_CHECK_ME(); - return COL_INVALID; + ENSURE_OR_RETURN( ( i_column >= 0 ) && ( i_column < m_pModel->getColumnCount() ), + "TableControl_Impl::getColumnMetrics: illegal column index!", ColumnMetrics() ); + return (ColumnMetrics const &)m_aColumnWidths[ i_column ]; } //------------------------------------------------------------------------------------------------------------------ @@ -1858,6 +1875,55 @@ namespace svt { namespace table return m_nCurRow; } + //------------------------------------------------------------------------------------------------------------------ + ::Size TableControl_Impl::getTableSizePixel() const + { + return m_pDataWindow->GetOutputSizePixel(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::setPointer( Pointer const & i_pointer ) + { + DBG_CHECK_ME(); + m_pDataWindow->SetPointer( i_pointer ); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::captureMouse() + { + m_pDataWindow->CaptureMouse(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::releaseMouse() + { + m_pDataWindow->ReleaseMouse(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::invalidate() + { + m_pDataWindow->Invalidate(); + } + + //------------------------------------------------------------------------------------------------------------------ + long TableControl_Impl::pixelWidthToAppFont( long const i_pixels ) const + { + return m_pDataWindow->PixelToLogic( Size( i_pixels, 0 ), MAP_APPFONT ).Width(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::hideTracking() + { + m_pDataWindow->HideTracking(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TableControl_Impl::showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) + { + m_pDataWindow->ShowTracking( i_location, i_flags ); + } + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::activateCellAt(const Point& rPoint) { @@ -2344,135 +2410,6 @@ namespace svt { namespace table return true; } - //-------------------------------------------------------------------- - void TableControl_Impl::resizeColumn( const Point& rPoint ) - { - Pointer aNewPointer( POINTER_ARROW ); - const ColPos hitColumn = impl_getColumnForOrdinate( rPoint.X() ); - if ( m_bResizingColumn ) - { - const ColumnWidthInfo& rColInfo( m_aColumnWidths[ m_nResizingColumn ] ); - if ( ( rPoint.X() > m_pDataWindow->GetOutputSizePixel().Width() ) - || ( rPoint.X() < rColInfo.getStart() ) - ) - { - aNewPointer = Pointer( POINTER_NOTALLOWED ); - } - else - { - aNewPointer = Pointer( POINTER_HSPLIT ); - } - m_pDataWindow->HideTracking(); - - int lineHeight = m_nColHeaderHeightPixel; - lineHeight += m_nRowHeightPixel * m_nRowCount; - const int gridHeight = m_pDataWindow->GetOutputSizePixel().Height(); - if ( lineHeight >= gridHeight ) - lineHeight = gridHeight; - - m_pDataWindow->ShowTracking( - Rectangle( - Point( rPoint.X(), 0 ), - Size( 1, lineHeight ) - ), - SHOWTRACK_SPLIT | SHOWTRACK_WINDOW - ); - } - else if ( hitColumn != COL_INVALID ) - { - // hit test for the column separator - const PColumnModel pColumn = m_pModel->getColumnModel( hitColumn ); - const ColumnWidthInfo& rColInfo( m_aColumnWidths[ hitColumn ] ); - if ( ( rColInfo.getEnd() - 2 <= rPoint.X() ) - && ( rColInfo.getEnd() + 2 > rPoint.X() ) - && pColumn->isResizable() - ) - aNewPointer = Pointer( POINTER_HSPLIT ); - } - - m_pDataWindow->SetPointer( aNewPointer ); - } - - //-------------------------------------------------------------------- - bool TableControl_Impl::checkResizeColumn( const Point& rPoint ) - { - m_bResizingGrid = false; - - if ( m_bResizingColumn ) - return true; - - const ColPos hitColumn = impl_getColumnForOrdinate( rPoint.X() ); - if ( hitColumn == COL_INVALID ) - return false; - - const PColumnModel pColumn = m_pModel->getColumnModel( hitColumn ); - const ColumnWidthInfo& rColInfo( m_aColumnWidths[ hitColumn ] ); - - // hit test for the column separator - if ( ( rColInfo.getEnd() - 2 <= rPoint.X() ) - && ( rColInfo.getEnd() + 2 > rPoint.X() ) - && pColumn->isResizable() - ) - { - m_nResizingColumn = hitColumn; - m_pDataWindow->CaptureMouse(); - m_bResizingColumn = true; - } - return m_bResizingColumn; - } - //-------------------------------------------------------------------- - bool TableControl_Impl::endResizeColumn( const Point& rPoint ) - { - DBG_CHECK_ME(); - ENSURE_OR_RETURN_FALSE( m_bResizingColumn, "TableControl_Impl::endResizeColumn: not resizing currently!" ); - - m_pDataWindow->HideTracking(); - const PColumnModel pColumn = m_pModel->getColumnModel( m_nResizingColumn ); - const long maxWidthLogical = pColumn->getMaxWidth(); - const long minWidthLogical = pColumn->getMinWidth(); - - // new position of mouse - const long requestedEnd = rPoint.X(); - - // old position of right border - const long oldEnd = m_aColumnWidths[ m_nResizingColumn ].getEnd(); - - // position of left border if cursor in the to-be-resized column - const long columnStart = m_aColumnWidths[ m_nResizingColumn ].getStart(); - const long requestedWidth = requestedEnd - columnStart; - // TODO: this is not correct, strictly: It assumes that the mouse was pressed exactly on the "end" pos, - // but for a while now, we have relaxed this, and allow clicking a few pixels aside, too - - if ( requestedEnd >= columnStart ) - { - long requestedWidthLogical = m_rAntiImpl.PixelToLogic( Size( requestedWidth, 0 ), MAP_APPFONT ).Width(); - // respect column width limits - if ( oldEnd > requestedEnd ) - { - // column has become smaller, check against minimum width - if ( ( minWidthLogical != 0 ) && ( requestedWidthLogical < minWidthLogical ) ) - requestedWidthLogical = minWidthLogical; - } - else if ( oldEnd < requestedEnd ) - { - // column has become larger, check against max width - if ( ( maxWidthLogical != 0 ) && ( requestedWidthLogical >= maxWidthLogical ) ) - requestedWidthLogical = maxWidthLogical; - } - pColumn->setPreferredWidth( requestedWidthLogical ); - } - - impl_ni_updateColumnWidths(); - impl_ni_updateScrollbars(); - m_pDataWindow->Invalidate( INVALIDATE_UPDATE ); - m_pDataWindow->SetPointer( Pointer() ); - m_bResizingColumn = false; - m_bResizingGrid = true; - - m_pDataWindow->ReleaseMouse(); - return m_bResizingColumn; - } - //-------------------------------------------------------------------- Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader) { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 721847caaf7b..5b84cd9ca4cd 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -46,17 +46,15 @@ namespace svt { namespace table { //........................................................................ - struct ColumnWidthInfo + struct MutableColumnMetrics : protected ColumnMetrics { - ColumnWidthInfo() - :nStartPixel( 0 ) - ,nEndPixel( 0 ) + MutableColumnMetrics() + :ColumnMetrics() { } - ColumnWidthInfo( long const i_startPixel, long const i_endPixel ) - :nStartPixel( i_startPixel ) - ,nEndPixel( i_endPixel ) + MutableColumnMetrics( long const i_startPixel, long const i_endPixel ) + :ColumnMetrics( i_startPixel, i_endPixel ) { } @@ -68,31 +66,22 @@ namespace svt { namespace table long getWidth() const { return nEndPixel - nStartPixel; } - private: - /** the start of the column, in pixels. Might be negative, in case the column is scrolled out of the visible - area. - */ - long nStartPixel; - - /** the end of the column, in pixels, plus 1. Effectively, this is the accumulated width of a all columns - up to the current one. - */ - long nEndPixel; + ColumnMetrics const & operator()() { return *this; } }; struct ColumnInfoPositionLess { - bool operator()( ColumnWidthInfo const& i_colInfo, long const i_position ) + bool operator()( MutableColumnMetrics const& i_colInfo, long const i_position ) { return i_colInfo.getEnd() < i_position; } - bool operator()( long const i_position, ColumnWidthInfo const& i_colInfo ) + bool operator()( long const i_position, MutableColumnMetrics const& i_colInfo ) { return i_position < i_colInfo.getStart(); } }; - typedef ::std::vector< ColumnWidthInfo > ColumnPositions; + typedef ::std::vector< MutableColumnMetrics > ColumnPositions; class TableControl; class TableDataWindow; @@ -159,8 +148,6 @@ namespace svt { namespace table TableFunctionSet* m_pTableFunctionSet; //part of selection engine RowPos m_nAnchor; - bool m_bResizingColumn; - ColPos m_nResizingColumn; bool m_bResizingGrid; bool m_bUpdatingColWidths; @@ -287,12 +274,19 @@ namespace svt { namespace table virtual PTableModel getModel() const; virtual ColPos getCurrentColumn() const; virtual RowPos getCurrentRow() const; + virtual ::Size getTableSizePixel() const; + virtual void setPointer( Pointer const & i_pointer ); + virtual void captureMouse(); + virtual void releaseMouse(); + virtual void invalidate(); + virtual long pixelWidthToAppFont( long const i_pixels ) const; + virtual void hideTracking(); + virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ); virtual void activateCellAt( const Point& rPoint ); virtual RowPos getRowAtPoint( const Point& rPoint ) const; virtual ColPos getColAtPoint( const Point& rPoint ) const; - virtual void resizeColumn(const Point& rPoint); - virtual bool checkResizeColumn(const Point& rPoint); - virtual bool endResizeColumn(const Point& rPoint); + virtual TableCell hitTest( const Point& rPoint ) const; + virtual ColumnMetrics getColumnMetrics( ColPos const i_column ) const; virtual bool isRowSelected( RowPos i_row ) const; diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 36966d92aea5..cdf909d9fa65 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -96,71 +96,71 @@ namespace svt { namespace table void TableDataWindow::RequestHelp( const HelpEvent& rHEvt ) { USHORT const nHelpMode = rHEvt.GetMode(); - if ( ( nHelpMode & HELPMODE_QUICK ) != 0 ) + if ( ( IsMouseCaptured() ) + || ( ( nHelpMode & HELPMODE_QUICK ) == 0 ) + ) { - ITableControl& rTableControl = m_rTableControl; - PTableModel const pTableModel( rTableControl.getModel() ); - - Point const aMousePos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); + Window::RequestHelp( rHEvt ); + return; + } - RowPos const hitRow = rTableControl.getRowAtPoint( aMousePos ); - ColPos const hitCol = rTableControl.getColAtPoint( aMousePos ); + ::rtl::OUString sHelpText; + USHORT nHelpStyle = 0; - ::rtl::OUString sHelpText; - USHORT nHelpStyle = 0; + Point const aMousePos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); + RowPos const hitRow = m_rTableControl.getRowAtPoint( aMousePos ); + ColPos const hitCol = m_rTableControl.getColAtPoint( aMousePos ); - if ( ( hitCol >= 0 ) && ( hitCol < pTableModel->getColumnCount() ) ) + PTableModel const pTableModel( m_rTableControl.getModel() ); + if ( ( hitCol >= 0 ) && ( hitCol < pTableModel->getColumnCount() ) ) + { + if ( hitRow == ROW_COL_HEADERS ) { - if ( hitRow == ROW_COL_HEADERS ) - { - sHelpText = pTableModel->getColumnModel( hitCol )->getHelpText(); - } - else if ( ( hitRow >= 0 ) && ( hitRow < pTableModel->getRowCount() ) ) + sHelpText = pTableModel->getColumnModel( hitCol )->getHelpText(); + } + else if ( ( hitRow >= 0 ) && ( hitRow < pTableModel->getRowCount() ) ) + { + Any aCellToolTip; + pTableModel->getCellToolTip( hitCol, hitRow, aCellToolTip ); + if ( !aCellToolTip.hasValue() ) { - Any aCellToolTip; - pTableModel->getCellToolTip( hitCol, hitRow, aCellToolTip ); - if ( !aCellToolTip.hasValue() ) - { - // use the cell content - pTableModel->getCellContent( hitCol, hitRow, aCellToolTip ); - - // use the cell content as tool tip only if it doesn't fit into the cell. - bool const activeCell = ( hitRow == rTableControl.getCurrentRow() ) && ( hitCol == rTableControl.getCurrentColumn() ); - bool const selectedCell = rTableControl.isRowSelected( hitRow ); + // use the cell content + pTableModel->getCellContent( hitCol, hitRow, aCellToolTip ); - Rectangle const aWindowRect( Point( 0, 0 ), GetOutputSizePixel() ); - TableCellGeometry const aCell( m_rTableControl, aWindowRect, hitCol, hitRow ); - Rectangle const aCellRect( aCell.getRect() ); + // use the cell content as tool tip only if it doesn't fit into the cell. + bool const activeCell = ( hitRow == m_rTableControl.getCurrentRow() ) && ( hitCol == m_rTableControl.getCurrentColumn() ); + bool const selectedCell = m_rTableControl.isRowSelected( hitRow ); - PTableRenderer const pRenderer = pTableModel->getRenderer(); - if ( pRenderer->FitsIntoCell( aCellToolTip, hitCol, hitRow, activeCell, selectedCell, *this, aCellRect ) ) - aCellToolTip.clear(); - } + Rectangle const aWindowRect( Point( 0, 0 ), GetOutputSizePixel() ); + TableCellGeometry const aCell( m_rTableControl, aWindowRect, hitCol, hitRow ); + Rectangle const aCellRect( aCell.getRect() ); - sHelpText = CellValueConversion::convertToString( aCellToolTip ); - - if ( sHelpText.indexOf( '\n' ) >= 0 ) - nHelpStyle = QUICKHELP_TIP_STYLE_BALLOON; + PTableRenderer const pRenderer = pTableModel->getRenderer(); + if ( pRenderer->FitsIntoCell( aCellToolTip, hitCol, hitRow, activeCell, selectedCell, *this, aCellRect ) ) + aCellToolTip.clear(); } - } - if ( sHelpText.getLength() ) - { - Rectangle const aControlScreenRect( - OutputToScreenPixel( Point( 0, 0 ) ), - GetOutputSizePixel() - ); + sHelpText = CellValueConversion::convertToString( aCellToolTip ); - if ( m_nTipWindowHandle ) - Help::UpdateTip( m_nTipWindowHandle, this, aControlScreenRect, sHelpText ); - else - m_nTipWindowHandle = Help::ShowTip( this, aControlScreenRect, sHelpText, nHelpStyle ); + if ( sHelpText.indexOf( '\n' ) >= 0 ) + nHelpStyle = QUICKHELP_TIP_STYLE_BALLOON; } } - else + + if ( sHelpText.getLength() ) { - Window::RequestHelp( rHEvt ); + Rectangle const aControlScreenRect( + OutputToScreenPixel( Point( 0, 0 ) ), + GetOutputSizePixel() + ); + + if ( m_nTipWindowHandle ) + Help::UpdateTip( m_nTipWindowHandle, this, aControlScreenRect, sHelpText ); + else + m_nTipWindowHandle = Help::ShowTip( this, aControlScreenRect, sHelpText, nHelpStyle ); } + else + impl_hideTipWindow(); } //------------------------------------------------------------------------------------------------------------------ @@ -179,24 +179,18 @@ namespace svt { namespace table if ( rMEvt.IsLeaveWindow() ) impl_hideTipWindow(); - Point aPoint = rMEvt.GetPosPixel(); if ( !m_rTableControl.getInputHandler()->MouseMove( m_rTableControl, rMEvt ) ) { - if ( m_rTableControl.getRowAtPoint( aPoint ) == ROW_COL_HEADERS ) - { - m_rTableControl.resizeColumn( aPoint ); - } - else - { - Window::MouseMove( rMEvt ); - } + Window::MouseMove( rMEvt ); } } //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::MouseButtonDown( const MouseEvent& rMEvt ) { - const Point aPoint = rMEvt.GetPosPixel(); - const RowPos nCurRow = m_rTableControl.getRowAtPoint( aPoint ); + impl_hideTipWindow(); + + Point const aPoint = rMEvt.GetPosPixel(); + RowPos const nCurRow = m_rTableControl.getRowAtPoint( aPoint ); if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) ) Window::MouseButtonDown( rMEvt ); else @@ -219,21 +213,6 @@ namespace svt { namespace table m_aMouseButtonUpHdl.Call((MouseEvent*) &rMEvt); m_rTableControl.getAntiImpl().GrabFocus(); } - //------------------------------------------------------------------------------------------------------------------ - void TableDataWindow::SetPointer( const Pointer& rPointer ) - { - Window::SetPointer(rPointer); - } - //------------------------------------------------------------------------------------------------------------------ - void TableDataWindow::CaptureMouse() - { - Window::CaptureMouse(); - } - //------------------------------------------------------------------------------------------------------------------ - void TableDataWindow::ReleaseMouse( ) - { - Window::ReleaseMouse(); - } // ----------------------------------------------------------------------- long TableDataWindow::Notify(NotifyEvent& rNEvt ) { diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx index 45ffec92c286..68532fb71793 100644 --- a/svtools/source/table/tabledatawindow.hxx +++ b/svtools/source/table/tabledatawindow.hxx @@ -73,9 +73,6 @@ namespace svt { namespace table virtual void MouseMove( const MouseEvent& rMEvt); virtual void MouseButtonDown( const MouseEvent& rMEvt); virtual void MouseButtonUp( const MouseEvent& rMEvt); - virtual void SetPointer( const Pointer& rPointer ); - virtual void CaptureMouse(); - virtual void ReleaseMouse(); virtual long Notify(NotifyEvent& rNEvt); virtual void SetControlBackground(const Color& rColor); virtual void SetControlBackground(); -- cgit From 1a31d1f55bf8d28069dd4b9d353f42e12bcb3e04 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 17 Jan 2011 13:14:28 +0100 Subject: gridsort: outsourced the column-resizing functionality into a dedicated class. Less cluttering in the InputHandler implementation this way. Same outsourcing is still to happen to the row selection functionality. The upcoming feature of column sorting will be a IMouseFunction implementation, too. --- svtools/inc/svtools/table/defaultinputhandler.hxx | 18 +- svtools/source/table/defaultinputhandler.cxx | 219 ++++++++++------------ svtools/source/table/makefile.mk | 1 + svtools/source/table/mousefunction.cxx | 194 +++++++++++++++++++ svtools/source/table/mousefunction.hxx | 119 ++++++++++++ 5 files changed, 420 insertions(+), 131 deletions(-) create mode 100755 svtools/source/table/mousefunction.cxx create mode 100755 svtools/source/table/mousefunction.hxx diff --git a/svtools/inc/svtools/table/defaultinputhandler.hxx b/svtools/inc/svtools/table/defaultinputhandler.hxx index 5be517d2c623..6990f903cdb2 100644 --- a/svtools/inc/svtools/table/defaultinputhandler.hxx +++ b/svtools/inc/svtools/table/defaultinputhandler.hxx @@ -30,22 +30,22 @@ #include "svtools/table/tableinputhandler.hxx" #include "svtools/table/tabletypes.hxx" -//........................................................................ +#include + +//...................................................................................................................... namespace svt { namespace table { -//........................................................................ +//...................................................................................................................... struct DefaultInputHandler_Impl; - //==================================================================== + //================================================================================================================== //= DefaultInputHandler - //==================================================================== + //================================================================================================================== class DefaultInputHandler : public ITableInputHandler { - friend class TableDataWindow; private: - DefaultInputHandler_Impl* m_pImpl; - ColPos m_nResizingColumn; + ::boost::scoped_ptr< DefaultInputHandler_Impl > m_pImpl; public: DefaultInputHandler(); @@ -63,8 +63,8 @@ namespace svt { namespace table virtual bool Notify ( ITableControl& _rControl, NotifyEvent& rNEvt ); }; -//........................................................................ +//...................................................................................................................... } } // namespace svt::table -//........................................................................ +//...................................................................................................................... #endif // SVTOOLS_INC_TABLE_DEFAULTINPUTHANDLER_HXX diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index add92e850c4f..4c9dc2f415d9 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -31,104 +31,116 @@ #include "svtools/table/tablecontrolinterface.hxx" #include "tabledatawindow.hxx" +#include "mousefunction.hxx" #include #include #include -//........................................................................ +//...................................................................................................................... namespace svt { namespace table { -//....................................................................... +//...................................................................................................................... + typedef ::rtl::Reference< IMouseFunction > PMouseFunction; + typedef ::std::vector< PMouseFunction > MouseFunctions; struct DefaultInputHandler_Impl { + PMouseFunction pActiveFunction; + MouseFunctions aMouseFunctions; }; - //==================================================================== + //================================================================================================================== //= DefaultInputHandler - //==================================================================== - //-------------------------------------------------------------------- + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ DefaultInputHandler::DefaultInputHandler() :m_pImpl( new DefaultInputHandler_Impl ) - ,m_nResizingColumn( COL_INVALID ) { + m_pImpl->aMouseFunctions.push_back( new ColumnResize ); } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ DefaultInputHandler::~DefaultInputHandler() { - DELETEZ( m_pImpl ); } - //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseMove( ITableControl& i_control, const MouseEvent& _rMEvt ) + //------------------------------------------------------------------------------------------------------------------ + namespace { - Point const aPoint = _rMEvt.GetPosPixel(); - - // resize test - if ( m_nResizingColumn != COL_INVALID ) + bool lcl_delegateMouseEvent( DefaultInputHandler_Impl& i_impl, ITableControl& i_control, const MouseEvent& i_event, + FunctionResult ( IMouseFunction::*i_handlerMethod )( ITableControl&, const MouseEvent& ) ) { - ::Size const tableSize = i_control.getTableSizePixel(); - - // set proper pointer - Pointer aNewPointer( POINTER_ARROW ); - ColumnMetrics const & columnMetrics( i_control.getColumnMetrics( m_nResizingColumn ) ); - if ( ( aPoint.X() > tableSize.Width() ) - || ( aPoint.X() < columnMetrics.nStartPixel ) - ) - { - aNewPointer = Pointer( POINTER_NOTALLOWED ); - } - else + if ( i_impl.pActiveFunction.is() ) { - aNewPointer = Pointer( POINTER_HSPLIT ); + bool furtherHandler = false; + switch ( (i_impl.pActiveFunction.get()->*i_handlerMethod)( i_control, i_event ) ) + { + case ActivateFunction: + OSL_ENSURE( false, "lcl_delegateMouseEvent: unexpected - function already *is* active!" ); + break; + case ContinueFunction: + break; + case DeactivateFunction: + i_impl.pActiveFunction.clear(); + break; + case SkipFunction: + furtherHandler = true; + break; + } + if ( !furtherHandler ) + // handled the event + return true; } - i_control.setPointer( aNewPointer ); - - // show tracking line - i_control.hideTracking(); - i_control.showTracking( - Rectangle( - Point( aPoint.X(), 0 ), - Size( 1, tableSize.Height() ) - ), - SHOWTRACK_SPLIT | SHOWTRACK_WINDOW - ); - return true; - } - // test for column divider, adjust the mouse pointer, if necessary - Pointer aNewPointer( POINTER_ARROW ); + // ask all other handlers + bool handled = false; + for ( MouseFunctions::iterator handler = i_impl.aMouseFunctions.begin(); + ( handler != i_impl.aMouseFunctions.end() ) && !handled; + ++handler + ) + { + if ( *handler == i_impl.pActiveFunction ) + // we already invoked this function + continue; - TableCell const tableCell = i_control.hitTest( aPoint ); - if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.eArea == ColumnDivider ) ) - { - aNewPointer = Pointer( POINTER_HSPLIT ); + switch ( (handler->get()->*i_handlerMethod)( i_control, i_event ) ) + { + case ActivateFunction: + i_impl.pActiveFunction = *handler; + handled = true; + break; + case ContinueFunction: + case DeactivateFunction: + OSL_ENSURE( false, "lcl_delegateMouseEvent: unexpected: inactivate handler cannot be continued or deactivated!" ); + break; + case SkipFunction: + handled = false; + break; + } + } + return handled; } + } - i_control.setPointer( aNewPointer ); - return true; + //------------------------------------------------------------------------------------------------------------------ + bool DefaultInputHandler::MouseMove( ITableControl& i_tableControl, const MouseEvent& i_event ) + { + return lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseMove ); } - //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseButtonDown( ITableControl& i_tableControl, const MouseEvent& _rMEvt ) + //------------------------------------------------------------------------------------------------------------------ + bool DefaultInputHandler::MouseButtonDown( ITableControl& i_tableControl, const MouseEvent& i_event ) { + if ( lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseDown ) ) + return true; + bool bHandled = false; - Point const aPoint = _rMEvt.GetPosPixel(); + + // TODO: move the below to a IMouseFunction implementation, too + Point const aPoint = i_event.GetPosPixel(); TableCell const tableCell( i_tableControl.hitTest( aPoint ) ); - if ( tableCell.nRow == ROW_COL_HEADERS ) - { - if ( ( tableCell.nColumn != COL_INVALID ) - && ( tableCell.eArea == ColumnDivider ) - ) - { - m_nResizingColumn = tableCell.nColumn; - i_tableControl.captureMouse(); - } - bHandled = true; - } - else if ( tableCell.nRow >= 0 ) + if ( tableCell.nRow >= 0 ) { bool bSetCursor = false; if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) @@ -139,7 +151,7 @@ namespace svt { namespace table { if ( !i_tableControl.isRowSelected( tableCell.nRow ) ) { - bHandled = i_tableControl.getSelEngine()->SelMouseButtonDown( _rMEvt ); + bHandled = i_tableControl.getSelEngine()->SelMouseButtonDown( i_event ); } else { @@ -153,59 +165,21 @@ namespace svt { namespace table bHandled = true; } } + return bHandled; } - //-------------------------------------------------------------------- - bool DefaultInputHandler::MouseButtonUp( ITableControl& i_tableControl, const MouseEvent& _rMEvt ) - { - bool bHandled = false; - Point const aPoint = _rMEvt.GetPosPixel(); - if ( m_nResizingColumn != COL_INVALID ) - { - i_tableControl.hideTracking(); - PColumnModel const pColumn = i_tableControl.getModel()->getColumnModel( m_nResizingColumn ); - long const maxWidthLogical = pColumn->getMaxWidth(); - long const minWidthLogical = pColumn->getMinWidth(); - - // new position of mouse - long const requestedEnd = aPoint.X(); - - // old position of right border - long const oldEnd = i_tableControl.getColumnMetrics( m_nResizingColumn ).nEndPixel; - - // position of left border if cursor in the to-be-resized column - long const columnStart = i_tableControl.getColumnMetrics( m_nResizingColumn ).nStartPixel; - long const requestedWidth = requestedEnd - columnStart; - // TODO: this is not correct, strictly: It assumes that the mouse was pressed exactly on the "end" pos, - // but for a while now, we have relaxed this, and allow clicking a few pixels aside, too - if ( requestedEnd >= columnStart ) - { - long requestedWidthLogical = i_tableControl.pixelWidthToAppFont( requestedWidth ); - // respect column width limits - if ( oldEnd > requestedEnd ) - { - // column has become smaller, check against minimum width - if ( ( minWidthLogical != 0 ) && ( requestedWidthLogical < minWidthLogical ) ) - requestedWidthLogical = minWidthLogical; - } - else if ( oldEnd < requestedEnd ) - { - // column has become larger, check against max width - if ( ( maxWidthLogical != 0 ) && ( requestedWidthLogical >= maxWidthLogical ) ) - requestedWidthLogical = maxWidthLogical; - } - pColumn->setWidth( requestedWidthLogical ); - i_tableControl.invalidate(); - } + //------------------------------------------------------------------------------------------------------------------ + bool DefaultInputHandler::MouseButtonUp( ITableControl& i_tableControl, const MouseEvent& i_event ) + { + if ( lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseUp ) ) + return true; - i_tableControl.setPointer( Pointer() ); - i_tableControl.releaseMouse(); + bool bHandled = false; - m_nResizingColumn = COL_INVALID; - bHandled = true; - } - else if ( i_tableControl.getRowAtPoint( aPoint ) >= 0 ) + // TODO: move the below to a IMouseFunction implementation, too + Point const aPoint = i_event.GetPosPixel(); + if ( i_tableControl.getRowAtPoint( aPoint ) >= 0 ) { if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) { @@ -213,12 +187,13 @@ namespace svt { namespace table } else { - bHandled = i_tableControl.getSelEngine()->SelMouseButtonUp( _rMEvt ); + bHandled = i_tableControl.getSelEngine()->SelMouseButtonUp( i_event ); } } return bHandled; } - //-------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::KeyInput( ITableControl& _rControl, const KeyEvent& rKEvt ) { bool bHandled = false; @@ -267,21 +242,21 @@ namespace svt { namespace table return bHandled; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::GetFocus( ITableControl& _rControl ) { _rControl.showCursor(); return false; // continue processing } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::LoseFocus( ITableControl& _rControl ) { _rControl.hideCursor(); return false; // continue processing } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::RequestHelp( ITableControl& _rControl, const HelpEvent& _rHEvt ) { (void)_rControl; @@ -290,7 +265,7 @@ namespace svt { namespace table return false; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::Command( ITableControl& _rControl, const CommandEvent& _rCEvt ) { (void)_rControl; @@ -299,7 +274,7 @@ namespace svt { namespace table return false; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::PreNotify( ITableControl& _rControl, NotifyEvent& _rNEvt ) { (void)_rControl; @@ -308,7 +283,7 @@ namespace svt { namespace table return false; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::Notify( ITableControl& _rControl, NotifyEvent& _rNEvt ) { (void)_rControl; @@ -316,6 +291,6 @@ namespace svt { namespace table // TODO return false; } -//........................................................................ +//...................................................................................................................... } } // namespace svt::table -//........................................................................ +//...................................................................................................................... diff --git a/svtools/source/table/makefile.mk b/svtools/source/table/makefile.mk index 7fa1b00d1740..39fa03454372 100644 --- a/svtools/source/table/makefile.mk +++ b/svtools/source/table/makefile.mk @@ -46,6 +46,7 @@ SLOFILES=\ $(SLO)$/tablegeometry.obj \ $(SLO)$/defaultinputhandler.obj \ $(SLO)$/tabledatawindow.obj \ + $(SLO)$/mousefunction.obj \ $(SLO)$/cellvalueconversion.obj #LIB1TARGET= $(SLB)$/$(TARGET).lib diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx new file mode 100755 index 000000000000..fa075284e225 --- /dev/null +++ b/svtools/source/table/mousefunction.cxx @@ -0,0 +1,194 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svtools.hxx" + +#include "mousefunction.hxx" +#include "svtools/table/tablecontrolinterface.hxx" + +#include +#include + +//...................................................................................................................... +namespace svt { namespace table +{ +//...................................................................................................................... + + //================================================================================================================== + //= MouseFunction + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + oslInterlockedCount MouseFunction::acquire() + { + return osl_incrementInterlockedCount( &m_refCount ); + } + + //------------------------------------------------------------------------------------------------------------------ + oslInterlockedCount MouseFunction::release() + { + oslInterlockedCount newCount = osl_decrementInterlockedCount( &m_refCount ); + if ( newCount == 0 ) + { + delete this; + return 0; + } + return newCount; + } + + //================================================================================================================== + //= ColumnResize + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + FunctionResult ColumnResize::handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + Point const aPoint = i_event.GetPosPixel(); + + if ( m_nResizingColumn == COL_INVALID ) + { + // if we hit a column divider, change the mosue pointer accordingly + Pointer aNewPointer( POINTER_ARROW ); + TableCell const tableCell = i_tableControl.hitTest( aPoint ); + if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.eArea == ColumnDivider ) ) + { + aNewPointer = Pointer( POINTER_HSPLIT ); + } + i_tableControl.setPointer( aNewPointer ); + + return SkipFunction; // TODO: is this correct? + } + + ::Size const tableSize = i_tableControl.getTableSizePixel(); + + // set proper pointer + Pointer aNewPointer( POINTER_ARROW ); + ColumnMetrics const & columnMetrics( i_tableControl.getColumnMetrics( m_nResizingColumn ) ); + if ( ( aPoint.X() > tableSize.Width() ) + || ( aPoint.X() < columnMetrics.nStartPixel ) + ) + { + aNewPointer = Pointer( POINTER_NOTALLOWED ); + } + else + { + aNewPointer = Pointer( POINTER_HSPLIT ); + } + i_tableControl.setPointer( aNewPointer ); + + // show tracking line + i_tableControl.hideTracking(); + i_tableControl.showTracking( + Rectangle( + Point( aPoint.X(), 0 ), + Size( 1, tableSize.Height() ) + ), + SHOWTRACK_SPLIT | SHOWTRACK_WINDOW + ); + + (void)i_event; + return ContinueFunction; + } + + //------------------------------------------------------------------------------------------------------------------ + FunctionResult ColumnResize::handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + if ( m_nResizingColumn != COL_INVALID ) + { + OSL_ENSURE( false, "ColumnResize::handleMouseDown: suspicious: MouseButtonDown while still tracking?" ); + return ContinueFunction; + } + + Point const aPoint = i_event.GetPosPixel(); + TableCell const tableCell( i_tableControl.hitTest( aPoint ) ); + if ( tableCell.nRow == ROW_COL_HEADERS ) + { + if ( ( tableCell.nColumn != COL_INVALID ) + && ( tableCell.eArea == ColumnDivider ) + ) + { + m_nResizingColumn = tableCell.nColumn; + i_tableControl.captureMouse(); + return ActivateFunction; + } + } + + return SkipFunction; + } + + //------------------------------------------------------------------------------------------------------------------ + FunctionResult ColumnResize::handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + if ( m_nResizingColumn == COL_INVALID ) + return SkipFunction; + + Point const aPoint = i_event.GetPosPixel(); + + i_tableControl.hideTracking(); + PColumnModel const pColumn = i_tableControl.getModel()->getColumnModel( m_nResizingColumn ); + long const maxWidthLogical = pColumn->getMaxWidth(); + long const minWidthLogical = pColumn->getMinWidth(); + + // new position of mouse + long const requestedEnd = aPoint.X(); + + // old position of right border + long const oldEnd = i_tableControl.getColumnMetrics( m_nResizingColumn ).nEndPixel; + + // position of left border if cursor in the to-be-resized column + long const columnStart = i_tableControl.getColumnMetrics( m_nResizingColumn ).nStartPixel; + long const requestedWidth = requestedEnd - columnStart; + // TODO: this is not correct, strictly: It assumes that the mouse was pressed exactly on the "end" pos, + // but for a while now, we have relaxed this, and allow clicking a few pixels aside, too + + if ( requestedEnd >= columnStart ) + { + long requestedWidthLogical = i_tableControl.pixelWidthToAppFont( requestedWidth ); + // respect column width limits + if ( oldEnd > requestedEnd ) + { + // column has become smaller, check against minimum width + if ( ( minWidthLogical != 0 ) && ( requestedWidthLogical < minWidthLogical ) ) + requestedWidthLogical = minWidthLogical; + } + else if ( oldEnd < requestedEnd ) + { + // column has become larger, check against max width + if ( ( maxWidthLogical != 0 ) && ( requestedWidthLogical >= maxWidthLogical ) ) + requestedWidthLogical = maxWidthLogical; + } + pColumn->setWidth( requestedWidthLogical ); + i_tableControl.invalidate(); + } + + i_tableControl.setPointer( Pointer() ); + i_tableControl.releaseMouse(); + + m_nResizingColumn = COL_INVALID; + return DeactivateFunction; + } + +//...................................................................................................................... +} } // namespace svt::table +//...................................................................................................................... diff --git a/svtools/source/table/mousefunction.hxx b/svtools/source/table/mousefunction.hxx new file mode 100755 index 000000000000..64c3a9533bcd --- /dev/null +++ b/svtools/source/table/mousefunction.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_MOUSEFUNCTION_HXX +#define SVTOOLS_MOUSEFUNCTION_HXX + +#include "svtools/table/tabletypes.hxx" + +#include + +#include + +class MouseEvent; + +//...................................................................................................................... +namespace svt { namespace table +{ +//...................................................................................................................... + + class ITableControl; + + //================================================================================================================== + //= FunctionResult + //================================================================================================================== + enum FunctionResult + { + ActivateFunction, + ContinueFunction, + DeactivateFunction, + + SkipFunction + }; + + //================================================================================================================== + //= IMouseFunction + //================================================================================================================== + class IMouseFunction : public ::rtl::IReference, public ::boost::noncopyable + { + public: + virtual FunctionResult handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ) = 0; + virtual FunctionResult handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event ) = 0; + virtual FunctionResult handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ) = 0; + + protected: + virtual ~IMouseFunction() { } + }; + + //================================================================================================================== + //= MouseFunction + //================================================================================================================== + class MouseFunction : public IMouseFunction + { + public: + MouseFunction() + :m_refCount( 0 ) + { + } + protected: + ~MouseFunction() + { + } + + public: + virtual oslInterlockedCount SAL_CALL acquire(); + virtual oslInterlockedCount SAL_CALL release(); + + private: + oslInterlockedCount m_refCount; + }; + + //================================================================================================================== + //= ColumnResize + //================================================================================================================== + class ColumnResize : public MouseFunction + { + public: + ColumnResize() + :m_nResizingColumn( COL_INVALID ) + { + } + + public: + // IMouseFunction + virtual FunctionResult handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ); + virtual FunctionResult handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event ); + virtual FunctionResult handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ); + + private: + ColPos m_nResizingColumn; + }; + +//...................................................................................................................... +} } // namespace svt::table +//...................................................................................................................... + +#endif // SVTOOLS_MOUSEFUNCTION_HXX -- cgit From 79610ce242aad3b0020f5f6d11d54bca2dcac7bc Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 17 Jan 2011 13:49:08 +0100 Subject: gridsort: moved the row selection functionality into a IMouseFunction implementation, too --- svtools/source/table/defaultinputhandler.cxx | 57 ++---------------------- svtools/source/table/mousefunction.cxx | 66 ++++++++++++++++++++++++++++ svtools/source/table/mousefunction.hxx | 21 +++++++++ svtools/source/table/tabledatawindow.cxx | 24 +++++----- 4 files changed, 104 insertions(+), 64 deletions(-) diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index 4c9dc2f415d9..0870fac86087 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -58,6 +58,7 @@ namespace svt { namespace table :m_pImpl( new DefaultInputHandler_Impl ) { m_pImpl->aMouseFunctions.push_back( new ColumnResize ); + m_pImpl->aMouseFunctions.push_back( new RowSelection ); } //------------------------------------------------------------------------------------------------------------------ @@ -132,65 +133,13 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::MouseButtonDown( ITableControl& i_tableControl, const MouseEvent& i_event ) { - if ( lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseDown ) ) - return true; - - bool bHandled = false; - - // TODO: move the below to a IMouseFunction implementation, too - Point const aPoint = i_event.GetPosPixel(); - TableCell const tableCell( i_tableControl.hitTest( aPoint ) ); - if ( tableCell.nRow >= 0 ) - { - bool bSetCursor = false; - if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) - { - bSetCursor = true; - } - else - { - if ( !i_tableControl.isRowSelected( tableCell.nRow ) ) - { - bHandled = i_tableControl.getSelEngine()->SelMouseButtonDown( i_event ); - } - else - { - bSetCursor = true; - } - } - - if ( bSetCursor ) - { - i_tableControl.activateCellAt( aPoint ); - bHandled = true; - } - } - - return bHandled; + return lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseDown ); } //------------------------------------------------------------------------------------------------------------------ bool DefaultInputHandler::MouseButtonUp( ITableControl& i_tableControl, const MouseEvent& i_event ) { - if ( lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseUp ) ) - return true; - - bool bHandled = false; - - // TODO: move the below to a IMouseFunction implementation, too - Point const aPoint = i_event.GetPosPixel(); - if ( i_tableControl.getRowAtPoint( aPoint ) >= 0 ) - { - if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) - { - bHandled = true; - } - else - { - bHandled = i_tableControl.getSelEngine()->SelMouseButtonUp( i_event ); - } - } - return bHandled; + return lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseUp ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index fa075284e225..d0fda5e6e7d1 100755 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -189,6 +189,72 @@ namespace svt { namespace table return DeactivateFunction; } + //================================================================================================================== + //= RowSelection + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + FunctionResult RowSelection::handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + return SkipFunction; + } + + //------------------------------------------------------------------------------------------------------------------ + FunctionResult RowSelection::handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + bool handled = false; + + Point const aPoint = i_event.GetPosPixel(); + TableCell const tableCell( i_tableControl.hitTest( aPoint ) ); + if ( tableCell.nRow >= 0 ) + { + bool bSetCursor = false; + if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION ) + { + bSetCursor = true; + } + else + { + if ( !i_tableControl.isRowSelected( tableCell.nRow ) ) + { + handled = i_tableControl.getSelEngine()->SelMouseButtonDown( i_event ); + } + else + { + bSetCursor = true; + } + } + + if ( bSetCursor ) + { + i_tableControl.activateCellAt( aPoint ); + handled = true; + } + } + + if ( handled ) + m_bActive = true; + return handled ? ActivateFunction : SkipFunction; + } + + //------------------------------------------------------------------------------------------------------------------ + FunctionResult RowSelection::handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + Point const aPoint = i_event.GetPosPixel(); + if ( i_tableControl.getRowAtPoint( aPoint ) >= 0 ) + { + if ( i_tableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION ) + { + i_tableControl.getSelEngine()->SelMouseButtonUp( i_event ); + } + } + if ( m_bActive ) + { + m_bActive = false; + return DeactivateFunction; + } + return SkipFunction; + } + //...................................................................................................................... } } // namespace svt::table //...................................................................................................................... diff --git a/svtools/source/table/mousefunction.hxx b/svtools/source/table/mousefunction.hxx index 64c3a9533bcd..dccd013e5680 100755 --- a/svtools/source/table/mousefunction.hxx +++ b/svtools/source/table/mousefunction.hxx @@ -112,6 +112,27 @@ namespace svt { namespace table ColPos m_nResizingColumn; }; + //================================================================================================================== + //= RowSelection + //================================================================================================================== + class RowSelection : public MouseFunction + { + public: + RowSelection() + :m_bActive( false ) + { + } + + public: + // IMouseFunction + virtual FunctionResult handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ); + virtual FunctionResult handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event ); + virtual FunctionResult handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ); + + private: + bool m_bActive; + }; + //...................................................................................................................... } } // namespace svt::table //...................................................................................................................... diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index cdf909d9fa65..7f1515be8b73 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -190,30 +190,34 @@ namespace svt { namespace table impl_hideTipWindow(); Point const aPoint = rMEvt.GetPosPixel(); - RowPos const nCurRow = m_rTableControl.getRowAtPoint( aPoint ); + RowPos const hitRow = m_rTableControl.getRowAtPoint( aPoint ); + bool const wasRowSelected = m_rTableControl.isRowSelected( hitRow ); + if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) ) + { Window::MouseButtonDown( rMEvt ); - else + return; + } + + bool const isRowSelected = m_rTableControl.isRowSelected( hitRow ); + if ( isRowSelected != wasRowSelected ) { - if(nCurRow >= 0 && m_rTableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION) - { - if( !m_rTableControl.isRowSelected( nCurRow ) ) - { - m_aSelectHdl.Call( NULL ); - } - } + m_aSelectHdl.Call( NULL ); } m_aMouseButtonDownHdl.Call((MouseEvent*) &rMEvt); } + //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::MouseButtonUp( const MouseEvent& rMEvt ) { if ( !m_rTableControl.getInputHandler()->MouseButtonUp( m_rTableControl, rMEvt ) ) Window::MouseButtonUp( rMEvt ); + m_aMouseButtonUpHdl.Call((MouseEvent*) &rMEvt); m_rTableControl.getAntiImpl().GrabFocus(); } - // ----------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------------------------ long TableDataWindow::Notify(NotifyEvent& rNEvt ) { long nDone = 0; -- cgit From 0621b2ecec8cd1d5f3249efb09f2c1b1c4462a24 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 17 Jan 2011 13:54:53 +0100 Subject: gridsort: fix impl_getColumnForOrdinate to take row headers into account --- svtools/source/table/tablecontrol_impl.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index cdae26548a43..87d249c63b10 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -2308,19 +2308,24 @@ namespace svt { namespace table { DBG_CHECK_ME(); - if ( m_aColumnWidths.empty() ) + if ( ( m_aColumnWidths.empty() ) || ( i_ordinate < 0 ) ) return COL_INVALID; + if ( i_ordinate < m_nRowHeaderWidthPixel ) + return COL_ROW_HEADERS; + + long const ordinate = i_ordinate - m_nRowHeaderWidthPixel; + ColumnPositions::const_iterator lowerBound = ::std::lower_bound( m_aColumnWidths.begin(), m_aColumnWidths.end(), - i_ordinate + 1, + ordinate + 1, ColumnInfoPositionLess() ); if ( lowerBound == m_aColumnWidths.end() ) { // point is *behind* the start of the last column ... - if ( i_ordinate < m_aColumnWidths.rbegin()->getEnd() ) + if ( ordinate < m_aColumnWidths.rbegin()->getEnd() ) // ... but still before its end return m_nColumnCount - 1; return COL_INVALID; -- cgit From bdf5a65cb535289f5bcf15b01cee2ad1352c882e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 17 Jan 2011 14:18:20 +0100 Subject: gridsort: do not activate header cells --- svtools/source/table/tablecontrol_impl.cxx | 120 +++++++++++++---------------- svtools/source/table/tablecontrol_impl.hxx | 17 ++-- 2 files changed, 64 insertions(+), 73 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 87d249c63b10..56a5908ebe4f 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1929,16 +1929,12 @@ namespace svt { namespace table { DBG_CHECK_ME(); - TempHideCursor aHideCursor( *this ); - - const RowPos newRowPos = getRowAtPoint( rPoint ); - const ColPos newColPos = getColAtPoint( rPoint ); + RowPos const newRowPos = getRowAtPoint( rPoint ); + ColPos const newColPos = getColAtPoint( rPoint ); - if ( ( newRowPos != ROW_INVALID ) && ( newColPos != COL_INVALID ) ) - { - m_nCurColumn = newColPos; - m_nCurRow = newRowPos; - ensureVisible( m_nCurColumn, m_nCurRow, true ); + if ( ( newRowPos >= 0 ) && ( newColPos >= 0 ) ) + { // don't activate invalid or header cells + goTo( newColPos, newRowPos ); } } //------------------------------------------------------------------------------------------------------------------ @@ -2509,7 +2505,7 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ TableFunctionSet::TableFunctionSet(TableControl_Impl* _pTableControl) :m_pTableControl( _pTableControl) - ,m_nCurrentRow (-2) + ,m_nCurrentRow( ROW_INVALID ) { } //------------------------------------------------------------------------------------------------------------------ @@ -2523,106 +2519,105 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::CreateAnchor() { - m_pTableControl->m_nAnchor = m_pTableControl->m_nCurRow; + m_pTableControl->setAnchor( m_pTableControl->getCurRow() ); } + //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::DestroyAnchor() { - m_pTableControl->m_nAnchor = -1; + m_pTableControl->setAnchor( ROW_INVALID ); } + //------------------------------------------------------------------------------------------------------------------ BOOL TableFunctionSet::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor) { BOOL bHandled = FALSE; - // newRow is the row which includes the point, m_nCurRow is the last selected row, before the mouse click - const RowPos newRow = m_pTableControl->getRowAtPoint( rPoint ); - const ColPos newCol = m_pTableControl->getColAtPoint( rPoint ); + // newRow is the row which includes the point, getCurRow() is the last selected row, before the mouse click + RowPos newRow = m_pTableControl->getRowAtPoint( rPoint ); + if ( newRow == ROW_COL_HEADERS ) + newRow = m_pTableControl->getTopRow(); + + ColPos newCol = m_pTableControl->getColAtPoint( rPoint ); + if ( newCol == COL_ROW_HEADERS ) + newCol = m_pTableControl->getLeftColumn(); + if ( ( newRow == ROW_INVALID ) || ( newCol == COL_INVALID ) ) return FALSE; if ( bDontSelectAtCursor ) { - if ( m_pTableControl->m_aSelectedRows.size()>1 ) - m_pTableControl->m_pSelEngine->AddAlways(TRUE); + if ( m_pTableControl->getSelectedRowCount() > 1 ) + m_pTableControl->getSelEngine()->AddAlways(TRUE); bHandled = TRUE; } - else if ( m_pTableControl->m_nAnchor == m_pTableControl->m_nCurRow ) + else if ( m_pTableControl->getAnchor() == m_pTableControl->getCurRow() ) { //selecting region, - int diff = m_pTableControl->m_nCurRow - newRow; + int diff = m_pTableControl->getCurRow() - newRow; //selected region lies above the last selection if( diff >= 0) { //put selected rows in vector - while ( m_pTableControl->m_nAnchor >= newRow ) + while ( m_pTableControl->getAnchor() >= newRow ) { - bool isAlreadySelected = m_pTableControl->isRowSelected( m_pTableControl->m_nAnchor ); - //if row isn't selected, put it in vector, otherwise don't put it there, because it will be twice there - if(!isAlreadySelected) - m_pTableControl->m_aSelectedRows.push_back(m_pTableControl->m_nAnchor); - m_pTableControl->m_nAnchor--; + m_pTableControl->markRowAsSelected( m_pTableControl->getAnchor() ); + m_pTableControl->setAnchor( m_pTableControl->getAnchor() - 1 ); diff--; } - m_pTableControl->m_nAnchor++; + m_pTableControl->setAnchor( m_pTableControl->getAnchor() + 1 ); } //selected region lies beneath the last selected row else { - while ( m_pTableControl->m_nAnchor <= newRow ) + while ( m_pTableControl->getAnchor() <= newRow ) { - bool isAlreadySelected = m_pTableControl->isRowSelected( m_pTableControl->m_nAnchor ); - if(!isAlreadySelected) - m_pTableControl->m_aSelectedRows.push_back(m_pTableControl->m_nAnchor); - m_pTableControl->m_nAnchor++; + m_pTableControl->markRowAsSelected( m_pTableControl->getAnchor() ); + m_pTableControl->setAnchor( m_pTableControl->getAnchor() + 1 ); diff++; } - m_pTableControl->m_nAnchor--; + m_pTableControl->setAnchor( m_pTableControl->getAnchor() - 1 ); } Rectangle aCellRect; - m_pTableControl->invalidateSelectedRegion( m_pTableControl->m_nCurRow, newRow, aCellRect ); + m_pTableControl->invalidateSelectedRegion( m_pTableControl->getCurRow(), newRow, aCellRect ); bHandled = TRUE; } //no region selected else { - if(m_pTableControl->m_aSelectedRows.empty()) - m_pTableControl->m_aSelectedRows.push_back( newRow ); + if ( !m_pTableControl->hasRowSelection() ) + m_pTableControl->markRowAsSelected( newRow ); else { - if(m_pTableControl->m_pSelEngine->GetSelectionMode()==SINGLE_SELECTION) + if ( m_pTableControl->getSelEngine()->GetSelectionMode() == SINGLE_SELECTION ) { DeselectAll(); - m_pTableControl->m_aSelectedRows.push_back( newRow ); + m_pTableControl->markRowAsSelected( newRow ); } else { - bool isAlreadySelected = m_pTableControl->isRowSelected( newRow ); - if ( !isAlreadySelected ) - m_pTableControl->m_aSelectedRows.push_back( newRow ); + m_pTableControl->markRowAsSelected( newRow ); } } - if(m_pTableControl->m_aSelectedRows.size()>1 && m_pTableControl->m_pSelEngine->GetSelectionMode()!=SINGLE_SELECTION) - m_pTableControl->m_pSelEngine->AddAlways(TRUE); + if ( m_pTableControl->getSelectedRowCount() > 1 && m_pTableControl->getSelEngine()->GetSelectionMode() != SINGLE_SELECTION ) + m_pTableControl->getSelEngine()->AddAlways(TRUE); Rectangle aCellRect; m_pTableControl->invalidateSelectedRegion( newRow, newRow, aCellRect ); bHandled = TRUE; } - m_pTableControl->m_nCurRow = newRow; - m_pTableControl->m_nCurColumn = newCol; - m_pTableControl->ensureVisible( newCol, newRow, true ); + m_pTableControl->goTo( newCol, newRow ); return bHandled; } //------------------------------------------------------------------------------------------------------------------ BOOL TableFunctionSet::IsSelectionAtPoint( const Point& rPoint ) { - m_pTableControl->m_pSelEngine->AddAlways(FALSE); - if(m_pTableControl->m_aSelectedRows.empty()) + m_pTableControl->getSelEngine()->AddAlways(FALSE); + if ( !m_pTableControl->hasRowSelection() ) return FALSE; else { RowPos curRow = m_pTableControl->getRowAtPoint( rPoint ); - m_pTableControl->m_nAnchor = -1; + m_pTableControl->setAnchor( ROW_INVALID ); bool selected = m_pTableControl->isRowSelected( curRow ); m_nCurrentRow = curRow; return selected; @@ -2634,32 +2629,25 @@ namespace svt { namespace table (void)rPoint; long pos = 0; long i = 0; - Rectangle rCells; - for(std::vector::iterator it=m_pTableControl->m_aSelectedRows.begin(); - it!=m_pTableControl->m_aSelectedRows.end();++it) - { - if(*it == m_nCurrentRow) - { - pos = i; - m_pTableControl->invalidateSelectedRegion(*it, *it, rCells); - } - ++i; - } - m_pTableControl->m_aSelectedRows.erase(m_pTableControl->m_aSelectedRows.begin()+pos); + + Rectangle aCellRange; + m_pTableControl->invalidateSelectedRegion( m_nCurrentRow, m_nCurrentRow, aCellRange ); + m_pTableControl->markRowAsDeselected( m_nCurrentRow ); } //------------------------------------------------------------------------------------------------------------------ void TableFunctionSet::DeselectAll() { - if(!m_pTableControl->m_aSelectedRows.empty()) + if ( m_pTableControl->hasRowSelection() ) { - Rectangle rCells; - for(std::vector::iterator it=m_pTableControl->m_aSelectedRows.begin(); - it!=m_pTableControl->m_aSelectedRows.end();++it) + Rectangle aCellRange; + for ( size_t i=0; igetSelectedRowCount(); ++i ) { - m_pTableControl->invalidateSelectedRegion(*it, *it, rCells); + RowPos const rowIndex = m_pTableControl->getSelectedRowIndex(i); + m_pTableControl->invalidateSelectedRegion( rowIndex, rowIndex, aCellRange ); } - m_pTableControl->m_aSelectedRows.clear(); + + m_pTableControl->markAllRowsAsDeselected(); } } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 5b84cd9ca4cd..78b87916083f 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -97,7 +97,6 @@ namespace svt { namespace table friend class TableRowGeometry; friend class TableColumnGeometry; friend class SuspendInvariants; - friend class TableFunctionSet; private: /// the control whose impl-instance we implemnt @@ -167,14 +166,18 @@ namespace svt { namespace table #endif public: - - void setModel( PTableModel _pModel ); inline const PTableInputHandler& getInputHandler() const { return m_pInputHandler; } - inline void setCurRow(RowPos curRow){ m_nCurRow = curRow; } + inline RowPos getCurRow() const { return m_nCurRow; } + inline void setCurRow( RowPos i_curRow ){ m_nCurRow = i_curRow; } + + RowPos getAnchor() const { return m_nAnchor; } + void setAnchor( RowPos const i_anchor ) { m_nAnchor = i_anchor; } + inline RowPos getTopRow() const { return m_nTopRow; } + inline ColPos getLeftColumn() const { return m_nLeftColumn; } inline const TableControl& getAntiImpl() const { return m_rAntiImpl; } inline TableControl& getAntiImpl() { return m_rAntiImpl; } @@ -449,10 +452,10 @@ namespace svt { namespace table //see seleng.hxx, seleng.cxx, FunctionSet overridables, part of selection engine class TableFunctionSet : public FunctionSet { - friend class TableDataWindow; private: - TableControl_Impl* m_pTableControl; - RowPos m_nCurrentRow; + TableControl_Impl* m_pTableControl; + RowPos m_nCurrentRow; + public: TableFunctionSet(TableControl_Impl* _pTableControl); virtual ~TableFunctionSet(); -- cgit From 405a0f6cf14f30bed6cf676d7c3224c1c2cb1312 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 17 Jan 2011 14:25:56 +0100 Subject: gridsort: fix getRowAtPoint --- svtools/source/table/tablecontrol_impl.cxx | 36 ++++++++++++++---------------- svtools/source/table/tablecontrol_impl.hxx | 4 ++++ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 56a5908ebe4f..12370ca305ce 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1800,31 +1800,13 @@ namespace svt { namespace table RowPos TableControl_Impl::getRowAtPoint( const Point& rPoint ) const { DBG_CHECK_ME(); - - if ( ( rPoint.Y() >= 0 ) && ( rPoint.Y() < m_nColHeaderHeightPixel ) ) - return ROW_COL_HEADERS; - - Rectangle aAllCellsArea; - impl_getAllVisibleCellsArea( aAllCellsArea ); - - TableRowGeometry aHitTest( *this, aAllCellsArea, ROW_COL_HEADERS ); - while ( aHitTest.isValid() ) - { - if ( aHitTest.getRect().IsInside( rPoint ) ) - return aHitTest.getRow(); - aHitTest.moveDown(); - } - return ROW_INVALID; + return impl_getRowForAbscissa( rPoint.Y() ); } //------------------------------------------------------------------------------------------------------------------ ColPos TableControl_Impl::getColAtPoint( const Point& rPoint ) const { DBG_CHECK_ME(); - - if ( ( rPoint.X() >= 0 ) && ( rPoint.X() < m_nRowHeaderWidthPixel ) ) - return COL_ROW_HEADERS; - return impl_getColumnForOrdinate( rPoint.X() ); } @@ -2329,6 +2311,22 @@ namespace svt { namespace table return lowerBound - m_aColumnWidths.begin(); } + //-------------------------------------------------------------------- + RowPos TableControl_Impl::impl_getRowForAbscissa( long const i_abscissa ) const + { + DBG_CHECK_ME(); + + if ( i_abscissa < 0 ) + return ROW_INVALID; + + if ( i_abscissa < m_nColHeaderHeightPixel ) + return ROW_COL_HEADERS; + + long const abscissa = i_abscissa - m_nColHeaderHeightPixel; + long const row = m_nTopRow + abscissa / m_nRowHeightPixel; + return row < m_pModel->getRowCount() ? row : ROW_INVALID; + } + //-------------------------------------------------------------------- bool TableControl_Impl::markRowAsDeselected( RowPos const i_rowIndex ) { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 78b87916083f..a6aebbaa6cc4 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -442,6 +442,10 @@ namespace svt { namespace table */ ColPos impl_getColumnForOrdinate( long const i_ordinate ) const; + /** retrieves the row which covers the given abscissa + */ + RowPos impl_getRowForAbscissa( long const i_abscissa ) const; + /// invalidates the window area occupied by the given column void impl_invalidateColumn( ColPos const i_column ); -- cgit From 20a8cc813f0b12c5a0be5f1fbb6ef47f539ae589 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 17 Jan 2011 16:24:56 +0100 Subject: vcl118: #i116133# convert to greyscale for PDFWriter --- vcl/inc/vcl/pdfwriter.hxx | 9 +++- vcl/source/gdi/pdfwriter_impl.cxx | 84 ++++++++++++++++++++++++++++---------- vcl/source/gdi/pdfwriter_impl.hxx | 4 ++ vcl/source/gdi/pdfwriter_impl2.cxx | 9 ++++ vcl/unx/source/gdi/salprnpsp.cxx | 2 + 5 files changed, 86 insertions(+), 22 deletions(-) diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx index 52e4b5014120..949e242d9b39 100644 --- a/vcl/inc/vcl/pdfwriter.hxx +++ b/vcl/inc/vcl/pdfwriter.hxx @@ -537,6 +537,11 @@ The following structure describes the permissions used in PDF security String Producer; // OpenOffice }; + enum ColorMode + { + DrawColor, DrawGreyscale + }; + struct PDFWriterContext { /* must be a valid file: URL usable by osl */ @@ -599,6 +604,7 @@ The following structure describes the permissions used in PDF security com::sun::star::lang::Locale DocumentLocale; // defines the document default language sal_uInt32 DPIx, DPIy; // how to handle MapMode( MAP_PIXEL ) // 0 here specifies a default handling + PDFWriter::ColorMode ColorMode; PDFWriterContext() : RelFsys( false ), //i56629, i49415?, i64585? @@ -627,7 +633,8 @@ The following structure describes the permissions used in PDF security OpenBookmarkLevels( -1 ), Encryption(), DPIx( 0 ), - DPIy( 0 ) + DPIy( 0 ), + ColorMode( PDFWriter::DrawColor ) {} }; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 5540a5f0c48e..c3d6bf0d6a2a 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -887,34 +888,44 @@ static void appendDouble( double fValue, OStringBuffer& rBuffer, sal_Int32 nPrec } -static void appendColor( const Color& rColor, OStringBuffer& rBuffer ) +static void appendColor( const Color& rColor, OStringBuffer& rBuffer, bool bConvertToGrey = false ) { if( rColor != Color( COL_TRANSPARENT ) ) { - appendDouble( (double)rColor.GetRed() / 255.0, rBuffer ); - rBuffer.append( ' ' ); - appendDouble( (double)rColor.GetGreen() / 255.0, rBuffer ); - rBuffer.append( ' ' ); - appendDouble( (double)rColor.GetBlue() / 255.0, rBuffer ); + if( bConvertToGrey ) + { + sal_uInt8 cByte = rColor.GetLuminance(); + appendDouble( (double)cByte / 255.0, rBuffer ); + } + else + { + appendDouble( (double)rColor.GetRed() / 255.0, rBuffer ); + rBuffer.append( ' ' ); + appendDouble( (double)rColor.GetGreen() / 255.0, rBuffer ); + rBuffer.append( ' ' ); + appendDouble( (double)rColor.GetBlue() / 255.0, rBuffer ); + } } } -static void appendStrokingColor( const Color& rColor, OStringBuffer& rBuffer ) +void PDFWriterImpl::appendStrokingColor( const Color& rColor, OStringBuffer& rBuffer ) { if( rColor != Color( COL_TRANSPARENT ) ) { - appendColor( rColor, rBuffer ); - rBuffer.append( " RG" ); + bool bGrey = m_aContext.ColorMode == PDFWriter::DrawGreyscale; + appendColor( rColor, rBuffer, bGrey ); + rBuffer.append( bGrey ? " G" : " RG" ); } } -static void appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer ) +void PDFWriterImpl::appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer ) { if( rColor != Color( COL_TRANSPARENT ) ) { - appendColor( rColor, rBuffer ); - rBuffer.append( " rg" ); + bool bGrey = m_aContext.ColorMode == PDFWriter::DrawGreyscale; + appendColor( rColor, rBuffer, bGrey ); + rBuffer.append( bGrey ? " g" : " rg" ); } } @@ -9411,6 +9422,10 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject ) VirtualDevice aDev; aDev.SetOutputSizePixel( rObject.m_aSize ); aDev.SetMapMode( MapMode( MAP_PIXEL ) ); + if( m_aContext.ColorMode == PDFWriter::DrawGreyscale ) + aDev.SetDrawMode( aDev.GetDrawMode() | + ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | + DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) ); aDev.DrawGradient( Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient ); Bitmap aSample = aDev.GetBitmap( Point( 0, 0 ), rObject.m_aSize ); @@ -9882,8 +9897,25 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const if( ! (rSizePixel.Width() && rSizePixel.Height()) ) return; - SvMemoryStream* pStream = new SvMemoryStream; rDCTData.Seek( 0 ); + if( bIsTrueColor && m_aContext.ColorMode == PDFWriter::DrawGreyscale ) + { + // need to convert to grayscale; + // load stream to bitmap and draw the bitmap instead + Graphic aGraphic; + GraphicConverter::Import( rDCTData, aGraphic, CVT_JPG ); + Bitmap aBmp( aGraphic.GetBitmap() ); + if( !!rMask && rMask.GetSizePixel() == aBmp.GetSizePixel() ) + { + BitmapEx aBmpEx( aBmp, rMask ); + drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), aBmpEx ); + } + else + drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), aBmp ); + return; + } + + SvMemoryStream* pStream = new SvMemoryStream; *pStream << rDCTData; pStream->Seek( STREAM_SEEK_TO_END ); @@ -9974,18 +10006,28 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize, writeBuffer( aLine.getStr(), aLine.getLength() ); } -const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& rBitmap, bool bDrawMask ) +const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& i_rBitmap, bool bDrawMask ) { + BitmapEx aBitmap( i_rBitmap ); + if( m_aContext.ColorMode == PDFWriter::DrawGreyscale ) + { + BmpConversion eConv = BMP_CONVERSION_8BIT_GREYS; + int nDepth = aBitmap.GetBitmap().GetBitCount(); + if( nDepth <= 4 ) + eConv = BMP_CONVERSION_4BIT_GREYS; + if( nDepth > 1 ) + aBitmap.Convert( eConv ); + } BitmapID aID; - aID.m_aPixelSize = rBitmap.GetSizePixel(); - aID.m_nSize = rBitmap.GetBitCount(); - aID.m_nChecksum = rBitmap.GetBitmap().GetChecksum(); + aID.m_aPixelSize = aBitmap.GetSizePixel(); + aID.m_nSize = aBitmap.GetBitCount(); + aID.m_nChecksum = aBitmap.GetBitmap().GetChecksum(); aID.m_nMaskChecksum = 0; - if( rBitmap.IsAlpha() ) - aID.m_nMaskChecksum = rBitmap.GetAlpha().GetChecksum(); + if( aBitmap.IsAlpha() ) + aID.m_nMaskChecksum = aBitmap.GetAlpha().GetChecksum(); else { - Bitmap aMask = rBitmap.GetMask(); + Bitmap aMask = aBitmap.GetMask(); if( ! aMask.IsEmpty() ) aID.m_nMaskChecksum = aMask.GetChecksum(); } @@ -9999,7 +10041,7 @@ const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx { m_aBitmaps.push_front( BitmapEmit() ); m_aBitmaps.front().m_aID = aID; - m_aBitmaps.front().m_aBitmap = rBitmap; + m_aBitmaps.front().m_aBitmap = aBitmap; m_aBitmaps.front().m_nObject = createObject(); m_aBitmaps.front().m_bDrawMask = bDrawMask; it = m_aBitmaps.begin(); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 23d923b9990b..78b8c37d6fbe 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1060,6 +1060,10 @@ i12626 void putG4Bits( sal_uInt32 i_nLength, sal_uInt32 i_nCode, BitStreamState& io_rState ); void putG4Span( long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState ); void writeG4Stream( BitmapReadAccess* i_pBitmap ); + + // color helper functions + void appendStrokingColor( const Color& rColor, rtl::OStringBuffer& rBuffer ); + void appendNonStrokingColor( const Color& rColor, rtl::OStringBuffer& rBuffer ); public: PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >&, PDFWriter& ); ~PDFWriterImpl(); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 1aa41af93a72..e2179bb9749f 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -126,6 +126,15 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz const Size aSizePixel( aBitmapEx.GetSizePixel() ); if ( aSizePixel.Width() && aSizePixel.Height() ) { + if( m_aContext.ColorMode == PDFWriter::DrawGreyscale ) + { + BmpConversion eConv = BMP_CONVERSION_8BIT_GREYS; + int nDepth = aBitmapEx.GetBitmap().GetBitCount(); + if( nDepth <= 4 ) + eConv = BMP_CONVERSION_4BIT_GREYS; + if( nDepth > 1 ) + aBitmapEx.Convert( eConv ); + } sal_Bool bUseJPGCompression = !i_rContext.m_bOnlyLosslessCompression; if ( ( aSizePixel.Width() < 32 ) || ( aSizePixel.Height() < 32 ) ) bUseJPGCompression = sal_False; diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx index ece724d717cb..750c390bbcbc 100644 --- a/vcl/unx/source/gdi/salprnpsp.cxx +++ b/vcl/unx/source/gdi/salprnpsp.cxx @@ -1188,6 +1188,8 @@ BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobNam aContext.Tagged = false; aContext.EmbedStandardFonts = true; aContext.DocumentLocale = Application::GetSettings().GetLocale(); + aContext.ColorMode = i_rController.getPrinter()->GetPrinterOptions().IsConvertToGreyscales() + ? vcl::PDFWriter::DrawGreyscale : vcl::PDFWriter::DrawColor; // prepare doc info aContext.DocumentInfo.Title = i_rJobName; -- cgit From 36a9d8b0104235c72b5659b1ed2416329e8c6c90 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 17 Jan 2011 18:21:18 +0100 Subject: vcl118: #i110916# move reverse page order checkbox to print range --- vcl/inc/vcl/prndlg.hxx | 2 +- vcl/inc/vcl/svids.hrc | 2 +- vcl/source/src/print.src | 15 ++++++++------- vcl/source/window/printdlg.cxx | 21 +++++++++++++++------ 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/vcl/inc/vcl/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx index d21e517d12f7..ddd387904fa6 100644 --- a/vcl/inc/vcl/prndlg.hxx +++ b/vcl/inc/vcl/prndlg.hxx @@ -169,6 +169,7 @@ namespace vcl NumericField maCopyCountField; CheckBox maCollateBox; FixedImage maCollateImage; + CheckBox maReverseOrderBox; Image maCollateImg; Image maCollateHCImg; @@ -197,7 +198,6 @@ namespace vcl FixedLine maOptionsLine; CheckBox maToFileBox; CheckBox maCollateSingleJobsBox; - CheckBox maReverseOrderBox; boost::shared_ptr mxOptGroup; diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc index 432a30c3a748..e05474a2b301 100644 --- a/vcl/inc/vcl/svids.hrc +++ b/vcl/inc/vcl/svids.hrc @@ -147,12 +147,12 @@ #define SV_PRINT_LOCATION_TXT 21 #define SV_PRINT_COMMENT_TXT 22 #define SV_PRINT_DETAILS_BTN 23 +#define SV_PRINT_OPT_REVERSE 24 #define SV_PRINT_TAB_OPT 3 #define SV_PRINT_OPT_PRINT_FL 1 #define SV_PRINT_OPT_TOFILE 2 #define SV_PRINT_OPT_SINGLEJOBS 3 -#define SV_PRINT_OPT_REVERSE 4 #define SV_DLG_PRINT_PROGRESS 2049 #define SV_PRINT_PROGRESS_CANCEL 1 diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src index 04ab77f09288..48f8dc5612ef 100644 --- a/vcl/source/src/print.src +++ b/vcl/source/src/print.src @@ -412,6 +412,14 @@ ModalDialog SV_DLG_PRINT { ImageBitmap = Bitmap { File = "ncollate_h.png" ; }; }; + + CheckBox SV_PRINT_OPT_REVERSE + { + HelpID = ".HelpID:vcl:PrintDialog:OptPage:ToReverse"; + Pos = MAP_APPFONT( 10, 50 ); + Size = MAP_APPFONT( 200, 12 ); + Text [en-US] = "Print in ~reverse page order"; + }; }; TabPage SV_PRINT_TAB_OPT @@ -440,13 +448,6 @@ ModalDialog SV_DLG_PRINT Size = MAP_APPFONT( 200, 12 ); Text [en-US] = "~Create single print jobs for collated output"; }; - CheckBox SV_PRINT_OPT_REVERSE - { - HelpID = ".HelpID:vcl:PrintDialog:OptPage:ToReverse"; - Pos = MAP_APPFONT( 10, 50 ); - Size = MAP_APPFONT( 200, 12 ); - Text [en-US] = "Print in ~reverse page order"; - }; }; }; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 574cef4e5a07..cd9db93f1b2f 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -613,6 +613,7 @@ PrintDialog::JobTabPage::JobTabPage( Window* i_pParent, const ResId& rResId ) , maCopyCountField( this, VclResId( SV_PRINT_COPYCOUNT_FIELD ) ) , maCollateBox( this, VclResId( SV_PRINT_COLLATE ) ) , maCollateImage( this, VclResId( SV_PRINT_COLLATE_IMAGE ) ) + , maReverseOrderBox( this, VclResId( SV_PRINT_OPT_REVERSE ) ) , maCollateImg( VclResId( SV_PRINT_COLLATE_IMG ) ) , maCollateHCImg( VclResId( SV_PRINT_COLLATE_HC_IMG ) ) , maNoCollateImg( VclResId( SV_PRINT_NOCOLLATE_IMG ) ) @@ -741,7 +742,6 @@ PrintDialog::OutputOptPage::OutputOptPage( Window* i_pParent, const ResId& i_rRe , maOptionsLine( this, VclResId( SV_PRINT_OPT_PRINT_FL ) ) , maToFileBox( this, VclResId( SV_PRINT_OPT_TOFILE ) ) , maCollateSingleJobsBox( this, VclResId( SV_PRINT_OPT_SINGLEJOBS ) ) - , maReverseOrderBox( this, VclResId( SV_PRINT_OPT_REVERSE ) ) { FreeResource(); @@ -765,7 +765,6 @@ void PrintDialog::OutputOptPage::setupLayout() mxOptGroup = xCol; xCol->addWindow( &maToFileBox ); xCol->addWindow( &maCollateSingleJobsBox ); - xCol->addWindow( &maReverseOrderBox ); } void PrintDialog::OutputOptPage::readFromSettings() @@ -833,7 +832,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptrgetReversePrint() ); + maJobPage.maReverseOrderBox.Check( maPController->getReversePrint() ); // fill printer listbox const std::vector< rtl::OUString >& rQueues( Printer::GetPrinterQueues() ); @@ -906,7 +905,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptrshow( false, false ); maJobPage.maCopySpacer.Show( FALSE ); + maJobPage.maReverseOrderBox.Show( FALSE ); + } + else + { + // add an indent to the current column + vcl::Indenter* pIndent = new vcl::Indenter( maJobPage.mxPrintRange.get(), -1 ); + maJobPage.mxPrintRange->addChild( pIndent ); + // and create a column inside the indent + pIndent->setWindow( &maJobPage.maReverseOrderBox ); + maJobPage.maReverseOrderBox.Show( TRUE ); } #ifdef WNT @@ -2187,9 +2196,9 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) makeAny( sal_Bool(isCollate()) ) ); checkControlDependencies(); } - else if( pButton == &maOptionsPage.maReverseOrderBox ) + else if( pButton == &maJobPage.maReverseOrderBox ) { - sal_Bool bChecked = maOptionsPage.maReverseOrderBox.IsChecked(); + sal_Bool bChecked = maJobPage.maReverseOrderBox.IsChecked(); maPController->setReversePrint( bChecked ); maPController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintReverse" ) ), makeAny( bChecked ) ); -- cgit From 649cff57f97ac9a1b035afeb69def21a3d9aca95 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 17 Jan 2011 20:56:42 +0100 Subject: locales34: #i116449# include W in IndexKey --- i18npool/source/localedata/data/fi_FI.xml | 2 +- i18npool/source/localedata/data/no_NO.xml | 2 +- i18npool/source/localedata/data/sv_SE.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i18npool/source/localedata/data/fi_FI.xml b/i18npool/source/localedata/data/fi_FI.xml index 432d5f155423..1f7747d8b97a 100644 --- a/i18npool/source/localedata/data/fi_FI.xml +++ b/i18npool/source/localedata/data/fi_FI.xml @@ -179,7 +179,7 @@ - A-V X-Z Ä Ö + A-Z Ä Ö 0 1 p. diff --git a/i18npool/source/localedata/data/no_NO.xml b/i18npool/source/localedata/data/no_NO.xml index 21ac49181020..6df7b5e2d018 100644 --- a/i18npool/source/localedata/data/no_NO.xml +++ b/i18npool/source/localedata/data/no_NO.xml @@ -232,7 +232,7 @@ -A-V X-Z Æ Ø Å +A-Z Æ Ø Å 0 1 p. diff --git a/i18npool/source/localedata/data/sv_SE.xml b/i18npool/source/localedata/data/sv_SE.xml index 211f95c3e894..4afefebfa661 100644 --- a/i18npool/source/localedata/data/sv_SE.xml +++ b/i18npool/source/localedata/data/sv_SE.xml @@ -179,7 +179,7 @@ - A-V X-Z Å Ä Ö + A-Z Å Ä Ö 0 1 f. -- cgit From dc971d000d15cbf5d19119cf54c44aafaff88c50 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 11:15:23 +0100 Subject: gridsort: GCC WaE --- svtools/source/table/mousefunction.cxx | 2 ++ svtools/source/table/tablecontrol_impl.cxx | 5 +---- toolkit/source/controls/grid/defaultgriddatamodel.cxx | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index d0fda5e6e7d1..f5e6080f9ddd 100755 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -195,6 +195,8 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ FunctionResult RowSelection::handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ) { + OSL_UNUSED( i_tableControl ); + OSL_UNUSED( i_event ); return SkipFunction; } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 12370ca305ce..dcd169381aef 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -314,7 +314,7 @@ namespace svt { namespace table // m_aSelectedRows should have reasonable content { - if ( m_aSelectedRows.size() > m_pModel->getRowCount() ) + if ( m_aSelectedRows.size() > size_t( m_pModel->getRowCount() ) ) return "there are more rows selected than actually exist"; for ( ::std::vector< RowPos >::const_iterator selRow = m_aSelectedRows.begin(); selRow != m_aSelectedRows.end(); @@ -2625,9 +2625,6 @@ namespace svt { namespace table void TableFunctionSet::DeselectAtPoint( const Point& rPoint ) { (void)rPoint; - long pos = 0; - long i = 0; - Rectangle aCellRange; m_pTableControl->invalidateSelectedRegion( m_nCurrentRow, m_nCurrentRow, aCellRange ); m_pTableControl->markRowAsDeselected( m_nCurrentRow ); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index d113415ccf79..9ddb70c01760 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -71,7 +71,8 @@ namespace toolkit //------------------------------------------------------------------------------------------------------------------ DefaultGridDataModel::DefaultGridDataModel( DefaultGridDataModel const & i_copySource ) - :DefaultGridDataModel_Base( m_aMutex ) + :cppu::BaseMutex() + ,DefaultGridDataModel_Base( m_aMutex ) ,m_aData( i_copySource.m_aData ) ,m_aRowHeaders( i_copySource.m_aRowHeaders ) ,m_nColumnCount( i_copySource.m_nColumnCount ) -- cgit From 4a593d1851b4673f7b9a68c7f336f182fc6b43bb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 11:49:19 +0100 Subject: gridsort: initial support for sorting the table data (unfinished) What's there is a IMouseFunction implementation which cares for sorting the ITableModel's data, by the column whose header was clicked. This is dependent on the model declaring support for sorting, by exposing a ITableSort interface. Missing pieces: - no UNO equivalent, yet (neither as design nor as implementation) - visualization of the current sort order/column --- .../inc/svtools/table/tablecontrolinterface.hxx | 25 +++++- svtools/inc/svtools/table/tablemodel.hxx | 10 +++ svtools/inc/svtools/table/tablesort.hxx | 91 ++++++++++++++++++++++ svtools/source/table/defaultinputhandler.cxx | 1 + svtools/source/table/mousefunction.cxx | 74 ++++++++++++++++-- svtools/source/table/mousefunction.hxx | 21 +++++ svtools/source/table/tablecontrol_impl.cxx | 16 ++-- svtools/source/table/tablecontrol_impl.hxx | 2 +- svtools/source/uno/svtxgridcontrol.cxx | 8 +- svtools/source/uno/unocontroltablemodel.cxx | 36 +++++++-- svtools/source/uno/unocontroltablemodel.hxx | 7 +- 11 files changed, 259 insertions(+), 32 deletions(-) create mode 100755 svtools/inc/svtools/table/tablesort.hxx diff --git a/svtools/inc/svtools/table/tablecontrolinterface.hxx b/svtools/inc/svtools/table/tablecontrolinterface.hxx index 038a701173be..6ff2b07e84ed 100644 --- a/svtools/inc/svtools/table/tablecontrolinterface.hxx +++ b/svtools/inc/svtools/table/tablecontrolinterface.hxx @@ -197,23 +197,40 @@ namespace svt { namespace table /// returns the index of the currently active row virtual RowPos getCurrentRow() const = 0; + /// activates the given cell + virtual bool activateCell( ColPos const i_col, RowPos const i_row ) = 0; + + /// retrieves the size of the table window, in pixels virtual ::Size getTableSizePixel() const = 0; + + /// sets a new mouse pointer for the table window virtual void setPointer( Pointer const & i_pointer ) = 0; + + /// captures the mouse to the table window virtual void captureMouse() = 0; + + /// releases the mouse, after it had previously been captured virtual void releaseMouse() = 0; + + /// invalidates the table window virtual void invalidate() = 0; + + /// calculates a width, given in pixels, into a AppFont-based width virtual long pixelWidthToAppFont( long const i_pixels ) const = 0; - virtual void hideTracking() = 0; + /// shows a trackign rectangle virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) = 0; - virtual void activateCellAt( const Point& rPoint ) = 0; + /// hides a prviously shown tracking rectangle + virtual void hideTracking() = 0; - virtual RowPos getRowAtPoint( const Point& rPoint ) const = 0; - virtual ColPos getColAtPoint( const Point& rPoint ) const = 0; + /// does a hit test for the given pixel coordinates virtual TableCell hitTest( const Point& rPoint ) const = 0; + + /// retrieves the metrics for a given column virtual ColumnMetrics getColumnMetrics( ColPos const i_column ) const = 0; + /// determines whether a given row is selected virtual bool isRowSelected( RowPos _nRow ) const = 0; virtual ~ITableControl() {}; diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index c5855414db97..80ce012b05d0 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -31,6 +31,7 @@ #include "svtools/table/tabletypes.hxx" #include "svtools/table/tablerenderer.hxx" #include "svtools/table/tableinputhandler.hxx" +#include "svtools/table/tablesort.hxx" #include #include @@ -313,6 +314,7 @@ namespace svt { namespace table @see getWidth */ virtual TableMetrics getPreferredWidth() const = 0; + /** sets the preferred width of the column, to be used when user resizes column @see getMaxWidth @@ -506,8 +508,16 @@ namespace svt { namespace table virtual ::boost::optional< ::std::vector< ::Color > > getRowBackgroundColors() const = 0; + /** determines the vertical alignment of content within a cell + */ virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() const = 0; + /** returns an adapter to the sorting functionality of the model + + It is legitimate to return here, in this case, the table model does not support sorting. + */ + virtual ITableDataSort* getSortAdapter() = 0; + /// destroys the table model instance virtual ~ITableModel() { } }; diff --git a/svtools/inc/svtools/table/tablesort.hxx b/svtools/inc/svtools/table/tablesort.hxx new file mode 100755 index 000000000000..a8f86a3953e1 --- /dev/null +++ b/svtools/inc/svtools/table/tablesort.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_TABLESORT_HXX +#define SVTOOLS_TABLESORT_HXX + +#include "svtools/table/tabletypes.hxx" + +//...................................................................................................................... +namespace svt { namespace table +{ +//...................................................................................................................... + + //================================================================================================================== + //= ColumnSortDirection + //================================================================================================================== + enum ColumnSortDirection + { + ColumnSortAscending, + ColumnSortDescending + }; + + //================================================================================================================== + //= ColumnSort + //================================================================================================================== + struct ColumnSort + { + ColPos nColumnPos; + ColumnSortDirection eSortDirection; + + ColumnSort() + :nColumnPos( COL_INVALID ) + ,eSortDirection( ColumnSortAscending ) + { + } + + ColumnSort( ColPos const i_columnPos, ColumnSortDirection i_sortDirection ) + :nColumnPos( i_columnPos ) + ,eSortDirection( i_sortDirection ) + { + } + }; + + //================================================================================================================== + //= ITableDataSort + //================================================================================================================== + /** provides sorting functionality for the datta underlying an ITableModel + */ + class SAL_NO_VTABLE ITableDataSort + { + public: + /** sorts the rows in the model by the given column's data, in the given direction. + */ + virtual void sortByColumn( ColPos const i_column, ColumnSortDirection const i_sortDirection ) = 0; + + /** retrieves the current sort order of the data + + If the nColumnIndex member of the returned srtructure is COL_INVALID, then + the data is currently not sorted. + */ + virtual ColumnSort getCurrentSortOrder() const = 0; + }; + +//...................................................................................................................... +} } // namespace svt::table +//...................................................................................................................... + +#endif // SVTOOLS_TABLESORT_HXX diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index 0870fac86087..e2706a37a715 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -59,6 +59,7 @@ namespace svt { namespace table { m_pImpl->aMouseFunctions.push_back( new ColumnResize ); m_pImpl->aMouseFunctions.push_back( new RowSelection ); + m_pImpl->aMouseFunctions.push_back( new ColumnSortHandler ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index f5e6080f9ddd..e3a47057423f 100755 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -120,8 +120,7 @@ namespace svt { namespace table return ContinueFunction; } - Point const aPoint = i_event.GetPosPixel(); - TableCell const tableCell( i_tableControl.hitTest( aPoint ) ); + TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) ); if ( tableCell.nRow == ROW_COL_HEADERS ) { if ( ( tableCell.nColumn != COL_INVALID ) @@ -205,8 +204,7 @@ namespace svt { namespace table { bool handled = false; - Point const aPoint = i_event.GetPosPixel(); - TableCell const tableCell( i_tableControl.hitTest( aPoint ) ); + TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) ); if ( tableCell.nRow >= 0 ) { bool bSetCursor = false; @@ -228,7 +226,7 @@ namespace svt { namespace table if ( bSetCursor ) { - i_tableControl.activateCellAt( aPoint ); + i_tableControl.activateCell( tableCell.nColumn, tableCell.nRow ); handled = true; } } @@ -241,8 +239,8 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ FunctionResult RowSelection::handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ) { - Point const aPoint = i_event.GetPosPixel(); - if ( i_tableControl.getRowAtPoint( aPoint ) >= 0 ) + TableCell const tableCell = i_tableControl.hitTest( i_event.GetPosPixel() ); + if ( tableCell.nRow >= 0 ) { if ( i_tableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION ) { @@ -257,6 +255,68 @@ namespace svt { namespace table return SkipFunction; } + //================================================================================================================== + //= ColumnSortHandler + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + FunctionResult ColumnSortHandler::handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + OSL_UNUSED( i_tableControl ); + OSL_UNUSED( i_event ); + return SkipFunction; + } + + //------------------------------------------------------------------------------------------------------------------ + FunctionResult ColumnSortHandler::handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + if ( m_nActiveColumn != COL_INVALID ) + { + OSL_ENSURE( false, "ColumnSortHandler::handleMouseDown: called while already active - suspicious!" ); + return ContinueFunction; + } + + if ( i_tableControl.getModel()->getSortAdapter() == NULL ) + // no sorting support at the model + return SkipFunction; + + TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) ); + if ( ( tableCell.nRow != ROW_COL_HEADERS ) || ( tableCell.nColumn < 0 ) ) + return SkipFunction; + + // TODO: ensure the column header is rendered in some special way, indicating its current state + + m_nActiveColumn = tableCell.nColumn; + return ActivateFunction; + } + + //------------------------------------------------------------------------------------------------------------------ + FunctionResult ColumnSortHandler::handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ) + { + if ( m_nActiveColumn == COL_INVALID ) + return SkipFunction; + + TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) ); + if ( ( tableCell.nRow != ROW_COL_HEADERS ) || ( tableCell.nColumn != m_nActiveColumn ) ) + // mouse was pressed on a column header, but released outside of it. + // => just deactivate, without sorting + return DeactivateFunction; + + ITableDataSort* pSort = i_tableControl.getModel()->getSortAdapter(); + ENSURE_OR_RETURN( pSort != NULL, "ColumnSortHandler::handleMouseUp: somebody is mocking with us!", DeactivateFunction ); + // in handleMousButtonDown, the model claimed to have sort support ... + + ColumnSortDirection eSortDirection = ColumnSortAscending; + ColumnSort const aCurrentSort = pSort->getCurrentSortOrder(); + if ( aCurrentSort.nColumnPos == m_nActiveColumn ) + // invert existing sort order + eSortDirection = ( aCurrentSort.eSortDirection == ColumnSortAscending ) ? ColumnSortDescending : ColumnSortAscending; + + pSort->sortByColumn( m_nActiveColumn, eSortDirection ); + + m_nActiveColumn = COL_INVALID; + return DeactivateFunction; + } + //...................................................................................................................... } } // namespace svt::table //...................................................................................................................... diff --git a/svtools/source/table/mousefunction.hxx b/svtools/source/table/mousefunction.hxx index dccd013e5680..2149026a0923 100755 --- a/svtools/source/table/mousefunction.hxx +++ b/svtools/source/table/mousefunction.hxx @@ -133,6 +133,27 @@ namespace svt { namespace table bool m_bActive; }; + //================================================================================================================== + //= ColumnSortHandler + //================================================================================================================== + class ColumnSortHandler : public MouseFunction + { + public: + ColumnSortHandler() + :m_nActiveColumn( COL_INVALID ) + { + } + + public: + // IMouseFunction + virtual FunctionResult handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ); + virtual FunctionResult handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event ); + virtual FunctionResult handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ); + + private: + ColPos m_nActiveColumn; + }; + //...................................................................................................................... } } // namespace svt::table //...................................................................................................................... diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index dcd169381aef..8e995babb36f 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -200,6 +200,10 @@ namespace svt { namespace table { return com::sun::star::style::VerticalAlignment(0); } + virtual ITableDataSort* getSortAdapter() + { + return NULL; + } virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ) { (void)i_row; @@ -1907,18 +1911,12 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::activateCellAt(const Point& rPoint) + bool TableControl_Impl::activateCell( ColPos const i_col, RowPos const i_row ) { DBG_CHECK_ME(); - - RowPos const newRowPos = getRowAtPoint( rPoint ); - ColPos const newColPos = getColAtPoint( rPoint ); - - if ( ( newRowPos >= 0 ) && ( newColPos >= 0 ) ) - { // don't activate invalid or header cells - goTo( newColPos, newRowPos ); - } + return goTo( i_col, i_row ); } + //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect) { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index a6aebbaa6cc4..0975368a88a2 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -277,6 +277,7 @@ namespace svt { namespace table virtual PTableModel getModel() const; virtual ColPos getCurrentColumn() const; virtual RowPos getCurrentRow() const; + virtual bool activateCell( ColPos const i_col, RowPos const i_row ); virtual ::Size getTableSizePixel() const; virtual void setPointer( Pointer const & i_pointer ); virtual void captureMouse(); @@ -285,7 +286,6 @@ namespace svt { namespace table virtual long pixelWidthToAppFont( long const i_pixels ) const; virtual void hideTracking(); virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ); - virtual void activateCellAt( const Point& rPoint ); virtual RowPos getRowAtPoint( const Point& rPoint ) const; virtual ColPos getColAtPoint( const Point& rPoint ) const; virtual TableCell hitTest( const Point& rPoint ) const; diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 57c0040935cc..ef9b10030230 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -91,8 +91,8 @@ sal_Int32 SAL_CALL SVTXGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getRowAtPoint: no control (anymore)!", -1 ); - sal_Int32 const nRow = pTable->getTableControlInterface().getRowAtPoint( Point( x, y ) ); - return ( nRow >= 0 ) ? nRow : -1; + TableCell const tableCell = pTable->getTableControlInterface().hitTest( Point( x, y ) ); + return ( tableCell.nRow >= 0 ) ? tableCell.nRow : -1; } // --------------------------------------------------------------------------------------------------------------------- @@ -103,8 +103,8 @@ sal_Int32 SAL_CALL SVTXGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getColumnAtPoint: no control (anymore)!", -1 ); - sal_Int32 const nColumn = pTable->getTableControlInterface().getColAtPoint( Point( x, y ) ); - return ( nColumn >= 0 ) ? nColumn : -1; + TableCell const tableCell = pTable->getTableControlInterface().hitTest( Point( x, y ) ); + return ( tableCell.nColumn >= 0 ) ? tableCell.nColumn : -1; } // --------------------------------------------------------------------------------------------------------------------- diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index a47b798c7d59..1e6a690f48e7 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -69,6 +69,8 @@ namespace svt { namespace table using ::com::sun::star::uno::Any; using ::com::sun::star::style::HorizontalAlignment_LEFT; using ::com::sun::star::style::HorizontalAlignment; + using ::com::sun::star::style::VerticalAlignment_TOP; + using ::com::sun::star::style::VerticalAlignment; using ::com::sun::star::uno::WeakReference; using ::com::sun::star::awt::grid::GridDataEvent; /** === end UNO using === **/ @@ -96,7 +98,7 @@ namespace svt { namespace table ::boost::optional< ::Color > m_aTextColor; ::boost::optional< ::Color > m_aTextLineColor; ::boost::optional< ::std::vector< ::Color > > m_aRowColors; - ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; + VerticalAlignment m_eVerticalAlign; ModellListeners m_aListeners; WeakReference< XGridDataModel > m_aDataModel; WeakReference< XGridColumnModel > m_aColumnModel; @@ -118,7 +120,7 @@ namespace svt { namespace table ,m_aTextColor ( ) ,m_aTextLineColor ( ) ,m_aRowColors ( ) - ,m_eVerticalAlign ( com::sun::star::style::VerticalAlignment_TOP ) + ,m_eVerticalAlign ( VerticalAlignment_TOP ) { } }; @@ -704,20 +706,20 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::style::VerticalAlignment UnoControlTableModel::getVerticalAlign() const + VerticalAlignment UnoControlTableModel::getVerticalAlign() const { DBG_CHECK_ME(); return m_pImpl->m_eVerticalAlign; } - //-------------------------------------------------------------------- - void UnoControlTableModel::setVerticalAlign( com::sun::star::style::VerticalAlignment _xAlign ) + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::setVerticalAlign( VerticalAlignment _xAlign ) { DBG_CHECK_ME(); m_pImpl->m_eVerticalAlign = _xAlign; } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ ColPos UnoControlTableModel::getColumnPos( UnoGridColumnFacade const & i_column ) const { DBG_CHECK_ME(); @@ -733,6 +735,28 @@ namespace svt { namespace table return COL_INVALID; } + //------------------------------------------------------------------------------------------------------------------ + ITableDataSort* UnoControlTableModel::getSortAdapter() + { + // TODO: make this depend on whether or not our XGridDataModel has sorting support + return this; + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::sortByColumn( ColPos const i_column, ColumnSortDirection const i_sortDirection ) + { + // TODO + OSL_UNUSED( i_column ); + OSL_UNUSED( i_sortDirection ); + } + + //------------------------------------------------------------------------------------------------------------------ + ColumnSort UnoControlTableModel::getCurrentSortOrder() const + { + // TODO + return ColumnSort(); + } + //-------------------------------------------------------------------- void UnoControlTableModel::notifyColumnChange( ColPos const i_columnPos, ColumnAttributeGroup const i_attributeGroup ) const { diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 85a4b9480370..32930a64326d 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -57,7 +57,7 @@ namespace svt { namespace table //================================================================================================================== class UnoGridColumnFacade; struct UnoControlTableModel_Impl; - class UnoControlTableModel : public ITableModel + class UnoControlTableModel : public ITableModel, public ITableDataSort { private: UnoControlTableModel_Impl* m_pImpl; @@ -95,6 +95,11 @@ namespace svt { namespace table getRowBackgroundColors() const; virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() const; + virtual ITableDataSort* getSortAdapter(); + + // ITableDataSort overridables + virtual void sortByColumn( ColPos const i_column, ColumnSortDirection const i_sortDirection ); + virtual ColumnSort getCurrentSortOrder() const; // column write access void appendColumn( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column ); -- cgit From e4e1fd5c1946b7ae2c774fc3e21dd2008efc5be9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 11:49:19 +0100 Subject: gridsort: outsorced the STL-compatible Less-predicates for UNO types from enumerablemap.cxx to a dedicated file, which can be used in other places, too --- comphelper/inc/comphelper/anycompare.hxx | 185 +++++++++++++++++++++++ comphelper/source/container/enumerablemap.cxx | 205 +------------------------- comphelper/source/misc/anycompare.cxx | 127 ++++++++++++++++ comphelper/source/misc/makefile.mk | 1 + 4 files changed, 319 insertions(+), 199 deletions(-) create mode 100755 comphelper/inc/comphelper/anycompare.hxx create mode 100755 comphelper/source/misc/anycompare.cxx diff --git a/comphelper/inc/comphelper/anycompare.hxx b/comphelper/inc/comphelper/anycompare.hxx new file mode 100755 index 000000000000..8fd398b7647d --- /dev/null +++ b/comphelper/inc/comphelper/anycompare.hxx @@ -0,0 +1,185 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef COMPHELPER_ANYCOMPARE_HXX +#define COMPHELPER_ANYCOMPARE_HXX + +#include "comphelper/comphelperdllapi.h" + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +#include + +#include +#include + +//...................................................................................................................... +namespace comphelper +{ +//...................................................................................................................... + + //================================================================================================================== + //= IKeyPredicateLess + //================================================================================================================== + class SAL_NO_VTABLE IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const = 0; + virtual ~IKeyPredicateLess() {} + }; + + //================================================================================================================== + //= LessPredicateAdapter + //================================================================================================================== + struct LessPredicateAdapter : public ::std::binary_function< ::com::sun::star::uno::Any, ::com::sun::star::uno::Any, bool > + { + LessPredicateAdapter( const IKeyPredicateLess& _predicate ) + :m_predicate( _predicate ) + { + } + + bool operator()( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + return m_predicate.isLess( _lhs, _rhs ); + } + + private: + IKeyPredicateLess const & m_predicate; + + private: + LessPredicateAdapter(); // never implemented + }; + + //================================================================================================================== + //= ScalarPredicateLess + //================================================================================================================== + template< typename SCALAR > + class ScalarPredicateLess : public IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + SCALAR lhs(0), rhs(0); + if ( !( _lhs >>= lhs ) + || !( _rhs >>= rhs ) + ) + throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + return lhs < rhs; + } + }; + + //================================================================================================================== + //= StringPredicateLess + //================================================================================================================== + class StringPredicateLess : public IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + ::rtl::OUString lhs, rhs; + if ( !( _lhs >>= lhs ) + || !( _rhs >>= rhs ) + ) + throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + return lhs < rhs; + } + }; + + //================================================================================================================== + //= TypePredicateLess + //================================================================================================================== + class TypePredicateLess : public IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + ::com::sun::star::uno::Type lhs, rhs; + if ( !( _lhs >>= lhs ) + || !( _rhs >>= rhs ) + ) + throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + return lhs.getTypeName() < rhs.getTypeName(); + } + }; + + //================================================================================================================== + //= EnumPredicateLess + //================================================================================================================== + class EnumPredicateLess : public IKeyPredicateLess + { + public: + EnumPredicateLess( ::com::sun::star::uno::Type const & _enumType ) + :m_enumType( _enumType ) + { + } + + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + sal_Int32 lhs(0), rhs(0); + if ( !::cppu::enum2int( lhs, _lhs ) + || !::cppu::enum2int( rhs, _rhs ) + || !_lhs.getValueType().equals( m_enumType ) + || !_rhs.getValueType().equals( m_enumType ) + ) + throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + return lhs < rhs; + } + + private: + ::com::sun::star::uno::Type const m_enumType; + }; + + //================================================================================================================== + //= InterfacePredicateLess + //================================================================================================================== + class InterfacePredicateLess : public IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + if ( ( _lhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE ) + || ( _rhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE ) + ) + throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > lhs( _lhs, ::com::sun::star::uno::UNO_QUERY ); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > rhs( _rhs, ::com::sun::star::uno::UNO_QUERY ); + return lhs.get() < rhs.get(); + } + }; + + //================================================================================================================== + //= InterfacePredicateLess + //================================================================================================================== + ::std::auto_ptr< IKeyPredicateLess > COMPHELPER_DLLPUBLIC getStandardLessPredicate( ::com::sun::star::uno::Type const & i_type ); + +//...................................................................................................................... +} // namespace comphelper +//...................................................................................................................... + +#endif // COMPHELPER_ANYCOMPARE_HXX diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index 15241cd72dd6..ecc9494056ee 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -24,11 +24,11 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" #include "comphelper_module.hxx" #include "comphelper/anytostring.hxx" +#include "comphelper/anycompare.hxx" #include "comphelper/componentbase.hxx" #include "comphelper/componentcontext.hxx" #include "comphelper/extract.hxx" @@ -47,9 +47,7 @@ #include #include -#include #include -#include #include //........................................................................ @@ -79,26 +77,14 @@ namespace comphelper using ::com::sun::star::beans::Pair; using ::com::sun::star::uno::TypeClass; using ::com::sun::star::uno::TypeClass_VOID; - using ::com::sun::star::uno::TypeClass_CHAR; - using ::com::sun::star::uno::TypeClass_BOOLEAN; - using ::com::sun::star::uno::TypeClass_BYTE; - using ::com::sun::star::uno::TypeClass_SHORT; - using ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT; - using ::com::sun::star::uno::TypeClass_LONG; - using ::com::sun::star::uno::TypeClass_UNSIGNED_LONG; - using ::com::sun::star::uno::TypeClass_HYPER; - using ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER; - using ::com::sun::star::uno::TypeClass_FLOAT; - using ::com::sun::star::uno::TypeClass_DOUBLE; - using ::com::sun::star::uno::TypeClass_STRING; - using ::com::sun::star::uno::TypeClass_TYPE; - using ::com::sun::star::uno::TypeClass_ENUM; - using ::com::sun::star::uno::TypeClass_INTERFACE; using ::com::sun::star::uno::TypeClass_UNKNOWN; using ::com::sun::star::uno::TypeClass_ANY; using ::com::sun::star::uno::TypeClass_EXCEPTION; using ::com::sun::star::uno::TypeClass_STRUCT; using ::com::sun::star::uno::TypeClass_UNION; + using ::com::sun::star::uno::TypeClass_FLOAT; + using ::com::sun::star::uno::TypeClass_DOUBLE; + using ::com::sun::star::uno::TypeClass_INTERFACE; using ::com::sun::star::lang::XServiceInfo; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::container::XEnumeration; @@ -107,136 +93,6 @@ namespace comphelper using ::com::sun::star::lang::DisposedException; /** === end UNO using === **/ - //==================================================================== - //= IKeyPredicateLess - //==================================================================== - class SAL_NO_VTABLE IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const = 0; - virtual ~IKeyPredicateLess() {} - }; - - //==================================================================== - //= LessPredicateAdapter - //==================================================================== - struct LessPredicateAdapter : public ::std::binary_function< Any, Any, bool > - { - LessPredicateAdapter( const IKeyPredicateLess& _predicate ) - :m_predicate( _predicate ) - { - } - - bool operator()( const Any& _lhs, const Any& _rhs ) const - { - return m_predicate.isLess( _lhs, _rhs ); - } - - private: - const IKeyPredicateLess& m_predicate; - - private: - LessPredicateAdapter(); // never implemented - }; - - //==================================================================== - //= ScalarPredicateLess - //==================================================================== - template< typename SCALAR > - class ScalarPredicateLess : public IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - SCALAR lhs(0), rhs(0); - if ( !( _lhs >>= lhs ) - || !( _rhs >>= rhs ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - return lhs < rhs; - } - }; - - //==================================================================== - //= StringPredicateLess - //==================================================================== - class StringPredicateLess : public IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - ::rtl::OUString lhs, rhs; - if ( !( _lhs >>= lhs ) - || !( _rhs >>= rhs ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - return lhs < rhs; - } - }; - - //==================================================================== - //= TypePredicateLess - //==================================================================== - class TypePredicateLess : public IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - Type lhs, rhs; - if ( !( _lhs >>= lhs ) - || !( _rhs >>= rhs ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - return lhs.getTypeName() < rhs.getTypeName(); - } - }; - - //==================================================================== - //= EnumPredicateLess - //==================================================================== - class EnumPredicateLess : public IKeyPredicateLess - { - public: - EnumPredicateLess( const Type& _enumType ) - :m_enumType( _enumType ) - { - } - - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - sal_Int32 lhs(0), rhs(0); - if ( !::cppu::enum2int( lhs, _lhs ) - || !::cppu::enum2int( rhs, _rhs ) - || !_lhs.getValueType().equals( m_enumType ) - || !_rhs.getValueType().equals( m_enumType ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - return lhs < rhs; - } - - private: - const Type m_enumType; - }; - - //==================================================================== - //= InterfacePredicateLess - //==================================================================== - class InterfacePredicateLess : public IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - if ( ( _lhs.getValueTypeClass() != TypeClass_INTERFACE ) - || ( _rhs.getValueTypeClass() != TypeClass_INTERFACE ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - - Reference< XInterface > lhs( _lhs, UNO_QUERY ); - Reference< XInterface > rhs( _rhs, UNO_QUERY ); - return lhs.get() < rhs.get(); - } - }; - //==================================================================== //= MapData //==================================================================== @@ -549,58 +405,9 @@ namespace comphelper throw IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported value type." ) ), *this ); // create the comparator for the KeyType, and throw if the type is not supported - TypeClass eKeyTypeClass = aKeyType.getTypeClass(); - ::std::auto_ptr< IKeyPredicateLess > pComparator; - switch ( eKeyTypeClass ) - { - case TypeClass_CHAR: - pComparator.reset( new ScalarPredicateLess< sal_Unicode >() ); - break; - case TypeClass_BOOLEAN: - pComparator.reset( new ScalarPredicateLess< sal_Bool >() ); - break; - case TypeClass_BYTE: - pComparator.reset( new ScalarPredicateLess< sal_Int8 >() ); - break; - case TypeClass_SHORT: - pComparator.reset( new ScalarPredicateLess< sal_Int16 >() ); - break; - case TypeClass_UNSIGNED_SHORT: - pComparator.reset( new ScalarPredicateLess< sal_uInt16 >() ); - break; - case TypeClass_LONG: - pComparator.reset( new ScalarPredicateLess< sal_Int32 >() ); - break; - case TypeClass_UNSIGNED_LONG: - pComparator.reset( new ScalarPredicateLess< sal_uInt32 >() ); - break; - case TypeClass_HYPER: - pComparator.reset( new ScalarPredicateLess< sal_Int64 >() ); - break; - case TypeClass_UNSIGNED_HYPER: - pComparator.reset( new ScalarPredicateLess< sal_uInt64 >() ); - break; - case TypeClass_FLOAT: - pComparator.reset( new ScalarPredicateLess< float >() ); - break; - case TypeClass_DOUBLE: - pComparator.reset( new ScalarPredicateLess< double >() ); - break; - case TypeClass_STRING: - pComparator.reset( new StringPredicateLess() ); - break; - case TypeClass_TYPE: - pComparator.reset( new TypePredicateLess() ); - break; - case TypeClass_ENUM: - pComparator.reset( new EnumPredicateLess( aKeyType ) ); - break; - case TypeClass_INTERFACE: - pComparator.reset( new InterfacePredicateLess() ); - break; - default: + ::std::auto_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType ) ); + if ( !pComparator.get() ) throw IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), *this ); - } // init members m_aData.m_aKeyType = aKeyType; diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx new file mode 100755 index 000000000000..2a6b7abda265 --- /dev/null +++ b/comphelper/source/misc/anycompare.cxx @@ -0,0 +1,127 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_comphelper.hxx" + +#include "comphelper/anycompare.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace comphelper +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::uno::TypeClass_CHAR; + using ::com::sun::star::uno::TypeClass_BOOLEAN; + using ::com::sun::star::uno::TypeClass_BYTE; + using ::com::sun::star::uno::TypeClass_SHORT; + using ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT; + using ::com::sun::star::uno::TypeClass_LONG; + using ::com::sun::star::uno::TypeClass_UNSIGNED_LONG; + using ::com::sun::star::uno::TypeClass_HYPER; + using ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER; + using ::com::sun::star::uno::TypeClass_FLOAT; + using ::com::sun::star::uno::TypeClass_DOUBLE; + using ::com::sun::star::uno::TypeClass_STRING; + using ::com::sun::star::uno::TypeClass_TYPE; + using ::com::sun::star::uno::TypeClass_ENUM; + using ::com::sun::star::uno::TypeClass_INTERFACE; + /** === end UNO using === **/ + + //------------------------------------------------------------------------------------------------------------------ + ::std::auto_ptr< IKeyPredicateLess > getStandardLessPredicate( ::com::sun::star::uno::Type const & i_type ) + { + ::std::auto_ptr< IKeyPredicateLess > pComparator; + switch ( i_type.getTypeClass() ) + { + case TypeClass_CHAR: + pComparator.reset( new ScalarPredicateLess< sal_Unicode >() ); + break; + case TypeClass_BOOLEAN: + pComparator.reset( new ScalarPredicateLess< sal_Bool >() ); + break; + case TypeClass_BYTE: + pComparator.reset( new ScalarPredicateLess< sal_Int8 >() ); + break; + case TypeClass_SHORT: + pComparator.reset( new ScalarPredicateLess< sal_Int16 >() ); + break; + case TypeClass_UNSIGNED_SHORT: + pComparator.reset( new ScalarPredicateLess< sal_uInt16 >() ); + break; + case TypeClass_LONG: + pComparator.reset( new ScalarPredicateLess< sal_Int32 >() ); + break; + case TypeClass_UNSIGNED_LONG: + pComparator.reset( new ScalarPredicateLess< sal_uInt32 >() ); + break; + case TypeClass_HYPER: + pComparator.reset( new ScalarPredicateLess< sal_Int64 >() ); + break; + case TypeClass_UNSIGNED_HYPER: + pComparator.reset( new ScalarPredicateLess< sal_uInt64 >() ); + break; + case TypeClass_FLOAT: + pComparator.reset( new ScalarPredicateLess< float >() ); + break; + case TypeClass_DOUBLE: + pComparator.reset( new ScalarPredicateLess< double >() ); + break; + case TypeClass_STRING: + pComparator.reset( new StringPredicateLess() ); + break; + case TypeClass_TYPE: + pComparator.reset( new TypePredicateLess() ); + break; + case TypeClass_ENUM: + pComparator.reset( new EnumPredicateLess( i_type ) ); + break; + case TypeClass_INTERFACE: + pComparator.reset( new InterfacePredicateLess() ); + break; + default: + break; + } + return pComparator; + } + +//...................................................................................................................... +} // namespace comphelper +//...................................................................................................................... diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk index 0bb4defb4165..2f421bdde70d 100644 --- a/comphelper/source/misc/makefile.mk +++ b/comphelper/source/misc/makefile.mk @@ -93,6 +93,7 @@ SLOFILES= \ $(SLO)$/comphelper_services.obj \ $(SLO)$/componentbase.obj \ $(SLO)$/stillreadwriteinteraction.obj \ + $(SLO)$/anycompare.obj \ # --- Targets ---------------------------------- -- cgit From 961e924dbc7ebd1cea9927134524a443a7666240 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 11:49:20 +0100 Subject: gridsort: #163172# added UNO API support for sorting grid data. Implementation still unfinished. Things missing in the SortableGridData implementation - add as listener to the delegator, so we're notified of changes - translate and multiplex those changes - do own notifications (XGridDataListener.dataChanged) when the sort order changed - (possibly) update the sort order when the data in the current sort-column changed --- svtools/inc/svtools/table/tablesort.hxx | 2 +- svtools/source/uno/unocontroltablemodel.cxx | 42 +- toolkit/inc/toolkit/helper/servicenames.hxx | 1 + toolkit/source/controls/grid/gridcontrol.cxx | 32 +- toolkit/source/controls/grid/initguard.hxx | 64 +++ toolkit/source/controls/grid/makefile.mk | 5 +- .../source/controls/grid/sortablegriddatamodel.cxx | 450 +++++++++++++++++++++ .../source/controls/grid/sortablegriddatamodel.hxx | 138 +++++++ toolkit/source/helper/registerservices.cxx | 3 +- toolkit/source/helper/servicenames.cxx | 2 + toolkit/util/tk.component | 3 + 11 files changed, 724 insertions(+), 18 deletions(-) create mode 100755 toolkit/source/controls/grid/initguard.hxx create mode 100755 toolkit/source/controls/grid/sortablegriddatamodel.cxx create mode 100755 toolkit/source/controls/grid/sortablegriddatamodel.hxx diff --git a/svtools/inc/svtools/table/tablesort.hxx b/svtools/inc/svtools/table/tablesort.hxx index a8f86a3953e1..1690b4d51344 100755 --- a/svtools/inc/svtools/table/tablesort.hxx +++ b/svtools/inc/svtools/table/tablesort.hxx @@ -57,7 +57,7 @@ namespace svt { namespace table { } - ColumnSort( ColPos const i_columnPos, ColumnSortDirection i_sortDirection ) + ColumnSort( ColPos const i_columnPos, ColumnSortDirection const i_sortDirection ) :nColumnPos( i_columnPos ) ,eSortDirection( i_sortDirection ) { diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 1e6a690f48e7..505cccf22702 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -38,6 +38,7 @@ #include #include #include +#include /** === end UNO includes === **/ #include @@ -73,6 +74,8 @@ namespace svt { namespace table using ::com::sun::star::style::VerticalAlignment; using ::com::sun::star::uno::WeakReference; using ::com::sun::star::awt::grid::GridDataEvent; + using ::com::sun::star::awt::grid::XSortableGridData; + using ::com::sun::star::beans::Pair; /** === end UNO using === **/ //================================================================================================================== @@ -738,23 +741,48 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ ITableDataSort* UnoControlTableModel::getSortAdapter() { - // TODO: make this depend on whether or not our XGridDataModel has sorting support - return this; + DBG_CHECK_ME(); + + Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY ); + if ( xSortAccess.is() ) + return this; + return NULL; } //------------------------------------------------------------------------------------------------------------------ void UnoControlTableModel::sortByColumn( ColPos const i_column, ColumnSortDirection const i_sortDirection ) { - // TODO - OSL_UNUSED( i_column ); - OSL_UNUSED( i_sortDirection ); + DBG_CHECK_ME(); + + try + { + Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); + xSortAccess->sortByColumn( i_column, i_sortDirection == ColumnSortAscending ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } //------------------------------------------------------------------------------------------------------------------ ColumnSort UnoControlTableModel::getCurrentSortOrder() const { - // TODO - return ColumnSort(); + DBG_CHECK_ME(); + + ColumnSort currentSort; + try + { + Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); + Pair< ::sal_Int32, ::sal_Bool > const aCurrentSortOrder( xSortAccess->getCurrentSortOrder() ); + currentSort.nColumnPos = aCurrentSortOrder.First; + currentSort.eSortDirection = aCurrentSortOrder.Second ? ColumnSortAscending : ColumnSortDescending; + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return currentSort; } //-------------------------------------------------------------------- diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx index 2d1df79b733b..a149f9e8f25f 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -97,6 +97,7 @@ extern const sal_Char __FAR_DATA szServiceName_GridControlModel[]; extern const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[]; extern const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[]; extern const sal_Char __FAR_DATA szServiceName_GridColumn[]; +extern const sal_Char __FAR_DATA szServiceName_SortableGridDataModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName2_UnoSimpleAnimationControl[]; extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[]; diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 14faa851400a..f054ca1ea05d 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include #include #include @@ -55,9 +57,25 @@ using namespace ::com::sun::star::view; namespace toolkit { -// ---------------------------------------------------- -// class UnoGridModel -// ---------------------------------------------------- +//====================================================================================================================== +//= UnoGridModel +//====================================================================================================================== +namespace +{ + Reference< XGridDataModel > lcl_getDefaultDataModel_throw( ::comphelper::ComponentContext const & i_context ) + { + Reference< XMutableGridDataModel > const xDelegatorModel( DefaultGridDataModel::create( i_context.getUNOContext() ), UNO_QUERY_THROW ); + Reference< XGridDataModel > const xDataModel( SortableGridDataModel::create( i_context.getUNOContext(), xDelegatorModel ), UNO_QUERY_THROW ); + return xDataModel; + } + + Reference< XGridColumnModel > lcl_getDefaultColumnModel_throw( ::comphelper::ComponentContext const & i_context ) + { + Reference< XGridColumnModel > const xColumnModel( i_context.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ), UNO_QUERY_THROW ); + return xColumnModel; + } +} + //---------------------------------------------------------------------------------------------------------------------- UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) :UnoControlModel( i_factory ) @@ -80,8 +98,8 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: ImplRegisterProperty( BASEPROPERTY_GRID_SHOWCOLUMNHEADER ); ImplRegisterProperty( BASEPROPERTY_COLUMN_HEADER_HEIGHT ); ImplRegisterProperty( BASEPROPERTY_ROW_HEIGHT ); - ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) ); - ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) ); + ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL, makeAny( lcl_getDefaultDataModel_throw( maContext ) ) ); + ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( lcl_getDefaultColumnModel_throw( maContext ) ) ); ImplRegisterProperty( BASEPROPERTY_GRID_SELECTIONMODE ); ImplRegisterProperty( BASEPROPERTY_FONTRELIEF ); ImplRegisterProperty( BASEPROPERTY_FONTEMPHASISMARK ); @@ -114,7 +132,7 @@ UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) DBG_UNHANDLED_EXCEPTION(); } if ( !success ) - setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) ); + setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL, makeAny( lcl_getDefaultDataModel_throw( maContext ) ) ); // clone the column model success = false; @@ -129,7 +147,7 @@ UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) DBG_UNHANDLED_EXCEPTION(); } if ( !success ) - setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) ); + setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( lcl_getDefaultColumnModel_throw( maContext ) ) ); } //---------------------------------------------------------------------------------------------------------------------- diff --git a/toolkit/source/controls/grid/initguard.hxx b/toolkit/source/controls/grid/initguard.hxx new file mode 100755 index 000000000000..b2dddd2e5987 --- /dev/null +++ b/toolkit/source/controls/grid/initguard.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_INITGUARD_HXX +#define SVTOOLS_INITGUARD_HXX + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +#include + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + //================================================================================================================== + //= InitGuard + //================================================================================================================== + template < class IMPL > + class InitGuard : public ::comphelper::ComponentGuard + { + public: + InitGuard( IMPL& i_component, ::cppu::OBroadcastHelper & i_broadcastHelper ) + :comphelper::ComponentGuard( i_component, i_broadcastHelper ) + { + if ( !i_component.isInitialized() ) + throw ::com::sun::star::lang::NotInitializedException( ::rtl::OUString(), *&i_component ); + } + + ~InitGuard() + { + } + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // SVTOOLS_INITGUARD_HXX diff --git a/toolkit/source/controls/grid/makefile.mk b/toolkit/source/controls/grid/makefile.mk index c7bc6f038b10..5b4e87bf77ee 100644 --- a/toolkit/source/controls/grid/makefile.mk +++ b/toolkit/source/controls/grid/makefile.mk @@ -44,8 +44,9 @@ SLOFILES= \ $(SLO)$/defaultgriddatamodel.obj\ $(SLO)$/defaultgridcolumnmodel.obj\ $(SLO)$/gridcolumn.obj\ - $(SLO)$/grideventforwarder.obj - + $(SLO)$/grideventforwarder.obj\ + $(SLO)$/sortablegriddatamodel.obj + # --- Targets ------------------------------------------------------ .INCLUDE : target.mk diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx new file mode 100755 index 000000000000..4b525dbc925a --- /dev/null +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -0,0 +1,450 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_toolkit.hxx" + +#include "sortablegriddatamodel.hxx" +#include "initguard.hxx" +#include "toolkit/helper/servicenames.hxx" + +/** === begin UNO includes === **/ +#include +#include +/** === end UNO includes === **/ + +#include +#include +#include + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::TypeClass; + using ::com::sun::star::uno::TypeClass_VOID; + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::lang::IndexOutOfBoundsException; + using ::com::sun::star::lang::IllegalArgumentException; + using ::com::sun::star::awt::grid::XGridDataListener; + using ::com::sun::star::beans::Pair; + using ::com::sun::star::util::XCloneable; + using ::com::sun::star::i18n::XCollator; + using ::com::sun::star::lang::IllegalArgumentException; + using ::com::sun::star::lang::XMultiServiceFactory; + /** === end UNO using === **/ + + typedef InitGuard< SortableGridDataModel > MethodGuard; + + //================================================================================================================== + //= SortableGridDataModel + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + SortableGridDataModel::SortableGridDataModel( Reference< XMultiServiceFactory > const & i_factory ) + :SortableGridDataModel_Base( m_aMutex ) + ,m_context( i_factory ) + ,m_isInitialized( false ) + ,m_delegator() + ,m_collator() + ,m_currentSortColumn( -1 ) + ,m_sortAscending( true ) + ,m_rowIndexTranslation() + { + } + + //------------------------------------------------------------------------------------------------------------------ + SortableGridDataModel::SortableGridDataModel( SortableGridDataModel const & i_copySource ) + :cppu::BaseMutex() + ,SortableGridDataModel_Base( m_aMutex ) + ,m_context( i_copySource.m_context ) + ,m_collator( i_copySource.m_collator ) + ,m_isInitialized( true ) + ,m_delegator() + ,m_currentSortColumn( i_copySource.m_currentSortColumn ) + ,m_sortAscending( i_copySource.m_sortAscending ) + ,m_rowIndexTranslation( i_copySource.m_rowIndexTranslation ) + { + ENSURE_OR_THROW( i_copySource.m_delegator.is(), + "not expected to be called for a disposed copy source!" ); + m_delegator.set( i_copySource.m_delegator->createClone(), UNO_QUERY_THROW ); + } + + //------------------------------------------------------------------------------------------------------------------ + SortableGridDataModel::~SortableGridDataModel() + { + if ( !rBHelper.bDisposed ) + { + acquire(); + dispose(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + Reference< XCollator > lcl_loadDefaultCollator_throw( ::comphelper::ComponentContext const & i_context ) + { + Reference< XCollator > const xCollator( i_context.createComponent( "com.sun.star.i18n.Collator" ), UNO_QUERY_THROW ); + xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 ); + return xCollator; + } + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::initialize( const Sequence< Any >& i_arguments ) throw (Exception, RuntimeException) + { + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); + + Reference< XMutableGridDataModel > xDelegator; + Reference< XCollator > xCollator; + switch ( i_arguments.getLength() ) + { + case 1: // SortableGridDataModel.create( XMutableGridDataModel ) + xDelegator.set( i_arguments[0], UNO_QUERY ); + xCollator = lcl_loadDefaultCollator_throw( m_context ); + break; + + case 2: // SortableGridDataModel.createWithCollator( XMutableGridDataModel, XCollator ) + xDelegator.set( i_arguments[0], UNO_QUERY ); + xCollator.set( i_arguments[1], UNO_QUERY ); + if ( !xCollator.is() ) + throw IllegalArgumentException( ::rtl::OUString(), *this, 2 ); + break; + } + if ( !xDelegator.is() ) + throw IllegalArgumentException( ::rtl::OUString(), *this, 1 ); + + // TODO: add as listener to the delegator model, so we're able to multiplex the events it will notify + + m_delegator = xDelegator; + m_isInitialized = true; + } + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + class CellDataLessComparison : public ::std::binary_function< sal_Int32, sal_Int32, bool > + { + public: + CellDataLessComparison( + ::std::vector< Any > const & i_data, + ::comphelper::IKeyPredicateLess& i_predicate, + sal_Bool const i_sortAscending + ) + :m_data( i_data ) + ,m_predicate( i_predicate ) + ,m_sortAscending( i_sortAscending ) + { + } + + bool operator()( sal_Int32 const i_lhs, sal_Int32 const i_rhs ) const + { + Any const & lhs = m_data[ i_lhs ]; + Any const & rhs = m_data[ i_rhs ]; + // is less than everything else + if ( !lhs.hasValue() ) + return m_sortAscending; + if ( !rhs.hasValue() ) + return !m_sortAscending; + + // actually compare + if ( m_sortAscending ) + return m_predicate.isLess( lhs, rhs ); + else + return m_predicate.isLess( rhs, lhs ); + } + + private: + ::std::vector< Any > const & m_data; + ::comphelper::IKeyPredicateLess const & m_predicate; + sal_Bool const m_sortAscending; + }; + } + + //------------------------------------------------------------------------------------------------------------------ + void SortableGridDataModel::impl_reIndex_nothrow( ::sal_Int32 const i_columnIndex, sal_Bool const i_sortAscending ) + { + ::sal_Int32 const rowCount( getRowCount() ); + ::std::vector< ::sal_Int32 > aIndexTranslation( rowCount ); + + try + { + // build an unsorted translation table, and retrieve the unsorted data + ::std::vector< Any > aColumnData( rowCount ); + Type dataType; + for ( ::sal_Int32 rowIndex = 0; rowIndex < rowCount; ++rowIndex ) + { + aColumnData[ rowIndex ] = m_delegator->getCellData( i_columnIndex, rowIndex ); + aIndexTranslation[ rowIndex ] = rowIndex; + + // determine the data types we assume for the complete column + if ( ( dataType.getTypeClass() == TypeClass_VOID ) && aColumnData[ rowIndex ].hasValue() ) + dataType = aColumnData[ rowIndex ].getValueType(); + } + + // get predicate object + ::std::auto_ptr< ::comphelper::IKeyPredicateLess > const pPredicate( ::comphelper::getStandardLessPredicate( dataType ) ); + ENSURE_OR_RETURN_VOID( pPredicate.get(), "SortableGridDataModel::impl_reIndex_nothrow: no sortable data found!" ); + + // then sort + CellDataLessComparison const aComparator( aColumnData, *pPredicate, i_sortAscending ); + ::std::sort( aIndexTranslation.begin(), aIndexTranslation.end(), aComparator ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + return; + } + + m_rowIndexTranslation.swap( aIndexTranslation ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::sortByColumn( ::sal_Int32 i_columnIndex, ::sal_Bool i_sortAscending ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + + if ( ( i_columnIndex < 0 ) || ( i_columnIndex >= getColumnCount() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); + + impl_reIndex_nothrow( i_columnIndex, i_sortAscending ); + + m_currentSortColumn = i_columnIndex; + m_sortAscending = i_sortAscending; + } + + //------------------------------------------------------------------------------------------------------------------ + Pair< ::sal_Int32, ::sal_Bool > SAL_CALL SortableGridDataModel::getCurrentSortOrder( ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + return Pair< ::sal_Int32, ::sal_Bool >( m_currentSortColumn, m_sortAscending ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::addRow( const Any& i_heading, const Sequence< Any >& i_data ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + m_delegator->addRow( i_heading, i_data ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::addRows( const Sequence< Any >& i_headings, const Sequence< Sequence< Any > >& i_data ) throw (IllegalArgumentException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + m_delegator->addRows( i_headings, i_data ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::removeRow( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + m_delegator->removeRow( rowIndex ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::removeAllRows( ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + m_delegator->removeAllRows(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::updateCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + m_delegator->updateCellData( i_columnIndex, rowIndex, i_value ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::updateRowData( const Sequence< ::sal_Int32 >& i_columnIndexes, ::sal_Int32 i_rowIndex, const Sequence< Any >& i_values ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + m_delegator->updateRowData( i_columnIndexes, rowIndex, i_values ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::setRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + m_delegator->setRowHeading( rowIndex, i_heading ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::updateCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + m_delegator->updateCellToolTip( i_columnIndex, rowIndex, i_value ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::updateRowToolTip( ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + m_delegator->updateRowToolTip( rowIndex, i_value ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::addGridDataListener( const Reference< XGridDataListener >& i_listener ) throw (RuntimeException) + { + rBHelper.addListener( XGridDataListener::static_type(), i_listener ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::removeGridDataListener( const Reference< XGridDataListener >& i_listener ) throw (RuntimeException) + { + rBHelper.removeListener( XGridDataListener::static_type(), i_listener ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL SortableGridDataModel::getRowCount() throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + return m_delegator->getRowCount(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL SortableGridDataModel::getColumnCount() throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + return m_delegator->getColumnCount(); + } + + //------------------------------------------------------------------------------------------------------------------ + Any SAL_CALL SortableGridDataModel::getCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + return m_delegator->getCellData( i_columnIndex, rowIndex ); + } + + //------------------------------------------------------------------------------------------------------------------ + Any SAL_CALL SortableGridDataModel::getCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + return m_delegator->getCellToolTip( i_columnIndex, rowIndex ); + } + + //------------------------------------------------------------------------------------------------------------------ + Any SAL_CALL SortableGridDataModel::getRowHeading( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + return m_delegator->getRowHeading( rowIndex ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::disposing() + { + m_currentSortColumn = -1; + + Reference< XComponent > const delegatorComponent( m_delegator.get() ); + m_delegator.clear(); + delegatorComponent->dispose(); + + Reference< XComponent > const collatorComponent( m_collator, UNO_QUERY ); + m_collator.clear(); + if ( collatorComponent.is() ) + collatorComponent->dispose(); + + ::std::vector< ::sal_Int32 > aEmpty; + m_rowIndexTranslation.swap( aEmpty ); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XCloneable > SAL_CALL SortableGridDataModel::createClone( ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + return new SortableGridDataModel( *this ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL SortableGridDataModel::getImplementationName( ) throw (RuntimeException) + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.SortableGridDataModel" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL SortableGridDataModel::supportsService( const ::rtl::OUString& i_serviceName ) throw (RuntimeException) + { + Sequence< ::rtl::OUString > const aServiceNames( getSupportedServiceNames() ); + for ( sal_Int32 i=0; i SAL_CALL SortableGridDataModel::getSupportedServiceNames( ) throw (RuntimeException) + { + Sequence< ::rtl::OUString > aServiceNames(1); + aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_SortableGridDataModel ); + return aServiceNames; + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SortableGridDataModel::impl_translateRowIndex_throw( ::sal_Int32 const i_publicRowIndex ) const + { + if ( ( i_publicRowIndex < 0 ) || ( i_publicRowIndex >= m_delegator->getRowCount() ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), *const_cast< SortableGridDataModel* >( this ) ); + + if ( !impl_isSorted_nothrow() ) + // no need to translate anything + return i_publicRowIndex; + + ENSURE_OR_RETURN( size_t( i_publicRowIndex ) < m_rowIndexTranslation.size(), + "SortableGridDataModel::impl_translateRowIndex_throw: inconsistency!", i_publicRowIndex ); + // obviously the translation table contains too few elements - it should have exactly |getRowCount()| + // elements + + return m_rowIndexTranslation[ i_publicRowIndex ]; + } + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SortableGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) +{ + return *( new ::toolkit::SortableGridDataModel( i_factory ) ); +} diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.hxx b/toolkit/source/controls/grid/sortablegriddatamodel.hxx new file mode 100755 index 000000000000..64dad34af2bf --- /dev/null +++ b/toolkit/source/controls/grid/sortablegriddatamodel.hxx @@ -0,0 +1,138 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_SORTABLEGRIDDATAMODEL_HXX +#define TOOLKIT_SORTABLEGRIDDATAMODEL_HXX + +/** === begin UNO includes === **/ +#include +#include +#include +#include +/** === end UNO includes === **/ + +#include +#include +#include + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + //================================================================================================================== + //= SortableGridDataModel + //================================================================================================================== + typedef ::cppu::WeakComponentImplHelper3 < ::com::sun::star::awt::grid::XSortableMutableGridDataModel + , ::com::sun::star::lang::XServiceInfo + , ::com::sun::star::lang::XInitialization + > SortableGridDataModel_Base; + class SortableGridDataModel :public ::cppu::BaseMutex + ,public SortableGridDataModel_Base + { + public: + SortableGridDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory ); + SortableGridDataModel( SortableGridDataModel const & i_copySource ); + + public: + bool isInitialized() const { return m_isInitialized; } + + protected: + ~SortableGridDataModel(); + + public: + // XSortableGridData + virtual void SAL_CALL sortByColumn( ::sal_Int32 ColumnIndex, ::sal_Bool SortAscending ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::beans::Pair< ::sal_Int32, ::sal_Bool > SAL_CALL getCurrentSortOrder( ) throw (::com::sun::star::uno::RuntimeException); + + // XMutableGridDataModel + virtual void SAL_CALL addRow( const ::com::sun::star::uno::Any& Heading, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Data ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Headings, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeRow( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateRowData( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + + // XGridDataModel + virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getCellToolTip( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getRowHeading( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // OComponentHelper + virtual void SAL_CALL disposing(); + + // XCloneable + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); + + // XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + + private: + /** translates the given public index into one to be passed to our delegator + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the given index does not denote a valid row + */ + ::sal_Int32 impl_translateRowIndex_throw( ::sal_Int32 const i_publicRowIndex ) const; + + inline bool impl_isSorted_nothrow() const + { + return m_currentSortColumn >= 0; + } + + /** rebuilds the index translation structure. + + Neither m_currentSortColumn nor m_sortAscending are touched by this method. + Also, the given column index is not checked, this is the responsibility of the caller. + */ + void impl_reIndex_nothrow( ::sal_Int32 const i_columnIndex, sal_Bool const i_sortAscending ); + + private: + ::comphelper::ComponentContext m_context; + bool m_isInitialized; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XMutableGridDataModel > m_delegator; + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > m_collator; + ::sal_Int32 m_currentSortColumn; + ::sal_Bool m_sortAscending; + ::std::vector< ::sal_Int32 > m_rowIndexTranslation; + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // TOOLKIT_SORTABLEGRIDDATAMODEL_HXX diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index ef6dca4f4916..61e734d39208 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -207,6 +207,7 @@ extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); +extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SortableGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); extern void * SAL_CALL comp_AsyncCallback_component_getFactory( const char * implName, void * serviceManager, void * registryKey ); @@ -298,7 +299,7 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen GET_FACTORY( DefaultGridDataModel, szServiceName_DefaultGridDataModel, NULL ); GET_FACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL ); GET_FACTORY_WITH_IMPL_PREFIX( GridColumn, "org.openoffice.comp.toolkit", szServiceName_GridColumn, NULL ); - + GET_FACTORY_WITH_IMPL_PREFIX( SortableGridDataModel, "org.openoffice.comp.toolkit", szServiceName_SortableGridDataModel, NULL ); if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 ) return comp_AsyncCallback_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey ); diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx index f57f52f13e57..0a2131a92eb3 100644 --- a/toolkit/source/helper/servicenames.cxx +++ b/toolkit/source/helper/servicenames.cxx @@ -102,3 +102,5 @@ const sal_Char __FAR_DATA szServiceName_GridControlModel[] = "com.sun.star.awt.g const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[] = "com.sun.star.awt.grid.DefaultGridDataModel"; const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[] = "com.sun.star.awt.grid.DefaultGridColumnModel"; const sal_Char __FAR_DATA szServiceName_GridColumn[] = "com.sun.star.awt.grid.GridColumn"; +const sal_Char __FAR_DATA szServiceName_SortableGridDataModel[] = "com.sun.star.awt.grid.SortableGridDataModel"; + diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component index e919e8451dbb..ef6e8abfc268 100644 --- a/toolkit/util/tk.component +++ b/toolkit/util/tk.component @@ -44,6 +44,9 @@ + + + -- cgit From b3025e479194db9858c18d13c8d08c0e7964ab6e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 11:49:20 +0100 Subject: gridsort: #163172# added UNO API support for sorting grid data. Implementation still unfinished. Things missing in the SortableGridData implementation - add as listener to the delegator, so we're notified of changes - translate and multiplex those changes - do own notifications (XGridDataListener.dataChanged) when the sort order changed - (possibly) update the sort order when the data in the current sort-column changed --- .../com/sun/star/awt/grid/DefaultGridDataModel.idl | 5 +- .../sun/star/awt/grid/SortableGridDataModel.idl | 102 +++++++++++++++++++++ offapi/com/sun/star/awt/grid/XSortableGridData.idl | 73 +++++++++++++++ .../awt/grid/XSortableMutableGridDataModel.idl | 53 +++++++++++ offapi/com/sun/star/awt/grid/makefile.mk | 3 + 5 files changed, 232 insertions(+), 4 deletions(-) create mode 100755 offapi/com/sun/star/awt/grid/SortableGridDataModel.idl create mode 100755 offapi/com/sun/star/awt/grid/XSortableGridData.idl create mode 100755 offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl diff --git a/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl b/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl index 6f30d1dcefa1..8c2726f42851 100644 --- a/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl @@ -45,10 +45,7 @@ @since OOo 3.3.0 */ -service DefaultGridDataModel -{ - interface com::sun::star::awt::grid::XMutableGridDataModel; -}; +service DefaultGridDataModel : ::com::sun::star::awt::grid::XMutableGridDataModel; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl b/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl new file mode 100755 index 000000000000..2b7aca1ca9f9 --- /dev/null +++ b/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl @@ -0,0 +1,102 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_SortableGridDataModel_idl__ +#define __com_sun_star_awt_grid_SortableGridDataModel_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +interface XSortableMutableGridDataModel; +interface XMutableGridDataModel; + +//================================================================================================================== + +/** provides a default implementation of a XSortableGridData. + +

          This service must be created with a secondary grid data model, which all actual data requests are delegated to. + But before providing this data to the service's own clients, it is sorted, according to the sort order defined + via the XSortableGridData interface.

          + +

          The service implementation is able to compare the default scalar types, plus strings.

          + +

          For determining the data type of a column which the data should be sorted by, the first non- data encountered + in this column is taken into account. Further read requests to this column will assume that all non- data is of + the same type.

          + +

          Consequently, you cannot use this service with data sets containing heterogenous data in a given column.

          + +

          All requests made via the XMutableGridDataModel are delegated to the XMutableGridDataModel + instance passed in the service constructor.

          + +

          Note that changing the data might result in the sort order being destroyed. If you want to ensure + that the data represented by the model is still sorted after your modifications, you should call + XSortableGridData::sortByColumn, again.

          + */ +service SortableGridDataModel : XSortableMutableGridDataModel +{ + /** creates a new instance of the SortableGridDataModel + +

          For string comparison, a default Collator, based on the system's + locale, will be used.

          + + @param DelegatorModel + the data model to which read requests are delegated. + @throws ::com::sun::star::lang::IllegalArgumentException + if the given DelegatorModel is + */ + create( + [in] XMutableGridDataModel DelegatorModel + ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); + + /** creates a new instance of the ScortableDefaultGridDataModel, passing a collator to be used for string comparison. + + @param DelegatorModel + is the data model to which read requests are delegated + @param Collator + is the collator to be used for string comparison + @throws ::com::sun::star::lang::IllegalArgumentException + if the given DelegatorModel is + */ + createWithCollator( + [in] XMutableGridDataModel DelegatorModel, + [in] ::com::sun::star::i18n::XCollator Collator + ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/XSortableGridData.idl b/offapi/com/sun/star/awt/grid/XSortableGridData.idl new file mode 100755 index 000000000000..de969e133603 --- /dev/null +++ b/offapi/com/sun/star/awt/grid/XSortableGridData.idl @@ -0,0 +1,73 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_XSortableGridData_idl__ +#define __com_sun_star_awt_grid_XSortableGridData_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +//================================================================================================================== + +/** allows to sort the data represented by a XGridDataModel + */ +interface XSortableGridData +{ + /** sorts the rows represented by the model by a given column's data. + + @param ColumnIndex + the index of the column whose data should be used as sort key + @param SortAscending + is if the data should be sorted ascending, otherwise. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if ColumnIndex does not denote a valid column. + */ + void sortByColumn( [in] long ColumnIndex, [in] boolean SortAscending ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** returns the current sort order. + + @return + a structure describing the current sort order. Pair::First + denotes the column by which the data is sorted, or -1 if the data is currently unsorted. + Pair::Second is if the data is sorted ascending, + otherwise. + */ + ::com::sun::star::beans::Pair< long, boolean > + getCurrentSortOrder(); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl new file mode 100755 index 000000000000..efd106dcbf51 --- /dev/null +++ b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl @@ -0,0 +1,53 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_XSortableMutableGridDataModel_idl__ +#define __com_sun_star_awt_grid_XSortableMutableGridDataModel_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +//================================================================================================================== + +/** describes a grid control data model whose data can be modified and sorted. + */ +interface XSortableMutableGridDataModel +{ + interface XMutableGridDataModel; + interface XSortableGridData; +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index c511e1dbad07..8499dca27d82 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -56,6 +56,9 @@ IDLFILES=\ UnoControlGridModel.idl\ GridInvalidDataException.idl\ GridInvalidModelException.idl\ + XSortableGridData.idl\ + SortableGridDataModel.idl\ + XSortableMutableGridDataModel.idl\ # ------------------------------------------------------------------ -- cgit From de9dba9275aff2863978f7f665685d54ef82b0ad Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 17:30:17 +0100 Subject: gridsort: introduce XSortableGridDataModel::removeColumnSort --- svtools/source/uno/unocontroltablemodel.cxx | 10 +- .../source/controls/grid/sortablegriddatamodel.cxx | 440 +++++++++++++++++++-- .../source/controls/grid/sortablegriddatamodel.hxx | 68 +++- 3 files changed, 484 insertions(+), 34 deletions(-) diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 505cccf22702..ae4de7c36809 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include /** === end UNO includes === **/ #include @@ -74,7 +74,7 @@ namespace svt { namespace table using ::com::sun::star::style::VerticalAlignment; using ::com::sun::star::uno::WeakReference; using ::com::sun::star::awt::grid::GridDataEvent; - using ::com::sun::star::awt::grid::XSortableGridData; + using ::com::sun::star::awt::grid::XSortableGridDataModel; using ::com::sun::star::beans::Pair; /** === end UNO using === **/ @@ -743,7 +743,7 @@ namespace svt { namespace table { DBG_CHECK_ME(); - Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY ); + Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY ); if ( xSortAccess.is() ) return this; return NULL; @@ -756,7 +756,7 @@ namespace svt { namespace table try { - Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); + Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); xSortAccess->sortByColumn( i_column, i_sortDirection == ColumnSortAscending ); } catch( const Exception& ) @@ -773,7 +773,7 @@ namespace svt { namespace table ColumnSort currentSort; try { - Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); + Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); Pair< ::sal_Int32, ::sal_Bool > const aCurrentSortOrder( xSortAccess->getCurrentSortOrder() ); currentSort.nColumnPos = aCurrentSortOrder.First; currentSort.eSortDirection = aCurrentSortOrder.Second ? ColumnSortAscending : ColumnSortDescending; diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index 4b525dbc925a..d69f3d6187a5 100755 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -27,18 +27,22 @@ #include "precompiled_toolkit.hxx" #include "sortablegriddatamodel.hxx" -#include "initguard.hxx" #include "toolkit/helper/servicenames.hxx" /** === begin UNO includes === **/ #include #include +#include /** === end UNO includes === **/ #include +#include #include +#include #include +#include + //...................................................................................................................... namespace toolkit { @@ -66,38 +70,104 @@ namespace toolkit using ::com::sun::star::i18n::XCollator; using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::awt::grid::GridDataEvent; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::ucb::AlreadyInitializedException; /** === end UNO using === **/ - typedef InitGuard< SortableGridDataModel > MethodGuard; +#ifdef DBG_UTIL + const char* SortableGridDataModel_checkInvariants( const void* _pInstance ) + { + return static_cast< const SortableGridDataModel* >( _pInstance )->checkInvariants(); + } + + //------------------------------------------------------------------------------------------------------------------ + const char* SortableGridDataModel::checkInvariants() const + { + if ( m_publicToPrivateRowIndex.size() != m_privateToPublicRowIndex.size() ) + return "inconsistent index maps"; + + if ( m_delegator.is() ) + { + if ( m_publicToPrivateRowIndex.size() != size_t( m_delegator->getRowCount() ) ) + return "wrong cached row count"; + } + else + { + if ( !m_publicToPrivateRowIndex.empty() ) + return "disposed or not initialized, but having a non-empty map"; + } + + for ( size_t publicIndex=0; publicIndex= m_privateToPublicRowIndex.size() ) ) + return "invalid cached private index"; + + if ( m_privateToPublicRowIndex[ privateIndex ] != sal_Int32( publicIndex ) ) + return "index map traversal not commutavive"; + } + + if ( impl_isSorted_nothrow() && m_publicToPrivateRowIndex.empty() ) + return "sorted, but no row index translation tables"; + + if ( !impl_isSorted_nothrow() && !m_publicToPrivateRowIndex.empty() ) + return "unsorted, but have index translation tables"; + + return NULL; + } +#endif + +#define DBG_CHECK_ME() \ + DBG_CHKTHIS( SortableGridDataModel, SortableGridDataModel_checkInvariants ) + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + template< class STLCONTAINER > + static void lcl_clear( STLCONTAINER& i_container ) + { + STLCONTAINER empty; + empty.swap( i_container ); + } + } //================================================================================================================== //= SortableGridDataModel //================================================================================================================== + DBG_NAME( SortableGridDataModel ) //------------------------------------------------------------------------------------------------------------------ SortableGridDataModel::SortableGridDataModel( Reference< XMultiServiceFactory > const & i_factory ) :SortableGridDataModel_Base( m_aMutex ) + ,SortableGridDataModel_PrivateBase() ,m_context( i_factory ) ,m_isInitialized( false ) ,m_delegator() ,m_collator() ,m_currentSortColumn( -1 ) ,m_sortAscending( true ) - ,m_rowIndexTranslation() + ,m_publicToPrivateRowIndex() + ,m_privateToPublicRowIndex() { + DBG_CTOR( SortableGridDataModel, SortableGridDataModel_checkInvariants ); } //------------------------------------------------------------------------------------------------------------------ SortableGridDataModel::SortableGridDataModel( SortableGridDataModel const & i_copySource ) :cppu::BaseMutex() ,SortableGridDataModel_Base( m_aMutex ) + ,SortableGridDataModel_PrivateBase() ,m_context( i_copySource.m_context ) ,m_collator( i_copySource.m_collator ) ,m_isInitialized( true ) ,m_delegator() ,m_currentSortColumn( i_copySource.m_currentSortColumn ) ,m_sortAscending( i_copySource.m_sortAscending ) - ,m_rowIndexTranslation( i_copySource.m_rowIndexTranslation ) + ,m_publicToPrivateRowIndex( i_copySource.m_publicToPrivateRowIndex ) + ,m_privateToPublicRowIndex( i_copySource.m_privateToPublicRowIndex ) { + DBG_CTOR( SortableGridDataModel, SortableGridDataModel_checkInvariants ); + ENSURE_OR_THROW( i_copySource.m_delegator.is(), "not expected to be called for a disposed copy source!" ); m_delegator.set( i_copySource.m_delegator->createClone(), UNO_QUERY_THROW ); @@ -111,6 +181,43 @@ namespace toolkit acquire(); dispose(); } + + DBG_DTOR( SortableGridDataModel, SortableGridDataModel_checkInvariants ); + } + + //------------------------------------------------------------------------------------------------------------------ + Any SAL_CALL SortableGridDataModel::queryInterface( const Type& aType ) throw (RuntimeException) + { + Any aReturn( SortableGridDataModel_Base::queryInterface( aType ) ); + if ( !aReturn.hasValue() ) + aReturn = SortableGridDataModel_PrivateBase::queryInterface( aType ); + return aReturn; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::acquire( ) throw () + { + SortableGridDataModel_Base::acquire(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::release( ) throw () + { + SortableGridDataModel_Base::release(); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< Type > SAL_CALL SortableGridDataModel::getTypes( ) throw (RuntimeException) + { + return SortableGridDataModel_Base::getTypes(); + // don't expose the types got via SortableGridDataModel_PrivateBase - they're private, after all + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::sal_Int8 > SAL_CALL SortableGridDataModel::getImplementationId( ) throw (RuntimeException) + { + static ::cppu::OImplementationId aId; + return aId.getImplementationId(); } //------------------------------------------------------------------------------------------------------------------ @@ -128,6 +235,10 @@ namespace toolkit void SAL_CALL SortableGridDataModel::initialize( const Sequence< Any >& i_arguments ) throw (Exception, RuntimeException) { ::comphelper::ComponentGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + + if ( m_delegator.is() ) + throw AlreadyInitializedException( ::rtl::OUString(), *this ); Reference< XMutableGridDataModel > xDelegator; Reference< XCollator > xCollator; @@ -148,12 +259,210 @@ namespace toolkit if ( !xDelegator.is() ) throw IllegalArgumentException( ::rtl::OUString(), *this, 1 ); - // TODO: add as listener to the delegator model, so we're able to multiplex the events it will notify - m_delegator = xDelegator; + m_collator = xCollator; + + m_delegator->addGridDataListener( this ); + m_isInitialized = true; } + //------------------------------------------------------------------------------------------------------------------ + GridDataEvent SortableGridDataModel::impl_createPublicEvent( GridDataEvent const & i_originalEvent ) const + { + GridDataEvent aEvent( i_originalEvent ); + aEvent.Source = *const_cast< SortableGridDataModel* >( this ); + aEvent.FirstRow = impl_getPublicRowIndex_nothrow( aEvent.FirstRow ); + aEvent.LastRow = impl_getPublicRowIndex_nothrow( aEvent.LastRow ); + return aEvent; + } + + //------------------------------------------------------------------------------------------------------------------ + void SortableGridDataModel::impl_broadcast( void ( SAL_CALL XGridDataListener::*i_listenerMethod )( const GridDataEvent & ), + GridDataEvent const & i_publicEvent, MethodGuard& i_instanceLock ) + { + ::cppu::OInterfaceContainerHelper* pListeners = rBHelper.getContainer( XGridDataListener::static_type() ); + if ( pListeners == NULL ) + return; + + i_instanceLock.clear(); + pListeners->notifyEach( i_listenerMethod, i_publicEvent ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::rowsInserted( const GridDataEvent& i_event ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + + // if the data is not sorted, broadcast the event unchanged + if ( !impl_isSorted_nothrow() ) + { + GridDataEvent const aEvent( impl_createPublicEvent( i_event ) ); + impl_broadcast( &XGridDataListener::rowsInserted, aEvent, aGuard ); + return; + } + + bool needReIndex = false; + if ( i_event.FirstRow > i_event.LastRow ) + { + OSL_ENSURE( false, "SortableGridDataModel::rowsInserted: invalid event - invalid row indexes!" ); + needReIndex = true; + } + else if ( size_t( i_event.FirstRow ) > m_privateToPublicRowIndex.size() ) + { + OSL_ENSURE( false, "SortableGridDataModel::rowsInserted: invalid event - too large row index!" ); + needReIndex = true; + } + + if ( needReIndex ) + { + impl_rebuildIndexesAndNotify( aGuard ); + return; + } + + // we do not insert the new rows into the sort order - if somebody adds rows while we're sorted, s/he has + // to resort. Instead, we simply append the rows, no matter where they were inserted in the delegator data + // model. + sal_Int32 const nPublicFirstRow = sal_Int32( m_privateToPublicRowIndex.size() ); + sal_Int32 nPublicLastRow = nPublicFirstRow; + for ( sal_Int32 newRow = i_event.FirstRow; newRow <= i_event.LastRow; ++newRow, ++nPublicLastRow ) + { + m_privateToPublicRowIndex.push_back( nPublicLastRow ); + m_publicToPrivateRowIndex.push_back( nPublicLastRow ); + } + + // broadcast the event + GridDataEvent const aEvent( *this, -1, -1, nPublicFirstRow, nPublicLastRow ); + impl_broadcast( &XGridDataListener::rowsInserted, aEvent, aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + void lcl_decrementValuesGreaterThan( ::std::vector< ::sal_Int32 > & io_indexMap, sal_Int32 const i_threshold ) + { + for ( ::std::vector< ::sal_Int32 >::iterator loop = io_indexMap.begin(); + loop != io_indexMap.end(); + ++loop + ) + { + if ( *loop >= i_threshold ) + --*loop; + } + } + } + + //------------------------------------------------------------------------------------------------------------------ + void SortableGridDataModel::impl_rebuildIndexesAndNotify( MethodGuard& i_instanceLock ) + { + OSL_PRECOND( impl_isSorted_nothrow(), "SortableGridDataModel::impl_rebuildIndexesAndNotify: illegal call!" ); + + // clear the indexes + lcl_clear( m_publicToPrivateRowIndex ); + lcl_clear( m_privateToPublicRowIndex ); + + // broadcast an artificial event, saying that all rows have been removed + GridDataEvent const aRemovalEvent( *this, -1, -1, -1, -1 ); + impl_broadcast( &XGridDataListener::rowsRemoved, aRemovalEvent, i_instanceLock ); + i_instanceLock.reset(); + + // rebuild the index + impl_reIndex_nothrow( m_currentSortColumn, m_sortAscending ); + + // broadcast an artificial event, saying that n rows have been added + GridDataEvent const aAdditionEvent( *this, -1, -1, 0, m_delegator->getRowCount() - 1 ); + impl_broadcast( &XGridDataListener::rowsInserted, aAdditionEvent, i_instanceLock ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + + // if the data is not sorted, broadcast the event unchanged + if ( !impl_isSorted_nothrow() ) + { + GridDataEvent const aEvent( impl_createPublicEvent( i_event ) ); + impl_broadcast( &XGridDataListener::rowsRemoved, aEvent, aGuard ); + return; + } + + // if all rows have been removed, also simply multiplex to own listeners + if ( i_event.FirstRow < 0 ) + { + lcl_clear( m_publicToPrivateRowIndex ); + lcl_clear( m_privateToPublicRowIndex ); + GridDataEvent aEvent( i_event ); + aEvent.Source = *this; + impl_broadcast( &XGridDataListener::rowsRemoved, aEvent, aGuard ); + return; + } + + bool needReIndex = false; + if ( i_event.FirstRow != i_event.LastRow ) + { + OSL_ENSURE( false, "SortableGridDataModel::rowsRemoved: missing implementation - removal of multiple rows!" ); + needReIndex = true; + } + else if ( size_t( i_event.FirstRow ) >= m_privateToPublicRowIndex.size() ) + { + OSL_ENSURE( false, "SortableGridDataModel::rowsRemoved: inconsistent/wrong data!" ); + needReIndex = true; + } + + if ( needReIndex ) + { + impl_rebuildIndexesAndNotify( aGuard ); + return; + } + + // build public event version + GridDataEvent const aEvent( impl_createPublicEvent( i_event ) ); + + // remove the entries from the index maps + sal_Int32 const privateIndex = i_event.FirstRow; + sal_Int32 const publicIndex = aEvent.FirstRow; + + m_publicToPrivateRowIndex.erase( m_publicToPrivateRowIndex.begin() + publicIndex ); + m_privateToPublicRowIndex.erase( m_privateToPublicRowIndex.begin() + privateIndex ); + + // adjust remaining entries in the index maps + lcl_decrementValuesGreaterThan( m_publicToPrivateRowIndex, privateIndex ); + lcl_decrementValuesGreaterThan( m_privateToPublicRowIndex, publicIndex ); + + // broadcast the event + impl_broadcast( &XGridDataListener::rowsRemoved, aEvent, aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::dataChanged( const GridDataEvent& i_event ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + + GridDataEvent const aEvent( impl_createPublicEvent( i_event ) ); + impl_broadcast( &XGridDataListener::dataChanged, aEvent, aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::rowHeadingChanged( const GridDataEvent& i_event ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + + GridDataEvent const aEvent( impl_createPublicEvent( i_event ) ); + impl_broadcast( &XGridDataListener::rowHeadingChanged, aEvent, aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::disposing( const EventObject& i_event ) throw (RuntimeException) + { + // not interested in + OSL_UNUSED( i_event ); + } + //------------------------------------------------------------------------------------------------------------------ namespace { @@ -199,7 +508,7 @@ namespace toolkit void SortableGridDataModel::impl_reIndex_nothrow( ::sal_Int32 const i_columnIndex, sal_Bool const i_sortAscending ) { ::sal_Int32 const rowCount( getRowCount() ); - ::std::vector< ::sal_Int32 > aIndexTranslation( rowCount ); + ::std::vector< ::sal_Int32 > aPublicToPrivate( rowCount ); try { @@ -209,7 +518,7 @@ namespace toolkit for ( ::sal_Int32 rowIndex = 0; rowIndex < rowCount; ++rowIndex ) { aColumnData[ rowIndex ] = m_delegator->getCellData( i_columnIndex, rowIndex ); - aIndexTranslation[ rowIndex ] = rowIndex; + aPublicToPrivate[ rowIndex ] = rowIndex; // determine the data types we assume for the complete column if ( ( dataType.getTypeClass() == TypeClass_VOID ) && aColumnData[ rowIndex ].hasValue() ) @@ -222,7 +531,7 @@ namespace toolkit // then sort CellDataLessComparison const aComparator( aColumnData, *pPredicate, i_sortAscending ); - ::std::sort( aIndexTranslation.begin(), aIndexTranslation.end(), aComparator ); + ::std::sort( aPublicToPrivate.begin(), aPublicToPrivate.end(), aComparator ); } catch( const Exception& ) { @@ -230,13 +539,20 @@ namespace toolkit return; } - m_rowIndexTranslation.swap( aIndexTranslation ); + // also build the "private to public" mapping + ::std::vector< sal_Int32 > aPrivateToPublic( aPublicToPrivate.size() ); + for ( size_t i=0; i= getColumnCount() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); @@ -245,12 +561,39 @@ namespace toolkit m_currentSortColumn = i_columnIndex; m_sortAscending = i_sortAscending; + + impl_broadcast( + &XGridDataListener::dataChanged, + GridDataEvent( *this, -1, -1, -1, -1 ), + aGuard + ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SortableGridDataModel::removeColumnSort( ) throw (RuntimeException) + { + MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + + lcl_clear( m_publicToPrivateRowIndex ); + lcl_clear( m_privateToPublicRowIndex ); + + m_currentSortColumn = -1; + m_sortAscending = sal_True; + + impl_broadcast( + &XGridDataListener::dataChanged, + GridDataEvent( *this, -1, -1, -1, -1 ), + aGuard + ); } //------------------------------------------------------------------------------------------------------------------ Pair< ::sal_Int32, ::sal_Bool > SAL_CALL SortableGridDataModel::getCurrentSortOrder( ) throw (RuntimeException) { MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + return Pair< ::sal_Int32, ::sal_Bool >( m_currentSortColumn, m_sortAscending ); } @@ -258,6 +601,8 @@ namespace toolkit void SAL_CALL SortableGridDataModel::addRow( const Any& i_heading, const Sequence< Any >& i_data ) throw (RuntimeException) { MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + m_delegator->addRow( i_heading, i_data ); } @@ -265,6 +610,8 @@ namespace toolkit void SAL_CALL SortableGridDataModel::addRows( const Sequence< Any >& i_headings, const Sequence< Sequence< Any > >& i_data ) throw (IllegalArgumentException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + m_delegator->addRows( i_headings, i_data ); } @@ -272,7 +619,9 @@ namespace toolkit void SAL_CALL SortableGridDataModel::removeRow( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); m_delegator->removeRow( rowIndex ); } @@ -280,6 +629,8 @@ namespace toolkit void SAL_CALL SortableGridDataModel::removeAllRows( ) throw (RuntimeException) { MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + m_delegator->removeAllRows(); } @@ -287,7 +638,9 @@ namespace toolkit void SAL_CALL SortableGridDataModel::updateCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); m_delegator->updateCellData( i_columnIndex, rowIndex, i_value ); } @@ -295,7 +648,9 @@ namespace toolkit void SAL_CALL SortableGridDataModel::updateRowData( const Sequence< ::sal_Int32 >& i_columnIndexes, ::sal_Int32 i_rowIndex, const Sequence< Any >& i_values ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); m_delegator->updateRowData( i_columnIndexes, rowIndex, i_values ); } @@ -303,7 +658,9 @@ namespace toolkit void SAL_CALL SortableGridDataModel::setRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); m_delegator->setRowHeading( rowIndex, i_heading ); } @@ -311,7 +668,9 @@ namespace toolkit void SAL_CALL SortableGridDataModel::updateCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); m_delegator->updateCellToolTip( i_columnIndex, rowIndex, i_value ); } @@ -319,7 +678,9 @@ namespace toolkit void SAL_CALL SortableGridDataModel::updateRowToolTip( ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); m_delegator->updateRowToolTip( rowIndex, i_value ); } @@ -339,6 +700,8 @@ namespace toolkit ::sal_Int32 SAL_CALL SortableGridDataModel::getRowCount() throw (RuntimeException) { MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + return m_delegator->getRowCount(); } @@ -346,6 +709,8 @@ namespace toolkit ::sal_Int32 SAL_CALL SortableGridDataModel::getColumnCount() throw (RuntimeException) { MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + return m_delegator->getColumnCount(); } @@ -353,7 +718,9 @@ namespace toolkit Any SAL_CALL SortableGridDataModel::getCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); return m_delegator->getCellData( i_columnIndex, rowIndex ); } @@ -361,7 +728,9 @@ namespace toolkit Any SAL_CALL SortableGridDataModel::getCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); return m_delegator->getCellToolTip( i_columnIndex, rowIndex ); } @@ -369,7 +738,9 @@ namespace toolkit Any SAL_CALL SortableGridDataModel::getRowHeading( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); - ::sal_Int32 const rowIndex = impl_translateRowIndex_throw( i_rowIndex ); + DBG_CHECK_ME(); + + ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); return m_delegator->getRowHeading( rowIndex ); } @@ -379,6 +750,7 @@ namespace toolkit m_currentSortColumn = -1; Reference< XComponent > const delegatorComponent( m_delegator.get() ); + m_delegator->removeGridDataListener( this ); m_delegator.clear(); delegatorComponent->dispose(); @@ -387,14 +759,16 @@ namespace toolkit if ( collatorComponent.is() ) collatorComponent->dispose(); - ::std::vector< ::sal_Int32 > aEmpty; - m_rowIndexTranslation.swap( aEmpty ); + lcl_clear( m_publicToPrivateRowIndex ); + lcl_clear( m_privateToPublicRowIndex ); } //------------------------------------------------------------------------------------------------------------------ Reference< XCloneable > SAL_CALL SortableGridDataModel::createClone( ) throw (RuntimeException) { MethodGuard aGuard( *this, rBHelper ); + DBG_CHECK_ME(); + return new SortableGridDataModel( *this ); } @@ -423,7 +797,7 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - ::sal_Int32 SortableGridDataModel::impl_translateRowIndex_throw( ::sal_Int32 const i_publicRowIndex ) const + ::sal_Int32 SortableGridDataModel::impl_getPrivateRowIndex_throw( ::sal_Int32 const i_publicRowIndex ) const { if ( ( i_publicRowIndex < 0 ) || ( i_publicRowIndex >= m_delegator->getRowCount() ) ) throw IndexOutOfBoundsException( ::rtl::OUString(), *const_cast< SortableGridDataModel* >( this ) ); @@ -432,12 +806,28 @@ namespace toolkit // no need to translate anything return i_publicRowIndex; - ENSURE_OR_RETURN( size_t( i_publicRowIndex ) < m_rowIndexTranslation.size(), - "SortableGridDataModel::impl_translateRowIndex_throw: inconsistency!", i_publicRowIndex ); + ENSURE_OR_RETURN( size_t( i_publicRowIndex ) < m_publicToPrivateRowIndex.size(), + "SortableGridDataModel::impl_getPrivateRowIndex_throw: inconsistency!", i_publicRowIndex ); // obviously the translation table contains too few elements - it should have exactly |getRowCount()| // elements - return m_rowIndexTranslation[ i_publicRowIndex ]; + return m_publicToPrivateRowIndex[ i_publicRowIndex ]; + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SortableGridDataModel::impl_getPublicRowIndex_nothrow( ::sal_Int32 const i_privateRowIndex ) const + { + if ( !impl_isSorted_nothrow() ) + // no need to translate anything + return i_privateRowIndex; + + if ( i_privateRowIndex < 0 ) + return i_privateRowIndex; + + ENSURE_OR_RETURN( size_t( i_privateRowIndex ) < m_privateToPublicRowIndex.size(), + "SortableGridDataModel::impl_getPublicRowIndex_nothrow: invalid index!", i_privateRowIndex ); + + return m_privateToPublicRowIndex[ i_privateRowIndex ]; } //...................................................................................................................... diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.hxx b/toolkit/source/controls/grid/sortablegriddatamodel.hxx index 64dad34af2bf..26f0e63f9762 100755 --- a/toolkit/source/controls/grid/sortablegriddatamodel.hxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.hxx @@ -27,22 +27,29 @@ #ifndef TOOLKIT_SORTABLEGRIDDATAMODEL_HXX #define TOOLKIT_SORTABLEGRIDDATAMODEL_HXX +#include "initguard.hxx" + /** === begin UNO includes === **/ #include #include #include #include +#include /** === end UNO includes === **/ #include #include #include +#include //...................................................................................................................... namespace toolkit { //...................................................................................................................... + class SortableGridDataModel; + typedef InitGuard< SortableGridDataModel > MethodGuard; + //================================================================================================================== //= SortableGridDataModel //================================================================================================================== @@ -50,22 +57,29 @@ namespace toolkit , ::com::sun::star::lang::XServiceInfo , ::com::sun::star::lang::XInitialization > SortableGridDataModel_Base; + typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::grid::XGridDataListener + > SortableGridDataModel_PrivateBase; class SortableGridDataModel :public ::cppu::BaseMutex ,public SortableGridDataModel_Base + ,public SortableGridDataModel_PrivateBase { public: SortableGridDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory ); SortableGridDataModel( SortableGridDataModel const & i_copySource ); - public: bool isInitialized() const { return m_isInitialized; } +#ifdef DBG_UTIL + const char* checkInvariants() const; +#endif + protected: ~SortableGridDataModel(); public: - // XSortableGridData + // XSortableGridDataModel virtual void SAL_CALL sortByColumn( ::sal_Int32 ColumnIndex, ::sal_Bool SortAscending ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeColumnSort( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::beans::Pair< ::sal_Int32, ::sal_Bool > SAL_CALL getCurrentSortOrder( ) throw (::com::sun::star::uno::RuntimeException); // XMutableGridDataModel @@ -102,12 +116,34 @@ namespace toolkit // XInitialization virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + // XGridDataListener + virtual void SAL_CALL rowsInserted( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowHeadingChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw (); + virtual void SAL_CALL release( ) throw (); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException); + private: /** translates the given public index into one to be passed to our delegator @throws ::com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row */ - ::sal_Int32 impl_translateRowIndex_throw( ::sal_Int32 const i_publicRowIndex ) const; + ::sal_Int32 impl_getPrivateRowIndex_throw( ::sal_Int32 const i_publicRowIndex ) const; + + /** translates the given private row index to a public one + */ + ::sal_Int32 impl_getPublicRowIndex_nothrow( ::sal_Int32 const i_privateRowIndex ) const; inline bool impl_isSorted_nothrow() const { @@ -121,6 +157,29 @@ namespace toolkit */ void impl_reIndex_nothrow( ::sal_Int32 const i_columnIndex, sal_Bool const i_sortAscending ); + /** translates the given event, obtained from our delegator, to a version which can be broadcasted to our own + clients. + */ + ::com::sun::star::awt::grid::GridDataEvent + impl_createPublicEvent( ::com::sun::star::awt::grid::GridDataEvent const & i_originalEvent ) const; + + /** broadcasts the given event to our registered XGridDataListeners + */ + void impl_broadcast( + void ( SAL_CALL ::com::sun::star::awt::grid::XGridDataListener::*i_listenerMethod )( const ::com::sun::star::awt::grid::GridDataEvent & ), + ::com::sun::star::awt::grid::GridDataEvent const & i_publicEvent, + MethodGuard& i_instanceLock + ); + + /** rebuilds our indexes, notifying row removal and row addition events + + First, a rowsRemoved event is notified to our registered listeners. Then, the index translation tables are + rebuilt, and a rowsInserted event is notified. + + Only to be called when we're sorted. + */ + void impl_rebuildIndexesAndNotify( MethodGuard& i_instanceLock ); + private: ::comphelper::ComponentContext m_context; bool m_isInitialized; @@ -128,7 +187,8 @@ namespace toolkit ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > m_collator; ::sal_Int32 m_currentSortColumn; ::sal_Bool m_sortAscending; - ::std::vector< ::sal_Int32 > m_rowIndexTranslation; + ::std::vector< ::sal_Int32 > m_publicToPrivateRowIndex; + ::std::vector< ::sal_Int32 > m_privateToPublicRowIndex; }; //...................................................................................................................... -- cgit From 0194bd2f4e55e3586d97cdd04efa87afb16dbe63 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 17:30:17 +0100 Subject: gridsort: introduce XSortableGridDataModel::removeColumnSort --- .../sun/star/awt/grid/SortableGridDataModel.idl | 6 +- offapi/com/sun/star/awt/grid/XSortableGridData.idl | 73 -------------------- .../sun/star/awt/grid/XSortableGridDataModel.idl | 77 ++++++++++++++++++++++ .../awt/grid/XSortableMutableGridDataModel.idl | 4 +- offapi/com/sun/star/awt/grid/makefile.mk | 2 +- 5 files changed, 83 insertions(+), 79 deletions(-) delete mode 100755 offapi/com/sun/star/awt/grid/XSortableGridData.idl create mode 100755 offapi/com/sun/star/awt/grid/XSortableGridDataModel.idl diff --git a/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl b/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl index 2b7aca1ca9f9..b76913bf0707 100755 --- a/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl @@ -39,11 +39,11 @@ interface XMutableGridDataModel; //================================================================================================================== -/** provides a default implementation of a XSortableGridData. +/** provides a default implementation of a XSortableGridDataModel.

          This service must be created with a secondary grid data model, which all actual data requests are delegated to. But before providing this data to the service's own clients, it is sorted, according to the sort order defined - via the XSortableGridData interface.

          + via the XSortableGridDataModel interface.

          The service implementation is able to compare the default scalar types, plus strings.

          @@ -58,7 +58,7 @@ interface XMutableGridDataModel;

          Note that changing the data might result in the sort order being destroyed. If you want to ensure that the data represented by the model is still sorted after your modifications, you should call - XSortableGridData::sortByColumn, again.

          + XSortableGridDataModel::sortByColumn, again.

          */ service SortableGridDataModel : XSortableMutableGridDataModel { diff --git a/offapi/com/sun/star/awt/grid/XSortableGridData.idl b/offapi/com/sun/star/awt/grid/XSortableGridData.idl deleted file mode 100755 index de969e133603..000000000000 --- a/offapi/com/sun/star/awt/grid/XSortableGridData.idl +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************************* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __com_sun_star_awt_grid_XSortableGridData_idl__ -#define __com_sun_star_awt_grid_XSortableGridData_idl__ - -#include -#include - -//================================================================================================================== - -module com { module sun { module star { module awt { module grid { - -//================================================================================================================== - -/** allows to sort the data represented by a XGridDataModel - */ -interface XSortableGridData -{ - /** sorts the rows represented by the model by a given column's data. - - @param ColumnIndex - the index of the column whose data should be used as sort key - @param SortAscending - is if the data should be sorted ascending, otherwise. - @throws ::com::sun::star::lang::IndexOutOfBoundsException - if ColumnIndex does not denote a valid column. - */ - void sortByColumn( [in] long ColumnIndex, [in] boolean SortAscending ) - raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); - - /** returns the current sort order. - - @return - a structure describing the current sort order. Pair::First - denotes the column by which the data is sorted, or -1 if the data is currently unsorted. - Pair::Second is if the data is sorted ascending, - otherwise. - */ - ::com::sun::star::beans::Pair< long, boolean > - getCurrentSortOrder(); -}; - -//================================================================================================================== - -}; }; }; }; }; - -//================================================================================================================== - -#endif diff --git a/offapi/com/sun/star/awt/grid/XSortableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XSortableGridDataModel.idl new file mode 100755 index 000000000000..dc0b72a69e08 --- /dev/null +++ b/offapi/com/sun/star/awt/grid/XSortableGridDataModel.idl @@ -0,0 +1,77 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_XSortableGridData_idl__ +#define __com_sun_star_awt_grid_XSortableGridData_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +//================================================================================================================== + +/** allows to sort the data represented by a XGridDataModel + */ +interface XSortableGridDataModel +{ + /** sorts the rows represented by the model by a given column's data. + + @param ColumnIndex + the index of the column whose data should be used as sort key + @param SortAscending + is if the data should be sorted ascending, otherwise. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if ColumnIndex does not denote a valid column. + */ + void sortByColumn( [in] long ColumnIndex, [in] boolean SortAscending ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** removes any possibly present sorting of the grid data + */ + void removeColumnSort(); + + /** returns the current sort order. + + @return + a structure describing the current sort order. Pair::First + denotes the column by which the data is sorted, or -1 if the data is currently unsorted. + Pair::Second is if the data is sorted ascending, + otherwise. + */ + ::com::sun::star::beans::Pair< long, boolean > + getCurrentSortOrder(); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl index efd106dcbf51..3ed7c34e3254 100755 --- a/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl @@ -28,7 +28,7 @@ #define __com_sun_star_awt_grid_XSortableMutableGridDataModel_idl__ #include -#include +#include //================================================================================================================== @@ -41,7 +41,7 @@ module com { module sun { module star { module awt { module grid { interface XSortableMutableGridDataModel { interface XMutableGridDataModel; - interface XSortableGridData; + interface XSortableGridDataModel; }; //================================================================================================================== diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index 8499dca27d82..27daa0c1a51d 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -56,7 +56,7 @@ IDLFILES=\ UnoControlGridModel.idl\ GridInvalidDataException.idl\ GridInvalidModelException.idl\ - XSortableGridData.idl\ + XSortableGridDataModel.idl\ SortableGridDataModel.idl\ XSortableMutableGridDataModel.idl\ -- cgit From 9381025d4abb0a10fb458117542c2a063c7b1cfd Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 18 Jan 2011 18:44:14 +0100 Subject: vcl118: #i116501# migrated padmin module to gbuild system --- padmin/AllLangResTarget_spa.mk | 48 +++++++++++++++++++++++++ padmin/Executable_spadmin.bin.mk | 70 ++++++++++++++++++++++++++++++++++++ padmin/Library_spa.mk | 76 ++++++++++++++++++++++++++++++++++++++++ padmin/Makefile | 38 ++++++++++++++++++++ padmin/Module_padmin.mk | 41 ++++++++++++++++++++++ padmin/Package_inc.mk | 30 ++++++++++++++++ padmin/prj/build.lst | 2 +- padmin/prj/d.lst | 7 ---- padmin/prj/makefile.mk | 40 +++++++++++++++++++++ padmin/source/helper.hxx | 7 ++++ padmin/source/padialog.hxx | 2 +- padmin/source/prtsetup.cxx | 6 ++-- vcl/prj/d.lst | 2 ++ vcl/source/salmain/makefile.mk | 6 +++- 14 files changed, 362 insertions(+), 13 deletions(-) create mode 100644 padmin/AllLangResTarget_spa.mk create mode 100644 padmin/Executable_spadmin.bin.mk create mode 100644 padmin/Library_spa.mk create mode 100644 padmin/Makefile create mode 100644 padmin/Module_padmin.mk create mode 100644 padmin/Package_inc.mk create mode 100644 padmin/prj/makefile.mk diff --git a/padmin/AllLangResTarget_spa.mk b/padmin/AllLangResTarget_spa.mk new file mode 100644 index 000000000000..b3acb92f81d5 --- /dev/null +++ b/padmin/AllLangResTarget_spa.mk @@ -0,0 +1,48 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,spa)) + +$(eval $(call gb_AllLangResTarget_set_reslocation,spa,padmin/source)) + +$(eval $(call gb_AllLangResTarget_add_srs,spa,\ + padmin/source \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,padmin/source)) + +$(eval $(call gb_SrsTarget_set_include,padmin/source,\ + $$(INCLUDE) \ +)) + +$(eval $(call gb_SrsTarget_add_files,padmin/source,\ + padmin/source/padialog.src \ + padmin/source/rtsetup.src \ +)) + + +# vim: set noet sw=4 ts=4: diff --git a/padmin/Executable_spadmin.bin.mk b/padmin/Executable_spadmin.bin.mk new file mode 100644 index 000000000000..ae677c1c86b4 --- /dev/null +++ b/padmin/Executable_spadmin.bin.mk @@ -0,0 +1,70 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,spadmin.bin)) + +$(eval $(call gb_Executable_set_include,spadmin.bin,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Executable_set_cxxflags,spadmin.bin,\ + $$(CXXFLAGS) \ +)) + +$(eval $(call gb_Executable_add_linked_static_libs,spadmin.bin,\ + vclmain \ +)) + +$(eval $(call gb_Executable_add_linked_libs,spadmin.bin,\ + spa \ + svt \ + vcl \ + utl \ + ucbhelper \ + comphelper \ + tl \ + cppuhelper \ + cppu \ + sal \ + stl \ +)) + +$(eval $(call gb_Executable_add_exception_objects,spadmin.bin,\ + padmin/source/desktopcontext \ + padmin/source/pamain \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,spadmin.bin,\ + dl \ + pthread \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/padmin/Library_spa.mk b/padmin/Library_spa.mk new file mode 100644 index 000000000000..47618720d283 --- /dev/null +++ b/padmin/Library_spa.mk @@ -0,0 +1,76 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,spa)) + +$(eval $(call gb_Library_set_include,spa,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ +)) + +$(eval $(call gb_Library_set_defs,spa,\ + $$(DEFS) \ + -DSPA_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,spa,\ + svt \ + vcl \ + utl \ + tl \ + basegfx \ + comphelper \ + i18nisolang1 \ + stl \ + cppu \ + sal \ + vos3 \ +)) + + +$(eval $(call gb_Library_add_exception_objects,spa,\ + padmin/source/adddlg \ + padmin/source/cmddlg \ + padmin/source/fontentry \ + padmin/source/helper \ + padmin/source/newppdlg \ + padmin/source/padialog \ + padmin/source/progress \ + padmin/source/prtsetup \ + padmin/source/titlectrl \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,spa,\ + dl \ + m \ + pthread \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/padmin/Makefile b/padmin/Makefile new file mode 100644 index 000000000000..a79aff831024 --- /dev/null +++ b/padmin/Makefile @@ -0,0 +1,38 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/padmin/Module_padmin.mk b/padmin/Module_padmin.mk new file mode 100644 index 000000000000..01fd4c99af19 --- /dev/null +++ b/padmin/Module_padmin.mk @@ -0,0 +1,41 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + + +$(eval $(call gb_Module_Module,padmin)) + +ifeq ($(GUIBASE),unx) + +$(eval $(call gb_Module_add_targets,padmin,\ + Executable_spadmin.bin \ + Library_spa \ + AllLangResTarget_spa \ + Package_inc \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/padmin/Package_inc.mk b/padmin/Package_inc.mk new file mode 100644 index 000000000000..3a2a3a3177e1 --- /dev/null +++ b/padmin/Package_inc.mk @@ -0,0 +1,30 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,padmin_src,$(SRCDIR)/padmin/source)) +$(eval $(call gb_Package_add_file,padmin_src,bin/spadmin,spadmin.sh)) + diff --git a/padmin/prj/build.lst b/padmin/prj/build.lst index 9aaab83cf7de..0e505f92f2a2 100644 --- a/padmin/prj/build.lst +++ b/padmin/prj/build.lst @@ -1,3 +1,3 @@ pd padmin : vcl svtools NULL pd padmin usr1 - all pd_mkout NULL -pd padmin\source nmake - all pd_source NULL +pd padmin\prj nmake - all pd_prj NULL diff --git a/padmin/prj/d.lst b/padmin/prj/d.lst index 3b86822c24e8..8b137891791f 100644 --- a/padmin/prj/d.lst +++ b/padmin/prj/d.lst @@ -1,8 +1 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res -..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so -..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT%\lib*.dylib -..\%__SRC%\misc\spadmin.sh %_DEST%\bin%_EXT%\spadmin diff --git a/padmin/prj/makefile.mk b/padmin/prj/makefile.mk new file mode 100644 index 000000000000..c73a3d944bbf --- /dev/null +++ b/padmin/prj/makefile.mk @@ -0,0 +1,40 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=.. +TARGET=prj + +.INCLUDE : settings.mk + +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF + +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/padmin/source/helper.hxx b/padmin/source/helper.hxx index 636241b826a6..4a9468c50725 100644 --- a/padmin/source/helper.hxx +++ b/padmin/source/helper.hxx @@ -46,6 +46,13 @@ #endif #include +#if defined SPA_DLLIMPLEMENTATION +#define SPA_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define SPA_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif + + class Config; #define PSPRINT_PPDDIR "driver" diff --git a/padmin/source/padialog.hxx b/padmin/source/padialog.hxx index 2a8285f8af88..053d9501ee7e 100644 --- a/padmin/source/padialog.hxx +++ b/padmin/source/padialog.hxx @@ -50,7 +50,7 @@ class Printer; namespace padmin { - class PADialog : public ModalDialog + class SPA_DLLPUBLIC PADialog : public ModalDialog { private: DelListBox m_aDevicesLB; diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx index 8165b8015403..1d105618b648 100644 --- a/padmin/source/prtsetup.cxx +++ b/padmin/source/prtsetup.cxx @@ -802,7 +802,7 @@ OString RTSPWDialog::getPassword() const extern "C" { - int Sal_SetupPrinterDriver( ::psp::PrinterInfo& rJobData ) + int SPA_DLLPUBLIC Sal_SetupPrinterDriver( ::psp::PrinterInfo& rJobData ) { int nRet = 0; RTSDialog aDialog( rJobData, rJobData.m_aPrinterName, false ); @@ -816,14 +816,14 @@ extern "C" { return nRet; } - int Sal_queryFaxNumber( String& rNumber ) + int SPA_DLLPUBLIC Sal_queryFaxNumber( String& rNumber ) { String aTmpString( PaResId( RID_TXT_QUERYFAXNUMBER ) ); QueryString aQuery( NULL, aTmpString, rNumber ); return aQuery.Execute(); } - bool Sal_authenticateQuery( const OString& rServer, OString& rUserName, OString& rPassword ) + bool SPA_DLLPUBLIC Sal_authenticateQuery( const OString& rServer, OString& rUserName, OString& rPassword ) { bool bRet = false; diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst index 307064f7555d..d99694fdd458 100644 --- a/vcl/prj/d.lst +++ b/vcl/prj/d.lst @@ -12,6 +12,8 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\%__SRC%\misc\vcl?????.map %_DEST%\bin%_EXT%\vcl?????.map ..\%__SRC%\obj\salmain.obj %_DEST%\lib%_EXT%\salmain.obj ..\%__SRC%\obj\salmain.o %_DEST%\lib%_EXT%\salmain.o +..\%__SRC%\lib\libvclmain.a %_DEST%\lib%_EXT%\libvclmain.a +..\%__SRC%\lib\vclmain.lib %_DEST%\lib%_EXT%\vclmain.lib ..\inc\vcl\accel.hxx %_DEST%\inc%_EXT%\vcl\accel.hxx ..\inc\vcl\alpha.hxx %_DEST%\inc%_EXT%\vcl\alpha.hxx diff --git a/vcl/source/salmain/makefile.mk b/vcl/source/salmain/makefile.mk index de085b482c4d..8b62991f65a6 100644 --- a/vcl/source/salmain/makefile.mk +++ b/vcl/source/salmain/makefile.mk @@ -28,11 +28,15 @@ PRJ = ..$/.. PRJNAME = vcl TARGET = salmain -LIBTARGET = NO ENABLE_EXCEPTIONS = TRUE .INCLUDE: settings.mk OBJFILES = $(OBJ)$/salmain.obj +LIB1TARGET=$(LB)$/vclmain.lib +LIB1ARCHIV=$(LB)$/libvclmain.a +LIB1FILES=$(LB)$/salmain.lib + + .INCLUDE: target.mk -- cgit From a1d300f593abbfb1e6f2dc7fe4f86a358a5ba8ee Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 18 Jan 2011 18:44:14 +0100 Subject: vcl118: #i116501# migrated padmin module to gbuild system --- Module_ooo.mk | 1 + Repository.mk | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Module_ooo.mk b/Module_ooo.mk index bc8d42079993..c7c09ab8494c 100644 --- a/Module_ooo.mk +++ b/Module_ooo.mk @@ -29,6 +29,7 @@ $(eval $(call gb_Module_Module,ooo)) $(eval $(call gb_Module_add_moduledirs,ooo,\ framework \ + padmin \ sfx2 \ svl \ svtools \ diff --git a/Repository.mk b/Repository.mk index be80170315d2..bc5ef65f88c4 100644 --- a/Repository.mk +++ b/Repository.mk @@ -58,6 +58,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ sb \ sfx \ sot \ + spa \ svl \ svt \ svx \ @@ -121,6 +122,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ jpeglib \ ooopathutils \ salcpprt \ + vclmain \ zlib \ )) -- cgit From f25576b919fff510e057608a25b7194509480dd9 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 18 Jan 2011 18:48:23 +0100 Subject: vcl118: #i116501# migrated padmin module to gbuild system --- padmin/source/makefile.mk | 115 ---------------------------------------------- 1 file changed, 115 deletions(-) delete mode 100644 padmin/source/makefile.mk diff --git a/padmin/source/makefile.mk b/padmin/source/makefile.mk deleted file mode 100644 index 8bcbd51ef832..000000000000 --- a/padmin/source/makefile.mk +++ /dev/null @@ -1,115 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(GUIBASE)"=="aqua" - -dummy: - @echo "Nothing to build for GUIBASE aqua." - -.ELSE - -PRJ=.. -PRJNAME=padmin -TARGET=padmin -TARGETTYPE=GUI -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE: settings.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=padialog.src rtsetup.src - -RESLIB1NAME=spa -RESLIB1IMAGES=$(PRJ)$/source -RESLIB1SRSFILES= $(SRS)$/padmin.srs -RESLIB1DEPN=\ - padialog.src \ - padialog.hrc \ - rtsetup.src \ - rtsetup.hrc - -.IF "$(GUI)" == "UNX" - -SLOFILES=\ - $(SLO)$/padialog.obj \ - $(SLO)$/cmddlg.obj \ - $(SLO)$/progress.obj \ - $(SLO)$/newppdlg.obj \ - $(SLO)$/prtsetup.obj \ - $(SLO)$/fontentry.obj \ - $(SLO)$/helper.obj \ - $(SLO)$/adddlg.obj \ - $(SLO)$/titlectrl.obj - - -OBJFILES=\ - $(OBJ)/pamain.obj - -SHL1TARGET= spa$(DLLPOSTFIX) -SHL1OBJS=$(SLOFILES) -SHL1STDLIBS=\ - $(SVTOOLLIB) \ - $(VCLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -APP1TARGET=spadmin.bin -APP1DEPN+=$(SHL1TARGETN) - -APP1OBJS=\ - $(OBJ)$/desktopcontext.obj \ - $(OBJ)/pamain.obj - -APP1STDLIBS= \ - -l$(SHL1TARGET) \ - $(VCLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -UNIXTEXT = $(MISC)$/spadmin.sh - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.ENDIF # GUIBASE==aqua - -- cgit From 73c1b2ce0dc2f7fe7cb698404f1f15f1534431e1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 21:31:48 +0100 Subject: gridsort: corrected include --- comphelper/inc/comphelper/anycompare.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comphelper/inc/comphelper/anycompare.hxx b/comphelper/inc/comphelper/anycompare.hxx index 8fd398b7647d..94a97e4d78fc 100755 --- a/comphelper/inc/comphelper/anycompare.hxx +++ b/comphelper/inc/comphelper/anycompare.hxx @@ -33,7 +33,7 @@ #include /** === end UNO includes === **/ -#include +#include #include #include -- cgit From 7ad4e757c3a37889e77ecc60081ef12c27cb8815 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 22:11:21 +0100 Subject: gridsort: getStandardLessPredicate: optional collator instance for string comparison --- comphelper/inc/comphelper/anycompare.hxx | 57 +++++++++++++++++++++++---- comphelper/source/container/enumerablemap.cxx | 2 +- comphelper/source/misc/anycompare.cxx | 8 +++- 3 files changed, 56 insertions(+), 11 deletions(-) diff --git a/comphelper/inc/comphelper/anycompare.hxx b/comphelper/inc/comphelper/anycompare.hxx index 94a97e4d78fc..03f41e108ba9 100755 --- a/comphelper/inc/comphelper/anycompare.hxx +++ b/comphelper/inc/comphelper/anycompare.hxx @@ -31,6 +31,7 @@ /** === begin UNO includes === **/ #include +#include /** === end UNO includes === **/ #include @@ -88,7 +89,7 @@ namespace comphelper if ( !( _lhs >>= lhs ) || !( _rhs >>= rhs ) ) - throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + throw ::com::sun::star::lang::IllegalArgumentException(); return lhs < rhs; } }; @@ -105,11 +106,36 @@ namespace comphelper if ( !( _lhs >>= lhs ) || !( _rhs >>= rhs ) ) - throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + throw ::com::sun::star::lang::IllegalArgumentException(); return lhs < rhs; } }; + //================================================================================================================== + //= StringCollationPredicateLess + //================================================================================================================== + class StringCollationPredicateLess : public IKeyPredicateLess + { + public: + StringCollationPredicateLess( ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const & i_collator ) + :m_collator( i_collator ) + { + } + + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + ::rtl::OUString lhs, rhs; + if ( !( _lhs >>= lhs ) + || !( _rhs >>= rhs ) + ) + throw ::com::sun::star::lang::IllegalArgumentException(); + return m_collator->compareString( lhs, rhs ) < 0; + } + + private: + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const m_collator; + }; + //================================================================================================================== //= TypePredicateLess //================================================================================================================== @@ -122,7 +148,7 @@ namespace comphelper if ( !( _lhs >>= lhs ) || !( _rhs >>= rhs ) ) - throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + throw ::com::sun::star::lang::IllegalArgumentException(); return lhs.getTypeName() < rhs.getTypeName(); } }; @@ -146,7 +172,7 @@ namespace comphelper || !_lhs.getValueType().equals( m_enumType ) || !_rhs.getValueType().equals( m_enumType ) ) - throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + throw ::com::sun::star::lang::IllegalArgumentException(); return lhs < rhs; } @@ -165,7 +191,7 @@ namespace comphelper if ( ( _lhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE ) || ( _rhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE ) ) - throw ::com::sun::star::lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); + throw ::com::sun::star::lang::IllegalArgumentException(); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > lhs( _lhs, ::com::sun::star::uno::UNO_QUERY ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > rhs( _rhs, ::com::sun::star::uno::UNO_QUERY ); @@ -174,9 +200,24 @@ namespace comphelper }; //================================================================================================================== - //= InterfacePredicateLess - //================================================================================================================== - ::std::auto_ptr< IKeyPredicateLess > COMPHELPER_DLLPUBLIC getStandardLessPredicate( ::com::sun::star::uno::Type const & i_type ); + //= getStandardLessPredicate + //================================================================================================================== + /** creates a default IKeyPredicateLess instance for the given UNO type + @param i_type + the type for which a predicate instance should be created + @param i_collator + specifies a collator instance to use, or . If , strings will be compared using the < + operator, otherwise the collator will be used. The parameter is ignored if i_type does not specify + the string type. + @return + a default implementation of IKeyPredicateLess, which is able to compare values of the given type. If no + such default implementation is known for the given type, then is returned. + */ + ::std::auto_ptr< IKeyPredicateLess > COMPHELPER_DLLPUBLIC + getStandardLessPredicate( + ::com::sun::star::uno::Type const & i_type, + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const & i_collator + ); //...................................................................................................................... } // namespace comphelper diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index ecc9494056ee..a73983517751 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -405,7 +405,7 @@ namespace comphelper throw IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported value type." ) ), *this ); // create the comparator for the KeyType, and throw if the type is not supported - ::std::auto_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType ) ); + ::std::auto_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType, NULL ) ); if ( !pComparator.get() ) throw IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), *this ); diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx index 2a6b7abda265..a86174daf08e 100755 --- a/comphelper/source/misc/anycompare.cxx +++ b/comphelper/source/misc/anycompare.cxx @@ -63,10 +63,11 @@ namespace comphelper using ::com::sun::star::uno::TypeClass_TYPE; using ::com::sun::star::uno::TypeClass_ENUM; using ::com::sun::star::uno::TypeClass_INTERFACE; + using ::com::sun::star::i18n::XCollator; /** === end UNO using === **/ //------------------------------------------------------------------------------------------------------------------ - ::std::auto_ptr< IKeyPredicateLess > getStandardLessPredicate( ::com::sun::star::uno::Type const & i_type ) + ::std::auto_ptr< IKeyPredicateLess > getStandardLessPredicate( Type const & i_type, Reference< XCollator > const & i_collator ) { ::std::auto_ptr< IKeyPredicateLess > pComparator; switch ( i_type.getTypeClass() ) @@ -105,7 +106,10 @@ namespace comphelper pComparator.reset( new ScalarPredicateLess< double >() ); break; case TypeClass_STRING: - pComparator.reset( new StringPredicateLess() ); + if ( i_collator.is() ) + pComparator.reset( new StringCollationPredicateLess( i_collator ) ); + else + pComparator.reset( new StringPredicateLess() ); break; case TypeClass_TYPE: pComparator.reset( new TypePredicateLess() ); -- cgit From e24827c9a760bdb408ef882c851f6c77c95060a9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 22:12:03 +0100 Subject: gridsort: respect the collator got in the service ctor --- toolkit/source/controls/grid/sortablegriddatamodel.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index d69f3d6187a5..11ac5730042b 100755 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -526,7 +526,7 @@ namespace toolkit } // get predicate object - ::std::auto_ptr< ::comphelper::IKeyPredicateLess > const pPredicate( ::comphelper::getStandardLessPredicate( dataType ) ); + ::std::auto_ptr< ::comphelper::IKeyPredicateLess > const pPredicate( ::comphelper::getStandardLessPredicate( dataType, m_collator ) ); ENSURE_OR_RETURN_VOID( pPredicate.get(), "SortableGridDataModel::impl_reIndex_nothrow: no sortable data found!" ); // then sort -- cgit From 37b53c32ec5320838721ee209d259f41427f8335 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 Jan 2011 22:31:36 +0100 Subject: gridsort: fix calculation of nActualRows when rendering the row header area - there were edge cases where this area was too large --- svtools/source/table/tablecontrol_impl.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 8e995babb36f..e085fc45a990 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1242,10 +1242,6 @@ namespace svt { namespace table // our current style settings, to be passed to the renderer const StyleSettings& rStyle = m_rAntiImpl.GetSettings().GetStyleSettings(); m_nRowCount = m_pModel->getRowCount(); - TableSize nVisibleRows = impl_getVisibleRows(true); - TableSize nActualRows = m_nRowCount; - if(m_nRowCount>nVisibleRows) - nActualRows = nVisibleRows; // the area occupied by all (at least partially) visible cells, including // headers Rectangle aAllCellsWithHeaders; @@ -1285,10 +1281,13 @@ namespace svt { namespace table { aRowHeaderArea = aAllCellsWithHeaders; aRowHeaderArea.Right() = m_nRowHeaderWidthPixel - 1; + + TableSize const nVisibleRows = impl_getVisibleRows( true ); + TableSize nActualRows = nVisibleRows; if ( m_nTopRow + nActualRows > m_nRowCount ) - aRowHeaderArea.Bottom() = m_nRowHeightPixel * (nActualRows - 1 ) + m_nColHeaderHeightPixel - 1; - else - aRowHeaderArea.Bottom() = m_nRowHeightPixel * nActualRows + m_nColHeaderHeightPixel - 1; + nActualRows = m_nRowCount - m_nTopRow; + aRowHeaderArea.Bottom() = m_nColHeaderHeightPixel + m_nRowHeightPixel * nActualRows - 1; + pRenderer->PaintHeaderArea( *m_pDataWindow, aRowHeaderArea, false, true, rStyle ); // Note that strictly, aRowHeaderArea also contains the intersection between column // and row header area. However, below we go to paint this intersection, again, -- cgit From 98414e6874f2a84f2740a7b292a5d8bcb09ac253 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Wed, 19 Jan 2011 00:27:35 +0100 Subject: locales34: #i112431# adapt documentation to reality --- .../com/sun/star/i18n/TransliterationModules.idl | 8 +- offapi/com/sun/star/util/XTextSearch.idl | 150 ++++++++++++++------- 2 files changed, 108 insertions(+), 50 deletions(-) diff --git a/offapi/com/sun/star/i18n/TransliterationModules.idl b/offapi/com/sun/star/i18n/TransliterationModules.idl index 1ac752d52fd8..69618dee0c9f 100644 --- a/offapi/com/sun/star/i18n/TransliterationModules.idl +++ b/offapi/com/sun/star/i18n/TransliterationModules.idl @@ -33,8 +33,12 @@ module com { module sun { module star { module i18n { //============================================================================= -/** Old transliteration module enumeration to use with - XTransliteration::loadModule() +/** Old transliteration module enumeration. + +

          Use with XTransliteration::loadModule() and + SearchOptions::transliterateFlags

          + +

          Note that values >=0x100 are logically or'ed with other values!

          */ published enum TransliterationModules diff --git a/offapi/com/sun/star/util/XTextSearch.idl b/offapi/com/sun/star/util/XTextSearch.idl index cc9e45058c47..3b0170c2ec26 100644 --- a/offapi/com/sun/star/util/XTextSearch.idl +++ b/offapi/com/sun/star/util/XTextSearch.idl @@ -40,97 +40,151 @@ module com { module sun { module star { module util { //============================================================================= -published enum SearchAlgorithms { - ABSOLUTE, // "normal" a kind of Boyer-Moore - REGEXP, // regular expression - APPROXIMATE // Leveinstein distance +published enum SearchAlgorithms +{ + /// Literal + ABSOLUTE, // implemented as a kind of Boyer-Moore + /// Regular expression + REGEXP, + /// Weighted Levenshtein Distance + APPROXIMATE }; +/// Flags for search methods published constants SearchFlags { - //Flag for all search methods - /** - @deprecated : the constant ALL_IGNORE_CASE is never supported - - it must use the transliteration flags of - the SearchOptions. -

          @see TransliterationModulesNew + @deprecated The constant ALL_IGNORE_CASE is never supported - use + TransliterationModules::IGNORE_CASE + with + SearchOptions::transliterateFlags + instead. + + @see TransliterationModules */ const long ALL_IGNORE_CASE = 0x00000001; - /// Flag for normal (Boyer-Moore) search + /** Flag for normal (Boyer-Moore) search / Search for word only. */ const long NORM_WORD_ONLY = 0x00000010; - /// Flag for "regular expression" search / interpret as extended regular expression + /** Flag for "regular expression" search / Interpret as extended + regular expression. + + @deprecated The flag is currently not supported by OOo. + */ const long REG_EXTENDED = 0x00000100; - /** Flag for "regular expression" search / No replace, i.e., avoid sub regular - expresions, return true/false to match - + /** Flag for "regular expression" search / No register information + or backreferences, i.e., avoid sub expressions. Return only + true/false if matched or not. + + @deprecated The flag is currently not supported by OOo. + */ + const long REG_NOSUB = 0x00000200; + + /** Flag for "regular expression" search / Special new line + treatment. + + @deprecated The flag is currently not supported by OOo. + +

          A NEWLINE character in string will not be matched by a + period outside bracket expression or by any form of a non + matching list.

          + +

          A circumflex (^) in pattern when used to specify expression + anchoring will match the zero length string immediately after a + newline in string, regardless of the setting of + REG_NOT_BEGINOFLINE.

          + +

          A dollar-sign ($) in pattern when used to specify expression + anchoring, will match zero-length string immediately before a + new line in string, regardless of the setting of + REG_NOT_ENDOFLINE.

          + */ + const long REG_NEWLINE = 0x00000400; + + /** The first character in the string is not the beginning of the + line therefore ^ will not match with first character of the + string. */ - const long REG_NOSUB = 0x00000200; - - /// Flag for "regular expression" search / Special new line treatment - const long REG_NEWLINE = 0x00000400; - - /** A NEWLINE character in string will not be matched by a period outside bracket - expression or by any form of a non matching list. - A circumflex (^) in pattern when used to specify expression anchoring - - will match the zero length string immediately after a newline in string, - regardless of the setting of REG_NOTBOL - A dollar-sign ($) in pattern when used to specify expression anchoring, - will match zero-length string immediately before a new line in string, - regardless of the setting of REG_NOTEOL -*/ const long REG_NOT_BEGINOFLINE = 0x00000800; - /** The first character in the string is not the beginning of the line therefore ^ will not - match with first character of the string + /** The last character in the string is not the end of the line + therefore $ will not match with last character of the string. */ const long REG_NOT_ENDOFLINE = 0x00001000; - - /// Flags for "Weight Levenshtein-Distance" search + /** Flag for "Weighted Levenshtein Distance" search / Relaxed + checking of limit, split weigh pools. + +

          If not specified (strict), the search is sucessful if + the WLD is within a calculated limit where each insertion, + deletion and replacement adds a weight to a common pool of + weights. This is the mathematically correct WLD.

          + +

          From a user's point of view the strict WLD is an + exclusive-OR of the arguments given, for example if allowed + insertions=2 and allowed replacements=2, the search fails if 2 + characters had been inserted and an additional operation would + be needed to match. Depending on the weights it may also fail if + 1 character was inserted and 1 character replaced and an + additional operation would be needed to match. The strict + algorithm may match less than expected from a first glance of + the specified arguments, but does not return false positives.

          + +

          If specified (relaxed), the search is also successful + if the combined pool for insertions and deletions is below a + doubled calculated limit and replacements are treated + differently. Additionally, swapped characters are counted as one + replacement.

          + +

          From a user's point of view the relaxed WLD is an + inclusive-OR of the arguments given, for example if allowed + insertions=2 and allowed replacements=2, the search succeeds if + 2 characters had been inserted and an additional replacement is + needed to match. The relaxed algorithm may return false + positives, but meets user expectation better.

          + */ const long LEV_RELAXED = 0x00010000; }; published struct SearchOptions { //------------------------------------------------------------------------- - /// search type, can be: ABSOLUTE, REGEXP, APPROXIMATE + /** search type */ SearchAlgorithms algorithmType; /** some flags - can be mixed - @see SearchFlags + @see SearchFlags */ long searchFlag; - /// the search text + /** The text or pattern to be searched. */ string searchString; - /** the replace text - (is for optional replacing - SearchOption is only the data container for it)*/ + /** The replacement text + (is for optional replacing - SearchOption is only the data container for it) */ string replaceString; - /// this is the language for case insensitive search + /** The locale for case insensitive search. */ ::com::sun::star::lang::Locale Locale; - /** this many characters can be different between the found and search word - in a "Weight Levenshtein-Distance"*/ + /** This many characters can be different (as a replacement) between + the found word and the search pattern in a "Weighted Levenshtein + Distance" search. */ long changedChars; - /** this many characters can be missed in the found word - in a "Weight Levenshtein-Distance"*/ + /** This many characters can be missing in the found word in a + "Weighted Levenshtein Distance" search. */ long deletedChars; - /// this many characters can be additional in the found word in a "Weight Levenshtein-Distance" + /** This many characters can be additional in the found word in a + "Weighted Levenshtein Distance" search. */ long insertedChars; - /** asian flags for the transliteration. Same meaning as the enum of TransliteratorModule - - @see com/sun/star/i18n/XTransliteration.idl + /** Flags for the transliteration. Same meaning as the enum of + TransliterationModules */ long transliterateFlags; }; -- cgit From 16932cb2060d4f3965a8db131a6b6123c2b7760f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 19 Jan 2011 08:38:58 +0100 Subject: gridsort: TableControl API adjustments --- automation/source/server/statemnt.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 3e3b6db764df..f4ae483da633 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -6210,7 +6210,7 @@ protected: Point aPos( aSize.Width() / 2, aSize.Height() / 2 ); long nStep = aSize.Height() / 4; ::svt::table::RowPos nLastPos; - while ( ( nLastPos = pTC->getTableControlInterface().getRowAtPoint( aPos ) ) != nNr1-1 && nStep > 0 ) + while ( ( nLastPos = pTC->getTableControlInterface().hitTest( aPos ).nRow ) != nNr1-1 && nStep > 0 ) { if ( nLastPos > nNr1-1 || nLastPos == ROW_INVALID ) aPos.Y() -= nStep; @@ -6218,7 +6218,7 @@ protected: aPos.Y() += nStep; nStep /= 2; } - if ( pTC->getTableControlInterface().getRowAtPoint( aPos ) == nNr1-1 ) + if ( pTC->getTableControlInterface().hitTest( aPos ).nRow == nNr1-1 ) { MouseEvent aMEvnt(aPos,1,MOUSE_SIMPLECLICK|MOUSE_SELECT,MOUSE_LEFT,KEY_MOD1); pTC->getSelEngine()->SelMouseButtonDown( aMEvnt ); -- cgit From e8f649b5ad64a2a3f07dfab1a52033d126da211b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 19 Jan 2011 11:11:29 +0100 Subject: gridsort: render indicator for current column sort --- .../inc/svtools/table/tablecontrolinterface.hxx | 13 ++- svtools/source/table/gridtablerenderer.cxx | 98 +++++++++++++++++++++- svtools/source/table/mousefunction.cxx | 2 +- svtools/source/table/tablecontrol.cxx | 2 +- svtools/source/table/tablecontrol_impl.cxx | 87 ++++++++++--------- svtools/source/table/tablecontrol_impl.hxx | 6 +- svtools/source/uno/svtxgridcontrol.cxx | 19 ++++- 7 files changed, 175 insertions(+), 52 deletions(-) diff --git a/svtools/inc/svtools/table/tablecontrolinterface.hxx b/svtools/inc/svtools/table/tablecontrolinterface.hxx index 6ff2b07e84ed..74e9688d01db 100644 --- a/svtools/inc/svtools/table/tablecontrolinterface.hxx +++ b/svtools/inc/svtools/table/tablecontrolinterface.hxx @@ -146,6 +146,17 @@ namespace svt { namespace table } }; + //================================================================================================================== + //= TableArea + //================================================================================================================== + enum TableArea + { + TableAreaColumnHeaders, + TableAreaRowHeaders, + TableAreaDataArea, + TableAreaAll + }; + //================================================================================================================== //= ITableControl //================================================================================================================== @@ -213,7 +224,7 @@ namespace svt { namespace table virtual void releaseMouse() = 0; /// invalidates the table window - virtual void invalidate() = 0; + virtual void invalidate( TableArea const i_what ) = 0; /// calculates a width, given in pixels, into a AppFont-based width virtual long pixelWidthToAppFont( long const i_pixels ) const = 0; diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 5fa7e0ab6f8d..91f78ff7fbc5 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -39,6 +39,8 @@ #include #include #include +#include +#include //...................................................................................................................... namespace svt { namespace table @@ -60,11 +62,65 @@ namespace svt { namespace table using ::com::sun::star::style::VerticalAlignment_BOTTOM; /** === end UNO using === **/ + //================================================================================================================== + //= CachedSortIndicator + //================================================================================================================== + class CachedSortIndicator + { + public: + CachedSortIndicator() + :m_lastHeaderHeight( 0 ) + ,m_lastArrowColor( COL_TRANSPARENT ) + { + } + + BitmapEx const & getBitmapFor( OutputDevice const & i_device, long const i_headerHeight, StyleSettings const & i_style, bool const i_sortAscending ); + + private: + long m_lastHeaderHeight; + Color m_lastArrowColor; + BitmapEx m_sortAscending; + BitmapEx m_sortDescending; + }; + + //------------------------------------------------------------------------------------------------------------------ + BitmapEx const & CachedSortIndicator::getBitmapFor( OutputDevice const & i_device, long const i_headerHeight, + StyleSettings const & i_style, bool const i_sortAscending ) + { + BitmapEx & rBitmap( i_sortAscending ? m_sortAscending : m_sortDescending ); + if ( !rBitmap || ( i_headerHeight != m_lastHeaderHeight ) || ( i_style.GetActiveColor() != m_lastArrowColor ) ) + { + long const nSortIndicatorWidth = 2 * i_headerHeight / 3; + long const nSortIndicatorHeight = 2 * nSortIndicatorWidth / 3; + + Point const aBitmapPos( 0, 0 ); + Size const aBitmapSize( nSortIndicatorWidth, nSortIndicatorHeight ); + VirtualDevice aDevice( i_device, 0, 0 ); + aDevice.SetOutputSizePixel( aBitmapSize ); + + DecorationView aDecoView( &aDevice ); + aDecoView.DrawSymbol( + Rectangle( aBitmapPos, aBitmapSize ), + i_sortAscending ? SYMBOL_SPIN_DOWN : SYMBOL_SPIN_UP, + i_style.GetActiveColor() + ); + + rBitmap = aDevice.GetBitmapEx( aBitmapPos, aBitmapSize ); + m_lastHeaderHeight = i_headerHeight; + m_lastArrowColor = i_style.GetActiveColor(); + } + return rBitmap; + } + + //================================================================================================================== + //= GridTableRenderer_Impl + //================================================================================================================== struct GridTableRenderer_Impl { - ITableModel& rModel; - RowPos nCurrentRow; - bool bUseGridLines; + ITableModel& rModel; + RowPos nCurrentRow; + bool bUseGridLines; + CachedSortIndicator aSortIndicator; GridTableRenderer_Impl( ITableModel& _rModel ) :rModel( _rModel ) @@ -73,6 +129,10 @@ namespace svt { namespace table { } }; + + //================================================================================================================== + //= helper + //================================================================================================================== namespace { static Rectangle lcl_getContentArea( GridTableRenderer_Impl const & i_impl, Rectangle const & i_cellArea ) @@ -220,6 +280,38 @@ namespace svt { namespace table _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight()); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); + // draw sort indicator if the model data is sorted by the given column + ITableDataSort const * pSortAdapter = m_pImpl->rModel.getSortAdapter(); + ColumnSort aCurrentSortOrder; + if ( pSortAdapter != NULL ) + aCurrentSortOrder = pSortAdapter->getCurrentSortOrder(); + if ( aCurrentSortOrder.nColumnPos == _nCol ) + { + long const nHeaderHeight( _rArea.GetHeight() ); + BitmapEx const aIndicatorBitmap = m_pImpl->aSortIndicator.getBitmapFor( _rDevice, nHeaderHeight, _rStyle, + aCurrentSortOrder.eSortDirection == ColumnSortAscending ); + Size const aBitmapSize( aIndicatorBitmap.GetSizePixel() ); + long const nSortIndicatorPaddingX = 2; + long const nSortIndicatorPaddingY = ( nHeaderHeight - aBitmapSize.Height() ) / 2; + + if ( ( nDrawTextFlags & TEXT_DRAW_RIGHT ) != 0 ) + { + // text is right aligned => draw the sort indicator at the left hand side + _rDevice.DrawBitmapEx( + Point( nSortIndicatorPaddingX, nSortIndicatorPaddingY ), + aIndicatorBitmap + ); + } + else + { + // text is left-aligned or centered => draw the sort indicator at the right hand side + _rDevice.DrawBitmapEx( + Point( _rArea.Right() - nSortIndicatorPaddingX - aBitmapSize.Width(), nSortIndicatorPaddingY ), + aIndicatorBitmap + ); + } + } + _rDevice.Pop(); (void)_bActive; diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index e3a47057423f..6d37e35b7a4c 100755 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -178,7 +178,7 @@ namespace svt { namespace table requestedWidthLogical = maxWidthLogical; } pColumn->setWidth( requestedWidthLogical ); - i_tableControl.invalidate(); + i_tableControl.invalidate( TableAreaAll ); } i_tableControl.setPointer( Pointer() ); diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index c448af323b8b..448da7c9395b 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -564,7 +564,7 @@ namespace svt { namespace table Rectangle TableControl::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen) { (void)_bOnScreen; - return m_pImpl->calcHeaderRect(_bIsColumnBar); + return m_pImpl->calcHeaderRect( _bIsColumnBar ? false : true ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index e085fc45a990..53ff00756d98 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -693,8 +693,7 @@ namespace svt { namespace table { DBG_CHECK_ME(); - Rectangle aAllCellsArea; - impl_getAllVisibleCellsArea( aAllCellsArea ); + Rectangle const aAllCellsArea( impl_getAllVisibleCellsArea() ); const TableColumnGeometry aColumn( *this, aAllCellsArea, i_column ); if ( aColumn.isValid() ) @@ -727,16 +726,15 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const + Rectangle TableControl_Impl::impl_getAllVisibleCellsArea() const { DBG_CHECK_ME(); - _rCellArea.Left() = 0; - _rCellArea.Top() = 0; + Rectangle aArea( Point( 0, 0 ), Size( 0, 0 ) ); // determine the right-most border of the last column which is // at least partially visible - _rCellArea.Right() = m_nRowHeaderWidthPixel; + aArea.Right() = m_nRowHeaderWidthPixel; if ( !m_aColumnWidths.empty() ) { // the number of pixels which are scrolled out of the left hand @@ -746,31 +744,34 @@ namespace svt { namespace table ColumnPositions::const_reverse_iterator loop = m_aColumnWidths.rbegin(); do { - _rCellArea.Right() = loop->getEnd() - nScrolledOutLeft + m_nRowHeaderWidthPixel; + aArea.Right() = loop->getEnd() - nScrolledOutLeft + m_nRowHeaderWidthPixel; ++loop; } while ( ( loop != m_aColumnWidths.rend() ) - && ( loop->getEnd() - nScrolledOutLeft >= _rCellArea.Right() ) + && ( loop->getEnd() - nScrolledOutLeft >= aArea.Right() ) ); } - // so far, _rCellArea.Right() denotes the first pixel *after* the cell area - --_rCellArea.Right(); + // so far, aArea.Right() denotes the first pixel *after* the cell area + --aArea.Right(); // determine the last row which is at least partially visible - _rCellArea.Bottom() = + aArea.Bottom() = m_nColHeaderHeightPixel + impl_getVisibleRows( true ) * m_nRowHeightPixel - 1; + + return aArea; } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::impl_getAllVisibleDataCellArea( Rectangle& _rCellArea ) const + Rectangle TableControl_Impl::impl_getAllVisibleDataCellArea() const { DBG_CHECK_ME(); - impl_getAllVisibleCellsArea( _rCellArea ); - _rCellArea.Left() = m_nRowHeaderWidthPixel; - _rCellArea.Top() = m_nColHeaderHeightPixel; + Rectangle aArea( impl_getAllVisibleCellsArea() ); + aArea.Left() = m_nRowHeaderWidthPixel; + aArea.Top() = m_nColHeaderHeightPixel; + return aArea; } //------------------------------------------------------------------------------------------------------------------ @@ -1244,8 +1245,7 @@ namespace svt { namespace table m_nRowCount = m_pModel->getRowCount(); // the area occupied by all (at least partially) visible cells, including // headers - Rectangle aAllCellsWithHeaders; - impl_getAllVisibleCellsArea( aAllCellsWithHeaders ); + Rectangle const aAllCellsWithHeaders( impl_getAllVisibleCellsArea() ); // ............................ // draw the header column area @@ -1310,8 +1310,7 @@ namespace svt { namespace table TableSize colCount = getModel()->getColumnCount(); // paint all rows - Rectangle aAllDataCellsArea; - impl_getAllVisibleDataCellArea( aAllDataCellsArea ); + Rectangle const aAllDataCellsArea( impl_getAllVisibleDataCellArea() ); for ( TableRowGeometry aRowIterator( *this, aAllCellsWithHeaders, getTopRow() ); aRowIterator.isValid(); aRowIterator.moveDown() ) @@ -1792,10 +1791,7 @@ namespace svt { namespace table return; } - Rectangle aAllCells; - impl_getAllVisibleCellsArea( aAllCells ); - - TableCellGeometry aCell( *this, aAllCells, _nColumn, _nRow ); + TableCellGeometry aCell( *this, impl_getAllVisibleCellsArea(), _nColumn, _nRow ); _rCellRect = aCell.getRect(); } @@ -1886,9 +1882,26 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::invalidate() + void TableControl_Impl::invalidate( TableArea const i_what ) { - m_pDataWindow->Invalidate(); + switch ( i_what ) + { + case TableAreaColumnHeaders: + m_pDataWindow->Invalidate( calcHeaderRect( true ) ); + break; + + case TableAreaRowHeaders: + m_pDataWindow->Invalidate( calcHeaderRect( false ) ); + break; + + case TableAreaDataArea: + m_pDataWindow->Invalidate( impl_getAllVisibleDataCellArea() ); + break; + + case TableAreaAll: + m_pDataWindow->Invalidate(); + break; + } } //------------------------------------------------------------------------------------------------------------------ @@ -1920,9 +1933,8 @@ namespace svt { namespace table void TableControl_Impl::invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect) { DBG_CHECK_ME(); - Rectangle aAllCells; //get the visible area of the table control and set the Left and right border of the region to be repainted - impl_getAllVisibleCellsArea( aAllCells ); + Rectangle const aAllCells( impl_getAllVisibleCellsArea() ); _rCellRect.Left() = aAllCells.Left(); _rCellRect.Right() = aAllCells.Right(); //if only one row is selected @@ -1967,9 +1979,7 @@ namespace svt { namespace table Rectangle aInvalidateRect; - Rectangle aVisibleCellsArea; - impl_getAllVisibleCellsArea( aVisibleCellsArea ); - + Rectangle const aVisibleCellsArea( impl_getAllVisibleCellsArea() ); TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow, true ); while ( aRow.isValid() && ( aRow.getRow() <= lastRow ) ) { @@ -2409,23 +2419,18 @@ namespace svt { namespace table //-------------------------------------------------------------------- Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader) { - Rectangle aRectTable, aRectTableWithHeaders; - impl_getAllVisibleDataCellArea(aRectTable); - impl_getAllVisibleCellsArea(aRectTableWithHeaders); - Size aSizeTable(aRectTable.GetSize()); - Size aSizeTableWithHeaders(aRectTableWithHeaders.GetSize()); - if(bColHeader) - return Rectangle(aRectTableWithHeaders.TopLeft(),Size(aSizeTableWithHeaders.Width()-aSizeTable.Width(), aSizeTableWithHeaders.Height())); + Rectangle const aRectTableWithHeaders( impl_getAllVisibleCellsArea() ); + Size const aSizeTableWithHeaders( aRectTableWithHeaders.GetSize() ); + if ( bColHeader ) + return Rectangle( aRectTableWithHeaders.TopLeft(), Size( aSizeTableWithHeaders.Width(), m_nColHeaderHeightPixel ) ); else - return Rectangle(aRectTableWithHeaders.TopLeft(),Size(aSizeTableWithHeaders.Width(), aSizeTableWithHeaders.Height()-aSizeTable.Height())); + return Rectangle( aRectTableWithHeaders.TopLeft(), Size( m_nRowHeaderWidthPixel, aSizeTableWithHeaders.Height() ) ); } //-------------------------------------------------------------------- Rectangle TableControl_Impl::calcTableRect() { - Rectangle aRect; - impl_getAllVisibleDataCellArea(aRect); - return aRect; + return impl_getAllVisibleDataCellArea(); } //-------------------------------------------------------------------- diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 0975368a88a2..747ffc8a36fa 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -282,7 +282,7 @@ namespace svt { namespace table virtual void setPointer( Pointer const & i_pointer ); virtual void captureMouse(); virtual void releaseMouse(); - virtual void invalidate(); + virtual void invalidate( TableArea const i_what ); virtual long pixelWidthToAppFont( long const i_pixels ) const; virtual void hideTracking(); virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ); @@ -429,14 +429,14 @@ namespace svt { namespace table As a result of respecting the partial visibility of rows and columns, the returned area might be larger than the data window's output size. */ - void impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const; + Rectangle impl_getAllVisibleCellsArea() const; /** retrieves the area occupied by all (at least partially) visible data cells. Effectively, the returned area is the same as returned by ->impl_getAllVisibleCellsArea, minus the row and column header areas. */ - void impl_getAllVisibleDataCellArea( Rectangle& _rCellArea ) const; + Rectangle impl_getAllVisibleDataCellArea() const; /** retrieves the column which covers the given ordinate */ diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index ef9b10030230..14ac857179b1 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -524,7 +524,8 @@ void SAL_CALL SVTXGridControl::rowsInserted( const GridDataEvent& i_event ) thro } //---------------------------------------------------------------------------------------------------------------------- -void SAL_CALL SVTXGridControl::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException) +void SAL_CALL//---------------------------------------------------------------------------------------------------------------------- + SVTXGridControl::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); m_pTableModel->notifyRowsRemoved( i_event ); @@ -544,6 +545,10 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw pTable->InvalidateDataWindow( 0, m_pTableModel->getRowCount() ); else pTable->InvalidateDataWindow( i_event.FirstRow, i_event.LastRow ); + + // if the data model is sortable, a dataChanged event is also fired in case the sort order changed. + // So, invalidate the column header area, too. + pTable->getTableControlInterface().invalidate( TableAreaColumnHeaders ); } //---------------------------------------------------------------------------------------------------------------------- @@ -556,7 +561,7 @@ void SAL_CALL SVTXGridControl::rowHeadingChanged( const GridDataEvent& i_event ) ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowHeadingChanged: no control (anymore)!" ); // TODO: we could do better than this - invalidate the header area only - pTable->Invalidate(); + pTable->getTableControlInterface().invalidate( TableAreaRowHeaders ); } @@ -609,6 +614,7 @@ void SAL_CALL SVTXGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com: pTable->SelectRow( i_rowIndex, true ); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -619,6 +625,7 @@ void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::Run pTable->SelectAllRows( true ); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -629,6 +636,7 @@ void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::co pTable->SelectRow( i_rowIndex, false ); } +//---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -639,6 +647,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R pTable->SelectAllRows( false ); } +//---------------------------------------------------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL SVTXGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -653,6 +662,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R return selectedRows; } +//---------------------------------------------------------------------------------------------------------------------- ::sal_Bool SAL_CALL SVTXGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -663,6 +673,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R return pTable->GetSelectedRowCount() > 0; } +//---------------------------------------------------------------------------------------------------------------------- ::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex( ::sal_Int32 index ) throw (::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -673,6 +684,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R return pTable->IsRowSelected( index ); } +//---------------------------------------------------------------------------------------------------------------------- void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::lang::EventObject aObj; @@ -681,6 +693,7 @@ void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException) VCLXWindow::dispose(); } +//---------------------------------------------------------------------------------------------------------------------- void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { ::vos::OGuard aGuard( GetMutex() ); @@ -703,6 +716,7 @@ void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent } } +//---------------------------------------------------------------------------------------------------------------------- void SVTXGridControl::ImplCallItemListeners() { TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); @@ -750,6 +764,7 @@ void SVTXGridControl::ImplCallItemListeners() } } +//---------------------------------------------------------------------------------------------------------------------- void SVTXGridControl::impl_updateColumnsFromModel_nothrow() { Reference< XGridColumnModel > const xColumnModel( m_pTableModel->getColumnModel() ); -- cgit From 903ddf534a9a71cb54867d7c40eedf456acb018a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 19 Jan 2011 12:39:41 +0100 Subject: gridsort: introduce XGridColumn::DataModelIndex. this allows for column removal/insertion at the GridColumnModel, without the need to touch the GridDataModel --- svtools/inc/svtools/table/tablecontrol.hxx | 3 -- svtools/inc/svtools/table/tablemodel.hxx | 2 +- svtools/source/table/tablecontrol.cxx | 6 --- svtools/source/table/tablecontrol_impl.cxx | 13 +++--- svtools/source/table/tablecontrol_impl.hxx | 2 +- svtools/source/uno/svtxgridcontrol.cxx | 15 ++----- svtools/source/uno/unocontroltablemodel.cxx | 49 ++++++++++++++++++---- svtools/source/uno/unocontroltablemodel.hxx | 10 ++++- svtools/source/uno/unogridcolumnfacade.cxx | 34 +++++++++++++++ svtools/source/uno/unogridcolumnfacade.hxx | 12 +++++- .../controls/grid/defaultgridcolumnmodel.cxx | 1 + toolkit/source/controls/grid/gridcolumn.cxx | 15 +++++++ toolkit/source/controls/grid/gridcolumn.hxx | 3 ++ 13 files changed, 124 insertions(+), 41 deletions(-) diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index a5360145bc46..a8324e0bc13d 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -151,9 +151,6 @@ namespace svt { namespace table void SetSelectHdl( const Link& rLink ); const Link& GetSelectHdl() const; - /// invalidates those areas of the data window which are covered by the given rows - void InvalidateDataWindow( RowPos const i_firstRow, RowPos const i_lastRow ); - /**after removing a row, updates the vector which contains the selected rows if the row, which should be removed, is selected, it will be erased from the vector */ diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index 80ce012b05d0..b6c0c466edd0 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -142,7 +142,7 @@ namespace svt { namespace table they have about the cells in question, in particular any possibly cached cell values. */ - virtual void cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ) = 0; + virtual void cellsUpdated( ColPos const i_firstCol, ColPos i_lastCol, RowPos const i_firstRow, RowPos const i_lastRow ) = 0; /** notifies the listener that attributes of a given column changed diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 448da7c9395b..4cccc3843adf 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -248,12 +248,6 @@ namespace svt { namespace table Select(); } - // ----------------------------------------------------------------------------------------------------------------- - void TableControl::InvalidateDataWindow( RowPos const i_firstRow, RowPos const i_lastRow ) - { - m_pImpl->invalidateRowRange( i_firstRow, i_lastRow ); - } - // ----------------------------------------------------------------------------------------------------------------- ITableControl& TableControl::getTableControlInterface() { diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 53ff00756d98..e47419f2ea52 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -670,14 +670,12 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ) + void TableControl_Impl::cellsUpdated( ColPos const i_firstCol, ColPos i_lastCol, RowPos const i_firstRow, RowPos const i_lastRow ) { - OSL_ENSURE( false, "TableControl_Impl::cellsUpdated: not implemented!" ); - // there's no known implementation (yet) which calls this method - OSL_UNUSED( firstCol ); - OSL_UNUSED( lastCol ); - OSL_UNUSED( firstRow ); - OSL_UNUSED( lastRow ); + invalidateRowRange( i_firstRow, i_lastRow ); + + OSL_UNUSED( i_firstCol ); + OSL_UNUSED( i_lastCol ); } //------------------------------------------------------------------------------------------------------------------ @@ -1966,7 +1964,6 @@ namespace svt { namespace table m_pDataWindow->Invalidate(_rCellRect); } //------------------------------------------------------------------------------------------------------------------ - //this method is to be called, when a new row is added void TableControl_Impl::invalidateRowRange( RowPos const i_firstRow, RowPos const i_lastRow ) { if ( m_nCursorHidden == 2 ) diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 747ffc8a36fa..dfc8141fa0e9 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -312,7 +312,7 @@ namespace svt { namespace table virtual void columnInserted( ColPos const i_colIndex ); virtual void columnRemoved( ColPos const i_colIndex ); virtual void allColumnsRemoved(); - virtual void cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ); + virtual void cellsUpdated( ColPos const i_firstCol, ColPos i_lastCol, RowPos const i_firstRow, RowPos const i_lastRow ); virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ); virtual void tableMetricsChanged(); diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 14ac857179b1..d61a983b309b 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -536,18 +536,12 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw { ::vos::OGuard aGuard( GetMutex() ); - TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); - ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" ); - - // TODO: Our UnoControlTableModel should be a listener at the data model, and multiplex those events, - // so the TableControl/_Impl can react on it. - if ( i_event.FirstRow == -1 ) - pTable->InvalidateDataWindow( 0, m_pTableModel->getRowCount() ); - else - pTable->InvalidateDataWindow( i_event.FirstRow, i_event.LastRow ); + m_pTableModel->notifyDataChanged( i_event ); // if the data model is sortable, a dataChanged event is also fired in case the sort order changed. - // So, invalidate the column header area, too. + // So, just in case, invalidate the column header area, too. + TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" ); pTable->getTableControlInterface().invalidate( TableAreaColumnHeaders ); } @@ -564,7 +558,6 @@ void SAL_CALL SVTXGridControl::rowHeadingChanged( const GridDataEvent& i_event ) pTable->getTableControlInterface().invalidate( TableAreaRowHeaders ); } - //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) { diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index ae4de7c36809..b6d4d0f1e451 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -523,12 +523,18 @@ namespace svt { namespace table { DBG_CHECK_ME(); + o_cellContent.clear(); try { Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel ); - ENSURE_OR_THROW( xDataModel.is(), "no data model anymore!" ); + ENSURE_OR_RETURN_VOID( xDataModel.is(), "UnoControlTableModel::getCellContent: no data model anymore!" ); + + PColumnModel const pColumn = getColumnModel( i_col ); + UnoGridColumnFacade* pColumnImpl = dynamic_cast< UnoGridColumnFacade* >( pColumn.get() ); + ENSURE_OR_RETURN_VOID( pColumnImpl != NULL, "UnoControlTableModel::getCellContent: no (valid) column at this position!" ); + sal_Int32 const nDataColumnIndex = pColumnImpl->getDataColumnIndex() >= 0 ? pColumnImpl->getDataColumnIndex() : i_col; - if ( i_col >= xDataModel->getColumnCount() ) + if ( nDataColumnIndex >= xDataModel->getColumnCount() ) { // this is allowed, in case the column model has been dynamically extended, but the data model does // not (yet?) know about it. @@ -540,11 +546,10 @@ namespace svt { namespace table "UnoControlTableModel::getCellContent: request a column's value which the ColumnModel doesn't know about!" ); } #endif - o_cellContent.clear(); } else { - o_cellContent = xDataModel->getCellData( i_col, i_row ); + o_cellContent = xDataModel->getCellData( nDataColumnIndex, i_row ); } } catch( const Exception& ) @@ -803,7 +808,7 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::notifyRowsInserted( GridDataEvent const & i_event ) + void UnoControlTableModel::notifyRowsInserted( GridDataEvent const & i_event ) const { // check sanity of the event ENSURE_OR_RETURN_VOID( i_event.FirstRow >= 0, "UnoControlTableModel::notifyRowsInserted: invalid first row!" ); @@ -840,9 +845,8 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::notifyRowsRemoved( GridDataEvent const & i_event ) + void UnoControlTableModel::notifyRowsRemoved( GridDataEvent const & i_event ) const { - // multiplex the event to our own listeners ModellListeners aListeners( m_pImpl->m_aListeners ); for ( ModellListeners::const_iterator loop = aListeners.begin(); loop != aListeners.end(); @@ -853,6 +857,37 @@ namespace svt { namespace table } } + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::notifyDataChanged( ::com::sun::star::awt::grid::GridDataEvent const & i_event ) const + { + ColPos const firstCol = i_event.FirstColumn == -1 ? 0 : i_event.FirstColumn; + ColPos const lastCol = i_event.FirstColumn == -1 ? getColumnCount() - 1 : i_event.LastColumn; + RowPos const firstRow = i_event.FirstRow == -1 ? 0 : i_event.FirstRow; + RowPos const lastRow = i_event.FirstRow == -1 ? getRowCount() - 1 : i_event.LastRow; + + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->cellsUpdated( firstCol, lastCol, firstRow, lastRow ); + } + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::notifyAllDataChanged() const + { + ModellListeners aListeners( m_pImpl->m_aListeners ); + for ( ModellListeners::const_iterator loop = aListeners.begin(); + loop != aListeners.end(); + ++loop + ) + { + (*loop)->cellsUpdated( 0, getColumnCount() - 1, 0, getRowCount() - 1 ); + } + } + // ..................................................................................................................... } } // svt::table // ..................................................................................................................... diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 32930a64326d..537c3d9a5249 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -137,8 +137,9 @@ namespace svt { namespace table void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); // multiplexing of XGridDataListener events - void notifyRowsInserted( ::com::sun::star::awt::grid::GridDataEvent const & i_event ); - void notifyRowsRemoved( ::com::sun::star::awt::grid::GridDataEvent const & i_event ); + void notifyRowsInserted( ::com::sun::star::awt::grid::GridDataEvent const & i_event ) const; + void notifyRowsRemoved( ::com::sun::star::awt::grid::GridDataEvent const & i_event ) const; + void notifyDataChanged( ::com::sun::star::awt::grid::GridDataEvent const & i_event ) const; /// retrieves the index of a column within the model ColPos getColumnPos( UnoGridColumnFacade const & i_column ) const; @@ -146,6 +147,11 @@ namespace svt { namespace table /// notifies a change in a column belonging to the model void notifyColumnChange( ColPos const i_columnPos, ColumnAttributeGroup const i_attributeGroup ) const; + /** notifies a change in all data represented by the model. To be used if you cannot specified the changed data + in more detail. + */ + void notifyAllDataChanged() const; + #ifdef DBG_UTIL const char* checkInvariants() const; #endif diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx index 00fa72199815..98078b1fb2d4 100755 --- a/svtools/source/uno/unogridcolumnfacade.cxx +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -148,6 +148,14 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ void SAL_CALL ColumnChangeMultiplexer::columnChanged( const GridColumnEvent& i_event ) throw (RuntimeException) { + if ( i_event.AttributeName.equalsAscii( "DataColumnIndex" ) ) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + if ( m_pColumnImplementation != NULL ) + m_pColumnImplementation->dataColumnIndexChanged(); + return; + } + ColumnAttributeGroup nChangedAttributes( COL_ATTRS_NONE ); if ( i_event.AttributeName.equalsAscii( "HorizontalAlign" ) ) @@ -182,9 +190,11 @@ namespace svt { namespace table UnoGridColumnFacade::UnoGridColumnFacade( UnoControlTableModel const & i_owner, Reference< XGridColumn > const & i_gridColumn ) :m_pOwner( &i_owner ) ,m_xGridColumn( i_gridColumn, UNO_QUERY_THROW ) + ,m_nDataColumnIndex( -1 ) ,m_pChangeMultiplexer( new ColumnChangeMultiplexer( *this ) ) { m_xGridColumn->addGridColumnListener( m_pChangeMultiplexer.get() ); + impl_updateDataColumnIndex_nothrow(); } //------------------------------------------------------------------------------------------------------------------ @@ -205,6 +215,30 @@ namespace svt { namespace table m_pOwner = NULL; } + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::impl_updateDataColumnIndex_nothrow() + { + m_nDataColumnIndex = -1; + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + try + { + m_nDataColumnIndex = m_xGridColumn->getDataColumnIndex(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::dataColumnIndexChanged() + { + DBG_TESTSOLARMUTEX(); + impl_updateDataColumnIndex_nothrow(); + if ( m_pOwner != NULL ) + m_pOwner->notifyAllDataChanged(); + } + //------------------------------------------------------------------------------------------------------------------ void UnoGridColumnFacade::columnChanged( ColumnAttributeGroup const i_attributeGroup ) { diff --git a/svtools/source/uno/unogridcolumnfacade.hxx b/svtools/source/uno/unogridcolumnfacade.hxx index 6f606bb6f86b..11d40afa2984 100755 --- a/svtools/source/uno/unogridcolumnfacade.hxx +++ b/svtools/source/uno/unogridcolumnfacade.hxx @@ -90,11 +90,19 @@ namespace svt { namespace table */ void dispose(); - // callback for the XGridColumnListener + sal_Int32 + getDataColumnIndex() const { return m_nDataColumnIndex; } + + // callbacks for the XGridColumnListener void columnChanged( ColumnAttributeGroup const i_attributeGroup ); + void dataColumnIndexChanged(); + + private: + void impl_updateDataColumnIndex_nothrow(); private: - const UnoControlTableModel* m_pOwner; + UnoControlTableModel const * m_pOwner; + sal_Int32 m_nDataColumnIndex; ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > m_xGridColumn; ::rtl::Reference< ColumnChangeMultiplexer > m_pChangeMultiplexer; }; diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 80d1c9c136d3..8c50a7e62ef7 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -234,6 +234,7 @@ namespace toolkit colTitle.append( i + 1 ); pGridColumn->setTitle( colTitle.makeStringAndClear() ); pGridColumn->setPreferredWidth( 80 /* APPFONT */ ); + pGridColumn->setDataColumnIndex( i ); ContainerEvent aEvent; aEvent.Source = *this; diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 99ea4e68ce8d..60873cc1802f 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -50,6 +50,7 @@ namespace toolkit :GridColumn_Base( m_aMutex ) ,m_aIdentifier() ,m_nIndex(-1) + ,m_nDataColumnIndex(-1) ,m_nColumnWidth(4) ,m_nPreferredWidth(0) ,m_nMaxWidth(0) @@ -65,6 +66,7 @@ namespace toolkit ,GridColumn_Base( m_aMutex ) ,m_aIdentifier( i_copySource.m_aIdentifier ) ,m_nIndex( -1 ) + ,m_nDataColumnIndex( i_copySource.m_nDataColumnIndex ) ,m_nColumnWidth( i_copySource.m_nColumnWidth ) ,m_nPreferredWidth( i_copySource.m_nPreferredWidth ) ,m_nMaxWidth( i_copySource.m_nMaxWidth ) @@ -248,6 +250,19 @@ namespace toolkit m_nIndex = i_index; } + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL GridColumn::getDataColumnIndex() throw(RuntimeException) + { + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); + return m_nDataColumnIndex; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setDataColumnIndex( ::sal_Int32 i_dataColumnIndex ) throw(RuntimeException) + { + impl_set( m_nDataColumnIndex, i_dataColumnIndex, "DataColumnIndex" ); + } + //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL GridColumn::getImplementationName( ) throw (RuntimeException) { diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index 4fbaddb3151b..a28fd5824160 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -73,6 +73,8 @@ public: virtual ::rtl::OUString SAL_CALL getHelpText() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setHelpText(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getIndex() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getDataColumnIndex() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDataColumnIndex( ::sal_Int32 i_dataColumnIndex ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::style::HorizontalAlignment SAL_CALL getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setHorizontalAlign(::com::sun::star::style::HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); @@ -119,6 +121,7 @@ private: ::com::sun::star::uno::Any m_aIdentifier; sal_Int32 m_nIndex; + sal_Int32 m_nDataColumnIndex; sal_Int32 m_nColumnWidth; sal_Int32 m_nPreferredWidth; sal_Int32 m_nMaxWidth; -- cgit From 6561e702dbc3fca4f01b3ceaf1f07aa1324043b8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 19 Jan 2011 12:39:41 +0100 Subject: gridsort: introduce XGridColumn::DataModelIndex. this allows for column removal/insertion at the GridColumnModel, without the need to touch the GridDataModel --- offapi/com/sun/star/awt/grid/XGridColumn.idl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index 8b0be51c309b..da3d5c8ade91 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -88,6 +88,20 @@ interface XGridColumn */ [attribute, readonly] long Index; + /** denotes the index of the data column which should be used to fetch this grid column's data + +

          A grid control has a column model and a data model, both containing a possibly different number of columns. + The DataColumnIndex attribute defines the index of the column within the data model, which should + be used to retrieve actual data.

          + +

          Using this, you can do runtime changes to the column model, i.e. insertion and removal of columns, without + necessarily needing to adjust the data model, too.

          + +

          If DataColumnIndex is negative, the it will be ignored, then the column's index within its + column model, as determined by the Index attribute, will be used.

          + */ + [attribute] long DataColumnIndex; + /** Adds a listener for the GridColumnEvent posted after the grid changes. @param Listener the listener to add. -- cgit From f308742dbe1238eb7ff020664af7515f12489217 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 12:52:07 +0100 Subject: accfixes: accessible name for preview bitmap --- fpicker/source/office/iodlg.cxx | 1 + fpicker/source/office/iodlg.hrc | 1 + fpicker/source/office/iodlg.src | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index b9d7fac3aa3b..0ab0f33db24f 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -3015,6 +3015,7 @@ void SvtFileDialog::AddControls_Impl( ) _pPrevBmp = new FixedBitmap( this, WinBits( WB_BORDER ) ); _pPrevBmp->SetBackground( Wallpaper( Color( COL_WHITE ) ) ); _pPrevBmp->Show(); + _pPrevBmp->SetAccessibleName(SvtResId(STR_PREVIEW)); } if ( _nExtraBits & SFX_EXTRA_AUTOEXTENSION ) diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc index b87082b56cbd..42b235ee31af 100644 --- a/fpicker/source/office/iodlg.hrc +++ b/fpicker/source/office/iodlg.hrc @@ -70,6 +70,7 @@ #define STR_PATHSELECT 5 #define STR_BUTTONSELECT 6 #define STR_ACTUALVERSION 7 +#define STR_PREVIEW 8 // DLG_SVT_QUERYFOLDERNAME ----------------------- diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src index da2d1cd926b6..2a460797fe56 100644 --- a/fpicker/source/office/iodlg.src +++ b/fpicker/source/office/iodlg.src @@ -251,6 +251,10 @@ ModalDialog DLG_SVT_EXPLORERFILE { Text [ en-US ] = "Current version"; }; + String STR_PREVIEW + { + Text [ en-US ] = "File Preview"; + }; }; // QueryFolderNameDialog ---------------------------------------------------------- -- cgit From 6e3b8dfd54a1c9de8a1dd273d2c7e12d6743a6d4 Mon Sep 17 00:00:00 2001 From: hde Date: Wed, 19 Jan 2011 13:00:47 +0100 Subject: #i116515#vcl118#moved testing of checkbox 'PrintReverse' from 'Global' to 'General' --- testautomation/global/required/includes/g_printing.inc | 4 ++-- testautomation/global/win/edia_p_s.win | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testautomation/global/required/includes/g_printing.inc b/testautomation/global/required/includes/g_printing.inc index 2d0bd716e551..cfffcc8395c5 100644 --- a/testautomation/global/required/includes/g_printing.inc +++ b/testautomation/global/required/includes/g_printing.inc @@ -172,7 +172,8 @@ testcase tPrintGeneral() else warnlog( "Pages setting disabled" ) endif - + + cb_test( PrintReverse, false, "" ) 'Selection.check() 'AllPages.check() @@ -485,7 +486,6 @@ testcase tPrintOptions() printlog( "Controls common for all applications" ) cb_test( PrintToFile, false, "" ) cb_test( PrintAsSingleJobs, false, "" ) - cb_test( PrintReverse, false, "" ) printlog( "Application specific controls" ) select case( gApplication ) diff --git a/testautomation/global/win/edia_p_s.win b/testautomation/global/win/edia_p_s.win index 7cd8e58ed94e..c985d6512cc2 100755 --- a/testautomation/global/win/edia_p_s.win +++ b/testautomation/global/win/edia_p_s.win @@ -150,6 +150,7 @@ PageCount .HelpID:vcl:PrintDialog:NumPagesText PartsToPrint .HelpID:vcl:PrintDialog:PageContentType:ListBox SlidesPerPage .HelpID:vcl:PrintDialog:SlidesPerPage:ListBox ArrangeSlides .HelpID:vcl:PrintDialog:SlidesPerPageOrder:ListBox +PrintReverse .HelpID:vcl:PrintDialog:OptPage:ToReverse *TabApplication .HelpID:vcl:PrintDialog:TabPage:AppPage PrintPageBackground .HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox @@ -197,7 +198,6 @@ BrochurePageSides .HelpID:vcl:PrintDialog:PrintProspectInclude:ListBox *TabOptions .HelpID:vcl:PrintDialog:OptPage PrintToFile .HelpID:vcl:PrintDialog:OptPage:ToFile PrintAsSingleJobs .HelpID:vcl:PrintDialog:OptPage:SingleJobs -PrintReverse .HelpID:vcl:PrintDialog:OptPage:ToReverse PaperTrayFromPrefs .HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox *PurchaseStarOffice sym:TAB_HID_LICENSING_DIALOG -- cgit From 9db12cc26aa41823a564fb5415202907ae8d4697 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 19 Jan 2011 15:20:30 +0100 Subject: gridsort: release our mutex before calling into the delegator (in particular for modifying calls, which trigger listener notifications) --- .../source/controls/grid/sortablegriddatamodel.cxx | 65 +++++++++++++++++----- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index 11ac5730042b..fc256ac1c079 100755 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -603,7 +603,9 @@ namespace toolkit MethodGuard aGuard( *this, rBHelper ); DBG_CHECK_ME(); - m_delegator->addRow( i_heading, i_data ); + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->addRow( i_heading, i_data ); } //------------------------------------------------------------------------------------------------------------------ @@ -612,7 +614,9 @@ namespace toolkit MethodGuard aGuard( *this, rBHelper ); DBG_CHECK_ME(); - m_delegator->addRows( i_headings, i_data ); + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->addRows( i_headings, i_data ); } //------------------------------------------------------------------------------------------------------------------ @@ -622,7 +626,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - m_delegator->removeRow( rowIndex ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->removeRow( rowIndex ); } //------------------------------------------------------------------------------------------------------------------ @@ -631,7 +638,9 @@ namespace toolkit MethodGuard aGuard( *this, rBHelper ); DBG_CHECK_ME(); - m_delegator->removeAllRows(); + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->removeAllRows(); } //------------------------------------------------------------------------------------------------------------------ @@ -641,7 +650,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - m_delegator->updateCellData( i_columnIndex, rowIndex, i_value ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->updateCellData( i_columnIndex, rowIndex, i_value ); } //------------------------------------------------------------------------------------------------------------------ @@ -651,7 +663,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - m_delegator->updateRowData( i_columnIndexes, rowIndex, i_values ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->updateRowData( i_columnIndexes, rowIndex, i_values ); } //------------------------------------------------------------------------------------------------------------------ @@ -661,7 +676,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - m_delegator->setRowHeading( rowIndex, i_heading ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->setRowHeading( rowIndex, i_heading ); } //------------------------------------------------------------------------------------------------------------------ @@ -671,7 +689,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - m_delegator->updateCellToolTip( i_columnIndex, rowIndex, i_value ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->updateCellToolTip( i_columnIndex, rowIndex, i_value ); } //------------------------------------------------------------------------------------------------------------------ @@ -681,7 +702,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - m_delegator->updateRowToolTip( rowIndex, i_value ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + delegator->updateRowToolTip( rowIndex, i_value ); } //------------------------------------------------------------------------------------------------------------------ @@ -702,7 +726,9 @@ namespace toolkit MethodGuard aGuard( *this, rBHelper ); DBG_CHECK_ME(); - return m_delegator->getRowCount(); + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + return delegator->getRowCount(); } //------------------------------------------------------------------------------------------------------------------ @@ -711,7 +737,9 @@ namespace toolkit MethodGuard aGuard( *this, rBHelper ); DBG_CHECK_ME(); - return m_delegator->getColumnCount(); + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + return delegator->getColumnCount(); } //------------------------------------------------------------------------------------------------------------------ @@ -721,7 +749,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - return m_delegator->getCellData( i_columnIndex, rowIndex ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + return delegator->getCellData( i_columnIndex, rowIndex ); } //------------------------------------------------------------------------------------------------------------------ @@ -731,7 +762,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - return m_delegator->getCellToolTip( i_columnIndex, rowIndex ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + return delegator->getCellToolTip( i_columnIndex, rowIndex ); } //------------------------------------------------------------------------------------------------------------------ @@ -741,7 +775,10 @@ namespace toolkit DBG_CHECK_ME(); ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex ); - return m_delegator->getRowHeading( rowIndex ); + + Reference< XMutableGridDataModel > const delegator( m_delegator ); + aGuard.clear(); + return delegator->getRowHeading( rowIndex ); } //------------------------------------------------------------------------------------------------------------------ -- cgit From 2319e97d11bc8e02c339c477055af94a38279cf2 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 19 Jan 2011 15:25:45 +0100 Subject: gridsort: document the relationship between soorting the data and notifying XGridDataListeners --- offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl index 3ed7c34e3254..dbe9cbc5f5cb 100755 --- a/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl @@ -40,7 +40,15 @@ module com { module sun { module star { module awt { module grid { */ interface XSortableMutableGridDataModel { + /** provides access to the basic functionality of a grid data model, plus functions to modify it. + */ interface XMutableGridDataModel; + + /** provides means to sort the data represented by the model. + +

          If you set a new column sort order, the implementation will notify the registered XGridDataListeners + via a call to its XGridDataListener::dataChanged method.

          + */ interface XSortableGridDataModel; }; -- cgit From 27be8d12e3a3d8b5b70741d6c6c470e78bd41f12 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 19 Jan 2011 16:33:54 +0100 Subject: vcl118: #i115048# revert brochure printing in writer to old behavior taking the paper size form the printer driver, add paper name to print preview --- editeng/source/items/paperinf.cxx | 46 +-------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index 270e188f146f..c91440427d8e 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -135,51 +135,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit ) String SvxPaperInfo::GetName( Paper ePaper ) { - USHORT nResId = 0; - - switch ( ePaper ) - { - case PAPER_A0: nResId = RID_SVXSTR_PAPER_A0; break; - case PAPER_A1: nResId = RID_SVXSTR_PAPER_A1; break; - case PAPER_A2: nResId = RID_SVXSTR_PAPER_A2; break; - case PAPER_A3: nResId = RID_SVXSTR_PAPER_A3; break; - case PAPER_A4: nResId = RID_SVXSTR_PAPER_A4; break; - case PAPER_A5: nResId = RID_SVXSTR_PAPER_A5; break; - case PAPER_B4_ISO: nResId = RID_SVXSTR_PAPER_B4_ISO; break; - case PAPER_B5_ISO: nResId = RID_SVXSTR_PAPER_B5_ISO; break; - case PAPER_LETTER: nResId = RID_SVXSTR_PAPER_LETTER; break; - case PAPER_LEGAL: nResId = RID_SVXSTR_PAPER_LEGAL; break; - case PAPER_TABLOID: nResId = RID_SVXSTR_PAPER_TABLOID; break; - case PAPER_USER: nResId = RID_SVXSTR_PAPER_USER; break; - case PAPER_B6_ISO: nResId = RID_SVXSTR_PAPER_B6_ISO; break; - case PAPER_ENV_C4: nResId = RID_SVXSTR_PAPER_C4; break; - case PAPER_ENV_C5: nResId = RID_SVXSTR_PAPER_C5; break; - case PAPER_ENV_C6: nResId = RID_SVXSTR_PAPER_C6; break; - case PAPER_ENV_C65: nResId = RID_SVXSTR_PAPER_C65; break; - case PAPER_ENV_DL: nResId = RID_SVXSTR_PAPER_DL; break; - case PAPER_SLIDE_DIA: nResId = RID_SVXSTR_PAPER_DIA; break; - case PAPER_SCREEN: nResId = RID_SVXSTR_PAPER_SCREEN; break; - case PAPER_C: nResId = RID_SVXSTR_PAPER_C; break; - case PAPER_D: nResId = RID_SVXSTR_PAPER_D; break; - case PAPER_E: nResId = RID_SVXSTR_PAPER_E; break; - case PAPER_EXECUTIVE: nResId = RID_SVXSTR_PAPER_EXECUTIVE;break; - case PAPER_FANFOLD_LEGAL_DE: nResId = RID_SVXSTR_PAPER_LEGAL2; break; - case PAPER_ENV_MONARCH: nResId = RID_SVXSTR_PAPER_MONARCH; break; - case PAPER_ENV_PERSONAL: nResId = RID_SVXSTR_PAPER_COM675; break; - case PAPER_ENV_9: nResId = RID_SVXSTR_PAPER_COM9; break; - case PAPER_ENV_10: nResId = RID_SVXSTR_PAPER_COM10; break; - case PAPER_ENV_11: nResId = RID_SVXSTR_PAPER_COM11; break; - case PAPER_ENV_12: nResId = RID_SVXSTR_PAPER_COM12; break; - case PAPER_KAI16: nResId = RID_SVXSTR_PAPER_KAI16; break; - case PAPER_KAI32: nResId = RID_SVXSTR_PAPER_KAI32; break; - case PAPER_KAI32BIG: nResId = RID_SVXSTR_PAPER_KAI32BIG; break; - case PAPER_B4_JIS: nResId = RID_SVXSTR_PAPER_B4_JIS; break; - case PAPER_B5_JIS: nResId = RID_SVXSTR_PAPER_B5_JIS; break; - case PAPER_B6_JIS: nResId = RID_SVXSTR_PAPER_B6_JIS; break; - default: DBG_ERRORFILE( "unknown papersize" ); - } - - return ( nResId > 0 ) ? String( EditResId( nResId ) ) : String(); + return String( Printer::GetPaperName( ePaper ) ); } -- cgit From cc01ab8a817f6badf4b9631097a43e0ea11d0f8a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 19 Jan 2011 16:33:54 +0100 Subject: vcl118: #i115048# revert brochure printing in writer to old behavior taking the paper size form the printer driver, add paper name to print preview --- vcl/inc/vcl/print.hxx | 3 +++ vcl/inc/vcl/prndlg.hxx | 4 +++- vcl/inc/vcl/svdata.hxx | 7 +++++-- vcl/inc/vcl/svids.hrc | 2 ++ vcl/source/app/svdata.cxx | 2 ++ vcl/source/gdi/print.cxx | 44 +++++++++++++++++++++++++++++++++++++++++ vcl/source/src/print.src | 45 ++++++++++++++++++++++++++++++++++++++++++ vcl/source/window/printdlg.cxx | 11 ++++++++++- 8 files changed, 114 insertions(+), 4 deletions(-) diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index 9d046269d7bc..1b5daffcdea0 100644 --- a/vcl/inc/vcl/print.hxx +++ b/vcl/inc/vcl/print.hxx @@ -340,6 +340,9 @@ public: BOOL SetPaperSizeUser( const Size& rSize ); BOOL SetPaperSizeUser( const Size& rSize, bool bMatchNearest ); Paper GetPaper() const; + static rtl::OUString GetPaperName( Paper ePaper ); + // return a UI string for the current paper; i_bPaperUser == false means an empty string for PAPER_USER + rtl::OUString GetPaperName( bool i_bPaperUser = true ) const; // returns number of available paper formats int GetPaperInfoCount() const; diff --git a/vcl/inc/vcl/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx index ddd387904fa6..39f326d6d089 100644 --- a/vcl/inc/vcl/prndlg.hxx +++ b/vcl/inc/vcl/prndlg.hxx @@ -73,7 +73,9 @@ namespace vcl virtual void Resize(); virtual void DataChanged( const DataChangedEvent& ); - void setPreview( const GDIMetaFile&, const Size&, const rtl::OUString&, + void setPreview( const GDIMetaFile&, const Size& i_rPaperSize, + const rtl::OUString& i_rPaperName, + const rtl::OUString& i_rNoPageString, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY, bool i_bGreyscale ); diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx index 035cd1eaccc7..72dd0fc22cda 100644 --- a/vcl/inc/vcl/svdata.hxx +++ b/vcl/inc/vcl/svdata.hxx @@ -43,6 +43,8 @@ #include "com/sun/star/uno/Reference.hxx" #include "unotools/options.hxx" +#include + namespace com { namespace sun { namespace star { @@ -365,14 +367,15 @@ struct ImplSVData com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient; ::vcl::SettingsConfigItem* mpSettingsConfigItem; std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList; + std::hash_map< int, rtl::OUString >* mpPaperNames; }; void ImplInitSVData(); void ImplDeInitSVData(); void ImplDestroySVData(); Window* ImplGetDefaultWindow(); -VCL_DLLPUBLIC ResMgr* ImplGetResMgr(); -VCL_DLLPUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr +VCL_PLUGIN_PUBLIC ResMgr* ImplGetResMgr(); +VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr DockingManager* ImplGetDockingManager(); void ImplWindowAutoMnemonic( Window* pWindow ); diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc index e05474a2b301..61622bcabade 100644 --- a/vcl/inc/vcl/svids.hrc +++ b/vcl/inc/vcl/svids.hrc @@ -58,6 +58,8 @@ #define SV_DISCLOSURE_PLUS_HC 1062 #define SV_DISCLOSURE_MINUS_HC 1063 +#define RID_STR_PAPERNAMES 1070 + #define SV_RESID_MENU_EDIT 2000 #define SV_MENU_EDIT_UNDO 1 #define SV_MENU_EDIT_CUT 2 diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 01647af81f7f..f0e1652cde17 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -179,6 +179,8 @@ void ImplDeInitSVData() delete pSVData->maCtrlData.mpFieldUnitStrings, pSVData->maCtrlData.mpFieldUnitStrings = NULL; if( pSVData->maCtrlData.mpCleanUnitStrings ) delete pSVData->maCtrlData.mpCleanUnitStrings, pSVData->maCtrlData.mpCleanUnitStrings = NULL; + if( pSVData->mpPaperNames ) + delete pSVData->mpPaperNames, pSVData->mpPaperNames = NULL; } // ----------------------------------------------------------------------- diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 78456992340f..fe01bd44f5d3 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -54,6 +55,7 @@ #include #include #include +#include #include @@ -1280,6 +1282,48 @@ int Printer::GetPaperInfoCount() const // ----------------------------------------------------------------------- +rtl::OUString Printer::GetPaperName( Paper ePaper ) +{ + ImplSVData* pSVData = ImplGetSVData(); + if( ! pSVData->mpPaperNames ) + { + pSVData->mpPaperNames = new std::hash_map< int, rtl::OUString >(); + if( ImplGetResMgr() ) + { + ResStringArray aPaperStrings( VclResId( RID_STR_PAPERNAMES ) ); + static const int PaperIndex[] = + { + PAPER_A0, PAPER_A1, PAPER_A2, PAPER_A3, PAPER_A4, PAPER_A5, + PAPER_B4_ISO, PAPER_B5_ISO, PAPER_LETTER, PAPER_LEGAL, PAPER_TABLOID, + PAPER_USER, PAPER_B6_ISO, PAPER_ENV_C4, PAPER_ENV_C5, PAPER_ENV_C6, PAPER_ENV_C65, + PAPER_ENV_DL, PAPER_SLIDE_DIA, PAPER_SCREEN, PAPER_C, PAPER_D, PAPER_E, + PAPER_EXECUTIVE, PAPER_FANFOLD_LEGAL_DE, PAPER_ENV_MONARCH, PAPER_ENV_PERSONAL, + PAPER_ENV_9, PAPER_ENV_10, PAPER_ENV_11, PAPER_ENV_12, PAPER_KAI16, + PAPER_KAI32, PAPER_KAI32BIG, PAPER_B4_JIS, PAPER_B5_JIS, PAPER_B6_JIS + }; + OSL_ENSURE( sal_uInt32(sizeof(PaperIndex)/sizeof(PaperIndex[0])) == aPaperStrings.Count(), "localized paper name count wrong" ); + for( int i = 0; i < int(sizeof(PaperIndex)/sizeof(PaperIndex[0])); i++ ) + (*pSVData->mpPaperNames)[PaperIndex[i]] = aPaperStrings.GetString(i); + } + } + + std::hash_map::const_iterator it = pSVData->mpPaperNames->find( (int)ePaper ); + return (it != pSVData->mpPaperNames->end()) ? it->second : rtl::OUString(); +} + +// ----------------------------------------------------------------------- + +rtl::OUString Printer::GetPaperName( bool i_bPaperUser ) const +{ + Size aPageSize = PixelToLogic( GetPaperSizePixel(), MAP_100TH_MM ); + Paper ePaper = ImplGetPaperFormat( aPageSize.Width(), aPageSize.Height() ); + if( ePaper == PAPER_USER ) + ePaper = ImplGetPaperFormat( aPageSize.Height(), aPageSize.Width() ); + return (ePaper != PAPER_USER || i_bPaperUser ) ? GetPaperName( ePaper ) : rtl::OUString(); +} + +// ----------------------------------------------------------------------- + const PaperInfo& Printer::GetPaperInfo( int nPaper ) const { if( ! mpInfoPrinter ) diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src index 48f8dc5612ef..f41e65f4939f 100644 --- a/vcl/source/src/print.src +++ b/vcl/source/src/print.src @@ -499,3 +499,48 @@ StringArray SV_PRINT_NATIVE_STRINGS < "Print selection only"; >; }; }; + +StringArray RID_STR_PAPERNAMES +{ + ItemList [en-US] = + { + < "A0"; >; + < "A1"; >; + < "A2"; >; + < "A3"; >; + < "A4"; >; + < "A5"; >; + < "B4 (ISO)"; >; + < "B5 (ISO)"; >; + < "Letter"; >; + < "Legal"; >; + < "Tabloid"; >; + < "User Defined"; >; + < "B6 (ISO)"; >; + < "C4 Envelope"; >; + < "C5 Envelope"; >; + < "C6 Envelope"; >; + < "C6/5 Envelope"; >; + < "DL Envelope"; >; + < "Dia Slide"; >; + < "Screen"; >; + < "C"; >; + < "D"; >; + < "E"; >; + < "Executive"; >; + < "Long Bond"; >; + < "#8 (Monarch) Envelope"; >; + < "#6 3/4 (Personal) Envelope"; >; + < "#9 Envelope"; >; + < "#10 Envelope"; >; + < "#11 Envelope"; >; + < "#12 Envelope"; >; + < "16 Kai"; >; + < "32 Kai"; >; + < "Big 32 Kai"; >; + < "B4 (JIS)"; >; + < "B5 (JIS)"; >; + < "B6 (JIS)"; >; + }; +}; + diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index cd9db93f1b2f..9d9376e4c8ab 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -310,6 +310,7 @@ void PrintDialog::PrintPreviewWindow::Command( const CommandEvent& rEvt ) void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPreview, const Size& i_rOrigSize, + const rtl::OUString& i_rPaperName, const rtl::OUString& i_rReplacement, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY, @@ -344,6 +345,12 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi String aNumText( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) ); aBuf.append( aNumText ); aBuf.appendAscii( eUnit == MAP_MM ? "mm" : "in" ); + if( i_rPaperName.getLength() ) + { + aBuf.appendAscii( " (" ); + aBuf.append( i_rPaperName ); + aBuf.append( sal_Unicode(')') ); + } maHorzDim.SetText( aBuf.makeStringAndClear() ); aNumText = rLocWrap.getNum( aLogicPaperSize.Height(), nDigits ); @@ -1891,7 +1898,9 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache ) } Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ); - maPreviewWindow.setPreview( aMtf, aCurPageSize, nPages > 0 ? rtl::OUString() : maNoPageStr, + maPreviewWindow.setPreview( aMtf, aCurPageSize, + aPrt->GetPaperName( false ), + nPages > 0 ? rtl::OUString() : maNoPageStr, aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY(), aPrt->GetPrinterOptions().IsConvertToGreyscales() ); -- cgit From ff16107d1cddab1ec78cffdbb4d6852db18e6be8 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 19 Jan 2011 16:33:54 +0100 Subject: vcl118: #i115048# revert brochure printing in writer to old behavior taking the paper size form the printer driver, add paper name to print preview --- sw/source/ui/uno/unotxdoc.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index b0b95657600c..4398de187871 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2897,6 +2897,9 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aTmpSize = pPrinter->LogicToLogic( aTmpSize, pPrinter->GetMapMode(), MapMode( MAP_100TH_MM )); aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() ); + #if 0 + // #i115048# it seems users didn't like getting double the formatted page size + // revert to "old" behavior scaling to the current paper size of the printer if (bPrintProspect) { // we just state what output size we would need @@ -2906,6 +2909,20 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ), TWIP_TO_MM100( aTmpSize.Height() )); } + #else + if( bPrintProspect ) + { + // just switch to an appropriate portrait/landscape format + // FIXME: brochure printing with landscape pages puts the + // pages next to each other, so landscape is currently always + // the better choice + if( aPageSize.Width < aPageSize.Height ) + { + aPreferredPageSize.Width = aPageSize.Height; + aPreferredPageSize.Height = aPageSize.Width; + } + } + #endif } } else -- cgit From ab645d9d6f0f7844fe64d490445313215b50f69b Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 18:15:46 +0100 Subject: accfixes: Completed VCL Window API for accessible releations, renamed GetLabeledBy to GetAccessibleRelationLabeledBy --- svtools/source/control/toolbarmenuacc.cxx | 2 +- svtools/source/control/valueacc.cxx | 2 +- toolkit/source/awt/vclxaccessiblecomponent.cxx | 4 +- vcl/inc/vcl/window.h | 18 +++++++ vcl/inc/vcl/window.hxx | 14 ++++- vcl/source/window/dlgctrl.cxx | 73 ++++++++++++++++++++++++-- vcl/source/window/window.cxx | 60 ++++++++++++++------- 7 files changed, 144 insertions(+), 29 deletions(-) diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 020467084748..d2111a9e8e1f 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -252,7 +252,7 @@ OUString SAL_CALL ToolbarMenuAcc::getAccessibleName() throw (RuntimeException) if( !aRet.getLength() ) { - Window* pLabel = mpParent->mrMenu.GetLabeledBy(); + Window* pLabel = mpParent->mrMenu.GetAccessibleRelationLabeledBy(); if( pLabel && pLabel != &mpParent->mrMenu ) aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); } diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 66da5636d89c..f94c474b5d57 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -317,7 +317,7 @@ sal_Int16 SAL_CALL ValueSetAcc::getAccessibleRole() if ( !aRet.Len() ) { - Window* pLabel = mpParent->GetLabeledBy(); + Window* pLabel = mpParent->GetAccessibleRelationLabeledBy(); if ( pLabel && pLabel != mpParent ) aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); } diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 175289d1ac84..83589537c62c 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -445,7 +445,7 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation Window* pWindow = GetWindow(); if ( pWindow ) { - Window *pLabeledBy = pWindow->GetLabeledBy(); + Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy(); if ( pLabeledBy && pLabeledBy != pWindow ) { uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); @@ -453,7 +453,7 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) ); } - Window* pLabelFor = pWindow->GetLabelFor(); + Window* pLabelFor = pWindow->GetAccessibleRelationLabelFor(); if ( pLabelFor && pLabelFor != pWindow ) { uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h index 73b6f1078ca9..ede8df9f8ac7 100644 --- a/vcl/inc/vcl/window.h +++ b/vcl/inc/vcl/window.h @@ -200,6 +200,24 @@ struct ImplFrameData BOOL mbInternalDragGestureRecognizer; }; +// ----------------------- +// - ImplAccessibleInfos - +// ----------------------- + +struct ImplAccessibleInfos +{ + USHORT nAccessibleRole; + String* pAccessibleName; + String* pAccessibleDescription; + Window* pLabeledByWindow; + Window* pLabelForWindow; + Window* pMemberOfWindow; + + ImplAccessibleInfos(); + ~ImplAccessibleInfos(); +}; + + // --------------- // - WindowImpl - // --------------- diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index fa136f6d514d..6a773d755a77 100755 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -1052,9 +1052,20 @@ public: void SetAccessibleDescription( const String& rDescr ); String GetAccessibleDescription() const; + void SetAccessibleRelationLabeledBy( Window* pLabeledBy ); + Window* GetAccessibleRelationLabeledBy() const; + + void SetAccessibleRelationLabelFor( Window* pLabelFor ); + Window* GetAccessibleRelationLabelFor() const; + + void SetAccessibleRelationMemberOf( Window* pMemberOf ); + Window* GetAccessibleRelationMemberOf() const; + + // to avoid sending accessibility events in cases like closing dialogs // by default checks complete parent path BOOL IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath = TRUE ); + void SetAccessibilityEventsSuppressed(BOOL bSuppressed); /// request XCanvas render interface for this window ::com::sun::star::uno::Reference< @@ -1079,8 +1090,7 @@ public: BOOL IsCreatedWithToolkit() const; void SetCreatedWithToolkit( BOOL b ); - Window* GetLabelFor() const; - Window* GetLabeledBy() const; + // Deprecated - can use SetAccessibleRelationLabelFor/By nowadys virtual Window* GetParentLabelFor( const Window* pLabel ) const; virtual Window* GetParentLabeledBy( const Window* pLabeled ) const; KeyEvent GetActivationKey() const; diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 055b7e9fe80b..faef1b7ba208 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -1120,11 +1120,15 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window return pWindow; } -Window* Window::GetLabelFor() const +Window* Window::GetAccessibleRelationLabelFor() const { if ( mpWindowImpl->mbDisableAccessibleLabelForRelation ) return NULL; + if ( mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabelForWindow ) + return mpWindowImpl->mpAccessibleInfos->pLabelForWindow; + + Window* pWindow = NULL; Window* pFrameWindow = ImplGetFrameWindow(); @@ -1205,11 +1209,14 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo return pWindow; } -Window* Window::GetLabeledBy() const +Window* Window::GetAccessibleRelationLabeledBy() const { if ( mpWindowImpl->mbDisableAccessibleLabeledByRelation ) return NULL; + if ( mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabeledByWindow ) + return mpWindowImpl->mpAccessibleInfos->pLabeledByWindow; + Window* pWindow = NULL; Window* pFrameWindow = ImplGetFrameWindow(); @@ -1238,6 +1245,62 @@ Window* Window::GetLabeledBy() const return pWindow; } +Window* Window::GetAccessibleRelationMemberOf() const +{ + Window* pWindow = NULL; + Window* pFrameWindow = GetParent(); + if ( !pFrameWindow ) + { + pFrameWindow = ImplGetFrameWindow(); + } + // if( ! ( GetType() == WINDOW_FIXEDTEXT || + if( !( GetType() == WINDOW_FIXEDLINE || + GetType() == WINDOW_GROUPBOX ) ) + { + // search for a control that makes member of this window + // it is considered the last fixed line or group box + // that comes before this control; with the exception of push buttons + // which are labeled only if the fixed line or group box + // is directly before the control + // get form start and form end and index of this control + USHORT nIndex, nFormStart, nFormEnd; + Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow, + const_cast(this), + nIndex, + nFormStart, + nFormEnd ); + if( pSWindow && nIndex != nFormStart ) + { + if( GetType() == WINDOW_PUSHBUTTON || + GetType() == WINDOW_HELPBUTTON || + GetType() == WINDOW_OKBUTTON || + GetType() == WINDOW_CANCELBUTTON ) + { + nFormStart = nIndex-1; + } + for( USHORT nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- ) + { + USHORT nFoundIndex = 0; + pSWindow = ::ImplGetChildWindow( pFrameWindow, + nSearchIndex, + nFoundIndex, + FALSE ); + if( pSWindow && pSWindow->IsVisible() && + ( pSWindow->GetType() == WINDOW_FIXEDLINE || + pSWindow->GetType() == WINDOW_GROUPBOX ) ) + { + pWindow = pSWindow; + break; + } + if( nFoundIndex > nSearchIndex || nSearchIndex == 0 ) + break; + } + } + } + return pWindow; +} +//-----IAccessibility2 Implementation 2009 + // ----------------------------------------------------------------------- KeyEvent Window::GetActivationKey() const @@ -1247,7 +1310,7 @@ KeyEvent Window::GetActivationKey() const sal_Unicode nAccel = getAccel( GetText() ); if( ! nAccel ) { - Window* pWindow = GetLabeledBy(); + Window* pWindow = GetAccessibleRelationLabeledBy(); if( pWindow ) nAccel = getAccel( pWindow->GetText() ); } @@ -1260,6 +1323,10 @@ KeyEvent Window::GetActivationKey() const nCode = KEY_A + (nAccel-'A'); else if( nAccel >= '0' && nAccel <= '9' ) nCode = KEY_0 + (nAccel-'0'); + else if( nAccel == '.' ) + nCode = KEY_POINT; + else if( nAccel == '-' ) + nCode = KEY_SUBTRACT; KeyCode aKeyCode( nCode, FALSE, FALSE, TRUE, FALSE ); aKeyEvent = KeyEvent( nAccel, aKeyCode ); } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index fe2af486c53a..c80415ca974f 100755 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -136,25 +136,21 @@ struct ImplCalcToTopData Region* mpInvalidateRegion; }; -struct ImplAccessibleInfos +ImplAccessibleInfos::ImplAccessibleInfos() { - USHORT nAccessibleRole; - String* pAccessibleName; - String* pAccessibleDescription; - - ImplAccessibleInfos() - { - nAccessibleRole = 0xFFFF; - pAccessibleName = NULL; - pAccessibleDescription = NULL; - } + nAccessibleRole = 0xFFFF; + pAccessibleName = NULL; + pAccessibleDescription = NULL; + pLabeledByWindow = NULL; + pLabelForWindow = NULL; + pMemberOfWindow = NULL; +} - ~ImplAccessibleInfos() - { - delete pAccessibleName; - delete pAccessibleDescription; - } -}; +ImplAccessibleInfos::~ImplAccessibleInfos() +{ + delete pAccessibleName; + delete pAccessibleDescription; +} // ----------------------------------------------------------------------- @@ -8066,7 +8062,7 @@ void Window::SetText( const XubString& rStr ) // name change. if ( IsReallyVisible() ) { - Window* pWindow = GetLabelFor(); + Window* pWindow = GetAccessibleRelationLabelFor(); if ( pWindow && pWindow != this ) pWindow->ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldTitle ); } @@ -9140,7 +9136,7 @@ void Window::SetAccessibleName( const String& rName ) if ( !mpWindowImpl->mpAccessibleInfos ) mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; - DBG_ASSERT( !mpWindowImpl->mpAccessibleInfos->pAccessibleName, "AccessibleName already set!" ); + DBG_ASSERT( !mpWindowImpl->mpAccessibleInfos->pAccessibleName || !rName.Len(), "AccessibleName already set!" ); delete mpWindowImpl->mpAccessibleInfos->pAccessibleName; mpWindowImpl->mpAccessibleInfos->pAccessibleName = new String( rName ); } @@ -9183,7 +9179,7 @@ String Window::GetAccessibleName() const case WINDOW_TREELISTBOX: { - Window *pLabel = GetLabeledBy(); + Window *pLabel = GetAccessibleRelationLabeledBy(); if ( pLabel && pLabel != this ) aAccessibleName = pLabel->GetText(); } @@ -9242,6 +9238,26 @@ String Window::GetAccessibleDescription() const return aAccessibleDescription; } +void Window::SetAccessibleRelationLabeledBy( Window* pLabeledBy ) +{ + if ( !mpWindowImpl->mpAccessibleInfos ) + mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; + mpWindowImpl->mpAccessibleInfos->pLabeledByWindow = pLabeledBy; +} + +void Window::SetAccessibleRelationLabelFor( Window* pLabelFor ) +{ + if ( !mpWindowImpl->mpAccessibleInfos ) + mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; + mpWindowImpl->mpAccessibleInfos->pLabelForWindow = pLabelFor; +} + +void Window::SetAccessibleRelationMemberOf( Window* pMemberOfWin ) +{ + if ( !mpWindowImpl->mpAccessibleInfos ) + mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; + mpWindowImpl->mpAccessibleInfos->pMemberOfWindow = pMemberOfWin; +} BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath ) { if( !bTraverseParentPath ) @@ -9259,6 +9275,10 @@ BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath ) return FALSE; } } +void Window::SetAccessibilityEventsSuppressed(BOOL bSuppressed) +{ + mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed; +} void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect ) { -- cgit From 44b9d8a5a479fc2dcf2518bf091ef0677eac7243 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 18:32:22 +0100 Subject: added some accessible releations in extensions/source/dbpilots/groupboxwiz --- extensions/source/dbpilots/groupboxwiz.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 9956cfe86428..69d8835dcdd5 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -238,6 +238,9 @@ namespace dbp m_aExistingRadios.EnableMultiSelection(sal_True); getDialog()->defaultButton(&m_aMoveRight); + + m_aExistingRadios.SetAccessibleRelationMemberOf(&m_aExistingRadios); + m_aExistingRadios.SetAccessibleRelationLabeledBy(&m_aExistingRadiosLabel); } //--------------------------------------------------------------------- @@ -368,6 +371,8 @@ namespace dbp announceControls(m_aDefSelYes, m_aDefSelNo, m_aDefSelection); m_aDefSelection.SetDropDownLineCount(10); + m_aDefSelection.SetAccessibleRelationLabeledBy( &m_aDefSelYes ); + m_aDefSelection.SetAccessibleRelationMemberOf(&m_aDefaultSelectionLabel); } //--------------------------------------------------------------------- @@ -418,6 +423,9 @@ namespace dbp FreeResource(); m_aOptions.SetSelectHdl(LINK(this, OOptionValuesPage, OnOptionSelected)); + + m_aOptions.SetAccessibleRelationMemberOf(&m_aOptions); + m_aOptions.SetAccessibleRelationLabeledBy(&m_aOptionsLabel); } //--------------------------------------------------------------------- -- cgit From 5b3e910e926c7dd1e8dcfe8e0a5c6cb5bd17480a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 19 Jan 2011 18:35:45 +0100 Subject: vcl118: #i115048# clean up, paper names are now in vcl and can be accessed with Printer::GetPaperName --- editeng/inc/editeng/editrids.hrc | 39 ----------- editeng/source/items/page.src | 148 --------------------------------------- 2 files changed, 187 deletions(-) diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc index dcef661d01b8..209d284a7fde 100644 --- a/editeng/inc/editeng/editrids.hrc +++ b/editeng/inc/editeng/editrids.hrc @@ -240,45 +240,6 @@ #define RID_SVXITEMS_WEIGHT_ULTRABOLD (RID_EDIT_START + 167) #define RID_SVXITEMS_WEIGHT_BLACK (RID_EDIT_START + 168) -// paper formats -#define RID_SVXSTR_PAPER_A0 (RID_SVX_START + 169) -#define RID_SVXSTR_PAPER_A1 (RID_SVX_START + 170) -#define RID_SVXSTR_PAPER_A2 (RID_SVX_START + 171) -#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 172) -#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 173) -#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 174) -#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 175) -#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 176) -#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 177) -#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 178) -#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 179) -#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 180) -#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 181) -#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 182) -#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 183) -#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 184) -#define RID_SVXSTR_PAPER_C65 (RID_SVX_START + 185) -#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 186) -#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 187) -#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 188) -#define RID_SVXSTR_PAPER_C (RID_SVX_START + 189) -#define RID_SVXSTR_PAPER_D (RID_SVX_START + 190) -#define RID_SVXSTR_PAPER_E (RID_SVX_START + 191) -#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 192) -#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 193) -#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 194) -#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 195) -#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 196) -#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 197) -#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 198) -#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 199) -#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 200) -#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 201) -#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 202) -#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 203) -#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 204) -#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 205) - // enum FontItalic ------------------------------------------------------- #define RID_SVXITEMS_ITALIC_BEGIN (RID_EDIT_START + 206) #define RID_SVXITEMS_ITALIC_NONE (RID_EDIT_START + 206) diff --git a/editeng/source/items/page.src b/editeng/source/items/page.src index 9fe7f3013ce6..c528dc8b0bd0 100644 --- a/editeng/source/items/page.src +++ b/editeng/source/items/page.src @@ -29,154 +29,6 @@ #include -String RID_SVXSTR_PAPER_A0 -{ - Text = "A0" ; -}; -String RID_SVXSTR_PAPER_A1 -{ - Text = "A1" ; -}; -String RID_SVXSTR_PAPER_A2 -{ - Text = "A2" ; -}; -String RID_SVXSTR_PAPER_A3 -{ - Text = "A3" ; -}; -String RID_SVXSTR_PAPER_A4 -{ - Text = "A4" ; -}; -String RID_SVXSTR_PAPER_A5 -{ - Text = "A5" ; -}; -String RID_SVXSTR_PAPER_B4_ISO -{ - Text = "B4 (ISO)" ; -}; -String RID_SVXSTR_PAPER_B5_ISO -{ - Text = "B5 (ISO)" ; -}; -String RID_SVXSTR_PAPER_LETTER -{ - Text = "Letter" ; -}; -String RID_SVXSTR_PAPER_LEGAL -{ - Text = "Legal" ; -}; -String RID_SVXSTR_PAPER_TABLOID -{ - Text = "Tabloid" ; -}; -String RID_SVXSTR_PAPER_USER -{ - Text [ en-US ] = "User Defined" ; -}; -String RID_SVXSTR_PAPER_B6_ISO -{ - Text = "B6 (ISO)" ; -}; -String RID_SVXSTR_PAPER_C4 -{ - Text = "C4 Envelope" ; -}; -String RID_SVXSTR_PAPER_C5 -{ - Text = "C5 Envelope" ; -}; -String RID_SVXSTR_PAPER_C6 -{ - Text = "C6 Envelope" ; -}; -String RID_SVXSTR_PAPER_C65 -{ - Text = "C6/5 Envelope" ; -}; -String RID_SVXSTR_PAPER_DL -{ - Text = "DL Envelope" ; -}; -String RID_SVXSTR_PAPER_DIA -{ - Text = "Dia Slide" ; -}; -String RID_SVXSTR_PAPER_SCREEN -{ - Text [ en-US ] = "Screen" ; -}; -String RID_SVXSTR_PAPER_C -{ - Text = "C" ; -}; -String RID_SVXSTR_PAPER_D -{ - Text = "D" ; -}; -String RID_SVXSTR_PAPER_E -{ - Text = "E" ; -}; -String RID_SVXSTR_PAPER_EXECUTIVE -{ - Text = "Executive" ; -}; -String RID_SVXSTR_PAPER_LEGAL2 -{ - Text = "Long Bond" ; -}; -String RID_SVXSTR_PAPER_MONARCH -{ - Text = "#8 (Monarch) Envelope" ; -}; -String RID_SVXSTR_PAPER_COM675 -{ - Text = "#6 3/4 (Personal) Envelope" ; -}; -String RID_SVXSTR_PAPER_COM9 -{ - Text = "#9 Envelope" ; -}; -String RID_SVXSTR_PAPER_COM10 -{ - Text = "#10 Envelope" ; -}; -String RID_SVXSTR_PAPER_COM11 -{ - Text = "#11 Envelope" ; -}; -String RID_SVXSTR_PAPER_COM12 -{ - Text = "#12 Envelope" ; -}; -String RID_SVXSTR_PAPER_KAI16 -{ - Text = "16 Kai" ; -}; -String RID_SVXSTR_PAPER_KAI32 -{ - Text = "32 Kai" ; -}; -String RID_SVXSTR_PAPER_KAI32BIG -{ - Text = "Big 32 Kai" ; -}; -String RID_SVXSTR_PAPER_B4_JIS -{ - Text = "B4 (JIS)" ; -}; -String RID_SVXSTR_PAPER_B5_JIS -{ - Text = "B5 (JIS)" ; -}; -String RID_SVXSTR_PAPER_B6_JIS -{ - Text = "B6 (JIS)" ; -}; String RID_SVXSTR_PAPERBIN { Text [ en-US ] = "Paper tray" ; -- cgit From 77d00ed549cad84fe32134fd828b041060cbab50 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 18:37:55 +0100 Subject: added some accessible names and releations in PDFImport dialog and XML Settings dialog --- filter/source/pdf/impdialog.cxx | 14 ++++++++++++-- filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 2 ++ filter/source/xsltdialog/xmlfiltersettingsdialog.hrc | 2 +- filter/source/xsltdialog/xmlfiltersettingsdialog.src | 5 +++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 1adbbc63619c..3023c32c81eb 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -473,6 +473,10 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent, aNewPos.Y() -= nDelta; maCbEmbedStandardFonts.SetPosPixel( aNewPos ); } + + maEdPages.SetAccessibleName(maRbRange.GetText()); + maEdPages.SetAccessibleRelationLabeledBy(&maRbRange); + maCbExportEmptyPages.SetStyle( maCbExportEmptyPages.GetStyle() | WB_VCENTER ); } @@ -658,7 +662,8 @@ SfxTabPage* ImpPDFTabGeneralPage::Create( Window* pParent, IMPL_LINK( ImpPDFTabGeneralPage, TogglePagesHdl, void*, EMPTYARG ) { maEdPages.Enable( maRbRange.IsChecked() ); - maEdPages.SetReadOnly( !maRbRange.IsChecked() ); + //Sym2_5805, When the control is disabled, it is also readonly. So here, it is not necessary to set it as readonly. + //maEdPages.SetReadOnly( !maRbRange.IsChecked() ); return 0; } @@ -695,7 +700,8 @@ IMPL_LINK( ImpPDFTabGeneralPage, ToggleAddStreamHdl, void*, EMPTYARG ) maRbRange.Enable( FALSE ); maRbSelection.Enable( FALSE ); maEdPages.Enable( FALSE ); - maEdPages.SetReadOnly( TRUE ); + //Sym2_5805, When the control is disabled, it is also readonly. So here, it is not necessary to set it as readonly. + //maEdPages.SetReadOnly( TRUE ); maRbAll.Enable( FALSE ); } else @@ -788,6 +794,8 @@ ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage( Window* pParent, maRbMagnFitWidth.SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) ); maRbMagnFitVisible.SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) ); maRbMagnZoom.SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) ); + maNumZoom.SetAccessibleName(maRbMagnZoom.GetText()); + maNumZoom.SetAccessibleRelationLabeledBy(&maRbMagnZoom); } // ----------------------------------------------------------------------------- @@ -951,6 +959,8 @@ ImpPDFTabViewerPage::ImpPDFTabViewerPage( Window* pParent, FreeResource(); maRbAllBookmarkLevels.SetToggleHdl( LINK( this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl ) ); maRbVisibleBookmarkLevels.SetToggleHdl( LINK( this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl ) ); + maNumBookmarkLevels.SetAccessibleName(maRbVisibleBookmarkLevels.GetText()); + maNumBookmarkLevels.SetAccessibleRelationLabeledBy(&maRbVisibleBookmarkLevels); } // ----------------------------------------------------------------------------- diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 9334c892028e..35214a7b80aa 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -91,6 +91,8 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResM mpFilterListBox->SetSelectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) ); mpFilterListBox->SetDeselectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) ); mpFilterListBox->SetDoubleClickHdl( LINK( this, XMLFilterSettingsDialog, DoubleClickHdl_Impl ) ); + mpFilterListBox->SetAccessibleName(String( RESID( STR_XML_FILTER_LISTBOX ))); + maCtrlFilterList.SetAccessibleName(String( RESID( STR_XML_FILTER_LISTBOX ))); mpFilterListBox->SetHelpId( HID_XML_FILTER_LIST ); maPBNew.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) ); diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc b/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc index 48ed1a2a4ee7..d611e2d1a824 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc @@ -39,5 +39,5 @@ #define PB_XML_FILTER_OPEN 7 #define BTN_XML_FILTER_HELP 8 #define PB_XML_FILTER_CLOSE 9 - +#define STR_XML_FILTER_LISTBOX 10 #endif diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.src b/filter/source/xsltdialog/xmlfiltersettingsdialog.src index b80dff3bfe50..deb15d18627d 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.src +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.src @@ -126,6 +126,11 @@ WorkWindow DLG_XML_FILTER_SETTINGS_DIALOG }; +String STR_XML_FILTER_LISTBOX +{ + Text [ en-US ] = "XML Filter List"; +}; + -- cgit From 6d63514eff7730b53907758980389abb0c9d469f Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 18:42:37 +0100 Subject: added some accessible names in BasicIDE --- basctl/source/basicide/baside2b.cxx | 10 +++++++--- basctl/source/basicide/objdlg.cxx | 4 +++- basctl/source/basicide/objdlg.hrc | 2 ++ basctl/source/basicide/objdlg.src | 6 ++++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 68cdbe9ad9ed..8464cd8b9cab 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1183,6 +1183,9 @@ WatchWindow::WatchWindow( Window* pParent ) : | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ), aHeaderBar( this, WB_BUTTONSTYLE | WB_BORDER ) { + aXEdit.SetAccessibleName(String(IDEResId( RID_STR_WATCHNAME))); + aTreeListBox.SetAccessibleName(String(IDEResId(RID_STR_WATCHNAME))); + nVirtToolBoxHeight = aXEdit.GetSizePixel().Height() + 7; nHeaderBarHeight = 16; @@ -1521,11 +1524,12 @@ StackWindow::StackWindow( Window* pParent ) : aGotoCallButton( this, IDEResId( RID_IMGBTN_GOTOCALL ) ), aStackStr( IDEResId( RID_STR_STACK ) ) { - aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST); + aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST); + aTreeListBox.SetAccessibleName(String( IDEResId(RID_STR_STACKNAME))); aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) ); aTreeListBox.SetHighlightRange(); - aTreeListBox.SetSelectionMode( NO_SELECTION ); - aTreeListBox.InsertEntry( String(), 0, FALSE, LIST_APPEND ); + aTreeListBox.SetSelectionMode( NO_SELECTION ); + aTreeListBox.InsertEntry( String(), 0, FALSE, LIST_APPEND ); aTreeListBox.Show(); SetText( String( IDEResId( RID_STR_STACKNAME ) ) ); diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx index 82030adfccee..e32148d2deff 100644 --- a/basctl/source/basicide/objdlg.cxx +++ b/basctl/source/basicide/objdlg.cxx @@ -108,8 +108,10 @@ ObjectCatalog::ObjectCatalog( Window * pParent ) WB_HSCROLL ); aMacroTreeList.SetSelectHdl( LINK( this, ObjectCatalog, TreeListHighlightHdl ) ); - + aMacroTreeList.SetAccessibleName(String(IDEResId(RID_STR_TLB_MACROS))); aMacroTreeList.ScanAllEntries(); + aMacroTreeList.GrabFocus(); + CheckButtons(); Point aPos = IDE_DLL()->GetExtraData()->GetObjectCatalogPos(); diff --git a/basctl/source/basicide/objdlg.hrc b/basctl/source/basicide/objdlg.hrc index 930ab31a4ae8..a090d45fc6e9 100644 --- a/basctl/source/basicide/objdlg.hrc +++ b/basctl/source/basicide/objdlg.hrc @@ -37,4 +37,6 @@ #define TBITEM_SHOW 1 +#define RID_STR_TLB_MACROS ( RID_BASICIDE_START + 71 ) + #endif // _OBJDLG_HXX diff --git a/basctl/source/basicide/objdlg.src b/basctl/source/basicide/objdlg.src index 2d7981dd1c28..1331be5a992c 100644 --- a/basctl/source/basicide/objdlg.src +++ b/basctl/source/basicide/objdlg.src @@ -92,3 +92,9 @@ FloatingWindow RID_BASICIDE_OBJCAT Size = MAP_APPFONT ( 185 , 18 ) ; }; }; + +String RID_STR_TLB_MACROS +{ + Text [ en-US ] = "Objects Tree"; +}; + -- cgit From 5f153ecded340480ce432640f2e22e71f2ab15e7 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 18:44:39 +0100 Subject: fixed tab order in BasicIDE, Library dialog tab page --- basctl/source/basicide/moduldl2.cxx | 2 +- basctl/source/basicide/moduldlg.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 35bc94e24fca..85ce443925f3 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -498,9 +498,9 @@ LibPage::LibPage( Window * pParent ) ,aEditButton( this, IDEResId( RID_PB_EDIT ) ) ,aCloseButton( this, IDEResId( RID_PB_CLOSE ) ) ,aPasswordButton( this, IDEResId( RID_PB_PASSWORD ) ) - ,aExportButton( this, IDEResId( RID_PB_EXPORT ) ) ,aNewLibButton( this, IDEResId( RID_PB_NEWLIB ) ) ,aInsertLibButton( this, IDEResId( RID_PB_APPEND ) ) + ,aExportButton( this, IDEResId( RID_PB_EXPORT ) ) ,aDelButton( this, IDEResId( RID_PB_DELETE ) ) ,m_aCurDocument( ScriptDocument::getApplicationScriptDocument() ) ,m_eCurLocation( LIBRARY_LOCATION_UNKNOWN ) diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index f9efa779357e..d83089517512 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -229,9 +229,9 @@ protected: PushButton aEditButton; CancelButton aCloseButton; PushButton aPasswordButton; - PushButton aExportButton; PushButton aNewLibButton; PushButton aInsertLibButton; + PushButton aExportButton; PushButton aDelButton; ScriptDocument m_aCurDocument; -- cgit From 824728abf8b278fbba9aad340390be8268ab005e Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 19:06:48 +0100 Subject: accfixes: fixed tab order --- formula/source/ui/dlg/parawin.cxx | 24 ++++++++++++------------ formula/source/ui/dlg/parawin.hxx | 26 +++++++++++++------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 5e656aea0967..7263236b30b1 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -56,24 +56,24 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos): aFtArgName ( this, ModuleRes( FT_PARNAME ) ), aFtArgDesc ( this, ModuleRes( FT_PARDESC ) ), + aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ), aFtArg1 ( this, ModuleRes( FT_ARG1 ) ), - aFtArg2 ( this, ModuleRes( FT_ARG2 ) ), - aFtArg3 ( this, ModuleRes( FT_ARG3 ) ), - aFtArg4 ( this, ModuleRes( FT_ARG4 ) ), + aEdArg1 ( this, ModuleRes( ED_ARG1 ) ), + aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ), - aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ), aBtnFx2 ( this, ModuleRes( BTN_FX2 ) ), - aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ), - aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ), - - aEdArg1 ( this, ModuleRes( ED_ARG1 ) ), + aFtArg2 ( this, ModuleRes( FT_ARG2 ) ), aEdArg2 ( this, ModuleRes( ED_ARG2 ) ), - aEdArg3 ( this, ModuleRes( ED_ARG3 ) ), - aEdArg4 ( this, ModuleRes( ED_ARG4 ) ), - - aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ), aRefBtn2 ( this, ModuleRes( RB_ARG2 ) ), + + aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ), + aFtArg3 ( this, ModuleRes( FT_ARG3 ) ), + aEdArg3 ( this, ModuleRes( ED_ARG3 ) ), aRefBtn3 ( this, ModuleRes( RB_ARG3 ) ), + + aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ), + aFtArg4 ( this, ModuleRes( FT_ARG4 ) ), + aEdArg4 ( this, ModuleRes( ED_ARG4 ) ), aRefBtn4 ( this, ModuleRes( RB_ARG4 ) ), aSlider ( this, ModuleRes( WND_SLIDER ) ), diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index bfaebccdca09..effaa3abb9c0 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -68,25 +68,25 @@ private: FixedText aFtArgName; FixedInfo aFtArgDesc; + ImageButton aBtnFx1; FixedText aFtArg1; - FixedText aFtArg2; - FixedText aFtArg3; - FixedText aFtArg4; + ArgEdit aEdArg1; + RefButton aRefBtn1; - ImageButton aBtnFx1; ImageButton aBtnFx2; - ImageButton aBtnFx3; - ImageButton aBtnFx4; - - ArgEdit aEdArg1; + FixedText aFtArg2; ArgEdit aEdArg2; + RefButton aRefBtn2; + + ImageButton aBtnFx3; + FixedText aFtArg3; ArgEdit aEdArg3; - ArgEdit aEdArg4; + RefButton aRefBtn3; - RefButton aRefBtn1; - RefButton aRefBtn2; - RefButton aRefBtn3; - RefButton aRefBtn4; + ImageButton aBtnFx4; + FixedText aFtArg4; + ArgEdit aEdArg4; + RefButton aRefBtn4; ScrollBar aSlider; String m_sOptional; -- cgit From 5983e2391c1cd2f95e72d89687170b158430041c Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 19:07:50 +0100 Subject: accfixes: added more accessibility information --- formula/source/ui/dlg/formula.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 0a971e94e5b6..9842d4c29157 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -313,6 +313,11 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent aRefBtn.Hide(); pMEdit = aMEFormula.GetEdit(); + //IAccessibility2 Implementation 2009----- + aMEFormula.SetAccessibleName(aFtFormula.GetText()); + if (pMEdit) + pMEdit->SetAccessibleName(aFtFormula.GetText()); + //-----IAccessibility2 Implementation 2009 m_aEditHelpId = pMEdit->GetHelpId(); pMEdit->SetUniqueId( m_aEditHelpId ); -- cgit From 3f195d1684cba759adce69bc4b3c53d6cb9adf23 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 19:12:11 +0100 Subject: accfixes: Introduced WINDOW_RULER --- svtools/source/control/ruler.cxx | 1 + tools/inc/tools/wintypes.hxx | 3 ++- vcl/source/window/window.cxx | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index bdbcd253c198..fc49e653d74f 100755 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -303,6 +303,7 @@ void Ruler::ImplInit( WinBits nWinBits ) else aDefSize.Width() = nDefHeight; SetOutputSizePixel( aDefSize ); + SetType(WINDOW_RULER); } // ----------------------------------------------------------------------- diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 9c7052e22d77..abbec6b1d280 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -117,7 +117,8 @@ typedef USHORT WindowType; #define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4f) #define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x50) #define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x51) -#define WINDOW_LAST (WINDOW_DOCKINGAREA) +#define WINDOW_RULER (WINDOW_FIRST + 0x52) +#define WINDOW_LAST (WINDOW_RULER) // --------------- diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index c80415ca974f..94fa4a89302b 100755 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -9110,6 +9110,7 @@ USHORT Window::GetAccessibleRole() const case WINDOW_HELPTEXTWINDOW: nRole = accessibility::AccessibleRole::TOOL_TIP; break; + case WINDOW_RULER: nRole = accessibility::AccessibleRole::RULER; break; case WINDOW_WINDOW: case WINDOW_CONTROL: case WINDOW_BORDERWINDOW: -- cgit From 09b062f89ab5c86dd49d392e2c98e927c29704d6 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Thu, 20 Jan 2011 10:18:08 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in chart --- .../controller/dialogs/ChartTypeDialogController.cxx | 2 ++ chart2/source/controller/dialogs/Strings.src | 9 +++++++++ chart2/source/controller/dialogs/res_BarGeometry.cxx | 2 ++ chart2/source/controller/dialogs/res_LegendPosition.cxx | 17 +++++++++++++++-- chart2/source/controller/dialogs/res_LegendPosition.hxx | 5 ++++- chart2/source/controller/dialogs/res_TextSeparator.cxx | 3 +++ .../source/controller/dialogs/tp_3D_SceneAppearance.cxx | 2 +- .../source/controller/dialogs/tp_3D_SceneAppearance.hxx | 2 +- .../source/controller/dialogs/tp_3D_SceneGeometry.cxx | 2 ++ .../controller/dialogs/tp_3D_SceneIllumination.cxx | 9 +++++++++ .../controller/dialogs/tp_3D_SceneIllumination.hrc | 4 +++- .../controller/dialogs/tp_3D_SceneIllumination.src | 5 +++++ chart2/source/controller/dialogs/tp_AxisPositions.cxx | 4 ++++ chart2/source/controller/dialogs/tp_ChartType.cxx | 11 ++++++++--- chart2/source/controller/dialogs/tp_DataSource.cxx | 2 ++ chart2/source/controller/dialogs/tp_LegendPosition.cxx | 1 + chart2/source/inc/Strings.hrc | 4 ++++ 17 files changed, 75 insertions(+), 9 deletions(-) diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 5e8bd7336b86..4f52f7f23220 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -1173,6 +1173,8 @@ void CombiColumnLineChartDialogController::showExtraControls( Window* pParent, c m_pFT_NumberOfLines->Show(); m_pMF_NumberOfLines->Show(); + m_pMF_NumberOfLines->SetAccessibleName(m_pFT_NumberOfLines->GetText()); + m_pMF_NumberOfLines->SetAccessibleRelationLabeledBy(m_pFT_NumberOfLines); } void CombiColumnLineChartDialogController::hideExtraControls() const { diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src index 4b4cec65426e..5e936b7863d3 100644 --- a/chart2/source/controller/dialogs/Strings.src +++ b/chart2/source/controller/dialogs/Strings.src @@ -101,6 +101,15 @@ String STR_PAGE_POSITION Text [ en-US ] = "Position" ; }; +String STR_BUTTON_UP +{ + Text [ en-US ] = "Up"; +}; +String STR_BUTTON_DOWN +{ + Text [ en-US ] = "Down"; +}; + String STR_PAGE_LAYOUT { Text [ en-US ] = "Layout"; diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx b/chart2/source/controller/dialogs/res_BarGeometry.cxx index f2c31fe461a9..a4a6faa21167 100644 --- a/chart2/source/controller/dialogs/res_BarGeometry.cxx +++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx @@ -48,6 +48,8 @@ BarGeometryResources::BarGeometryResources( Window* pWindow ) { m_aFT_Geometry.SetText( String( SchResId( STR_BAR_GEOMETRY )) ); m_aFT_Geometry.SetSizePixel( m_aFT_Geometry.CalcMinimumSize() ); + m_aLB_Geometry.SetAccessibleName(m_aFT_Geometry.GetText()); + m_aLB_Geometry.SetAccessibleRelationLabeledBy(&m_aFT_Geometry); } void BarGeometryResources::SetPosPixel( const Point& rPosition ) { diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index c9206a5428df..605b04d4348c 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -61,8 +61,8 @@ LegendPositionResources::LegendPositionResources( Window* pWindow ) : m_xCC() //unused in this scenario , m_aCbxShow( pWindow ) //unused in this scenario , m_aRbtLeft( pWindow, SchResId(RBT_LEFT) ) - , m_aRbtTop( pWindow, SchResId(RBT_TOP) ) , m_aRbtRight( pWindow, SchResId(RBT_RIGHT) ) + , m_aRbtTop( pWindow, SchResId(RBT_TOP) ) , m_aRbtBottom( pWindow, SchResId(RBT_BOTTOM) ) { m_aCbxShow.Check();//legend is assumed to be visible in this scenario @@ -73,12 +73,17 @@ LegendPositionResources::LegendPositionResources( Window* pWindow, const uno::Re : m_xCC( xCC ) , m_aCbxShow( pWindow, SchResId(CBX_SHOWLEGEND) ) , m_aRbtLeft( pWindow, SchResId(RBT_LEFT) ) - , m_aRbtTop( pWindow, SchResId(RBT_TOP) ) , m_aRbtRight( pWindow, SchResId(RBT_RIGHT) ) + , m_aRbtTop( pWindow, SchResId(RBT_TOP) ) , m_aRbtBottom( pWindow, SchResId(RBT_BOTTOM) ) { m_aCbxShow.SetToggleHdl( LINK( this, LegendPositionResources, PositionEnableHdl ) ); impl_setRadioButtonToggleHdl(); + m_aCbxShow.SetAccessibleRelationMemberOf(&m_aCbxShow); + m_aRbtLeft.SetAccessibleRelationMemberOf(&m_aCbxShow); + m_aRbtRight.SetAccessibleRelationMemberOf(&m_aCbxShow); + m_aRbtTop.SetAccessibleRelationMemberOf(&m_aCbxShow); + m_aRbtBottom.SetAccessibleRelationMemberOf(&m_aCbxShow); } void LegendPositionResources::impl_setRadioButtonToggleHdl() @@ -259,6 +264,14 @@ void LegendPositionResources::SetChangeHdl( const Link& rLink ) m_aChangeLink = rLink; } +void LegendPositionResources::SetAccessibleRelationMemberOf(Window* pMemberOf) +{ + m_aRbtLeft.SetAccessibleRelationMemberOf(pMemberOf); + m_aRbtRight.SetAccessibleRelationMemberOf(pMemberOf); + m_aRbtTop.SetAccessibleRelationMemberOf(pMemberOf); + m_aRbtBottom.SetAccessibleRelationMemberOf(pMemberOf); +} + //............................................................................. } //namespace chart //............................................................................. diff --git a/chart2/source/controller/dialogs/res_LegendPosition.hxx b/chart2/source/controller/dialogs/res_LegendPosition.hxx index ee0ac5a7601c..a4809df97239 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.hxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.hxx @@ -44,6 +44,7 @@ namespace chart class LegendPositionResources { + public: //constructor without Display checkbox LegendPositionResources( Window* pParent ); @@ -66,6 +67,8 @@ public: DECL_LINK( PositionEnableHdl, void* ); DECL_LINK( PositionChangeHdl, RadioButton* ); + void SetAccessibleRelationMemberOf(Window* pMemberOf); //IAccessibility2 Implementation 2009----- + private: void impl_setRadioButtonToggleHdl(); @@ -76,8 +79,8 @@ private: CheckBox m_aCbxShow; RadioButton m_aRbtLeft; - RadioButton m_aRbtTop; RadioButton m_aRbtRight; + RadioButton m_aRbtTop; RadioButton m_aRbtBottom; Link m_aChangeLink; diff --git a/chart2/source/controller/dialogs/res_TextSeparator.cxx b/chart2/source/controller/dialogs/res_TextSeparator.cxx index 45efd2f5e5b3..aeb25a662533 100644 --- a/chart2/source/controller/dialogs/res_TextSeparator.cxx +++ b/chart2/source/controller/dialogs/res_TextSeparator.cxx @@ -59,6 +59,9 @@ TextSeparatorResources::TextSeparatorResources( Window* pWindow ) m_aEntryMap[ C2U( ", " ) ] = 1; m_aEntryMap[ C2U( "; " ) ] = 2; m_aEntryMap[ C2U( "\n" ) ] = 3; + + m_aLB_Separator.SetAccessibleName(m_aFT_Separator.GetText()); + m_aLB_Separator.SetAccessibleRelationLabeledBy(&m_aFT_Separator); } TextSeparatorResources::~TextSeparatorResources() { diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx index 6b3b63495126..0b91aff256bf 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx @@ -110,9 +110,9 @@ ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage( , m_aFT_Scheme ( this, SchResId( FT_SCHEME ) ) , m_aLB_Scheme ( this, SchResId( LB_SCHEME ) ) , m_aFL_Seperator ( this, SchResId( FL_SEPERATOR ) ) - , m_aCB_RoundedEdge ( this, SchResId( CB_ROUNDEDEDGE ) ) , m_aCB_Shading ( this, SchResId( CB_SHADING ) ) , m_aCB_ObjectLines ( this, SchResId( CB_OBJECTLINES ) ) + , m_aCB_RoundedEdge ( this, SchResId( CB_ROUNDEDEDGE ) ) , m_bUpdateOtherControls( true ) , m_bCommitToModel( true ) , m_rControllerLockHelper( rControllerLockHelper ) diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx index 252c5c21669b..0e119d959c66 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx @@ -82,9 +82,9 @@ private: FixedLine m_aFL_Seperator; - CheckBox m_aCB_RoundedEdge; CheckBox m_aCB_Shading; CheckBox m_aCB_ObjectLines; + CheckBox m_aCB_RoundedEdge; bool m_bUpdateOtherControls; bool m_bCommitToModel; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index 39175695a48b..464138973c20 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -162,6 +162,8 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( Window* pWindow { m_aCbxRightAngledAxes.Enable(false); } + m_aMFPerspective.SetAccessibleName(m_aCbxPerspective.GetText()); + m_aMFPerspective.SetAccessibleRelationLabeledBy(&m_aCbxPerspective); } ThreeD_SceneGeometry_TabPage::~ThreeD_SceneGeometry_TabPage() diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 25b379481b7e..b14583d094d4 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -357,6 +357,15 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage( Window* pWin //m_aDelyedModelChangeTimer.SetTimeout( 4*EDIT_UPDATEDATA_TIMEOUT ); m_aModelChangeListener.startListening( uno::Reference< util::XModifyBroadcaster >(m_xSceneProperties, uno::UNO_QUERY) ); + m_aBtn_Light1.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light2.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light3.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light4.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light5.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light6.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light7.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light8.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aCtl_Preview.SetAccessibleName(String(SchResId( STR_LIGHT_PREVIEW ))); } ThreeD_SceneIllumination_TabPage::~ThreeD_SceneIllumination_TabPage() diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc index e2d031955867..f5ae0dcda267 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc @@ -42,5 +42,7 @@ #define BTN_LIGHT_6 8 #define BTN_LIGHT_7 9 #define BTN_LIGHT_8 10 - +//IAccessibility2 Implementation 2009----- +#define STR_LIGHT_PREVIEW 6000 +//-----IAccessibility2 Implementation 2009 #define CTL_LIGHT_PREVIEW 1 diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src index 0b052f4d00c6..cf5898af8c85 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src @@ -173,3 +173,8 @@ TabPage TP_3D_SCENEILLUMINATION }; }; +String STR_LIGHT_PREVIEW +{ + Text [ en-US ] = "Light Preview" ; +}; + diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index ab4e36ff1f84..0d4ce8731133 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -222,6 +222,10 @@ AxisPositionsTabPage::AxisPositionsTabPage(Window* pWindow,const SfxItemSet& rIn m_aLB_PlaceLabels.SetSelectHdl( LINK( this, AxisPositionsTabPage, PlaceLabelsSelectHdl ) ); m_aLB_PlaceLabels.SetDropDownLineCount( m_aLB_PlaceLabels.GetEntryCount() ); m_aLB_PlaceTicks.SetDropDownLineCount( m_aLB_PlaceTicks.GetEntryCount() ); + m_aCB_TicksInner.SetAccessibleRelationLabeledBy(&m_aFT_Major); + m_aCB_TicksOuter.SetAccessibleRelationLabeledBy(&m_aFT_Major); + m_aCB_MinorInner.SetAccessibleRelationLabeledBy(&m_aFT_Minor); + m_aCB_MinorOuter.SetAccessibleRelationLabeledBy(&m_aFT_Minor); } SfxTabPage* AxisPositionsTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs) diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index ec6c1d2a1c10..a0ad7a82f0cd 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -189,6 +189,8 @@ Dim3DLookResourceGroup::Dim3DLookResourceGroup( Window* pWindow ) m_aLB_Scheme.SetDropDownLineCount(2); m_aLB_Scheme.SetSelectHdl( LINK( this, Dim3DLookResourceGroup, SelectSchemeHdl ) ); + m_aLB_Scheme.SetAccessibleName(m_aCB_3DLook.GetText()); + m_aLB_Scheme.SetAccessibleRelationLabeledBy(&m_aCB_3DLook); } Dim3DLookResourceGroup::~Dim3DLookResourceGroup() { @@ -344,6 +346,9 @@ StackingResourceGroup::StackingResourceGroup( Window* pWindow ) m_aRB_Stack_Y.SetToggleHdl( LINK( this, StackingResourceGroup, StackingChangeHdl ) ); m_aRB_Stack_Y_Percent.SetToggleHdl( LINK( this, StackingResourceGroup, StackingChangeHdl ) ); m_aRB_Stack_Z.SetToggleHdl( LINK( this, StackingResourceGroup, StackingChangeHdl ) ); + m_aRB_Stack_Y.SetAccessibleRelationMemberOf(&m_aCB_Stacked); + m_aRB_Stack_Y_Percent.SetAccessibleRelationMemberOf(&m_aCB_Stacked); + m_aRB_Stack_Z.SetAccessibleRelationMemberOf(&m_aCB_Stacked); } StackingResourceGroup::~StackingResourceGroup() { @@ -472,9 +477,9 @@ private: MetricField m_aMF_SplineOrder; FixedLine m_aFL_DialogButtons; + HelpButton m_aBP_Help; OKButton m_aBP_OK; CancelButton m_aBP_Cancel; - HelpButton m_aBP_Help; }; SplinePropertiesDialog::SplinePropertiesDialog( Window* pParent ) @@ -487,9 +492,9 @@ SplinePropertiesDialog::SplinePropertiesDialog( Window* pParent ) , m_aFT_SplineOrder( this, SchResId( FT_SPLINE_ORDER ) ) , m_aMF_SplineOrder( this, SchResId( MF_SPLINE_ORDER ) ) , m_aFL_DialogButtons( this, SchResId( FL_SPLINE_DIALOGBUTTONS ) ) + , m_aBP_Help( this, SchResId(BTN_HELP) ) , m_aBP_OK( this, SchResId(BTN_OK) ) - , m_aBP_Cancel( this, SchResId(BTN_CANCEL) ) - , m_aBP_Help( this, SchResId(BTN_HELP) ) + , m_aBP_Cancel( this, SchResId(BTN_CANCEL) ) { FreeResource(); diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 70a478ea8c39..a46de14339a0 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -359,6 +359,8 @@ DataSourceTabPage::DataSourceTabPage( if( m_apLB_SERIES->First()) m_apLB_SERIES->Select( m_apLB_SERIES->First()); m_apLB_SERIES->GrabFocus(); + m_aBTN_UP.SetAccessibleName(String(SchResId(STR_BUTTON_UP))); + m_aBTN_DOWN.SetAccessibleName(String(SchResId(STR_BUTTON_DOWN))); } DataSourceTabPage::~DataSourceTabPage() diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index e3d23366a820..20f31e3e7aa6 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -51,6 +51,7 @@ SchLegendPosTabPage::SchLegendPosTabPage(Window* pWindow, , m_aFtTextDirection( this, SchResId( FT_LEGEND_TEXTDIR ) ) , m_aLbTextDirection( this, SchResId( LB_LEGEND_TEXTDIR ), &m_aFlTextOrient, &m_aFtTextDirection ) { + m_apLegendPositionResources->SetAccessibleRelationMemberOf(&aGrpLegend); FreeResource(); } diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc index 47ed75e80a9a..95c34dde76e7 100644 --- a/chart2/source/inc/Strings.hrc +++ b/chart2/source/inc/Strings.hrc @@ -341,6 +341,10 @@ #define STR_TEXT_DIRECTION_RTL (RID_APP_START + 279) #define STR_TEXT_DIRECTION_SUPER (RID_APP_START + 280) +//IAccessibility2 Implementation 2009----- +#define STR_BUTTON_UP (RID_APP_START + 500) +#define STR_BUTTON_DOWN (RID_APP_START + 501) +//-----IAccessibility2 Implementation 2009 //----------------------------------------------------------------------------- /* ////#define STR_DIAGRAM_X_AXIS (RID_APP_START + 34) -- cgit From 2a23ff5f014e266c24c39f862815edbd7fddb724 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 20 Jan 2011 10:22:28 +0100 Subject: sb139: #i116530# improve Java URP bridge error notification by utilizing the java.lang.Throwable cause facility --- .../lib/uno/bridges/java_remote/java_remote_bridge.java | 15 ++++++++------- .../sun/star/lib/uno/environments/remote/IThreadPool.java | 6 +++--- .../sun/star/lib/uno/environments/remote/JobQueue.java | 9 ++++++--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java index e37273be6902..221870b0b035 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java @@ -155,7 +155,7 @@ public class java_remote_bridge new Job(obj, java_remote_bridge.this, msg)); } } catch (Throwable e) { - dispose(new DisposedException(e.toString())); + dispose(e); } } @@ -478,12 +478,12 @@ public class java_remote_bridge dispose = _life_count <= 0; } if (dispose) { - dispose(new com.sun.star.uno.RuntimeException("end of life")); + dispose(new Throwable("end of life")); } } public void dispose() { - dispose(new com.sun.star.uno.RuntimeException("user dispose")); + dispose(new Throwable("user dispose")); } private void dispose(Throwable throwable) { @@ -604,7 +604,8 @@ public class java_remote_bridge _iProtocol.writeReply(exception, threadId, result); } catch (IOException e) { dispose(e); - throw new DisposedException("unexpected " + e); + throw (DisposedException) + (new DisposedException("unexpected " + e).initCause(e)); } catch (RuntimeException e) { dispose(e); throw e; @@ -633,9 +634,9 @@ public class java_remote_bridge oid, TypeDescription.getTypeDescription(type), operation, threadId, params); } catch (IOException e) { - DisposedException d = new DisposedException(e.toString()); - dispose(d); - throw d; + dispose(e); + throw (DisposedException) + new DisposedException(e.toString()).initCause(e); } if (sync && Thread.currentThread() != _messageDispatcher) { result = _iThreadPool.enter(handle, threadId); diff --git a/jurt/com/sun/star/lib/uno/environments/remote/IThreadPool.java b/jurt/com/sun/star/lib/uno/environments/remote/IThreadPool.java index c70ccfa7e934..71961737fd55 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/IThreadPool.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/IThreadPool.java @@ -110,10 +110,10 @@ public interface IThreadPool { /** * Disposes this thread pool, thus releasing - * all threads by throwing the given - * Throwable. + * all threads by throwing a DisposedException with the given + * Throwable cause. *

          - * @param throwing the Throwable + * @param throwing the cause */ public void dispose(Throwable throwable); diff --git a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java index f7568a30cef7..62e49cc44f16 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java @@ -27,6 +27,7 @@ package com.sun.star.lib.uno.environments.remote; +import com.sun.star.lang.DisposedException; /** * The JobQueue implements a queue for jobs. @@ -200,7 +201,7 @@ public class JobQueue { * @return a job or null if timed out * @param waitTime the maximum amount of time to wait for a job */ - private Job removeJob(int waitTime) throws Throwable { + private Job removeJob(int waitTime) { if(DEBUG) System.err.println("##### " + getClass().getName() + ".removeJob:" + _head + " " + _threadId); Job job = null; @@ -210,7 +211,8 @@ public class JobQueue { while(_head == null && (waitTime == 0 || !waited)) { if(_doDispose == _disposeId) { _doDispose = null; - throw _throwable; + throw (DisposedException) + new DisposedException().initCause(_throwable); } // notify sync queues @@ -250,7 +252,8 @@ public class JobQueue { if(_doDispose == _disposeId) { _doDispose = null; - throw _throwable; + throw (DisposedException) + new DisposedException().initCause(_throwable); } try { -- cgit From 0c514ad4f653c63702b55a1e3c6f8e725a549079 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Thu, 20 Jan 2011 12:21:31 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) --- cui/source/customize/cfg.cxx | 12 +++++++ cui/source/customize/cfg.hrc | 5 +++ cui/source/customize/cfg.src | 8 +++++ cui/source/dialogs/commonlingui.cxx | 1 + cui/source/dialogs/cuigaldlg.cxx | 13 ++++++-- cui/source/dialogs/cuigrfflt.cxx | 10 ++++-- cui/source/dialogs/gallery.src | 17 ++++++++++ cui/source/dialogs/hldocntp.cxx | 3 ++ cui/source/dialogs/hldoctp.cxx | 4 +++ cui/source/dialogs/hlinettp.cxx | 11 +++++-- cui/source/dialogs/hlmailtp.cxx | 3 ++ cui/source/dialogs/hlmarkwn.cxx | 3 ++ cui/source/dialogs/hlmarkwn.hrc | 3 ++ cui/source/dialogs/hlmarkwn.src | 19 +++--------- cui/source/dialogs/hltpbase.cxx | 3 ++ cui/source/dialogs/insdlg.cxx | 23 ++++++++------ cui/source/dialogs/linkdlg.cxx | 28 ++++++++++------- cui/source/dialogs/multipat.cxx | 3 ++ cui/source/dialogs/pastedlg.cxx | 4 ++- cui/source/dialogs/postdlg.cxx | 4 +++ cui/source/dialogs/splitcelldlg.cxx | 4 +-- cui/source/dialogs/zoom.cxx | 8 +++++ cui/source/inc/backgrnd.hxx | 25 +++++++-------- cui/source/inc/cuigaldlg.hxx | 6 ++-- cui/source/inc/cuigrfflt.hxx | 10 +++--- cui/source/inc/cuitabline.hxx | 10 +++--- cui/source/inc/gallery.hrc | 8 +++++ cui/source/inc/hlinettp.hxx | 4 +-- cui/source/inc/insdlg.hxx | 13 ++++---- cui/source/inc/linkdlg.hxx | 20 ++++++------ cui/source/inc/numfmt.hxx | 7 ++--- cui/source/inc/optdict.hxx | 4 +-- cui/source/inc/page.hxx | 2 +- cui/source/inc/paragrph.hxx | 10 +++--- cui/source/inc/pastedlg.hxx | 2 +- cui/source/inc/splitcelldlg.hxx | 4 +-- cui/source/inc/tabstpge.hxx | 7 ++--- cui/source/options/optdict.cxx | 10 ++++-- cui/source/options/optlingu.cxx | 7 +++++ cui/source/options/optlingu.hrc | 6 +++- cui/source/options/optlingu.src | 13 ++++++++ cui/source/options/treeopt.cxx | 2 ++ cui/source/tabpages/align.cxx | 4 +++ cui/source/tabpages/autocdlg.cxx | 27 ++++++++++++++++ cui/source/tabpages/autocdlg.hrc | 12 +++++++ cui/source/tabpages/autocdlg.src | 40 ++++++++++++++++++++++++ cui/source/tabpages/backgrnd.cxx | 35 +++++++++++++-------- cui/source/tabpages/connect.cxx | 3 ++ cui/source/tabpages/grfpage.cxx | 2 ++ cui/source/tabpages/measure.cxx | 4 +++ cui/source/tabpages/numfmt.cxx | 21 ++++++++----- cui/source/tabpages/numpages.cxx | 9 ++++++ cui/source/tabpages/page.cxx | 6 ++-- cui/source/tabpages/paragrph.cxx | 22 ++++++++++--- cui/source/tabpages/paragrph.hrc | 4 +++ cui/source/tabpages/paragrph.src | 43 +++++-------------------- cui/source/tabpages/tabarea.hrc | 4 +++ cui/source/tabpages/tabarea.src | 62 +++++-------------------------------- cui/source/tabpages/tabline.hrc | 26 +++++++++++++++- cui/source/tabpages/tabline.src | 52 +++++++++++++++++++++++++++++++ cui/source/tabpages/tabstpge.cxx | 23 ++++++++++++-- cui/source/tabpages/tabstpge.hrc | 3 ++ cui/source/tabpages/tabstpge.src | 39 +++-------------------- cui/source/tabpages/textanim.cxx | 18 +++++++++++ cui/source/tabpages/textattr.cxx | 2 ++ cui/source/tabpages/tparea.cxx | 20 +++++++++++- cui/source/tabpages/tpbitmap.cxx | 11 +++++++ cui/source/tabpages/tpcolor.cxx | 11 +++++++ cui/source/tabpages/tpgradnt.cxx | 10 ++++++ cui/source/tabpages/tphatch.cxx | 10 ++++++ cui/source/tabpages/tpline.cxx | 21 ++++++++++--- cui/source/tabpages/tplnedef.cxx | 13 ++++++++ cui/source/tabpages/tplneend.cxx | 3 ++ cui/source/tabpages/tpshadow.cxx | 4 ++- cui/source/tabpages/transfrm.cxx | 9 ++++++ 75 files changed, 658 insertions(+), 274 deletions(-) diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 858564af4e40..6c6c0dec33a6 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1667,6 +1667,15 @@ SvxConfigPage::SvxConfigPage( aDescriptionField.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); aDescriptionField.SetAutoScroll( TRUE ); aDescriptionField.EnableCursor( FALSE ); + + aMoveUpButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_UP))); + aMoveDownButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_DOWN))); + aMoveUpButton.SetAccessibleRelationMemberOf(&aContentsSeparator); + aMoveDownButton.SetAccessibleRelationMemberOf(&aContentsSeparator); + aNewTopLevelButton.SetAccessibleRelationMemberOf(&aTopLevelSeparator); + aModifyTopLevelButton.SetAccessibleRelationMemberOf(&aTopLevelSeparator); + aAddCommandsButton.SetAccessibleRelationMemberOf(&aContentsSeparator); + aModifyCommandButton.SetAccessibleRelationMemberOf(&aContentsSeparator); } SvxConfigPage::~SvxConfigPage() @@ -2925,6 +2934,9 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( LINK( this, SvxMainMenuOrganizerDialog, MoveHdl) ); aMoveDownButton.SetClickHdl ( LINK( this, SvxMainMenuOrganizerDialog, MoveHdl) ); + + aMoveUpButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_UP))); + aMoveDownButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_DOWN))); } IMPL_LINK(SvxMainMenuOrganizerDialog, ModifyHdl, Edit*, pEdit) diff --git a/cui/source/customize/cfg.hrc b/cui/source/customize/cfg.hrc index 74d7804dce8e..302f226623a3 100644 --- a/cui/source/customize/cfg.hrc +++ b/cui/source/customize/cfg.hrc @@ -103,3 +103,8 @@ #define EDT_ADDR (121 + CFG_OFFSET) #define MD_BTN_OK (122 + CFG_OFFSET) #define FI_INFO (123 + CFG_OFFSET) + +//IAccessibility2 Implementation 2009----- +#define BUTTON_STR_UP (130 + CFG_OFFSET) +#define BUTTON_STR_DOWN (131 + CFG_OFFSET) +//-----IAccessibility2 Implementation 2009 diff --git a/cui/source/customize/cfg.src b/cui/source/customize/cfg.src index 743aa7009fbc..66ac237a523b 100644 --- a/cui/source/customize/cfg.src +++ b/cui/source/customize/cfg.src @@ -888,4 +888,12 @@ String RID_SVXSTR_RENAME_TOOLBAR Text [ en-US ] = "Rename Toolbar"; }; +String BUTTON_STR_UP +{ + Text [ en-US ] = "Up"; +}; +String BUTTON_STR_DOWN +{ + Text [ en-US ] = "Down"; +}; diff --git a/cui/source/dialogs/commonlingui.cxx b/cui/source/dialogs/commonlingui.cxx index 327ffd4cbc17..115630b86b68 100644 --- a/cui/source/dialogs/commonlingui.cxx +++ b/cui/source/dialogs/commonlingui.cxx @@ -109,6 +109,7 @@ SvxCommonLinguisticControl::SvxCommonLinguisticControl( ModalDialog* _pParent ) SetType( WINDOW_TABPAGE ); #endif + aAktWord.SetAccessibleName(aWordText.GetText()); SetPosSizePixel( Point( 0, 0 ), _pParent->GetOutputSizePixel() ); Show(); } diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 4acfe2b8eec7..fa95cfeaa1d1 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -662,6 +662,10 @@ TPGalleryThemeGeneral::TPGalleryThemeGeneral( Window* pParent, const SfxItemSet& aFtMSShowChangeDate ( this, CUI_RES( FT_MS_SHOW_CHANGEDATE ) ) { FreeResource(); + + aEdtMSName.SetAccessibleName(GAL_RESID(RID_SVXSTR_GALLERY_THEMENAME)); + aFiMSImage.SetAccessibleName(GAL_RESID(RID_SVXSTR_GALLERY_THEMENAME)); + aEdtMSName.SetAccessibleRelationLabeledBy( &aFiMSImage ); } // ------------------------------------------------------------------------ @@ -748,13 +752,13 @@ SfxTabPage* TPGalleryThemeGeneral::Create( Window* pParent, const SfxItemSet& rS TPGalleryThemeProperties::TPGalleryThemeProperties( Window* pWindow, const SfxItemSet& rSet ) : SfxTabPage ( pWindow, CUI_RES( RID_SVXTABPAGE_GALLERYTHEME_FILES ), rSet ), + aFtFileType ( this, CUI_RES(FT_FILETYPE ) ), + aCbbFileType ( this, CUI_RES(CBB_FILETYPE ) ), + aLbxFound ( this, CUI_RES(LBX_FOUND ) ), aBtnSearch ( this, CUI_RES(BTN_SEARCH ) ), aBtnTake ( this, CUI_RES(BTN_TAKE ) ), aBtnTakeAll ( this, CUI_RES(BTN_TAKEALL ) ), aCbxPreview ( this, CUI_RES(CBX_PREVIEW ) ), - aCbbFileType ( this, CUI_RES(CBB_FILETYPE ) ), - aLbxFound ( this, CUI_RES(LBX_FOUND ) ), - aFtFileType ( this, CUI_RES(FT_FILETYPE ) ), aWndPreview ( this, CUI_RES( WND_BRSPRV ) ), nCurFilterPos (0), nFirstExtFilterPos (0), @@ -766,6 +770,9 @@ TPGalleryThemeProperties::TPGalleryThemeProperties( Window* pWindow, const SfxIt FreeResource(); xDialogListener->SetDialogClosedLink( LINK( this, TPGalleryThemeProperties, DialogClosedHdl ) ); + aLbxFound.SetAccessibleName(GAL_RESID(RID_SVXSTR_GALLERY_FILESFOUND)); + aWndPreview.SetAccessibleName(aCbxPreview.GetText()); + aLbxFound.SetAccessibleRelationLabeledBy(&aLbxFound); } // ------------------------------------------------------------------------ diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 8bbbfb5f8df2..27c4ec085f6b 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -369,10 +369,10 @@ GraphicFilterDialog::GraphicFilterDialog( Window* pParent, const ResId& rResId, mfScaleY ( 0.0 ), maSizePixel ( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ), maPreview ( this, CUI_RES( CTL_PREVIEW ) ), - maFlParameter ( this, CUI_RES( FL_PARAMETER ) ), maBtnOK ( this, CUI_RES( BTN_OK ) ), maBtnCancel ( this, CUI_RES( BTN_CANCEL ) ), - maBtnHelp ( this, CUI_RES( BTN_HELP ) ) + maBtnHelp ( this, CUI_RES( BTN_HELP ) ), + maFlParameter ( this, CUI_RES( FL_PARAMETER ) ) { const Size aPreviewSize( maPreview.GetOutputSizePixel() ); Size aGrfSize( maSizePixel ); @@ -468,6 +468,12 @@ GraphicFilterMosaic::GraphicFilterMosaic( Window* pParent, const Graphic& rGraph maCbxEdges.SetToggleHdl( GetModifyHdl() ); maMtrWidth.GrabFocus(); + + maFtWidth.SetAccessibleRelationMemberOf(&maFlParameter); + maMtrWidth.SetAccessibleRelationMemberOf(&maFlParameter); + maFtHeight.SetAccessibleRelationMemberOf(&maFlParameter); + maMtrHeight.SetAccessibleRelationMemberOf(&maFlParameter); + maCbxEdges.SetAccessibleRelationMemberOf(&maFlParameter); } // ----------------------------------------------------------------------------- diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index f8d035528c71..b40edf359d32 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -464,6 +464,23 @@ String RID_SVXSTR_GALLERY_ID_EXISTS { Text [ en-US ] = "This ID already exists..." ; }; +String RID_SVXSTR_GALLERY_THEMEITEMS +{ + Text [ en-US ] = "Theme Items"; +}; +String RID_SVXSTR_GALLERY_THEMENAME +{ + Text [ en-US ] = "Theme Name"; +}; +String RID_SVXSTR_GALLERY_FILESFOUND +{ + Text [ en-US ] = "Files Found"; +}; +String RID_SVXSTR_GALLERY_PREVIEW +{ + Text [ en-US ] = "Preview"; +}; + /******************************************************************************/ diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 1015063b05e3..e58ee6847e59 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -142,6 +142,9 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& maBtCreate.SetClickHdl ( LINK ( this, SvxHyperlinkNewDocTp, ClickNewHdl_Impl ) ); + maBtCreate.SetAccessibleRelationMemberOf( &maGrpNewDoc ); + maBtCreate.SetAccessibleRelationLabeledBy( &maFtPath ); + FillDocumentList (); } diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index a87d7710f484..de980ea2879d 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -90,6 +90,10 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemS maCbbPath.SetLoseFocusHdl( LINK ( this, SvxHyperlinkDocTp, LostFocusPathHdl_Impl ) ); + maBtBrowse.SetAccessibleRelationMemberOf( &maGrpTarget ); + maBtBrowse.SetAccessibleRelationLabeledBy( &maFtTarget ); + maBtFileopen.SetAccessibleRelationMemberOf( &maGrpDocument ); + maBtFileopen.SetAccessibleRelationLabeledBy( &maFtPath ); maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) ); } diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 79fde6c7a64c..f1ebbeffc9d7 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -61,13 +61,13 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maRbtLinktypTelnet ( this, CUI_RES (RB_LINKTYP_TELNET) ), maFtTarget ( this, CUI_RES (FT_TARGET_HTML) ), maCbbTarget ( this, INET_PROT_HTTP ), + maBtBrowse ( this, CUI_RES (BTN_BROWSE) ), maFtLogin ( this, CUI_RES (FT_LOGIN) ), maEdLogin ( this, CUI_RES (ED_LOGIN) ), + maBtTarget ( this, CUI_RES (BTN_TARGET) ), maFtPassword ( this, CUI_RES (FT_PASSWD) ), maEdPassword ( this, CUI_RES (ED_PASSWD) ), maCbAnonymous ( this, CUI_RES (CBX_ANONYMOUS) ), - maBtBrowse ( this, CUI_RES (BTN_BROWSE) ), - maBtTarget ( this, CUI_RES (BTN_TARGET) ), mbMarkWndOpen ( FALSE ) { // Set HC bitmaps and display display of bitmap names. @@ -124,6 +124,13 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maCbbTarget.SetLoseFocusHdl ( LINK ( this, SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl ) ); maCbbTarget.SetModifyHdl ( LINK ( this, SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl ) ); maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) ); + + maFtTarget.SetAccessibleRelationMemberOf( &maGrpLinkTyp ); + maCbbTarget.SetAccessibleRelationMemberOf( &maGrpLinkTyp ); + maBtTarget.SetAccessibleRelationMemberOf( &maGrpLinkTyp ); + maBtTarget.SetAccessibleRelationLabeledBy( &maFtTarget ); + maBtBrowse.SetAccessibleRelationMemberOf( &maGrpLinkTyp ); + maBtBrowse.SetAccessibleRelationLabeledBy( &maFtTarget ); } SvxHyperlinkInternetTp::~SvxHyperlinkInternetTp () diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 5ea43e165883..0f435ec1c659 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -89,6 +89,9 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( Window *pParent, const SfxItemSet& rIte if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) ) maBtAdrBook.Hide(); + + maBtAdrBook.SetAccessibleRelationMemberOf( &maGrpMailNews ); + maBtAdrBook.SetAccessibleRelationLabeledBy( &maFtReceiver ); } SvxHyperlinkMailTp::~SvxHyperlinkMailTp () diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 5d29e652a7d2..1931fb68ef22 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -148,6 +148,9 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent ) maLbTree.SetStyle( maLbTree.GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES | WB_HASBUTTONS | //WB_HASLINESATROOT | WB_HSCROLL | WB_HASBUTTONSATROOT ); + + maLbTree.SetAccessibleName(String(CUI_RES(STR_MARK_TREE))); + } SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd() diff --git a/cui/source/dialogs/hlmarkwn.hrc b/cui/source/dialogs/hlmarkwn.hrc index 1ac36dafa099..5fba2376eaf2 100644 --- a/cui/source/dialogs/hlmarkwn.hrc +++ b/cui/source/dialogs/hlmarkwn.hrc @@ -28,6 +28,9 @@ #define BT_APPLY 1 #define BT_CLOSE 2 #define TLB_MARK 3 +// IAccessibility2 implementation 2009. ------ +#define STR_MARK_TREE 5000 +// ------ IAccessibility2 implementation 2009. //#define HYPERLINK_BMP_EXPAND 301 //#define HYPERLINK_BMP_COLLAPSE 302 diff --git a/cui/source/dialogs/hlmarkwn.src b/cui/source/dialogs/hlmarkwn.src index 396e8cd573e0..450afc36758f 100644 --- a/cui/source/dialogs/hlmarkwn.src +++ b/cui/source/dialogs/hlmarkwn.src @@ -77,19 +77,8 @@ String RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN Text [ en-US ] = "Couldn't open the document." ; }; - - - - - - - - - - - - - - - +String STR_MARK_TREE +{ + Text [ en-US ] = "Mark Tree" ; +}; diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index f9e2c3814552..7787016ff123 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -356,6 +356,9 @@ void SvxHyperlinkTabPageBase::InitStdControls () mpBtScript->SetModeImage( Image( ResId( IMG_SCRIPT_HC, *m_pResMgr ) ), BMP_COLOR_HIGHCONTRAST ); mpBtScript->EnableTextDisplay (FALSE); + + mpBtScript->SetAccessibleRelationMemberOf( mpGrpMore ); + mpBtScript->SetAccessibleRelationLabeledBy( mpFtForm ); } mbStdControlsInit = TRUE; diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 8cf21129f52c..6b544836ec58 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -206,11 +206,11 @@ SvInsertOleDlg::SvInsertOleDlg : InsertObjectDialog_Impl( pParent, CUI_RES( MD_INSERT_OLEOBJECT ), xStorage ), aRbNewObject( this, CUI_RES( RB_NEW_OBJECT ) ), aRbObjectFromfile( this, CUI_RES( RB_OBJECT_FROMFILE ) ), + aGbObject( this, CUI_RES( GB_OBJECT ) ), aLbObjecttype( this, CUI_RES( LB_OBJECTTYPE ) ), aEdFilepath( this, CUI_RES( ED_FILEPATH ) ), aBtnFilepath( this, CUI_RES( BTN_FILEPATH ) ), aCbFilelink( this, CUI_RES( CB_FILELINK ) ), - aGbObject( this, CUI_RES( GB_OBJECT ) ), aOKButton1( this, CUI_RES( 1 ) ), aCancelButton1( this, CUI_RES( 1 ) ), aHelpButton1( this, CUI_RES( 1 ) ), @@ -226,6 +226,7 @@ SvInsertOleDlg::SvInsertOleDlg aRbObjectFromfile.SetClickHdl( aLink ); aRbNewObject.Check( TRUE ); RadioHdl( NULL ); + aBtnFilepath.SetAccessibleRelationMemberOf(&aGbObject); } short SvInsertOleDlg::Execute() @@ -449,11 +450,11 @@ IMPL_LINK( SvInsertPlugInDialog, BrowseHdl, PushButton *, EMPTYARG ) SvInsertPlugInDialog::SvInsertPlugInDialog( Window* pParent, const uno::Reference < embed::XStorage >& xStorage ) : InsertObjectDialog_Impl( pParent, CUI_RES( MD_INSERT_OBJECT_PLUGIN ), xStorage ), + aGbFileurl( this, CUI_RES( GB_FILEURL ) ), aEdFileurl( this, CUI_RES( ED_FILEURL ) ), aBtnFileurl( this, CUI_RES( BTN_FILEURL ) ), - aGbFileurl( this, CUI_RES( GB_FILEURL ) ), - aEdPluginsOptions( this, CUI_RES( ED_PLUGINS_OPTIONS ) ), aGbPluginsOptions( this, CUI_RES( GB_PLUGINS_OPTIONS ) ), + aEdPluginsOptions( this, CUI_RES( ED_PLUGINS_OPTIONS ) ), aOKButton1( this, CUI_RES( 1 ) ), aCancelButton1( this, CUI_RES( 1 ) ), aHelpButton1( this, CUI_RES( 1 ) ), @@ -739,22 +740,23 @@ SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog( Window *pParent, , aFTURL ( this, CUI_RES( FT_URL ) ) , aEDURL ( this, CUI_RES( ED_URL ) ) , aBTOpen ( this, CUI_RES(BT_FILEOPEN ) ) + + , aFLScrolling ( this, CUI_RES( GB_SCROLLING ) ) , aRBScrollingOn ( this, CUI_RES( RB_SCROLLINGON ) ) , aRBScrollingOff ( this, CUI_RES( RB_SCROLLINGOFF ) ) , aRBScrollingAuto ( this, CUI_RES( RB_SCROLLINGAUTO ) ) - , aFLScrolling ( this, CUI_RES( GB_SCROLLING ) ) , aFLSepLeft( this, CUI_RES( FL_SEP_LEFT ) ) + , aFLFrameBorder( this, CUI_RES( GB_BORDER ) ) , aRBFrameBorderOn ( this, CUI_RES( RB_FRMBORDER_ON ) ) , aRBFrameBorderOff ( this, CUI_RES( RB_FRMBORDER_OFF ) ) - , aFLFrameBorder( this, CUI_RES( GB_BORDER ) ) , aFLSepRight( this, CUI_RES( FL_SEP_RIGHT ) ) + , aFLMargin( this, CUI_RES( GB_MARGIN ) ) , aFTMarginWidth ( this, CUI_RES( FT_MARGINWIDTH ) ) , aNMMarginWidth ( this, CUI_RES( NM_MARGINWIDTH ) ) , aCBMarginWidthDefault( this, CUI_RES( CB_MARGINHEIGHTDEFAULT ) ) , aFTMarginHeight ( this, CUI_RES( FT_MARGINHEIGHT ) ) , aNMMarginHeight ( this, CUI_RES( NM_MARGINHEIGHT ) ) , aCBMarginHeightDefault( this, CUI_RES( CB_MARGINHEIGHTDEFAULT ) ) - , aFLMargin( this, CUI_RES( GB_MARGIN ) ) , aOKButton1( this, CUI_RES( 1 ) ) , aCancelButton1( this, CUI_RES( 1 ) ) , aHelpButton1( this, CUI_RES( 1 ) ) @@ -783,22 +785,25 @@ SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog( Window *pParent, con , aFTURL ( this, CUI_RES( FT_URL ) ) , aEDURL ( this, CUI_RES( ED_URL ) ) , aBTOpen ( this, CUI_RES(BT_FILEOPEN ) ) + + , aFLScrolling ( this, CUI_RES( GB_SCROLLING ) ) , aRBScrollingOn ( this, CUI_RES( RB_SCROLLINGON ) ) , aRBScrollingOff ( this, CUI_RES( RB_SCROLLINGOFF ) ) , aRBScrollingAuto ( this, CUI_RES( RB_SCROLLINGAUTO ) ) - , aFLScrolling ( this, CUI_RES( GB_SCROLLING ) ) + , aFLSepLeft( this, CUI_RES( FL_SEP_LEFT ) ) + , aFLFrameBorder( this, CUI_RES( GB_BORDER ) ) , aRBFrameBorderOn ( this, CUI_RES( RB_FRMBORDER_ON ) ) , aRBFrameBorderOff ( this, CUI_RES( RB_FRMBORDER_OFF ) ) - , aFLFrameBorder( this, CUI_RES( GB_BORDER ) ) + , aFLSepRight( this, CUI_RES( FL_SEP_RIGHT ) ) + , aFLMargin( this, CUI_RES( GB_MARGIN ) ) , aFTMarginWidth ( this, CUI_RES( FT_MARGINWIDTH ) ) , aNMMarginWidth ( this, CUI_RES( NM_MARGINWIDTH ) ) , aCBMarginWidthDefault( this, CUI_RES( CB_MARGINHEIGHTDEFAULT ) ) , aFTMarginHeight ( this, CUI_RES( FT_MARGINHEIGHT ) ) , aNMMarginHeight ( this, CUI_RES( NM_MARGINHEIGHT ) ) , aCBMarginHeightDefault( this, CUI_RES( CB_MARGINHEIGHTDEFAULT ) ) - , aFLMargin( this, CUI_RES( GB_MARGIN ) ) , aOKButton1( this, CUI_RES( 1 ) ) , aCancelButton1( this, CUI_RES( 1 ) ) , aHelpButton1( this, CUI_RES( 1 ) ) diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 0193cefa2964..cf92f4185b0d 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -80,21 +80,22 @@ SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml aFtLinks( this, CUI_RES( FT_LINKS ) ), aFtType( this, CUI_RES( FT_TYPE ) ), aFtStatus( this, CUI_RES( FT_STATUS ) ), - aCancelButton1( this, CUI_RES( 1 ) ), - aHelpButton1( this, CUI_RES( 1 ) ), - aPbUpdateNow( this, CUI_RES( PB_UPDATE_NOW ) ), - aPbOpenSource( this, CUI_RES( PB_OPEN_SOURCE ) ), - aPbChangeSource( this, CUI_RES( PB_CHANGE_SOURCE ) ), - aPbBreakLink( this, CUI_RES( PB_BREAK_LINK ) ), + aTbLinks( this, CUI_RES(TB_LINKS ) ), aFtFiles2( this, CUI_RES( FT_FILES2 ) ), + aFtFullFileName( this, CUI_RES( FT_FULL_FILE_NAME ) ), aFtSource2( this, CUI_RES( FT_SOURCE2 ) ), + aFtFullSourceName( this, CUI_RES( FT_FULL_SOURCE_NAME ) ), aFtType2( this, CUI_RES( FT_TYPE2 ) ), + aFtFullTypeName( this, CUI_RES( FT_FULL_TYPE_NAME ) ), aFtUpdate( this, CUI_RES( FT_UPDATE ) ), aRbAutomatic( this, CUI_RES( RB_AUTOMATIC ) ), aRbManual( this, CUI_RES( RB_MANUAL ) ), - aFtFullFileName( this, CUI_RES( FT_FULL_FILE_NAME ) ), - aFtFullSourceName( this, CUI_RES( FT_FULL_SOURCE_NAME ) ), - aFtFullTypeName( this, CUI_RES( FT_FULL_TYPE_NAME ) ), + aCancelButton1( this, CUI_RES( 1 ) ), + aHelpButton1( this, CUI_RES( 1 ) ), + aPbUpdateNow( this, CUI_RES( PB_UPDATE_NOW ) ), + aPbOpenSource( this, CUI_RES( PB_OPEN_SOURCE ) ), + aPbChangeSource( this, CUI_RES( PB_CHANGE_SOURCE ) ), + aPbBreakLink( this, CUI_RES( PB_BREAK_LINK ) ), aStrAutolink( CUI_RES( STR_AUTOLINK ) ), aStrManuallink( CUI_RES( STR_MANUALLINK ) ), aStrBrokenlink( CUI_RES( STR_BROKENLINK ) ), @@ -104,8 +105,7 @@ SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml aStrCloselinkmsgMulti( CUI_RES( STR_CLOSELINKMSG_MULTI ) ), aStrWaitinglink( CUI_RES( STR_WAITINGLINK ) ), pLinkMgr( NULL ), - bHtmlMode(bHtml), - aTbLinks( this, CUI_RES(TB_LINKS ) ) + bHtmlMode(bHtml) { FreeResource(); @@ -117,6 +117,12 @@ SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml //JP 24.02.99: UpdateTimer fuer DDE-/Grf-Links, auf die gewarted wird aUpdateTimer.SetTimeoutHdl( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) ); aUpdateTimer.SetTimeout( 1000 ); + //IAccessibility2 Implementation 2009----- + // Set the ZOrder, and accessible name to the dialog's title + aTbLinks.SetZOrder(0, WINDOW_ZORDER_FIRST); + aTbLinks.SetAccessibleName(this->GetText()); + aTbLinks.SetAccessibleRelationLabeledBy(&aFtFiles); + //-----IAccessibility2 Implementation 2009 OpenSource().Hide(); diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 1d3af44facf6..a2b9b67b756f 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -220,6 +220,9 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed ) : aDelBtn.SetClickHdl( LINK( this, SvxMultiPathDialog, DelHdl_Impl ) ); SelectHdl_Impl( NULL ); + + aAddBtn.SetAccessibleRelationMemberOf(&aPathLB); + aDelBtn.SetAccessibleRelationMemberOf(&aPathLB); } // ----------------------------------------------------------------------- diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 2fe952b9197a..4b0dec5ebaeb 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -53,10 +53,10 @@ SvPasteObjectDialog::SvPasteObjectDialog( Window* pParent ) aFtObjectSource( this, CUI_RES( FT_OBJECT_SOURCE ) ), aRbPaste( this, CUI_RES( RB_PASTE ) ), aRbPasteLink( this, CUI_RES( RB_PASTE_LINK ) ), - aLbInsertList( this, CUI_RES( LB_INSERT_LIST ) ), aCbDisplayAsIcon( this, CUI_RES( CB_DISPLAY_AS_ICON ) ), aPbChangeIcon( this, CUI_RES( PB_CHANGE_ICON ) ), aFlChoice( this, CUI_RES( FL_CHOICE ) ), + aLbInsertList( this, CUI_RES( LB_INSERT_LIST ) ), aOKButton1( this, CUI_RES( 1 ) ), aCancelButton1( this, CUI_RES( 1 ) ), aHelpButton1( this, CUI_RES( 1 ) ), @@ -74,6 +74,8 @@ SvPasteObjectDialog::SvPasteObjectDialog( Window* pParent ) ObjectLB().SetSelectHdl( LINK( this, SvPasteObjectDialog, SelectHdl ) ); ObjectLB().SetDoubleClickHdl( LINK( this, SvPasteObjectDialog, DoubleClickHdl ) ); SetDefault(); + + aLbInsertList.SetAccessibleName(aFlChoice.GetText()); } void SvPasteObjectDialog::SelectObject() diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 8ff20084f591..4177b39edc8d 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -159,6 +159,10 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, SetText( CUI_RESSTR( STR_NOTIZ_INSERT ) ); FreeResource(); + + aEditED.SetAccessibleRelationLabeledBy(&aEditFT); + aEditED.SetAccessibleRelationMemberOf(&aPostItFL); + aAuthorBtn.SetAccessibleRelationMemberOf(&aPostItFL); } // ----------------------------------------------------------------------- diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index 1025d53c5b1f..b92be7d35be1 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -38,13 +38,13 @@ SvxSplitTableDlg::SvxSplitTableDlg( Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal ) : SvxStandardDialog(pParent, CUI_RES(RID_SVX_SPLITCELLDLG)) +, maCountFL(this, CUI_RES(FL_COUNT)) , maCountLbl(this, CUI_RES(FT_COUNT)) , maCountEdit(this, CUI_RES(ED_COUNT)) -, maCountFL(this, CUI_RES(FL_COUNT)) +, maDirFL(this, CUI_RES(FL_DIR)) , maHorzBox(this, CUI_RES(RB_HORZ)) , maVertBox(this, CUI_RES(RB_VERT)) , maPropCB(this, CUI_RES(CB_PROP)) -, maDirFL(this, CUI_RES(FL_DIR)) , maOKBtn(this, CUI_RES(BT_OK)) , maCancelBtn(this, CUI_RES(BT_CANCEL)) , maHelpBtn( this, CUI_RES( BT_HELP ) ) diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index e838e94c0db6..d4c93e3dca62 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -230,6 +230,14 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : aUserEdit.SetLast( nMax ); aUserEdit.SetValue( nValue ); + aUserEdit.SetAccessibleRelationLabeledBy( &aUserBtn ); + aUserEdit.SetAccessibleName(aUserBtn.GetText()); + aColumnsEdit.SetAccessibleRelationLabeledBy(&aColumnsBtn); + aColumnsEdit.SetAccessibleName(aColumnsBtn.GetText()); + aColumnsEdit.SetAccessibleRelationMemberOf(&aColumnsBtn); + aBookModeChk.SetAccessibleRelationLabeledBy(&aColumnsBtn); + aBookModeChk.SetAccessibleRelationMemberOf(&aColumnsBtn); + const SfxPoolItem& rItem = rSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_ZOOM ) ); if ( rItem.ISA(SvxZoomItem) ) diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index 78e545e5e51a..6c7e8adcbfb7 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -84,6 +84,13 @@ private: SvxBackgroundTabPage( Window* pParent, const SfxItemSet& rCoreSet ); ~SvxBackgroundTabPage(); + FixedText aSelectTxt; + ListBox aLbSelect; + const String aStrBrowse; + const String aStrUnlinked; + FixedText aTblDesc; + ListBox aTblLBox; + ListBox aParaLBox; // Hintergrundfarbe ------------------------------------ Control aBorderWin; ValueSet aBackgroundColorSet; @@ -92,34 +99,24 @@ private: //color transparency FixedText aColTransFT; MetricField aColTransMF; + CheckBox aBtnPreview; // Hintergrund-Bitmap ---------------------------------- + FixedLine aGbFile; PushButton aBtnBrowse; CheckBox aBtnLink; - CheckBox aBtnPreview; - FixedInfo aFtFile; - FixedLine aGbFile; + FixedLine aGbPosition; RadioButton aBtnPosition; RadioButton aBtnArea; RadioButton aBtnTile; SvxRectCtl aWndPosition; - FixedLine aGbPosition; + FixedInfo aFtFile; //transparency of graphics FixedLine aGraphTransFL; MetricField aGraphTransMF; BackgroundPreviewImpl* pPreviewWin2; - // Selektor -------------------------------------------- - FixedText aSelectTxt; - ListBox aLbSelect; - const String aStrBrowse; - const String aStrUnlinked; // DDListBox fuer Writer ------------------------------- - - FixedText aTblDesc; - ListBox aTblLBox; - ListBox aParaLBox; - //------------------------------------------------------ Color aBgdColor; USHORT nHtmlMode; diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 954866383c4b..5ff70445a794 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -309,13 +309,13 @@ class TPGalleryThemeProperties : public SfxTabPage friend class TakeProgress; friend class TakeThread; + FixedText aFtFileType; + ComboBox aCbbFileType; + MultiListBox aLbxFound; PushButton aBtnSearch; PushButton aBtnTake; PushButton aBtnTakeAll; CheckBox aCbxPreview; - ComboBox aCbbFileType; - MultiListBox aLbxFound; - FixedText aFtFileType; GalleryPreview aWndPreview; ExchangeData* pData; diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index e7f9047af5ca..e452faab113c 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -97,16 +97,16 @@ private: double mfScaleX; double mfScaleY; Size maSizePixel; - PreviewWindow maPreview; - FixedLine maFlParameter; - OKButton maBtnOK; - CancelButton maBtnCancel; - HelpButton maBtnHelp; DECL_LINK( ImplPreviewTimeoutHdl, Timer* pTimer ); DECL_LINK( ImplModifyHdl, void* p ); protected: + PreviewWindow maPreview; + OKButton maBtnOK; + CancelButton maBtnCancel; + HelpButton maBtnHelp; + FixedLine maFlParameter; const Link& GetModifyHdl() const { return maModifyHdl; } const Size& GetGraphicSizePixel() const { return maSizePixel; } diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 933a71616039..1935c2b83f9f 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -104,6 +104,7 @@ class SvxLineTabPage : public SvxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; private: + FixedLine aFlLine; FixedText aFtLineStyle; LineLB aLbLineStyle; FixedText aFtColor; @@ -112,19 +113,18 @@ private: MetricField aMtrLineWidth; FixedText aFtTransparent; MetricField aMtrTransparent; - FixedLine aFlLine; - FixedText aFtLineEndsStyle; + FixedLine aFlLineEnds; LineEndLB aLbStartStyle; - FixedText aFtLineEndsWidth; MetricField aMtrStartWidth; TriStateBox aTsbCenterStart; + FixedText aFtLineEndsStyle; LineEndLB aLbEndStyle; + FixedText aFtLineEndsWidth; MetricField aMtrEndWidth; TriStateBox aTsbCenterEnd; CheckBox aCbxSynchronize; - FixedLine aFlLineEnds; - SvxXLinePreview aCtlPreview; FixedLine aFLSeparator; + SvxXLinePreview aCtlPreview; // #116827# FixedLine maFLEdgeStyle; diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index c9d6729be447..985eda3bc257 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -49,6 +49,14 @@ #define RID_SVXSTR_GALLERY_ALLFILES (RID_CUI_GALLERY_START + 44) #define RID_SVXSTR_GALLERY_ID_EXISTS (RID_CUI_GALLERY_START + 81) +//IAccessibility2 Implementation 2009----- +#define RID_SVXSTR_GALLERY_THEMEITEMS (RID_CUI_GALLERY_START + 93) +#define RID_SVXSTR_GALLERY_THEMENAME (RID_CUI_GALLERY_START + 94) +#define RID_SVXSTR_GALLERY_FILESFOUND (RID_CUI_GALLERY_START + 95) +#define RID_SVXSTR_GALLERY_PREVIEW (RID_CUI_GALLERY_START + 96) +//-----IAccessibility2 Implementation 2009 + + // Images #define RID_SVXBMP_THEME_NORMAL_BIG (RID_CUI_GALLERY_START + 49) #define RID_SVXBMP_THEME_IMPORTED_BIG (RID_CUI_GALLERY_START + 51) diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index e39bb20900af..3df2d5d42d8e 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -46,13 +46,13 @@ private: RadioButton maRbtLinktypTelnet; FixedText maFtTarget; SvxHyperURLBox maCbbTarget; + ImageButton maBtBrowse; FixedText maFtLogin; Edit maEdLogin; + ImageButton maBtTarget; FixedText maFtPassword; Edit maEdPassword; CheckBox maCbAnonymous; - ImageButton maBtBrowse; - ImageButton maBtTarget; String maStrOldUser; String maStrOldPassword; diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx index a93b93498d37..0983a63e7172 100644 --- a/cui/source/inc/insdlg.hxx +++ b/cui/source/inc/insdlg.hxx @@ -63,11 +63,11 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl { RadioButton aRbNewObject; RadioButton aRbObjectFromfile; + FixedLine aGbObject; ListBox aLbObjecttype; Edit aEdFilepath; PushButton aBtnFilepath; CheckBox aCbFilelink; - FixedLine aGbObject; OKButton aOKButton1; CancelButton aCancelButton1; HelpButton aHelpButton1; @@ -103,11 +103,11 @@ public: class SvInsertPlugInDialog : public InsertObjectDialog_Impl { private: + FixedLine aGbFileurl; Edit aEdFileurl; PushButton aBtnFileurl; - FixedLine aGbFileurl; - MultiLineEdit aEdPluginsOptions; FixedLine aGbPluginsOptions; + MultiLineEdit aEdPluginsOptions; OKButton aOKButton1; CancelButton aCancelButton1; HelpButton aHelpButton1; @@ -174,24 +174,25 @@ private: Edit aEDURL; PushButton aBTOpen; + FixedLine aFLScrolling; RadioButton aRBScrollingOn; RadioButton aRBScrollingOff; RadioButton aRBScrollingAuto; - FixedLine aFLScrolling; + FixedLine aFLSepLeft; + FixedLine aFLFrameBorder; RadioButton aRBFrameBorderOn; RadioButton aRBFrameBorderOff; - FixedLine aFLFrameBorder; FixedLine aFLSepRight; + FixedLine aFLMargin; FixedText aFTMarginWidth; NumericField aNMMarginWidth; CheckBox aCBMarginWidthDefault; FixedText aFTMarginHeight; NumericField aNMMarginHeight; CheckBox aCBMarginHeightDefault; - FixedLine aFLMargin; OKButton aOKButton1; CancelButton aCancelButton1; diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index f6f75ddee89d..a5c253f9b2ed 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -57,21 +57,22 @@ class SvBaseLinksDlg : public ModalDialog FixedText aFtLinks; FixedText aFtType; FixedText aFtStatus; - CancelButton aCancelButton1; - HelpButton aHelpButton1; - PushButton aPbUpdateNow; - PushButton aPbOpenSource; - PushButton aPbChangeSource; - PushButton aPbBreakLink; + SvTabListBox aTbLinks; FixedText aFtFiles2; + FixedText aFtFullFileName; FixedText aFtSource2; + FixedText aFtFullSourceName; FixedText aFtType2; + FixedText aFtFullTypeName; FixedText aFtUpdate; RadioButton aRbAutomatic; RadioButton aRbManual; - FixedText aFtFullFileName; - FixedText aFtFullSourceName; - FixedText aFtFullTypeName; + CancelButton aCancelButton1; + HelpButton aHelpButton1; + PushButton aPbUpdateNow; + PushButton aPbOpenSource; + PushButton aPbChangeSource; + PushButton aPbBreakLink; String aStrAutolink; String aStrManuallink; String aStrBrokenlink; @@ -82,7 +83,6 @@ class SvBaseLinksDlg : public ModalDialog String aStrWaitinglink; sfx2::LinkManager* pLinkMgr; BOOL bHtmlMode; - SvTabListBox aTbLinks; Timer aUpdateTimer; #if _SOLAR__PRIVATE diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index 92cc494faac4..fbb600c97d40 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -116,14 +116,14 @@ private: FixedText aFtLanguage; SvxLanguageBox aLbLanguage; CheckBox aCbSourceFormat; - + SvxNumberPreviewImpl aWndPreview; + FixedLine aFlOptions; FixedText aFtDecimals; NumericField aEdDecimals; + CheckBox aBtnNegRed; FixedText aFtLeadZeroes; NumericField aEdLeadZeroes; - CheckBox aBtnNegRed; CheckBox aBtnThousand; - FixedLine aFlOptions; FixedText aFtEdFormat; Edit aEdFormat; @@ -135,7 +135,6 @@ private: Edit aEdComment; Timer aResetWinTimer; - SvxNumberPreviewImpl aWndPreview; SvxNumberInfoItem* pNumItem; SvxNumberFormatShell* pNumFmtShell; diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx index 345623c19cff..32449ff8414a 100644 --- a/cui/source/inc/optdict.hxx +++ b/cui/source/inc/optdict.hxx @@ -63,12 +63,12 @@ namespace linguistic2{ class SvxNewDictionaryDialog : public ModalDialog { private: + FixedLine aNewDictBox; FixedText aNameText; Edit aNameEdit; FixedText aLanguageText; SvxLanguageBox aLanguageLB; CheckBox aExceptBtn; - FixedLine aNewDictBox; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; @@ -132,8 +132,8 @@ private: PushButton aDeletePB; FixedLine aEditDictsBox; - CancelButton aCloseBtn; HelpButton aHelpBtn; + CancelButton aCloseBtn; String sModify; String sNew; DecorationView aDecoView; diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index 9931d2d2cff1..7fc9ec414a19 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -125,6 +125,7 @@ class SvxPageDescPage : public SfxTabPage FixedText aBottomMarginLbl; MetricField aBottomMarginEdit; + FixedLine aBottomSeparatorFl; // layout settings FixedLine aLayoutFL; FixedText aPageText; @@ -132,7 +133,6 @@ class SvxPageDescPage : public SfxTabPage FixedText aNumberFormatText; ListBox aNumberFormatBox; - FixedLine aBottomSeparatorFl; //Extras Calc FixedText aTblAlignFT; diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 64a926f5ef89..80d7f068895f 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -71,6 +71,7 @@ class SvxStdParagraphTabPage: public SfxTabPage private: SvxStdParagraphTabPage( Window* pParent, const SfxItemSet& rSet ); + FixedLine aIndentFrm; // Einzug FixedText aLeftLabel; SvxRelativeField aLeftIndent; @@ -82,27 +83,26 @@ private: SvxRelativeField aFLineIndent; CheckBox aAutoCB; - FixedLine aIndentFrm; + FixedLine aDistFrm; // Abstaende FixedText aTopLabel; SvxRelativeField aTopDist; FixedText aBottomLabel; SvxRelativeField aBottomDist; - FixedLine aDistFrm; // Zeilenabstand + FixedLine aLineDistFrm; ListBox aLineDist; FixedText aLineDistAtLabel; MetricField aLineDistAtPercentBox; MetricField aLineDistAtMetricBox; - FixedLine aLineDistFrm; String sAbsDist; SvxParaPrevWindow aExampleWin; //Registerhaltigkeit - nur Writer - CheckBox aRegisterCB; FixedLine aRegisterFL; + CheckBox aRegisterCB; Edit* pActLineDistFld; long nAbst; @@ -237,6 +237,7 @@ private: SvxExtParagraphTabPage( Window* pParent, const SfxItemSet& rSet ); // Silbentrennung + FixedLine aExtFL; TriStateBox aHyphenBox; FixedText aBeforeText; NumericField aExtHyphenBeforeBox; @@ -246,7 +247,6 @@ private: // FixedText aHyphenAfterLabel; FixedText aMaxHyphenLabel; NumericField aMaxHyphenEdit; - FixedLine aExtFL; // Seitenumbruch FixedLine aBreaksFL; diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx index a1b71e2f751e..5706d3c8ee5a 100644 --- a/cui/source/inc/pastedlg.hxx +++ b/cui/source/inc/pastedlg.hxx @@ -54,10 +54,10 @@ class SvPasteObjectDialog : public ModalDialog FixedText aFtObjectSource; RadioButton aRbPaste; RadioButton aRbPasteLink; - ListBox aLbInsertList; CheckBox aCbDisplayAsIcon; PushButton aPbChangeIcon; FixedLine aFlChoice; + ListBox aLbInsertList; OKButton aOKButton1; CancelButton aCancelButton1; HelpButton aHelpButton1; diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx index 4e08cebf2866..b9aa0a030d20 100644 --- a/cui/source/inc/splitcelldlg.hxx +++ b/cui/source/inc/splitcelldlg.hxx @@ -37,13 +37,13 @@ class SvxSplitTableDlg : public SvxAbstractSplittTableDialog, public SvxStandardDialog { + FixedLine maCountFL; FixedText maCountLbl; NumericField maCountEdit; - FixedLine maCountFL; + FixedLine maDirFL; ImageRadioButton maHorzBox; ImageRadioButton maVertBox; CheckBox maPropCB; - FixedLine maDirFL; OKButton maOKBtn; CancelButton maCancelBtn; HelpButton maHelpBtn; diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx index 80e22eff43b5..23c1cef561e3 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -94,10 +94,11 @@ private: SvxTabulatorTabPage( Window* pParent, const SfxItemSet& rSet ); // Tabulatoren und Positionen - MetricBox aTabBox; FixedLine aTabLabel; + MetricBox aTabBox; FixedLine aTabLabelVert; + FixedLine aTabTypeLabel; // TabType RadioButton aLeftTab; RadioButton aRightTab; @@ -111,8 +112,8 @@ private: FixedText aDezCharLabel; Edit aDezChar; - FixedLine aTabTypeLabel; + FixedLine aFillLabel; // Fuellzeichen RadioButton aNoFillChar; RadioButton aFillPoints; @@ -120,8 +121,6 @@ private: RadioButton aFillSolidLine; RadioButton aFillSpecial; Edit aFillChar; - FixedLine aFillLabel; - // Buttons PushButton aNewBtn; PushButton aDelAllBtn; diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 7867c5de68b0..46358057a928 100755 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -101,12 +101,12 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent, ModalDialog( pParent, CUI_RES( RID_SFXDLG_NEWDICT ) ), + aNewDictBox ( this, CUI_RES( GB_NEWDICT ) ), aNameText ( this, CUI_RES( FT_DICTNAME ) ), aNameEdit ( this, CUI_RES( ED_DICTNAME ) ), aLanguageText ( this, CUI_RES( FT_DICTLANG ) ), aLanguageLB ( this, CUI_RES( LB_DICTLANG ) ), aExceptBtn ( this, CUI_RES( BTN_EXCEPT ) ), - aNewDictBox ( this, CUI_RES( GB_NEWDICT ) ), aOKBtn ( this, CUI_RES( BTN_NEWDICT_OK ) ), aCancelBtn ( this, CUI_RES( BTN_NEWDICT_ESC ) ), aHelpBtn ( this, CUI_RES( BTN_NEWDICT_HLP ) ), @@ -121,6 +121,11 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent, aLanguageLB.SetLanguageList( LANG_LIST_ALL, TRUE, TRUE ); aLanguageLB.SelectEntryPos(0); + aNameText.SetAccessibleRelationMemberOf( &aNewDictBox ); + aNameEdit.SetAccessibleRelationMemberOf( &aNewDictBox ); + aLanguageText.SetAccessibleRelationMemberOf( &aNewDictBox ); + aLanguageLB.SetAccessibleRelationMemberOf( &aNewDictBox ); + FreeResource(); } @@ -230,6 +235,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( aAllDictsLB ( this, CUI_RES( LB_ALLDICTS ) ), aLangFT ( this, CUI_RES( FT_DICTLANG ) ), aLangLB ( this, CUI_RES( LB_DICTLANG ) ), + aWordFT ( this, CUI_RES( FT_WORD ) ), aWordED ( this, CUI_RES( ED_WORD ) ), aReplaceFT ( this, CUI_RES( FT_REPLACE ) ), @@ -238,8 +244,8 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( aNewReplacePB ( this, CUI_RES( PB_NEW_REPLACE ) ), aDeletePB ( this, CUI_RES( PB_DELETE_REPLACE ) ), aEditDictsBox ( this, CUI_RES( GB_EDITDICTS ) ), - aCloseBtn ( this, CUI_RES( BTN_EDITCLOSE ) ), aHelpBtn ( this, CUI_RES( BTN_EDITHELP ) ), + aCloseBtn ( this, CUI_RES( BTN_EDITCLOSE ) ), sModify (CUI_RES(STR_MODIFY)), sNew (aNewReplacePB.GetText()), aDecoView ( this), diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index dd7f3ddb840f..a9258aefa2f4 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1176,6 +1176,13 @@ SvxLinguTabPage::SvxLinguTabPage( Window* pParent, else aMoreDictsLink.Hide(); + String sAccessibleNameModuleEdit( CUI_RES( STR_LINGU_MODULES_EDIT ) ); + String sAccessibleNameDicsEdit ( CUI_RES( STR_LINGU_DICS_EDIT_DIC ) ); + String sAccessibleNameOptionEdit( CUI_RES( STR_LINGU_OPTIONS_EDIT ) ); + + aLinguModulesEditPB.SetAccessibleName(sAccessibleNameModuleEdit); + aLinguDicsEditPB.SetAccessibleName(sAccessibleNameDicsEdit); + aLinguOptionsEditPB.SetAccessibleName(sAccessibleNameOptionEdit); // force recalculation of hash value used for checking the need of updating // because new dictionaries might be installed / downloaded. diff --git a/cui/source/options/optlingu.hrc b/cui/source/options/optlingu.hrc index 6a73b7321235..824e2236e9c6 100644 --- a/cui/source/options/optlingu.hrc +++ b/cui/source/options/optlingu.hrc @@ -85,4 +85,8 @@ #define CLB_EDIT_MODULES_MODULES 320 #define FT_EDIT_MODULES_NEWDICTSLINK 321 #define FL_EDIT_MODULES_BUTTONS 322 - +// IAccessibility2 implementation 2009. ------ +#define STR_LINGU_MODULES_EDIT 323 +#define STR_LINGU_DICS_EDIT_DIC 324 +#define STR_LINGU_OPTIONS_EDIT 325 +// ------ IAccessibility2 implementation 2009. diff --git a/cui/source/options/optlingu.src b/cui/source/options/optlingu.src index ace1f8e193bf..734a2215aaf7 100644 --- a/cui/source/options/optlingu.src +++ b/cui/source/options/optlingu.src @@ -344,6 +344,19 @@ TabPage RID_SFXPAGE_LINGU { Text [ en-US ] = "Hyphenate special regions"; }; + String STR_LINGU_MODULES_EDIT + { + Text [ en-US ] = "Edit Available language modules"; + }; + String STR_LINGU_DICS_EDIT_DIC + { + Text [ en-US ] = "Edit User-defined dictionaries"; + }; + String STR_LINGU_OPTIONS_EDIT + { + Text [ en-US ] = "Edit Options"; + }; + // ------ IAccessibility2 implementation 2009. }; // end: TabPage RID_SFXPAGE_LINGU diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index ee82e89b93b3..88ebaa2a4dde 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -598,6 +598,8 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog( ResizeTreeLB(); if (bActivateLastSelection) ActivateLastSelection(); + + aTreeLB.SetAccessibleName(GetDisplayText()); } // Ctor() with ExtensionId ----------------------------------------------- diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 65d0cad3dfd1..9d1ab08c7c7d 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -197,6 +197,10 @@ AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttr AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_SHRINKTOFIT, maBtnShrink, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_FRAMEDIRECTION, maFtFrameDir, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new FrameDirListBoxConnection( SID_ATTR_FRAMEDIRECTION, maLbFrameDir, sfx::ITEMCONN_HIDE_UNKNOWN ) ); + + maLbHorAlign.SetAccessibleRelationMemberOf( &maFlAlignment ); + maEdIndent.SetAccessibleRelationMemberOf( &maFlAlignment ); + maLbVerAlign.SetAccessibleRelationMemberOf( &maFlAlignment ); } AlignmentTabPage::~AlignmentTabPage() diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 05ec88e5aa7f..096613789012 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -1607,6 +1607,11 @@ OfaAutocorrExceptPage::OfaAutocorrExceptPage( Window* pParent, aAutoCapsCB (this, CUI_RES(CB_AUTOCAPS )), eLang(eLastDialogLanguage) { + aNewAbbrevPB.SetAccessibleName(String(CUI_RES(STR_PB_NEWABBREV) ) ); + aDelAbbrevPB.SetAccessibleName(String(CUI_RES(STR_PB_DELABBREV) ) ); + aNewDoublePB.SetAccessibleName(String(CUI_RES(STR_PB_NEWDOUBLECAPS) ) ); + aDelDoublePB.SetAccessibleName(String(CUI_RES(STR_PB_DELDOUBLECAPS) ) ); + FreeResource(); ::com::sun::star::lang::Locale aLcl( SvxCreateLocale(eLastDialogLanguage )); @@ -1627,6 +1632,10 @@ OfaAutocorrExceptPage::OfaAutocorrExceptPage( Window* pParent, aAbbrevED.SetActionHdl(LINK(this, OfaAutocorrExceptPage, NewDelHdl)); aDoubleCapsED.SetActionHdl(LINK(this, OfaAutocorrExceptPage, NewDelHdl)); + aNewAbbrevPB.SetAccessibleRelationMemberOf(&aAbbrevFL); + aDelAbbrevPB.SetAccessibleRelationMemberOf(&aAbbrevFL); + aNewDoublePB.SetAccessibleRelationMemberOf(&aDoubleCapsFL); + aDelDoublePB.SetAccessibleRelationMemberOf(&aDoubleCapsFL); } /*-----------------14.10.96 15.58------------------- @@ -2058,6 +2067,13 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : sStandard(CUI_RES(ST_STANDARD)) { + aSglStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_STD) ) ); + aDblStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_STD) ) ); + aStartQuotePB.SetAccessibleName( String(CUI_RES(STR_PB_DBL_START) )); + aEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_END) )); + aSglStartQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_START) )); + aSglEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_END) ) ); + FreeResource(); BOOL bShowSWOptions = FALSE; @@ -2099,6 +2115,16 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : aDblStandardPB.SetClickHdl(LINK(this, OfaQuoteTabPage, StdQuoteHdl)); aSglStandardPB.SetClickHdl(LINK(this, OfaQuoteTabPage, StdQuoteHdl)); + aSglStartQuotePB.SetAccessibleRelationLabeledBy( &aSglStartQuoteFT ); + aSglEndQuotePB.SetAccessibleRelationLabeledBy( &aSglEndQuoteFT ); + aSglStartQuotePB.SetAccessibleRelationMemberOf( &aSingleFL ); + aSglEndQuotePB.SetAccessibleRelationMemberOf( &aSingleFL ); + aStartQuotePB.SetAccessibleRelationLabeledBy( &aStartQuoteFT ); + aEndQuotePB.SetAccessibleRelationLabeledBy( &aEndQuoteFT ); + aStartQuotePB.SetAccessibleRelationMemberOf( &aDoubleFL ); + aEndQuotePB.SetAccessibleRelationMemberOf( &aDoubleFL ); + aSglStandardPB.SetAccessibleRelationMemberOf(&aSingleFL); + aDblStandardPB.SetAccessibleRelationMemberOf(&aDoubleFL); } /*-----------------03.07.97 13:17------------------- @@ -2431,6 +2457,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, aPBEntries.SetClickHdl(LINK(this, OfaAutoCompleteTabPage, DeleteHdl)); aCBActiv.SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl)); aCBCollect.SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl)); + aLBEntries.SetAccessibleRelationLabeledBy(&aLBEntries); } OfaAutoCompleteTabPage::~OfaAutoCompleteTabPage() diff --git a/cui/source/tabpages/autocdlg.hrc b/cui/source/tabpages/autocdlg.hrc index 1e77c22b4fa9..8920dadd35a0 100644 --- a/cui/source/tabpages/autocdlg.hrc +++ b/cui/source/tabpages/autocdlg.hrc @@ -154,6 +154,18 @@ #define FT_SMARTTAGS 221 #define LB_SMARTTAGS 222 #define PB_SMARTTAGS 223 +//IAccessibility2 Implementation 2009----- +#define STR_PB_NEWABBREV 224 +#define STR_PB_DELABBREV 225 +#define STR_PB_NEWDOUBLECAPS 226 +#define STR_PB_DELDOUBLECAPS 227 +#define STR_PB_SGL_STD 228 +#define STR_PB_DBL_STD 229 +#define STR_PB_SGL_START 230 +#define STR_PB_DBL_START 231 +#define STR_PB_SGL_END 232 +#define STR_PB_DBL_END 233 +//-----IAccessibility2 Implementation 2009 #endif diff --git a/cui/source/tabpages/autocdlg.src b/cui/source/tabpages/autocdlg.src index d698a8f8aa47..8a906cf54e45 100644 --- a/cui/source/tabpages/autocdlg.src +++ b/cui/source/tabpages/autocdlg.src @@ -483,6 +483,46 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT Text [ en-US ] = "A~utoInclude"; Text [ en-US ] = "A~utoInclude" ; }; + String STR_PB_NEWABBREV + { + Text [ en-US ] = "New abbreviations" ; + }; + String STR_PB_DELABBREV + { + Text [ en-US ] = "Delete abbreviations" ; + }; + String STR_PB_NEWDOUBLECAPS + { + Text [ en-US ] = "New words with two initial capitals" ; + }; + String STR_PB_DELDOUBLECAPS + { + Text [ en-US ] = "Delete words with two initial capitals" ; + }; + String STR_PB_SGL_STD + { + Text [ en-US ] = "Single quotes default" ; + }; + String STR_PB_DBL_STD + { + Text [ en-US ] = "Double quotes default" ; + }; + String STR_PB_SGL_START + { + Text [ en-US ] = "Start quote of single quotes" ; + }; + String STR_PB_DBL_START + { + Text [ en-US ] = "Start quote of double quotes" ; + }; + String STR_PB_SGL_END + { + Text [ en-US ] = "End quote of single quotes" ; + }; + String STR_PB_DBL_END + { + Text [ en-US ] = "End quote of double quotes" ; + }; }; /**************************************************************************/ /* */ diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index f9d2b9078824..f993e7a90036 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -343,34 +343,36 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, SvxTabPage( pParent, CUI_RES( RID_SVXPAGE_BACKGROUND ), rCoreSet ), + aSelectTxt ( this, CUI_RES( FT_SELECTOR ) ), + aLbSelect ( this, CUI_RES( LB_SELECTOR ) ), + aStrBrowse ( CUI_RES( STR_BROWSE ) ), + aStrUnlinked ( CUI_RES( STR_UNLINKED ) ), + aTblDesc ( this, CUI_RES( FT_TBL_DESC ) ), + aTblLBox ( this, CUI_RES( LB_TBL_BOX ) ), + aParaLBox ( this, CUI_RES( LB_PARA_BOX ) ), + aBorderWin ( this, CUI_RES(CT_BORDER) ), aBackgroundColorSet ( &aBorderWin, CUI_RES( SET_BGDCOLOR ) ), aBackgroundColorBox ( this, CUI_RES( GB_BGDCOLOR ) ), - pPreviewWin1 ( new BackgroundPreviewImpl( - this, CUI_RES( WIN_PREVIEW1 ), FALSE ) ), + pPreviewWin1 ( new BackgroundPreviewImpl( this, CUI_RES( WIN_PREVIEW1 ), FALSE ) ), + aColTransFT ( this, CUI_RES( FT_COL_TRANS ) ), aColTransMF ( this, CUI_RES( MF_COL_TRANS ) ), - aBtnBrowse ( this, CUI_RES( BTN_BROWSE ) ), - aBtnLink ( this, CUI_RES( BTN_LINK ) ), aBtnPreview ( this, CUI_RES( BTN_PREVIEW ) ), - aFtFile ( this, CUI_RES( FT_FILE ) ), aGbFile ( this, CUI_RES( GB_FILE ) ), + aBtnBrowse ( this, CUI_RES( BTN_BROWSE ) ), + aBtnLink ( this, CUI_RES( BTN_LINK ) ), + aGbPosition ( this, CUI_RES( GB_POSITION ) ), aBtnPosition ( this, CUI_RES( BTN_POSITION ) ), aBtnArea ( this, CUI_RES( BTN_AREA ) ), aBtnTile ( this, CUI_RES( BTN_TILE ) ), aWndPosition ( this, CUI_RES( WND_POSITION ), RP_MM ), - aGbPosition ( this, CUI_RES( GB_POSITION ) ), + aFtFile ( this, CUI_RES( FT_FILE ) ), aGraphTransFL ( this, CUI_RES( FL_GRAPH_TRANS ) ), aGraphTransMF ( this, CUI_RES( MF_GRAPH_TRANS ) ), pPreviewWin2 ( new BackgroundPreviewImpl( this, CUI_RES( WIN_PREVIEW2 ), TRUE ) ), - aSelectTxt ( this, CUI_RES( FT_SELECTOR ) ), - aLbSelect ( this, CUI_RES( LB_SELECTOR ) ), - aStrBrowse ( CUI_RES( STR_BROWSE ) ), - aStrUnlinked ( CUI_RES( STR_UNLINKED ) ), - aTblDesc ( this, CUI_RES( FT_TBL_DESC ) ), - aTblLBox ( this, CUI_RES( LB_TBL_BOX ) ), - aParaLBox ( this, CUI_RES( LB_PARA_BOX ) ), + nHtmlMode ( 0 ), bAllowShowSelector ( TRUE ), bIsGraphicValid ( FALSE ), @@ -402,6 +404,11 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, aBackgroundColorSet.SetSelectHdl( HDL(BackgroundColorHdl_Impl) ); FreeResource(); + + aBtnBrowse.SetAccessibleRelationMemberOf(&aGbFile); + aWndPosition.SetAccessibleRelationMemberOf(&aGbPosition); + aWndPosition.SetAccessibleRelationLabeledBy(&aBtnPosition); + aBackgroundColorSet.SetAccessibleRelationLabeledBy(&aBackgroundColorBox); } //------------------------------------------------------------------------ @@ -657,6 +664,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) aPos.Y() = nY; pPreviewWin1->SetPosPixel(aPos); aBackgroundColorBox.Hide(); + aBackgroundColorSet.SetAccessibleRelationLabeledBy(&aBackgroundColorSet); } } } @@ -1211,6 +1219,7 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() WinBits nBits = ( aBackgroundColorSet.GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD ); aBackgroundColorSet.SetText( SVX_RESSTR( RID_SVXSTR_TRANSPARENT ) ); aBackgroundColorSet.SetStyle( nBits ); + aBackgroundColorSet.SetAccessibleName(aBackgroundColorBox.GetText()); for ( i = 0; i < nCount; i++ ) { pEntry = pColorTable->GetColor(i); diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 2cc564c3c553..19e4db50ef1a 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -49,6 +49,7 @@ #include #include "svx/dlgutil.hxx" +#include "paragrph.hrc" #include static USHORT pRanges[] = @@ -124,6 +125,8 @@ SvxConnectionPage::SvxConnectionPage( Window* pWindow, const SfxItemSet& rInAttr { FreeResource(); + aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + SfxItemPool* pPool = rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); eUnit = pPool->GetMetric( SDRATTR_EDGENODE1HORZDIST ); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 6fb538a76947..4e0da47218bc 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -134,6 +134,8 @@ SvxGrfCropPage::SvxGrfCropPage ( Window *pParent, const SfxItemSet &rSet ) aTimer.SetTimeoutHdl(LINK(this, SvxGrfCropPage, Timeout)); aTimer.SetTimeout( 1500 ); + + aOrigSizePB.SetAccessibleRelationLabeledBy( &aOrigSizeFT ); } /*-------------------------------------------------------------------- diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index c370b5183ebd..01b99903f3d1 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -130,6 +130,7 @@ SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) : bPositionModified ( FALSE ) { + aCtlPreview.SetAccessibleName(aCtlPreview.GetHelpText()); FillUnitLB(); FreeResource(); @@ -168,6 +169,9 @@ SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) : aTsbParallel.SetClickHdl( aLink ); aTsbShowUnit.SetClickHdl( aLink ); aLbUnit.SetSelectHdl( aLink ); + aLbUnit.SetAccessibleName(GetNonMnemonicString(aTsbShowUnit.GetText())); + aCtlPosition.SetAccessibleRelationMemberOf( &aFlLabel ); + aLbUnit.SetAccessibleRelationLabeledBy( &aTsbShowUnit ); } /************************************************************************* diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 15ac78e9975e..e0bd5171f6db 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -260,13 +260,18 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent, aFtLanguage ( this, CUI_RES( FT_LANGUAGE ) ), aLbLanguage ( this, CUI_RES( LB_LANGUAGE ), FALSE ), aCbSourceFormat ( this, CUI_RES( CB_SOURCEFORMAT ) ), +#if ENABLE_LAYOUT + aWndPreview ( LAYOUT_THIS_WINDOW(this), CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ), +#else + aWndPreview ( this, CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ), +#endif + aFlOptions ( this, CUI_RES( FL_OPTIONS ) ), aFtDecimals ( this, CUI_RES( FT_DECIMALS ) ), aEdDecimals ( this, CUI_RES( ED_DECIMALS ) ), + aBtnNegRed ( this, CUI_RES( BTN_NEGRED ) ), aFtLeadZeroes ( this, CUI_RES( FT_LEADZEROES ) ), aEdLeadZeroes ( this, CUI_RES( ED_LEADZEROES ) ), - aBtnNegRed ( this, CUI_RES( BTN_NEGRED ) ), aBtnThousand ( this, CUI_RES( BTN_THOUSAND ) ), - aFlOptions ( this, CUI_RES( FL_OPTIONS ) ), aFtEdFormat ( this, CUI_RES( FT_EDFORMAT ) ), aEdFormat ( this, CUI_RES( ED_FORMAT ) ), @@ -276,11 +281,6 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent, aFtComment ( this, CUI_RES( FT_COMMENT ) ), aEdComment ( this, CUI_RES( ED_COMMENT ) ), -#if ENABLE_LAYOUT - aWndPreview ( LAYOUT_THIS_WINDOW(this), CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ), -#else - aWndPreview ( this, CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ), -#endif pNumItem ( NULL ), pNumFmtShell ( NULL ), nInitFormat ( ULONG_MAX ), @@ -380,6 +380,13 @@ void SvxNumberFormatTabPage::Init_Impl() { aLbLanguage.InsertLanguage( xLang[i] ); } + + aIbAdd.SetAccessibleRelationLabeledBy( &aFtEdFormat ); + aIbInfo.SetAccessibleRelationLabeledBy( &aFtEdFormat ); + aIbRemove.SetAccessibleRelationLabeledBy( &aFtEdFormat ); + aIbAdd.SetAccessibleRelationMemberOf( &aIbAdd ); + aIbInfo.SetAccessibleRelationMemberOf( &aIbInfo ); + aIbRemove.SetAccessibleRelationMemberOf( &aIbRemove ); } /************************************************************************* diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 5b2bb4474573..2510c678416b 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -989,6 +989,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent, pExamplesVS->Format(); } + pExamplesVS->SetAccessibleRelationMemberOf( &aValuesFL ); } /*-----------------12.02.97 07.46------------------- @@ -1365,6 +1366,8 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE)); + aBitmapMB.SetAccessibleRelationLabeledBy( &aBitmapFT ); + FreeResource(); //get advanced numbering types from the component @@ -1421,6 +1424,10 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, aFmtLB.RemoveEntry( nPos); } } + + aBulletPB.SetAccessibleRelationMemberOf(&aFormatFL); + aBulletPB.SetAccessibleRelationLabeledBy(&aStartFT); + aBulletPB.SetAccessibleName(aStartFT.GetText()); } /*-----------------01.12.97 16:30------------------- @@ -3096,6 +3103,8 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent, pDebugFixedText->SetPosSizePixel(aPos, aSize); pDebugFixedText->SetText( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Das ist ein Debug-Text" ) ) ); #endif + + aStandardPB.SetAccessibleRelationMemberOf(&aPositionFL); } /*-----------------03.12.97 10:02------------------- diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index e2ee5b11af8f..dc0f2c6f2fc1 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -272,13 +272,12 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : aTopMarginEdit ( this, CUI_RES( ED_TOP_MARGIN ) ), aBottomMarginLbl ( this, CUI_RES( FT_BOTTOM_MARGIN ) ), aBottomMarginEdit ( this, CUI_RES( ED_BOTTOM_MARGIN ) ), - + aBottomSeparatorFl ( this, CUI_RES( FL_BOTTOM_SEP ) ), aLayoutFL ( this, CUI_RES( FL_LAYOUT ) ), aPageText ( this, CUI_RES( FT_PAGELAYOUT ) ), aLayoutBox ( this, CUI_RES( LB_LAYOUT ) ), aNumberFormatText ( this, CUI_RES( FT_NUMBER_FORMAT ) ), aNumberFormatBox ( this, CUI_RES( LB_NUMBER_FORMAT ) ), - aBottomSeparatorFl ( this, CUI_RES( FL_BOTTOM_SEP ) ), aTblAlignFT ( this, CUI_RES( FT_TBL_ALIGN ) ), aHorzBox ( this, CUI_RES( CB_HORZ ) ), aVertBox ( this, CUI_RES( CB_VERT ) ), @@ -420,6 +419,9 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : aTopMarginEdit.SetLast(aDrawinglayerOpt.GetMaximumPaperTopMargin()); aBottomMarginEdit.SetMax(aDrawinglayerOpt.GetMaximumPaperBottomMargin()); aBottomMarginEdit.SetLast(aDrawinglayerOpt.GetMaximumPaperBottomMargin()); + + aPortraitBtn.SetAccessibleRelationMemberOf(&aOrientationFT); + aLandscapeBtn.SetAccessibleRelationMemberOf(&aOrientationFT); } // ----------------------------------------------------------------------- diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 0359ef595a87..1815c1c0bd70 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -637,6 +637,7 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent, SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_STD_PARAGRAPH ), rAttr ), + aIndentFrm ( this, CUI_RES( FL_INDENT ) ), aLeftLabel ( this, CUI_RES( FT_LEFTINDENT ) ), aLeftIndent ( this, CUI_RES( ED_LEFTINDENT ) ), aRightLabel ( this, CUI_RES( FT_RIGHTINDENT ) ), @@ -645,21 +646,21 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent, aFLineLabel ( this, CUI_RES( FT_FLINEINDENT ) ), aFLineIndent ( this, CUI_RES( ED_FLINEINDENT ) ), aAutoCB ( this, CUI_RES( CB_AUTO ) ), - aIndentFrm ( this, CUI_RES( FL_INDENT ) ), + aDistFrm ( this, CUI_RES( FL_DIST ) ), aTopLabel ( this, CUI_RES( FT_TOPDIST ) ), aTopDist ( this, CUI_RES( ED_TOPDIST ) ), aBottomLabel ( this, CUI_RES( FT_BOTTOMDIST ) ), aBottomDist ( this, CUI_RES( ED_BOTTOMDIST ) ), - aDistFrm ( this, CUI_RES( FL_DIST ) ), + + aLineDistFrm ( this, CUI_RES( FL_LINEDIST ) ), aLineDist ( this, CUI_RES( LB_LINEDIST ) ), aLineDistAtLabel ( this, CUI_RES( FT_LINEDIST ) ), aLineDistAtPercentBox ( this, CUI_RES( ED_LINEDISTPERCENT ) ), aLineDistAtMetricBox ( this, CUI_RES( ED_LINEDISTMETRIC ) ), - aLineDistFrm ( this, CUI_RES( FL_LINEDIST ) ), sAbsDist ( CUI_RES(ST_LINEDIST_ABS) ), aExampleWin ( this, CUI_RES( WN_EXAMPLE ) ), - aRegisterCB ( this, CUI_RES( CB_REGISTER ) ), aRegisterFL ( this, CUI_RES( FL_REGISTER ) ), + aRegisterCB ( this, CUI_RES( CB_REGISTER ) ), pActLineDistFld ( &aLineDistAtPercentBox ), nAbst ( MAX_DURCH ), nWidth ( 11905 /*567 * 50*/ ), @@ -676,6 +677,9 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent, FreeResource(); Init_Impl(); aFLineIndent.SetMin(-9999); // wird default auf 0 gesetzt + + aExampleWin.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + } @@ -1093,6 +1097,9 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSe aTextDirectionLB.Show(); } } + + aExampleWin.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + } /*-----------------16.01.97 19.33------------------- @@ -1933,6 +1940,7 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_EXT_PARAGRAPH ), rAttr ), + aExtFL ( this, CUI_RES( FL_HYPHEN ) ), aHyphenBox ( this, CUI_RES( BTN_HYPHEN ) ), aBeforeText ( this, CUI_RES( FT_HYPHENBEFORE ) ), aExtHyphenBeforeBox ( this, CUI_RES( ED_HYPHENBEFORE ) ), @@ -1940,7 +1948,6 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe aExtHyphenAfterBox ( this, CUI_RES( ED_HYPHENAFTER ) ), aMaxHyphenLabel ( this, CUI_RES( FT_MAXHYPH ) ), aMaxHyphenEdit ( this, CUI_RES( ED_MAXHYPH ) ), - aExtFL ( this, CUI_RES( FL_HYPHEN ) ), aBreaksFL ( this, CUI_RES( FL_BREAKS ) ), aPageBreakBox ( this, CUI_RES( BTN_PAGEBREAK ) ), aBreakTypeFT ( this, CUI_RES( FT_BREAKTYPE )), @@ -1970,6 +1977,11 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe { FreeResource(); + aApplyCollBox.SetAccessibleRelationLabeledBy(&aApplyCollBtn); + aApplyCollBox.SetAccessibleName(String(CUI_RES(STR_PAGE_STYLE))); + aOrphanRowNo.SetAccessibleRelationLabeledBy(&aOrphanBox); + aWidowRowNo.SetAccessibleRelationLabeledBy(&aWidowBox); + // diese Page braucht ExchangeSupport SetExchangeSupport(); diff --git a/cui/source/tabpages/paragrph.hrc b/cui/source/tabpages/paragrph.hrc index 8a14407a9cd0..c6158a22ceda 100644 --- a/cui/source/tabpages/paragrph.hrc +++ b/cui/source/tabpages/paragrph.hrc @@ -117,5 +117,9 @@ #define CB_AS_SCRIPT_SPACE 7 +//IAccessibility2 Implementation 2009----- +#define STR_EXAMPLE 5010 +#define STR_PAGE_STYLE 5011 +//-----IAccessibility2 Implementation 2009 #endif diff --git a/cui/source/tabpages/paragrph.src b/cui/source/tabpages/paragrph.src index e7e50842ba1c..cd13bdb12a6d 100644 --- a/cui/source/tabpages/paragrph.src +++ b/cui/source/tabpages/paragrph.src @@ -732,39 +732,12 @@ TabPage RID_SVXPAGE_PARA_ASIAN }; }; -// ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +String STR_EXAMPLE +{ + Text [ en-US ] = "Example" ; +}; +String STR_PAGE_STYLE +{ + Text [ en-US ] = "Page Style" ; +}; diff --git a/cui/source/tabpages/tabarea.hrc b/cui/source/tabpages/tabarea.hrc index 10fe10f1495d..8e2f9b4344c2 100644 --- a/cui/source/tabpages/tabarea.hrc +++ b/cui/source/tabpages/tabarea.hrc @@ -185,3 +185,7 @@ #define IMG_LOAD_H 23 #define IMG_SAVE_H 24 +// IAccessibility2 implementation 2009 ------ +#define STR_CUI_COLORMODEL 5030 +#define STR_LB_HATCHINGSTYLE 5031 +// ------ IAccessibility2 implementation 2009. diff --git a/cui/source/tabpages/tabarea.src b/cui/source/tabpages/tabarea.src index a9e4ccd207a6..8303509d4c64 100644 --- a/cui/source/tabpages/tabarea.src +++ b/cui/source/tabpages/tabarea.src @@ -1563,59 +1563,13 @@ Image RID_SVXIMG_SAVE_H MASKCOLOR }; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +String STR_LB_HATCHINGSTYLE +{ + Text [ en-US ] = "Hatching Style" ; +}; +String STR_CUI_COLORMODEL +{ + Text [ en-US ] = "Color Mode" ; +}; diff --git a/cui/source/tabpages/tabline.hrc b/cui/source/tabpages/tabline.hrc index 0034e2126bf5..81e9e99e5061 100644 --- a/cui/source/tabpages/tabline.hrc +++ b/cui/source/tabpages/tabline.hrc @@ -41,6 +41,21 @@ #define FT_LINE_ENDS_WIDTH 6 #define LB_START_STYLE 3 #define LB_END_STYLE 4 +//IAccessibility2 Impplementaton 2009----- +#define STR_STYLE (LB_END_STYLE+1) +#define STR_LB_START_STYLE 30 +#define STR_LB_END_STYLE 31 +#define STR_MTR_FLD_START_WIDTH 32 +#define STR_MTR_FLD_END_WIDTH 33 +#define STR_CENTER_START 34 +#define STR_CENTER_END 35 +#define STR_START_TYPE 36 +#define STR_END_TYPE 37 +#define STR_START_NUM 38 +#define STR_END_NUM 39 +#define STR_START_LENGTH 40 +#define STR_END_LENGTH 41 +//-----IAccessibility2 Impplementaton 2009 #define MTR_FLD_START_WIDTH 3 #define MTR_FLD_END_WIDTH 2 #define CBX_SYNCHRONIZE 1 @@ -103,4 +118,13 @@ #define MN_SYMBOLS_AUTO 5 #define MN_GALLERY_ENTRY 100 - +/* +//IAccessibility2 Implementation 2009----- +#define STR_START_TYPE 1 +#define STR_END_TYPE 2 +#define STR_START_NUM 3 +#define STR_END_NUM 4 +#define STR_START_LENGTH 5 +#define STR_END_LENGTH 6 +//-----IAccessibility2 Implementation 2009 +*/ diff --git a/cui/source/tabpages/tabline.src b/cui/source/tabpages/tabline.src index 4e40debbee6d..bdda4ebd1e54 100644 --- a/cui/source/tabpages/tabline.src +++ b/cui/source/tabpages/tabline.src @@ -385,6 +385,34 @@ TabPage RID_SVXPAGE_LINE Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Keep ratio" ; }; + String STR_STYLE + { + Text [ en-US ] = "Style" ; + }; + String STR_LB_START_STYLE + { + Text [ en-US ] = "Start style" ; + }; + String STR_LB_END_STYLE + { + Text [ en-US ] = "End style" ; + }; + String STR_MTR_FLD_START_WIDTH + { + Text [ en-US ] = "Start width" ; + }; + String STR_MTR_FLD_END_WIDTH + { + Text [ en-US ] = "End width" ; + }; + String STR_CENTER_START + { + Text [ en-US ] = "Start with center" ; + }; + String STR_CENTER_END + { + Text [ en-US ] = "End with center" ; + }; }; // Defining LineStyles -------------------- @@ -635,6 +663,30 @@ TabPage RID_SVXPAGE_LINE_DEF Size = MAP_APPFONT ( 248 , 40 ) ; }; + String STR_START_TYPE + { + Text [ en-US ] = "Start type" ; + }; + String STR_END_TYPE + { + Text [ en-US ] = "End type" ; + }; + String STR_START_NUM + { + Text [ en-US ] = "Start number" ; + }; + String STR_END_NUM + { + Text [ en-US ] = "End number" ; + }; + String STR_START_LENGTH + { + Text [ en-US ] = "Start length" ; + }; + String STR_END_LENGTH + { + Text [ en-US ] = "End length" ; + }; }; // Defining LineEnds -------------------- diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index e1e65404b1a2..66326a710f38 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -106,9 +106,10 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_TABULATOR ), rAttr ), - aTabBox ( this, CUI_RES( ED_TABPOS ) ), aTabLabel ( this, CUI_RES( FL_TABPOS ) ), + aTabBox ( this, CUI_RES( ED_TABPOS ) ), aTabLabelVert ( this, CUI_RES( FL_TABPOS_VERT ) ), + aTabTypeLabel ( this, CUI_RES( FL_TABTYPE ) ), aLeftTab ( this, CUI_RES( BTN_TABTYPE_LEFT ) ), aRightTab ( this, CUI_RES( BTN_TABTYPE_RIGHT ) ), aCenterTab ( this, CUI_RES( BTN_TABTYPE_CENTER ) ), @@ -119,14 +120,13 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, pDezWin ( new TabWin_Impl( this, CUI_RES( WIN_TABDECIMAL ), (USHORT)(RULER_TAB_DECIMAL|WB_HORZ) ) ), aDezCharLabel ( this, CUI_RES( FT_TABTYPE_DECCHAR ) ), aDezChar ( this, CUI_RES( ED_TABTYPE_DECCHAR ) ), - aTabTypeLabel ( this, CUI_RES( FL_TABTYPE ) ), + aFillLabel ( this, CUI_RES( FL_FILLCHAR ) ), aNoFillChar ( this, CUI_RES( BTN_FILLCHAR_NO ) ), aFillPoints ( this, CUI_RES( BTN_FILLCHAR_POINTS ) ), aFillDashLine ( this, CUI_RES( BTN_FILLCHAR_DASHLINE ) ), aFillSolidLine ( this, CUI_RES( BTN_FILLCHAR_UNDERSCORE ) ), aFillSpecial ( this, CUI_RES( BTN_FILLCHAR_OTHER ) ), aFillChar ( this, CUI_RES( ED_FILLCHAR_OTHER ) ), - aFillLabel ( this, CUI_RES( FL_FILLCHAR ) ), aNewBtn ( this, CUI_RES( BTN_NEW ) ), aDelAllBtn ( this, CUI_RES( BTN_DELALL ) ), aDelBtn ( this, CUI_RES( BTN_DEL ) ), @@ -145,6 +145,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aRightTab .SetText(String(CUI_RES( ST_RIGHTTAB_ASIAN ))); } + aFillChar.SetAccessibleName(String(CUI_RES( ST_FILLCHAR_OTHER ))); // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -182,6 +183,22 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aTabBox.SetDoubleClickHdl( LINK( this, SvxTabulatorTabPage, SelectHdl_Impl ) ); aTabBox.SetModifyHdl( LINK( this, SvxTabulatorTabPage, ModifyHdl_Impl ) ); + aLeftTab.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aRightTab.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aCenterTab.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aDezTab.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aDezCharLabel.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aDezChar.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + + aNoFillChar.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillPoints.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillDashLine.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillSolidLine.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillSpecial.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillChar.SetAccessibleRelationMemberOf( &aFillLabel ); + + aFillChar.SetAccessibleRelationLabeledBy(&aFillSpecial); + // das Default-Dezimalzeichen vom System holen LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); aAktTab.GetDecimal() = aLocaleWrapper.getNumDecimalSep().GetChar(0); diff --git a/cui/source/tabpages/tabstpge.hrc b/cui/source/tabpages/tabstpge.hrc index be3823fd9cd4..40bcc35dba0d 100644 --- a/cui/source/tabpages/tabstpge.hrc +++ b/cui/source/tabpages/tabstpge.hrc @@ -59,5 +59,8 @@ #define BTN_DELALL 52 #define ST_LEFTTAB_ASIAN 53 #define ST_RIGHTTAB_ASIAN 54 +//IAccessibility2 Implementation 2009----- +#define ST_FILLCHAR_OTHER 55 +//-----IAccessibility2 Implementation 2009 #endif diff --git a/cui/source/tabpages/tabstpge.src b/cui/source/tabpages/tabstpge.src index 6a92d21d3ad4..e4f2c600a87e 100644 --- a/cui/source/tabpages/tabstpge.src +++ b/cui/source/tabpages/tabstpge.src @@ -207,40 +207,9 @@ TabPage RID_SVXPAGE_TABULATOR { Text [ en-US ] = "Righ~t/Bottom" ; }; + String ST_FILLCHAR_OTHER + { + Text [ en-US ] = "Character" ; + }; }; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index cfff61fd5009..52cfb8378902 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -158,6 +158,24 @@ SvxTextAnimationPage::SvxTextAnimationPage( Window* pWindow, const SfxItemSet& r aBtnLeft.SetClickHdl( aLink ); aBtnRight.SetClickHdl( aLink ); aBtnDown.SetClickHdl( aLink ); + + aNumFldCount.SetAccessibleRelationLabeledBy( &aTsbEndless ); + aMtrFldAmount.SetAccessibleRelationLabeledBy( &aTsbPixel ); + aMtrFldDelay.SetAccessibleRelationLabeledBy( &aTsbAuto ); + + aBtnUp.SetAccessibleRelationLabeledBy( &aFtDirection ); + aBtnLeft.SetAccessibleRelationLabeledBy( &aFtDirection ); + aBtnRight.SetAccessibleRelationLabeledBy( &aFtDirection ); + aBtnDown.SetAccessibleRelationLabeledBy( &aFtDirection ); + + aBtnUp.SetAccessibleRelationMemberOf( &aFlEffect ); + aBtnLeft.SetAccessibleRelationMemberOf( &aFlEffect ); + aBtnRight.SetAccessibleRelationMemberOf( &aFlEffect ); + aBtnDown.SetAccessibleRelationMemberOf( &aFlEffect ); + + aTsbEndless.SetAccessibleRelationLabeledBy( &aFtCount ); + aTsbPixel.SetAccessibleRelationLabeledBy( &aFtAmount ); + aTsbAuto.SetAccessibleRelationLabeledBy( &aFtDelay ); } /************************************************************************* diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 93330fbeb4dd..ca02fd3c4a74 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -144,6 +144,8 @@ SvxTextAttrPage::SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs ) aTsbFullWidth.SetClickHdl( LINK( this, SvxTextAttrPage, ClickFullWidthHdl_Impl ) ); + + aCtlPosition.SetAccessibleRelationMemberOf( &aFlPosition ); } /************************************************************************* diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 774a58b4a34d..fdf912f0e2aa 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -57,7 +57,7 @@ #include "svx/dlgutil.hxx" #include //add CHINA001 #include //add CHINA001 - +#include "paragrph.hrc" #define DLGWIN this->GetParent()->GetParent() // static ---------------------------------------------------------------- @@ -288,6 +288,11 @@ SvxTransparenceTabPage::SvxTransparenceTabPage(Window* pParent, const SfxItemSet { FreeResource(); + String accName = String(CUI_RES(STR_EXAMPLE)); + aCtlBitmapPreview.SetAccessibleName(accName); + aCtlXRectPreview.SetAccessibleName(accName); + aMtrTransparent.SetAccessibleRelationLabeledBy( &aRbtTransLinear ); + // main selection aRbtTransOff.SetClickHdl(LINK(this, SvxTransparenceTabPage, ClickTransOffHdl_Impl)); aRbtTransLinear.SetClickHdl(LINK(this, SvxTransparenceTabPage, ClickTransLinearHdl_Impl)); @@ -670,6 +675,10 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : { FreeResource(); + String accName = String(CUI_RES(STR_EXAMPLE)); + aCtlXRectPreview.SetAccessibleName(accName); + aCtlBitmapPreview.SetAccessibleName(accName); + // Gruppen, die sich ueberlagern aLbBitmap.Hide(); aCtlBitmapPreview.Hide(); @@ -766,6 +775,15 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : // #i76307# always paint the preview in LTR, because this is what the document does aCtlXRectPreview.EnableRTL(FALSE); + + aNumFldStepCount.SetAccessibleRelationLabeledBy( &aTsbStepCount ); + aCtlPosition.SetAccessibleRelationMemberOf( &aFlPosition ); + aLbHatchBckgrdColor.SetAccessibleRelationLabeledBy( &aCbxHatchBckgrd ); + aLbHatchBckgrdColor.SetAccessibleName(aCbxHatchBckgrd.GetText()); + + aLbColor.SetAccessibleRelationMemberOf( &aFlProp ); + aMtrFldOffset.SetAccessibleRelationLabeledBy(&aFlOffset); + aMtrFldOffset.SetAccessibleName(aFlOffset.GetText()); } // ----------------------------------------------------------------------- diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 9060b6fb013e..906c64954474 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -71,6 +71,7 @@ #include //CHINA001 #include #include "sfx2/opengrf.hxx" +#include "paragrph.hrc" #define DLGWIN this->GetParent()->GetParent() @@ -148,6 +149,16 @@ SvxBitmapTabPage::SvxBitmapTabPage aLbBackgroundColor.SetSelectHdl( LINK( this, SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl ) ); + String accName = String(SVX_RES(STR_EXAMPLE)); + aCtlPreview.SetAccessibleName(accName); + aCtlPixel.SetAccessibleRelationMemberOf( &aFlProp ); + aCtlPixel.SetAccessibleRelationLabeledBy( &aFtPixelEdit ); + aLbBitmaps.SetAccessibleRelationLabeledBy(&aLbBitmaps); + aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnImport.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp ); + } // ----------------------------------------------------------------------- diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 5152bd0e9478..88c90af0f0eb 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -173,6 +173,11 @@ SvxColorTabPage::SvxColorTabPage aValSetColorTable.SetExtraSpacing( 0 ); aValSetColorTable.Show(); + aLbColorModel.SetAccessibleName( String( CUI_RES(STR_CUI_COLORMODEL) ) ); + aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnWorkOn.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp ); } // ----------------------------------------------------------------------- @@ -1121,6 +1126,12 @@ IMPL_LINK( SvxColorTabPage, SelectColorModelHdl_Impl, void *, EMPTYARG ) aMtrFldColorModel3.SetValue( ColorToPercent_Impl( aAktuellColor.GetBlue() ) ); aMtrFldColorModel4.SetValue( ColorToPercent_Impl( aAktuellColor.GetTransparency() ) ); } + + aMtrFldColorModel1.SetAccessibleName( GetNonMnemonicString(aFtColorModel1.GetText()) ); + aMtrFldColorModel2.SetAccessibleName( GetNonMnemonicString(aFtColorModel2.GetText()) ); + aMtrFldColorModel3.SetAccessibleName( GetNonMnemonicString(aFtColorModel3.GetText()) ); + aMtrFldColorModel4.SetAccessibleName( GetNonMnemonicString(aFtColorModel4.GetText()) ); + return( 0L ); } diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 1de256416b9d..bb81be3196c5 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -54,6 +54,7 @@ #include #include #include +#include "paragrph.hrc" #define DLGWIN this->GetParent()->GetParent() @@ -114,6 +115,10 @@ SvxGradientTabPage::SvxGradientTabPage FreeResource(); + aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + aLbGradients.SetAccessibleName( GetText()); + + // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -154,6 +159,11 @@ SvxGradientTabPage::SvxGradientTabPage aBtnSave.SetClickHdl( LINK( this, SvxGradientTabPage, ClickSaveHdl_Impl ) ); + aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp ); + aLbGradients.SetAccessibleRelationLabeledBy(&aLbGradients); + // #i76307# always paint the preview in LTR, because this is what the document does aCtlPreview.EnableRTL( FALSE ); } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 4fa65d95221a..fc9fe25892b7 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -54,6 +54,7 @@ #include #include "svx/dlgutil.hxx" #include +#include "paragrph.hrc" #include #define DLGWIN this->GetParent()->GetParent() @@ -153,6 +154,15 @@ SvxHatchTabPage::SvxHatchTabPage aBtnSave.SetClickHdl( LINK( this, SvxHatchTabPage, ClickSaveHdl_Impl ) ); aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + + aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + aLbHatchings.SetAccessibleName( String(CUI_RES(STR_LB_HATCHINGSTYLE)) ); + aCtlAngle.SetAccessibleRelationMemberOf( &aFlProp ); + aLbHatchings.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp ); + aLbHatchings.SetAccessibleRelationLabeledBy(&aLbHatchings); } // ----------------------------------------------------------------------- diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 2fee90d5871b..682721d56b39 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -68,6 +68,7 @@ #include #include #include +#include "paragrph.hrc" #include "sfx2/opengrf.hxx" #include #include @@ -105,6 +106,7 @@ SvxLineTabPage::SvxLineTabPage const SfxItemSet& rInAttrs ) : SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_LINE ), rInAttrs ), + aFlLine ( this, CUI_RES( FL_LINE ) ), aFtLineStyle ( this, CUI_RES( FT_LINE_STYLE ) ), aLbLineStyle ( this, CUI_RES( LB_LINE_STYLE ) ), aFtColor ( this, CUI_RES( FT_COLOR ) ), @@ -113,19 +115,18 @@ SvxLineTabPage::SvxLineTabPage aMtrLineWidth ( this, CUI_RES( MTR_FLD_LINE_WIDTH ) ), aFtTransparent ( this, CUI_RES( FT_TRANSPARENT ) ), aMtrTransparent ( this, CUI_RES( MTR_LINE_TRANSPARENT ) ), - aFlLine ( this, CUI_RES( FL_LINE ) ), - aFtLineEndsStyle ( this, CUI_RES( FT_LINE_ENDS_STYLE ) ), + aFlLineEnds ( this, CUI_RES( FL_LINE_ENDS ) ), aLbStartStyle ( this, CUI_RES( LB_START_STYLE ) ), - aFtLineEndsWidth ( this, CUI_RES( FT_LINE_ENDS_WIDTH ) ), aMtrStartWidth ( this, CUI_RES( MTR_FLD_START_WIDTH ) ), aTsbCenterStart ( this, CUI_RES( TSB_CENTER_START ) ), + aFtLineEndsStyle ( this, CUI_RES( FT_LINE_ENDS_STYLE ) ), aLbEndStyle ( this, CUI_RES( LB_END_STYLE ) ), + aFtLineEndsWidth ( this, CUI_RES( FT_LINE_ENDS_WIDTH ) ), aMtrEndWidth ( this, CUI_RES( MTR_FLD_END_WIDTH ) ), aTsbCenterEnd ( this, CUI_RES( TSB_CENTER_END ) ), aCbxSynchronize ( this, CUI_RES( CBX_SYNCHRONIZE ) ), - aFlLineEnds ( this, CUI_RES( FL_LINE_ENDS ) ), - aCtlPreview ( this, CUI_RES( CTL_PREVIEW ) ), aFLSeparator ( this, CUI_RES( FL_SEPARATOR ) ), + aCtlPreview ( this, CUI_RES( CTL_PREVIEW ) ), // #116827# maFLEdgeStyle ( this, CUI_RES( FL_EDGE_STYLE ) ), @@ -165,8 +166,18 @@ SvxLineTabPage::SvxLineTabPage pnColorTableState( 0 ), nPageType ( 0 )//CHINA001 pPageType ( NULL ), { + aLbEndStyle.SetAccessibleName(String(CUI_RES(STR_STYLE))); + aLbStartStyle.SetAccessibleName(String(CUI_RES( STR_LB_START_STYLE ) ) ); + aMtrStartWidth.SetAccessibleName(String(CUI_RES( STR_MTR_FLD_START_WIDTH ) ) ); + aLbEndStyle.SetAccessibleName(String(CUI_RES( STR_LB_END_STYLE ) ) ); + aMtrEndWidth.SetAccessibleName(String(CUI_RES( STR_MTR_FLD_END_WIDTH ) ) ); + aTsbCenterStart.SetAccessibleName(String(CUI_RES( STR_CENTER_START ) ) ); + aTsbCenterEnd.SetAccessibleName(String(CUI_RES( STR_CENTER_END ) ) ); + FreeResource(); + aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + // diese Page braucht ExchangeSupport SetExchangeSupport(); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 5f1b385e8137..f42d67fdee11 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -113,6 +113,13 @@ SvxLineDefTabPage::SvxLineDefTabPage aBtnLoad.SetModeImage( Image( CUI_RES( RID_SVXIMG_LOAD_H ) ), BMP_COLOR_HIGHCONTRAST ); aBtnSave.SetModeImage( Image( CUI_RES( RID_SVXIMG_SAVE_H ) ), BMP_COLOR_HIGHCONTRAST ); + aLbType1.SetAccessibleName(String(CUI_RES( STR_START_TYPE ) ) ); + aLbType2.SetAccessibleName(String(CUI_RES( STR_END_TYPE ) ) ); + aNumFldNumber1.SetAccessibleName(String(CUI_RES( STR_START_NUM ) ) ); + aNumFldNumber2.SetAccessibleName(String(CUI_RES( STR_END_NUM ) ) ); + aMtrLength1.SetAccessibleName(String(CUI_RES( STR_START_LENGTH ) ) ); + aMtrLength2.SetAccessibleName(String(CUI_RES( STR_END_LENGTH ) ) ); + FreeResource(); // diese Page braucht ExchangeSupport @@ -175,6 +182,12 @@ SvxLineDefTabPage::SvxLineDefTabPage aMtrDistance.SetModifyHdl( aLink ); pDashList = NULL; + + aBtnAdd.SetAccessibleRelationMemberOf( &aFlDefinition ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlDefinition ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlDefinition ); + aBtnLoad.SetAccessibleRelationMemberOf( &aFlDefinition ); + aBtnSave.SetAccessibleRelationMemberOf( &aFlDefinition ); } diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 4949ce4da6fa..598d3c4c42af 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -135,6 +135,9 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage aLbLineEnds.SetSelectHdl( LINK( this, SvxLineEndDefTabPage, SelectLineEndHdl_Impl ) ); + aBtnAdd.SetAccessibleRelationMemberOf(&aFlTip); + aBtnModify.SetAccessibleRelationMemberOf(&aFlTip); + aBtnDelete.SetAccessibleRelationMemberOf(&aFlTip); } //------------------------------------------------------------------------ diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 3accd144efcc..c1283acada68 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -46,7 +46,7 @@ #include #include "svx/dlgutil.hxx" #include - +#include "paragrph.hrc" #include #include //add CHINA001 @@ -188,6 +188,8 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs aMtrTransparent.SetModifyHdl( aLink ); aMtrDistance.SetModifyHdl( aLink ); + aCtlXRectPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + aCtlPosition.SetAccessibleRelationMemberOf( &aFlProp ); } // ----------------------------------------------------------------------- diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index e42f85c811f1..c99fee2bb42f 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -249,6 +249,11 @@ SvxAngleTabPage::SvxAngleTabPage( Window* pParent, const SfxItemSet& rInAttrs ) ePoolUnit = pPool->GetMetric(SID_ATTR_TRANSFORM_POS_X); aMtrAngle.SetModifyHdl(LINK( this, SvxAngleTabPage, ModifiedHdl)); + + aCtlRect.SetAccessibleRelationLabeledBy(&aFtPosPresets); + aCtlRect.SetAccessibleRelationMemberOf(&aFlPosition); + aCtlAngle.SetAccessibleRelationLabeledBy(&aFtAnglePresets); + aCtlAngle.SetAccessibleRelationMemberOf(&aFlAngle); } // ----------------------------------------------------------------------- @@ -765,6 +770,10 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage( Window* pParent, const SfxItemSe maTsbPosProtect.SetClickHdl( LINK( this, SvxPositionSizeTabPage, ChangePosProtectHdl ) ); maTsbSizeProtect.SetClickHdl( LINK( this, SvxPositionSizeTabPage, ChangeSizeProtectHdl ) ); + maCtlPos.SetAccessibleRelationMemberOf( &maFlPosition ); + maCtlSize.SetAccessibleRelationMemberOf( &maFlSize ); + maCtlPos.SetAccessibleRelationLabeledBy( &maFtPosReference ); + maCtlSize.SetAccessibleRelationLabeledBy( &maFtSizeReference ); } // ----------------------------------------------------------------------- -- cgit From 1f197059a0856e76c7e6fdb0cb5584c767734ed9 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 20 Jan 2011 13:38:53 +0100 Subject: vcl118: #i116501# additional needed fixes for gbuild migration --- padmin/AllLangResTarget_spa.mk | 2 +- padmin/source/padialog.src | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/padmin/AllLangResTarget_spa.mk b/padmin/AllLangResTarget_spa.mk index b3acb92f81d5..1fd6e42dad56 100644 --- a/padmin/AllLangResTarget_spa.mk +++ b/padmin/AllLangResTarget_spa.mk @@ -27,7 +27,7 @@ $(eval $(call gb_AllLangResTarget_AllLangResTarget,spa)) -$(eval $(call gb_AllLangResTarget_set_reslocation,spa,padmin/source)) +$(eval $(call gb_AllLangResTarget_set_reslocation,spa,padmin)) $(eval $(call gb_AllLangResTarget_add_srs,spa,\ padmin/source \ diff --git a/padmin/source/padialog.src b/padmin/source/padialog.src index 09ce29a2c682..85191f3dddf9 100644 --- a/padmin/source/padialog.src +++ b/padmin/source/padialog.src @@ -483,47 +483,47 @@ String RID_YOU_SURE Bitmap RID_BUTTERFLY { - File = "butter.png" ; + File = "source/butter.png" ; }; Bitmap RID_BMP_SMALL_PRINTER { - File = "print.png"; + File = "source/print.png"; }; Bitmap RID_BMP_SMALL_FAX { - File = "fax.png"; + File = "source/fax.png"; }; Bitmap RID_BMP_SMALL_PDF { - File = "pdf.png"; + File = "source/pdf.png"; }; Bitmap RID_BMP_PRINTER { - File = "printer_large.png"; + File = "source/printer_large.png"; }; Bitmap RID_BMP_SMALL_PRINTER_HC { - File = "printer_16_h.png"; + File = "source/printer_16_h.png"; }; Bitmap RID_BMP_SMALL_FAX_HC { - File = "fax_16_h.png"; + File = "source/fax_16_h.png"; }; Bitmap RID_BMP_SMALL_PDF_HC { - File = "printpdf_16_h.png"; + File = "source/printpdf_16_h.png"; }; Bitmap RID_BMP_PRINTER_HC { - File = "printer_40x48_h.png"; + File = "source/printer_40x48_h.png"; }; -- cgit From 8c5a96fcc44f060467680b5d9104bba2f091d4b7 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 20 Jan 2011 13:38:53 +0100 Subject: vcl118: #i116501# additional needed fixes for gbuild migration --- Repository.mk | 4 ++++ solenv/gbuild/platform/linux.mk | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Repository.mk b/Repository.mk index bc5ef65f88c4..c78c7205f171 100644 --- a/Repository.mk +++ b/Repository.mk @@ -38,6 +38,10 @@ $(eval $(call gb_Helper_register_executables,NONE, \ sspretty \ )) +$(eval $(call gb_Helper_register_executables,OOO, \ + spadmin.bin \ +)) + $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ avmedia \ basegfx \ diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk index f8505ccd39fd..71ebb8a2b2c6 100755 --- a/solenv/gbuild/platform/linux.mk +++ b/solenv/gbuild/platform/linux.mk @@ -309,7 +309,7 @@ gb_Executable_LAYER := \ define gb_Executable_get_rpath --Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1))) \ +-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1))) \ -Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION) endef -- cgit From b6ac7ef63c50895d04d314491b26b3b371d5fc93 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 20 Jan 2011 13:52:50 +0100 Subject: gridsort: GridTableRenderer::impl_paintCellContent allow for XInterfaces which are NULL, without asserting them --- svtools/source/table/gridtablerenderer.cxx | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 91f78ff7fbc5..3015cadff817 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -51,6 +51,8 @@ namespace svt { namespace table using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::TypeClass_INTERFACE; using ::com::sun::star::graphic::XGraphic; using ::com::sun::star::style::HorizontalAlignment; using ::com::sun::star::style::HorizontalAlignment_LEFT; @@ -520,9 +522,16 @@ namespace svt { namespace table Any aCellContent; m_pImpl->rModel.getCellContent( i_context.nColumn, m_pImpl->nCurrentRow, aCellContent ); - const Reference< XGraphic > xGraphic( aCellContent, UNO_QUERY ); - if ( xGraphic.is() ) + if ( aCellContent.getValueTypeClass() == TypeClass_INTERFACE ) { + Reference< XInterface > const xContentInterface( aCellContent, UNO_QUERY ); + if ( !xContentInterface.is() ) + // allowed. kind of. + return; + + Reference< XGraphic > const xGraphic( aCellContent, UNO_QUERY ); + ENSURE_OR_RETURN_VOID( xGraphic.is(), "GridTableRenderer::impl_paintCellContent: only XGraphic interfaces (or NULL) are supported for painting." ); + const Image aImage( xGraphic ); impl_paintCellImage( i_context, aImage ); return; @@ -568,10 +577,20 @@ namespace svt { namespace table if ( !i_cellContent.hasValue() ) return true; - Reference< XGraphic > const xGraphic( i_cellContent, UNO_QUERY ); - if ( xGraphic.is() ) - // for the moment, assume it fits. We can always scale it down during painting ... + if ( i_cellContent.getValueTypeClass() == TypeClass_INTERFACE ) + { + Reference< XInterface > const xContentInterface( i_cellContent, UNO_QUERY ); + if ( !xContentInterface.is() ) + return true; + + Reference< XGraphic > const xGraphic( i_cellContent, UNO_QUERY ); + if ( xGraphic.is() ) + // for the moment, assume it fits. We can always scale it down during painting ... + return true; + + OSL_ENSURE( false, "GridTableRenderer::FitsIntoCell: only XGraphic interfaces (or NULL) are supported for painting." ); return true; + } ::rtl::OUString const sText( CellValueConversion::convertToString( i_cellContent ) ); if ( sText.getLength() == 0 ) -- cgit From 38fe580341a3f1e379edada08db7e1aebab258f5 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Thu, 20 Jan 2011 16:34:26 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (sc module) --- sc/inc/sc.hrc | 3 ++ sc/source/ui/app/inputhdl.cxx | 7 ++++- sc/source/ui/app/inputwin.cxx | 1 + sc/source/ui/attrdlg/condfrmt.cxx | 30 +++++++++++++++++-- sc/source/ui/dbgui/dbnamdlg.cxx | 1 + sc/source/ui/dbgui/filtdlg.cxx | 59 +++++++++++++++++++++++++++++++++++++ sc/source/ui/dbgui/scendlg.cxx | 5 ++++ sc/source/ui/dbgui/scendlg.hrc | 3 ++ sc/source/ui/dbgui/scendlg.src | 4 +++ sc/source/ui/dbgui/scuiasciiopt.cxx | 3 ++ sc/source/ui/dbgui/sfiltdlg.cxx | 7 ++++- sc/source/ui/dbgui/tpsort.cxx | 7 +++++ sc/source/ui/dbgui/tpsubt.cxx | 3 ++ sc/source/ui/inc/areasdlg.hxx | 6 ++-- sc/source/ui/inc/condfrmt.hrc | 6 ++++ sc/source/ui/inc/condfrmt.hxx | 7 ++--- sc/source/ui/inc/filldlg.hxx | 19 ++++++------ sc/source/ui/inc/filtdlg.hxx | 2 +- sc/source/ui/inc/filter.hrc | 8 ++++- sc/source/ui/inc/instbdlg.hxx | 4 +-- sc/source/ui/inc/shtabdlg.hxx | 2 +- sc/source/ui/miscdlgs/crnrdlg.cxx | 3 ++ sc/source/ui/miscdlgs/filldlg.cxx | 18 ++++++----- sc/source/ui/miscdlgs/highred.cxx | 1 + sc/source/ui/miscdlgs/highred.src | 2 +- sc/source/ui/miscdlgs/instbdlg.cxx | 5 ++-- sc/source/ui/miscdlgs/linkarea.cxx | 3 ++ sc/source/ui/miscdlgs/optsolver.cxx | 13 ++++++++ sc/source/ui/miscdlgs/shtabdlg.cxx | 4 +-- sc/source/ui/miscdlgs/solvrdlg.cxx | 3 ++ sc/source/ui/namedlg/namedlg.cxx | 2 ++ sc/source/ui/navipi/navipi.cxx | 4 +++ sc/source/ui/pagedlg/areasdlg.cxx | 6 ++-- sc/source/ui/pagedlg/tphf.cxx | 2 ++ sc/source/ui/pagedlg/tptable.cxx | 3 ++ sc/source/ui/src/condfrmt.src | 49 ++++++++---------------------- sc/source/ui/src/filter.src | 20 +++++++++++++ sc/source/ui/src/scstring.src | 17 +++++++++++ 38 files changed, 262 insertions(+), 80 deletions(-) diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 159da72a34d2..382f106562c8 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -993,6 +993,9 @@ #define STR_ACC_DATAPILOT_COL_DESCR (STR_START + 179) #define STR_ACC_DATAPILOT_DATA_DESCR (STR_START + 180) #define STR_ACC_DATAPILOT_SEL_DESCR (STR_START + 181) +//IAccessibility2 Implementation 2009----- +#define STR_ACC_TOOLBAR_FORMULA (STR_START + 182) +//-----IAccessibility2 Implementation 2009 // -------------------------------------------------- diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 55aa0986d2ec..520171954138 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3443,8 +3443,13 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, else aCursorPos.Format( aPosStr, SCA_VALID | nFlags, pDoc, aAddrDetails ); } - + //IAccessibility2 Implementation 2009----- + // Disable the accessible VALUE_CHANGE event + BOOL IsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(FALSE); + pInputWin->SetAccessibilityEventsSuppressed(TRUE); pInputWin->SetPosString(aPosStr); + pInputWin->SetAccessibilityEventsSuppressed(IsSuppressed); + //-----IAccessibility2 Implementation 2009 pInputWin->SetSumAssignMode(); } diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index b028a0a153ce..cfd00a3ef098 100755 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -223,6 +223,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : pViewSh->UpdateInputHandler( TRUE ); // unbedingtes Update pImgMgr->RegisterToolBox( this ); + SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA)); } __EXPORT ScInputWindow::~ScInputWindow() diff --git a/sc/source/ui/attrdlg/condfrmt.cxx b/sc/source/ui/attrdlg/condfrmt.cxx index 5e3b23af8afa..04076c956cbf 100644 --- a/sc/source/ui/attrdlg/condfrmt.cxx +++ b/sc/source/ui/attrdlg/condfrmt.cxx @@ -71,7 +71,6 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aFtCond1Template ( this, ScResId( FT_COND1_TEMPLATE ) ), aLbCond1Template ( this, ScResId( LB_COND1_TEMPLATE ) ), aBtnNew1 ( this, ScResId( BTN_COND1_NEW ) ), - aFlSep1 ( this, ScResId( FL_SEP1 ) ), aCbxCond2 ( this, ScResId( CBX_COND2 ) ), aLbCond21 ( this, ScResId( LB_COND2_1 ) ), @@ -84,7 +83,6 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aFtCond2Template ( this, ScResId( FT_COND2_TEMPLATE ) ), aLbCond2Template ( this, ScResId( LB_COND2_TEMPLATE ) ), aBtnNew2 ( this, ScResId( BTN_COND2_NEW ) ), - aFlSep2 ( this, ScResId( FL_SEP2 ) ), aCbxCond3 ( this, ScResId( CBX_COND3 ) ), aLbCond31 ( this, ScResId( LB_COND3_1 ) ), @@ -101,6 +99,8 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), + aFlSep2 ( this, ScResId( FL_SEP2 ) ), + aFlSep1 ( this, ScResId( FL_SEP1 ) ), pEdActive ( NULL ), bDlgLostFocus ( FALSE ), @@ -322,6 +322,32 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( //@BugID 54702 Enablen/Disablen nur noch in Basisklasse //SFX_APPWINDOW->Enable(); // Ref-Feld hat Focus // SFX_APPWINDOW->Disable(); + + aLbCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 ); + aLbCond12.SetAccessibleRelationLabeledBy( &aCbxCond1 ); + aEdtCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 ); + aRbCond11.SetAccessibleRelationLabeledBy( &aCbxCond1 ); + + aLbCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 ); + aLbCond22.SetAccessibleRelationLabeledBy( &aCbxCond2 ); + aEdtCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 ); + aRbCond21.SetAccessibleRelationLabeledBy( &aCbxCond2 ); + + aLbCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 ); + aLbCond32.SetAccessibleRelationLabeledBy( &aCbxCond3 ); + aEdtCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 ); + aRbCond31.SetAccessibleRelationLabeledBy( &aCbxCond3 ); + aLbCond11.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) ); + aLbCond12.SetAccessibleName( ScResId(LABEL_CONDITIONS) ); + aEdtCond11.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) ); + + aLbCond21.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) ); + aLbCond22.SetAccessibleName( ScResId(LABEL_CONDITIONS) ); + aEdtCond21.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) ); + + aLbCond31.SetAccessibleName( ScResId(LABEL_FORMARTTING_CONDITIONS) ); + aLbCond32.SetAccessibleName( ScResId(LABEL_CONDITIONS) ); + aEdtCond31.SetAccessibleName( ScResId(LABEL_CONDITION_VALUE) ); } diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index a2f4d61af537..d20d29930e8c 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -185,6 +185,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, aBtnDoSize, aBtnKeepFmt, aBtnStripData, theCurArea ); Init(); FreeResource(); + aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign); } diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index b5dd2f3242c2..dacc141aaed0 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -132,6 +132,65 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, pTimer = new Timer; pTimer->SetTimeout( 50 ); // 50ms warten pTimer->SetTimeoutHdl( LINK( this, ScFilterDlg, TimeOutHdl ) ); + + String sAccName (ScResId(RID_FILTER_OPERATOR)); + String sIndexName(sAccName); + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1")); + aLbConnect1.SetAccessibleName(sIndexName); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2")); + aLbConnect2.SetAccessibleName(sIndexName); + + sAccName = String(ScResId(RID_FILTER_FIELDNAME)); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1")); + aLbField1.SetAccessibleName(sIndexName); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2")); + aLbField2.SetAccessibleName(sIndexName); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3")); + aLbField3.SetAccessibleName(sIndexName); + + + sAccName = String(ScResId(RID_FILTER_CONDITION)); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1")); + aLbCond1.SetAccessibleName(sIndexName); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2")); + aLbCond2.SetAccessibleName(sIndexName); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3")); + aLbCond3.SetAccessibleName(sIndexName); + + sAccName = String(ScResId(RID_FILTER_VALUE)); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1")); + aEdVal1.SetAccessibleName(sIndexName); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2")); + aEdVal2.SetAccessibleName(sIndexName); + sIndexName = sAccName; + sIndexName.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3")); + aEdVal3.SetAccessibleName(sIndexName); + + aLbCopyArea.SetAccessibleName(ScResId(STR_COPY_AREA_TO)); + aEdCopyArea.SetAccessibleName(ScResId(STR_COPY_AREA_TO)); + aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + + aLbConnect1.SetAccessibleRelationLabeledBy(&aFtConnect); + aLbConnect2.SetAccessibleRelationLabeledBy(&aFtConnect); + aLbField1.SetAccessibleRelationLabeledBy(&aFtField); + aLbField2.SetAccessibleRelationLabeledBy(&aFtField); + aLbField3.SetAccessibleRelationLabeledBy(&aFtField); + aLbCond1.SetAccessibleRelationLabeledBy(&aFtCond); + aLbCond2.SetAccessibleRelationLabeledBy(&aFtCond); + aLbCond3.SetAccessibleRelationLabeledBy(&aFtCond); + aEdVal1.SetAccessibleRelationLabeledBy(&aFtVal); + aEdVal2.SetAccessibleRelationLabeledBy(&aFtVal); + aEdVal3.SetAccessibleRelationLabeledBy(&aFtVal); } diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 96c9f120f5b1..37e1ddbc5580 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -117,6 +117,8 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b aBtnOk .SetClickHdl( LINK( this, ScNewScenarioDlg, OkHdl ) ); aCbShowFrame.SetClickHdl( LINK( this, ScNewScenarioDlg, EnableHdl ) ); + aLbColor.SetAccessibleName(String(ScResId( STR_COLOR ) )); + FreeResource(); aLbColor.SelectEntry( Color( COL_LIGHTGRAY ) ); @@ -142,6 +144,9 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b aCbAttrib.Enable(FALSE); aCbValue.Enable(FALSE); */ + + aEdComment.SetAccessibleRelationMemberOf(&aFlComment); + aLbColor.SetAccessibleRelationLabeledBy(&aCbShowFrame); } //------------------------------------------------------------------------ diff --git a/sc/source/ui/dbgui/scendlg.hrc b/sc/source/ui/dbgui/scendlg.hrc index 83818773bf5a..f7fa562a5b17 100644 --- a/sc/source/ui/dbgui/scendlg.hrc +++ b/sc/source/ui/dbgui/scendlg.hrc @@ -55,3 +55,6 @@ #define STR_CREATEDBY 31 #define STR_ON 32 #define STR_EDIT 33 +//IAccessibility2 Implementation 2009----- +#define STR_COLOR 34 +//-----IAccessibility2 Implementation 2009 diff --git a/sc/source/ui/dbgui/scendlg.src b/sc/source/ui/dbgui/scendlg.src index f7c3d29b8365..640fdda8bc30 100644 --- a/sc/source/ui/dbgui/scendlg.src +++ b/sc/source/ui/dbgui/scendlg.src @@ -147,6 +147,10 @@ ModalDialog RID_SCDLG_NEWSCENARIO { Text [ en-US ] = "on" ; }; + String STR_COLOR + { + Text [ en-US ] = "Display border in" ; + }; FixedLine FL_NAME { Pos = MAP_APPFONT ( 6 , 3 ) ; diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 42f2a2d86933..223557106267 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -410,6 +410,9 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, UpdateVertical(); maTableBox.Execute( CSVCMD_NEWCELLTEXTS ); + + aEdOther.SetAccessibleName(aCkbOther.GetText()); + aEdOther.SetAccessibleRelationLabeledBy(&aCkbOther); } diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index f70fbb094c92..df946873738f 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -70,8 +70,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi : ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_SPEC_FILTER ), // - aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ), aFtFilterArea ( this, ScResId( FT_CRITERIA_AREA ) ), + aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ), aEdFilterArea ( this, this, ScResId( ED_CRITERIA_AREA ) ), aRbFilterArea ( this, ScResId( RB_CRITERIA_AREA ), &aEdFilterArea, this ), // @@ -103,6 +103,11 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi pTimer->SetTimeout( 50 ); // 50ms warten pTimer->SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) ); pTimer->Start(); + + aLbCopyArea.SetAccessibleName(aBtnCopyResult.GetText()); + aEdCopyArea.SetAccessibleName(aBtnCopyResult.GetText()); + aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult); } diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 18c1eb25664a..4c4e8395186c 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -600,6 +600,13 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent, Init(); FreeResource(); SetExchangeSupport(); + + aLbOutPos.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + aLbOutPos.SetAccessibleName(aBtnCopyResult.GetText()); + aEdOutPos.SetAccessibleRelationLabeledBy(&aBtnCopyResult); + aEdOutPos.SetAccessibleName(aBtnCopyResult.GetText()); + aLbSortUser.SetAccessibleRelationLabeledBy(&aBtnSortUser); + aLbSortUser.SetAccessibleName(aBtnSortUser.GetText()); } // ----------------------------------------------------------------------- diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index fbada165b55d..52b7918f12c1 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -523,6 +523,9 @@ ScTpSubTotalOptions::ScTpSubTotalOptions( Window* pParent, { Init(); FreeResource(); + + aLbUserDef.SetAccessibleRelationLabeledBy(&aBtnUserDef); + aLbUserDef.SetAccessibleName(aBtnUserDef.GetText()); } // ----------------------------------------------------------------------- diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx index 08c6e3cf0a91..84616ec2a619 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -62,18 +62,18 @@ public: virtual BOOL Close(); private: - ListBox aLbPrintArea; FixedLine aFlPrintArea; + ListBox aLbPrintArea; formula::RefEdit aEdPrintArea; formula::RefButton aRbPrintArea; - ListBox aLbRepeatRow; FixedLine aFlRepeatRow; + ListBox aLbRepeatRow; formula::RefEdit aEdRepeatRow; formula::RefButton aRbRepeatRow; - ListBox aLbRepeatCol; FixedLine aFlRepeatCol; + ListBox aLbRepeatCol; formula::RefEdit aEdRepeatCol; formula::RefButton aRbRepeatCol; diff --git a/sc/source/ui/inc/condfrmt.hrc b/sc/source/ui/inc/condfrmt.hrc index 099d82b2fa85..773d57db0470 100644 --- a/sc/source/ui/inc/condfrmt.hrc +++ b/sc/source/ui/inc/condfrmt.hrc @@ -63,6 +63,12 @@ #define FL_SEP1 41 #define FL_SEP2 42 +//IAccessibility2 Implementation 2009----- +#define LABEL_FORMARTTING_CONDITIONS 43 +#define LABEL_CONDITIONS 44 +#define LABEL_CONDITION_VALUE 45 +//-----IAccessibility2 Implementation 2009 + #define BTN_OK 31 #define BTN_CANCEL 32 #define BTN_HELP 33 diff --git a/sc/source/ui/inc/condfrmt.hxx b/sc/source/ui/inc/condfrmt.hxx index ecd4c529d57a..f2025cb04536 100644 --- a/sc/source/ui/inc/condfrmt.hxx +++ b/sc/source/ui/inc/condfrmt.hxx @@ -69,8 +69,6 @@ private: FixedText aFtCond1Template; ListBox aLbCond1Template; PushButton aBtnNew1; - FixedLine aFlSep1; - CheckBox aCbxCond2; ListBox aLbCond21; ListBox aLbCond22; @@ -82,8 +80,6 @@ private: FixedText aFtCond2Template; ListBox aLbCond2Template; PushButton aBtnNew2; - FixedLine aFlSep2; - CheckBox aCbxCond3; ListBox aLbCond31; ListBox aLbCond32; @@ -123,7 +119,8 @@ private: Size aCond3Size1; Size aCond3Size2; Size aCond3Size3; - + FixedLine aFlSep2; + FixedLine aFlSep1; formula::RefEdit* pEdActive; BOOL bDlgLostFocus; ScDocument* pDoc; diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx index 7f2fb046093c..8dca05e35962 100644 --- a/sc/source/ui/inc/filldlg.hxx +++ b/sc/source/ui/inc/filldlg.hxx @@ -79,6 +79,15 @@ public: void SetEdStartValEnabled(BOOL bFlag=FALSE); private: + FixedText aFtStartVal; + Edit aEdStartVal; + String aStartStrVal; + + FixedText aFtEndVal; + Edit aEdEndVal; + + FixedText aFtIncrement; + Edit aEdIncrement; FixedLine aFlDirection; RadioButton aBtnDown; RadioButton aBtnRight; @@ -98,17 +107,7 @@ private: RadioButton aBtnDayOfWeek; RadioButton aBtnMonth; RadioButton aBtnYear; - BOOL bStartValFlag; - FixedText aFtStartVal; - Edit aEdStartVal; - String aStartStrVal; - - FixedText aFtEndVal; - Edit aEdEndVal; - - FixedText aFtIncrement; - Edit aEdIncrement; OKButton aBtnOk; CancelButton aBtnCancel; diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index 31e0e3a5d4b1..3d95d94c2260 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -216,8 +216,8 @@ public: virtual BOOL Close(); private: - ListBox aLbFilterArea; FixedText aFtFilterArea; + ListBox aLbFilterArea; formula::RefEdit aEdFilterArea; formula::RefButton aRbFilterArea; diff --git a/sc/source/ui/inc/filter.hrc b/sc/source/ui/inc/filter.hrc index 508c5af9aab5..e6c2b80ceefe 100644 --- a/sc/source/ui/inc/filter.hrc +++ b/sc/source/ui/inc/filter.hrc @@ -79,4 +79,10 @@ #define LB_CRITERIA_AREA 51 #define ED_CRITERIA_AREA 52 #define RB_CRITERIA_AREA 53 - +//IAccessibility2 Implementation 2009----- +#define STR_COPY_AREA_TO 54 +#define RID_FILTER_OPERATOR 55 +#define RID_FILTER_FIELDNAME 56 +#define RID_FILTER_CONDITION 57 +#define RID_FILTER_VALUE 58 +//-----IAccessibility2 Implementation 2009 diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx index 660d16b62cca..6c856f35877f 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -83,9 +83,10 @@ public: SCTAB GetTableCount() { return nTableCount;} private: + FixedLine aFlPos; RadioButton aBtnBefore; RadioButton aBtnBehind; - FixedLine aFlPos; + FixedLine aFlTable; RadioButton aBtnNew; RadioButton aBtnFromFile; FixedText aFtCount; @@ -96,7 +97,6 @@ private: ScExpandedFixedText aFtPath; PushButton aBtnBrowse; CheckBox aBtnLink; - FixedLine aFlTable; OKButton aBtnOk; CancelButton aBtnCancel; HelpButton aBtnHelp; diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx index 00ebb8a7c480..99b2b49c2e91 100644 --- a/sc/source/ui/inc/shtabdlg.hxx +++ b/sc/source/ui/inc/shtabdlg.hxx @@ -44,11 +44,11 @@ class ScShowTabDlg : public ModalDialog { private: + FixedText aFtLbTitle; ::svtools::ToolTipMultiListBox aLb; OKButton aBtnOk; CancelButton aBtnCancel; HelpButton aBtnHelp; - FixedText aFtLbTitle; DECL_LINK( DblClkHdl, void * ); diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 0ad2a2e80ca4..4cf31d02ea11 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -114,6 +114,9 @@ ScColRowNameRangesDlg::ScColRowNameRangesDlg( SfxBindings* pB, xRowNameRanges = pDoc->GetRowNameRanges()->Clone(); Init(); FreeResource(); + + aRbAssign.SetAccessibleRelationMemberOf(&aEdAssign); + aRbAssign2.SetAccessibleRelationMemberOf(&aEdAssign); } diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index 2b247f0f9a07..dd3a8789790b 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -65,6 +65,16 @@ ScFillSeriesDlg::ScFillSeriesDlg( Window* pParent, : ModalDialog ( pParent, ScResId( RID_SCDLG_FILLSERIES ) ), + aFtStartVal ( this, ScResId( FT_START_VALUE ) ), + aEdStartVal ( this, ScResId( ED_START_VALUES ) ), + aStartStrVal ( aStartStr), + + aFtEndVal ( this, ScResId( FT_END_VALUE ) ), + aEdEndVal ( this, ScResId( ED_END_VALUES ) ), + + aFtIncrement ( this, ScResId( FT_INCREMENT ) ), + aEdIncrement ( this, ScResId( ED_INCREMENT ) ), + aFlDirection ( this, ScResId( FL_DIRECTION ) ), aBtnDown ( this, ScResId( BTN_BOTTOM ) ), aBtnRight ( this, ScResId( BTN_RIGHT ) ), @@ -83,14 +93,6 @@ ScFillSeriesDlg::ScFillSeriesDlg( Window* pParent, aBtnMonth ( this, ScResId( BTN_MONTH ) ), aBtnYear ( this, ScResId( BTN_YEAR ) ), - aFtStartVal ( this, ScResId( FT_START_VALUE ) ), - aEdStartVal ( this, ScResId( ED_START_VALUES ) ), - aStartStrVal ( aStartStr), - aFtEndVal ( this, ScResId( FT_END_VALUE ) ), - aEdEndVal ( this, ScResId( ED_END_VALUES ) ), - aFtIncrement ( this, ScResId( FT_INCREMENT ) ), - aEdIncrement ( this, ScResId( ED_INCREMENT ) ), - aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx index dce755c10db3..8b0e5ac0dd8f 100644 --- a/sc/source/ui/miscdlgs/highred.cxx +++ b/sc/source/ui/miscdlgs/highred.cxx @@ -109,6 +109,7 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind Init(); + aFilterCtr.SetMemberOf(&aFlFilter); } ScHighlightChgDlg::~ScHighlightChgDlg() { diff --git a/sc/source/ui/miscdlgs/highred.src b/sc/source/ui/miscdlgs/highred.src index dd32eb9b4012..3fa4a62fcd17 100644 --- a/sc/source/ui/miscdlgs/highred.src +++ b/sc/source/ui/miscdlgs/highred.src @@ -100,7 +100,7 @@ ModelessDialog RID_SCDLG_HIGHLIGHT_CHANGES Hide = TRUE ; Pos = MAP_APPFONT ( 142 , 118 ) ; Size = MAP_APPFONT ( 13 , 15 ) ; - TabStop = FALSE ; + TabStop = TRUE; QuickHelpText [ en-US ] = "Minimize/Maximize" ; }; Text [ en-US ] = "Show Changes" ; diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 06d4f23389c0..4c29c3b39c83 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -69,9 +69,10 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT : ModalDialog ( pParent, ScResId( RID_SCDLG_INSERT_TABLE ) ), // + aFlPos ( this, ScResId( FL_POSITION ) ), aBtnBefore ( this, ScResId( RB_BEFORE ) ), aBtnBehind ( this, ScResId( RB_BEHIND ) ), - aFlPos ( this, ScResId( FL_POSITION ) ), + aFlTable ( this, ScResId( FL_TABLE ) ), aBtnNew ( this, ScResId( RB_NEW ) ), aBtnFromFile ( this, ScResId( RB_FROMFILE ) ), aFtCount ( this, ScResId( FT_COUNT ) ), @@ -82,7 +83,6 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT aFtPath ( this, ScResId( FT_PATH ) ), aBtnBrowse ( this, ScResId( BTN_BROWSE ) ), aBtnLink ( this, ScResId( CB_LINK ) ), - aFlTable ( this, ScResId( FL_TABLE ) ), aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), @@ -100,6 +100,7 @@ ScInsertTableDlg::ScInsertTableDlg( Window* pParent, ScViewData& rData, SCTAB nT #endif /* ENABLE_LAYOUT */ Init_Impl( bFromFile ); FreeResource(); + aLbTables.SetAccessibleName(aBtnFromFile.GetText()); } //------------------------------------------------------------------------ diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 48e33622e99f..8c219719ad6d 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -82,6 +82,9 @@ ScLinkedAreaDlg::ScLinkedAreaDlg( Window* pParent ) : aLbRanges.SetSelectHdl( LINK( this, ScLinkedAreaDlg, RangeHdl ) ); aBtnReload.SetClickHdl( LINK( this, ScLinkedAreaDlg, ReloadHdl ) ); UpdateEnable(); + + aNfDelay.SetAccessibleName(aBtnReload.GetText()); + aNfDelay.SetAccessibleRelationLabeledBy(&aBtnReload); } ScLinkedAreaDlg::~ScLinkedAreaDlg() diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 37759aef81b5..5aa4912e9938 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -269,6 +269,19 @@ ScOptSolverDlg::ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP mpOperator[3] = &maLbOp4; mpDelButton[3] = &maBtnDel4; + maRbMax.SetAccessibleRelationMemberOf(&maFtDirection); + maRbMin.SetAccessibleRelationMemberOf(&maFtDirection); + maRbValue.SetAccessibleRelationMemberOf(&maFtDirection); + maEdLeft2.SetAccessibleName(maFtCellRef.GetText()); + maLbOp2.SetAccessibleName(maFtOperator.GetText()); + maEdRight2.SetAccessibleName(maFtConstraint.GetText()); + maEdLeft3.SetAccessibleName(maFtCellRef.GetText()); + maLbOp3.SetAccessibleName(maFtOperator.GetText()); + maEdRight3.SetAccessibleName(maFtConstraint.GetText()); + maEdLeft4.SetAccessibleName(maFtCellRef.GetText()); + maLbOp4.SetAccessibleName(maFtOperator.GetText()); + maEdRight4.SetAccessibleName(maFtConstraint.GetText()); + Init( aCursorPos ); FreeResource(); } diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx index 99f3ba5ad444..a629ee064310 100644 --- a/sc/source/ui/miscdlgs/shtabdlg.cxx +++ b/sc/source/ui/miscdlgs/shtabdlg.cxx @@ -45,11 +45,11 @@ ScShowTabDlg::ScShowTabDlg( Window* pParent ) : ModalDialog ( pParent, ScResId( RID_SCDLG_SHOW_TAB ) ), + aFtLbTitle ( this, ScResId( FT_LABEL ) ), aLb ( this, ScResId( LB_ENTRYLIST ) ), aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), - aBtnHelp ( this, ScResId( BTN_HELP ) ), - aFtLbTitle ( this, ScResId( FT_LABEL ) ) + aBtnHelp ( this, ScResId( BTN_HELP ) ) { aLb.Clear(); aLb.SetDoubleClickHdl( LINK( this, ScShowTabDlg, DblClkHdl ) ); diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index 5b41592e8457..1a0e8c14da3d 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -88,6 +88,9 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, { Init(); FreeResource(); + + aRBFormulaCell.SetAccessibleRelationMemberOf(&aFlVariables); + aRBVariableCell.SetAccessibleRelationMemberOf(&aFlVariables); } //---------------------------------------------------------------------------- diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index bc79fa7c65e7..97758d7165ae 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -154,6 +154,8 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, pSaveObj = new SaveData; Init(); FreeResource(); + + aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign); } diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 846e2ce53310..c16c2b79a909 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -767,6 +767,10 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win aContentTimer.SetTimeout( SC_CONTENT_TIMEOUT ); FreeResource(); + + aLbEntries.SetAccessibleRelationLabeledBy(&aLbEntries); + aTbxCmd.SetAccessibleRelationLabeledBy(&aTbxCmd); + aLbDocuments.SetAccessibleName(aStrActiveWin); } //------------------------------------------------------------------------ diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 915355d5d0f2..ab5bcdd684a0 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -112,18 +112,18 @@ static void printAddressFlags(USHORT nFlag) ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent ) : ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_AREAS), // - aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ), aFlPrintArea ( this, ScResId( FL_PRINTAREA ) ), + aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ), aEdPrintArea ( this, this, ScResId( ED_PRINTAREA ) ), aRbPrintArea ( this, ScResId( RB_PRINTAREA ), &aEdPrintArea, this ), // - aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ), aFlRepeatRow ( this, ScResId( FL_REPEATROW ) ), + aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ), aEdRepeatRow ( this, this, ScResId( ED_REPEATROW ) ), aRbRepeatRow ( this, ScResId( RB_REPEATROW ), &aEdRepeatRow, this ), // - aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ), aFlRepeatCol ( this, ScResId( FL_REPEATCOL ) ), + aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ), aEdRepeatCol ( this, this, ScResId( ED_REPEATCOL ) ), aRbRepeatCol ( this, ScResId( RB_REPEATCOL ), &aEdRepeatCol, this ), // diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index de647cf5f82a..294638ef9d6a 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -101,6 +101,8 @@ ScHFPage::ScHFPage( Window* pParent, USHORT nResId, aBtnEdit.SetHelpId( HID_SC_HEADER_EDIT ); else aBtnEdit.SetHelpId( HID_SC_FOOTER_EDIT ); + + aBtnEdit.SetAccessibleRelationMemberOf(&aFrm); } //------------------------------------------------------------------ diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index a2b732464e12..169480b789ec 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -162,6 +162,9 @@ ScTablePage::ScTablePage( Window* pParent, const SfxItemSet& rCoreAttrs ) : aBmpPageDir.SetOutputSizePixel( aBmpSize ); FreeResource(); + + aEdPageNo.SetAccessibleName(aBtnPageNo.GetText()); + aEdPageNo.SetAccessibleRelationLabeledBy(&aBtnPageNo); } // ----------------------------------------------------------------------- diff --git a/sc/source/ui/src/condfrmt.src b/sc/source/ui/src/condfrmt.src index 4cd79a2ffc3d..4adc735a7f2d 100644 --- a/sc/source/ui/src/condfrmt.src +++ b/sc/source/ui/src/condfrmt.src @@ -385,41 +385,16 @@ ModelessDialog RID_SCDLG_CONDFORMAT Text [ en-US ] = "Conditional Formatting" ; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +String LABEL_FORMARTTING_CONDITIONS +{ + Text [ en-US ] = "Formatting Conditions" ; +}; +String LABEL_CONDITIONS +{ + Text [ en-US ] = "Conditions" ; +}; +String LABEL_CONDITION_VALUE +{ + Text [ en-US ] = "Condition Value" ; +}; diff --git a/sc/source/ui/src/filter.src b/sc/source/ui/src/filter.src index eed896330b0e..ed501b782a8d 100644 --- a/sc/source/ui/src/filter.src +++ b/sc/source/ui/src/filter.src @@ -872,3 +872,23 @@ ModalDialog RID_SCDLG_PIVOTFILTER }; }; +String STR_COPY_AREA_TO +{ + Text [ en-US ] = "Copy results to" ; +}; +String RID_FILTER_OPERATOR +{ + Text [ en-US ] = "Operator" ; +}; +String RID_FILTER_FIELDNAME +{ + Text [ en-US ] = "Field Name" ; +}; +String RID_FILTER_CONDITION +{ + Text [ en-US ] = "Condition" ; +}; +String RID_FILTER_VALUE +{ + Text [ en-US ] = "Value" ; +}; diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src index 9c47a42239cc..2921f5242813 100644 --- a/sc/source/ui/src/scstring.src +++ b/sc/source/ui/src/scstring.src @@ -733,6 +733,23 @@ String RID_SCSTR_ONCLICK Text [ en-US ] = "Mouse button pressed"; }; +String STR_ACC_TOOLBAR_FORMULA +{ + Text [ en-US ] = "Formula Tool Bar"; +}; +String STR_ACC_DOC_SPREADSHEET +{ + Text [ en-US ] = "%PRODUCTNAME Spreadsheets"; +}; +String STR_ACC_DOC_SPREADSHEET_READONLY +{ + Text [ en-US ] = "(read-only)"; +}; +String STR_ACC_DOC_PREVIEW_SUFFIX +{ + Text [ en-US ] = "(Preview mode)"; +}; + String SCSTR_MOREBTN_MOREOPTIONS { Text [ en-US ] = "More ~Options"; -- cgit From a3f24d231e8f54d4af456f4781e444738f197631 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Thu, 20 Jan 2011 17:18:35 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (sd module) --- sd/source/ui/app/strings.src | 7 +++++++ sd/source/ui/dlg/animobjs.cxx | 12 ++++++++---- sd/source/ui/dlg/animobjs.src | 4 ++++ sd/source/ui/dlg/copydlg.cxx | 6 +++--- sd/source/ui/dlg/custsdlg.src | 3 +++ sd/source/ui/dlg/dlgfield.cxx | 2 +- sd/source/ui/dlg/headerfooterdlg.cxx | 13 +++++++++++++ sd/source/ui/dlg/navigatr.cxx | 2 ++ sd/source/ui/dlg/navigatr.src | 5 +++++ sd/source/ui/dlg/present.cxx | 6 ++++++ sd/source/ui/dlg/prntopts.cxx | 3 +++ sd/source/ui/dlg/tpaction.cxx | 3 +++ sd/source/ui/dlg/tpaction.src | 5 ++++- sd/source/ui/dlg/vectdlg.src | 3 +++ sd/source/ui/inc/animobjs.hrc | 3 +++ sd/source/ui/inc/animobjs.hxx | 5 ++--- sd/source/ui/inc/copydlg.hxx | 6 +++--- sd/source/ui/inc/dlgfield.hxx | 2 +- sd/source/ui/inc/navigatr.hrc | 7 +++++++ sd/source/ui/inc/strings.hrc | 3 +++ sd/source/ui/inc/tpaction.hrc | 3 +++ 21 files changed, 87 insertions(+), 16 deletions(-) mode change 100644 => 100755 sd/source/ui/dlg/copydlg.cxx mode change 100644 => 100755 sd/source/ui/dlg/dlgfield.cxx mode change 100644 => 100755 sd/source/ui/dlg/navigatr.src mode change 100644 => 100755 sd/source/ui/dlg/present.cxx mode change 100644 => 100755 sd/source/ui/inc/animobjs.hrc mode change 100644 => 100755 sd/source/ui/inc/copydlg.hxx mode change 100644 => 100755 sd/source/ui/inc/dlgfield.hxx mode change 100644 => 100755 sd/source/ui/inc/navigatr.hrc mode change 100644 => 100755 sd/source/ui/inc/tpaction.hrc diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src index 7e87b246d371..8e2606a7c7ec 100644 --- a/sd/source/ui/app/strings.src +++ b/sd/source/ui/app/strings.src @@ -1234,10 +1234,17 @@ String STR_SET_BACKGROUND_PICTURE { Text [ en-US ] = "Set Background Picture for Slide ..." ; }; + +String STR_ACC_DIALOG_DESC +{ + Text [ en-US ] = "Select a template from which to import page designs." ; +}; + String RID_ANNOTATIONS_START { Text [ en-US ] = "Comments"; }; + String STR_RESET_LAYOUT { Text[ en-US ] = "Reset Slide Layout"; diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index e179a0ba9f86..fba26c0bb768 100755 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -157,21 +157,19 @@ AnimationWindow::AnimationWindow( SfxBindings* pInBindings, aNumFldBitmap ( this, SdResId( NUM_FLD_BITMAP ) ), aTimeField ( this, SdResId( TIME_FIELD ) ), aLbLoopCount ( this, SdResId( LB_LOOP_COUNT ) ), - + aGrpBitmap ( this, SdResId( GRP_BITMAP ) ), aBtnGetOneObject ( this, SdResId( BTN_GET_ONE_OBJECT ) ), aBtnGetAllObjects ( this, SdResId( BTN_GET_ALL_OBJECTS ) ), aBtnRemoveBitmap ( this, SdResId( BTN_REMOVE_BITMAP ) ), aBtnRemoveAll ( this, SdResId( BTN_REMOVE_ALL ) ), aFtCount ( this, SdResId( FT_COUNT ) ), aFiCount ( this, SdResId( FI_COUNT ) ), - aGrpBitmap ( this, SdResId( GRP_BITMAP ) ), - + aGrpAnimation ( this, SdResId( GRP_ANIMATION_GROUP ) ), aRbtGroup ( this, SdResId( RBT_GROUP ) ), aRbtBitmap ( this, SdResId( RBT_BITMAP ) ), aFtAdjustment ( this, SdResId( FT_ADJUSTMENT ) ), aLbAdjustment ( this, SdResId( LB_ADJUSTMENT ) ), aBtnCreateGroup ( this, SdResId( BTN_CREATE_GROUP ) ), - aGrpAnimation ( this, SdResId( GRP_ANIMATION_GROUP ) ), pWin ( pParent ), pBitmapEx ( NULL ), @@ -181,6 +179,7 @@ AnimationWindow::AnimationWindow( SfxBindings* pInBindings, pBindings ( pInBindings ) { + aCtlDisplay.SetAccessibleName(String (SdResId(STR_DISPLAY))); FreeResource(); aBtnGetOneObject.SetModeImage( Image( SdResId( IMG_GET1OBJECT_H ) ), BMP_COLOR_HIGHCONTRAST ); @@ -226,6 +225,11 @@ AnimationWindow::AnimationWindow( SfxBindings* pInBindings, // der Animator ist leer; es kann keine Animationsgruppe erstellt werden aBtnCreateGroup.Disable(); + + aBtnGetOneObject.SetAccessibleRelationMemberOf( &aGrpBitmap ); + aBtnGetAllObjects.SetAccessibleRelationMemberOf( &aGrpBitmap ); + aBtnRemoveBitmap.SetAccessibleRelationMemberOf( &aGrpBitmap ); + aBtnRemoveAll.SetAccessibleRelationMemberOf( &aGrpBitmap ); } // ----------------------------------------------------------------------- diff --git a/sd/source/ui/dlg/animobjs.src b/sd/source/ui/dlg/animobjs.src index efbd75ac9003..66bb46a22ed0 100644 --- a/sd/source/ui/dlg/animobjs.src +++ b/sd/source/ui/dlg/animobjs.src @@ -319,6 +319,10 @@ DockingWindow FLT_WIN_ANIMATION Size = MAP_APPFONT ( 147 , 8 ) ; Text [ en-US ] = "Animation group" ; }; + String STR_DISPLAY + { + Text [ en-US ] = "Preview"; + }; }; diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx old mode 100644 new mode 100755 index 6b3c04346f31..0d3cf95d7963 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -72,23 +72,23 @@ CopyDlg::CopyDlg( maFtCopies ( this, SdResId( FT_COPIES ) ), maNumFldCopies ( this, SdResId( NUM_FLD_COPIES ) ), maBtnSetViewData ( this, SdResId( BTN_SET_VIEWDATA ) ), + maGrpMovement ( this, SdResId( GRP_MOVEMENT ) ), maFtMoveX ( this, SdResId( FT_MOVE_X ) ), maMtrFldMoveX ( this, SdResId( MTR_FLD_MOVE_X ) ), maFtMoveY ( this, SdResId( FT_MOVE_Y ) ), maMtrFldMoveY ( this, SdResId( MTR_FLD_MOVE_Y ) ), maFtAngle ( this, SdResId( FT_ANGLE ) ), maMtrFldAngle ( this, SdResId( MTR_FLD_ANGLE ) ), - maGrpMovement ( this, SdResId( GRP_MOVEMENT ) ), + maGrpEnlargement ( this, SdResId( GRP_ENLARGEMENT ) ), maFtWidth ( this, SdResId( FT_WIDTH ) ), maMtrFldWidth ( this, SdResId( MTR_FLD_WIDTH ) ), maFtHeight ( this, SdResId( FT_HEIGHT ) ), maMtrFldHeight ( this, SdResId( MTR_FLD_HEIGHT ) ), - maGrpEnlargement ( this, SdResId( GRP_ENLARGEMENT ) ), + maGrpColor ( this, SdResId( GRP_COLOR ) ), maFtStartColor ( this, SdResId( FT_START_COLOR ) ), maLbStartColor ( this, SdResId( LB_START_COLOR ) ), maFtEndColor ( this, SdResId( FT_END_COLOR ) ), maLbEndColor ( this, SdResId( LB_END_COLOR ) ), - maGrpColor ( this, SdResId( GRP_COLOR ) ), maBtnOK ( this, SdResId( BTN_OK ) ), maBtnCancel ( this, SdResId( BTN_CANCEL ) ), maBtnHelp ( this, SdResId( BTN_HELP ) ), diff --git a/sd/source/ui/dlg/custsdlg.src b/sd/source/ui/dlg/custsdlg.src index 5d05b63f6287..275a47b38397 100644 --- a/sd/source/ui/dlg/custsdlg.src +++ b/sd/source/ui/dlg/custsdlg.src @@ -99,6 +99,9 @@ ModalDialog DLG_CUSTOMSHOW Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 102 + DIFF , 86 + DIFF_Y ) ; TabStop = TRUE ; + //IAccessibility2 Implementation 2009----- + QuickHelpText [ en-US ] = "Custom Screen Show" ; + //-----IAccessibility2 Implementation 2009 }; CheckBox CBX_USE_CUSTOMSHOW { diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx old mode 100644 new mode 100755 index 6778f073aaa9..a66f62d4d6a1 --- a/sd/source/ui/dlg/dlgfield.cxx +++ b/sd/source/ui/dlg/dlgfield.cxx @@ -61,9 +61,9 @@ SdModifyFieldDlg::SdModifyFieldDlg( Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) : ModalDialog ( pWindow, SdResId( DLG_FIELD_MODIFY ) ), + aGrpType ( this, SdResId( GRP_TYPE ) ), aRbtFix ( this, SdResId( RBT_FIX ) ), aRbtVar ( this, SdResId( RBT_VAR ) ), - aGrpType ( this, SdResId( GRP_TYPE ) ), maFtLanguage( this, SdResId( FT_LANGUAGE ) ), maLbLanguage( this, SdResId( LB_LANGUAGE ) ), aFtFormat ( this, SdResId( FT_FORMAT ) ), diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index b48a1682bba6..3e4caae6bbad 100755 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -544,6 +544,19 @@ HeaderFooterTabPage::HeaderFooterTabPage( HeaderFooterDialog* pDialog, ::Window* FillFormatList(SVXDATEFORMAT_A); + maTBHeader.SetAccessibleRelationMemberOf(&maCBHeader); + maRBDateTimeFixed.SetAccessibleRelationMemberOf(&maCBDateTime); + maRBDateTimeAutomatic.SetAccessibleRelationMemberOf(&maCBDateTime); + maTBDateTimeFixed.SetAccessibleName(maRBDateTimeFixed.GetText()); + maTBDateTimeFixed.SetAccessibleRelationMemberOf(&maCBDateTime); + maTBDateTimeFixed.SetAccessibleRelationLabeledBy(&maRBDateTimeFixed); + maCBDateTimeFormat.SetAccessibleRelationMemberOf(&maCBDateTime); + maCBDateTimeFormat.SetAccessibleName(maRBDateTimeAutomatic.GetText()); + maCBDateTimeFormat.SetAccessibleRelationLabeledBy(&maRBDateTimeAutomatic); + maCBDateTimeLanguage.SetAccessibleRelationMemberOf(&maCBDateTime); + maTBFooter.SetAccessibleRelationMemberOf(&maCBFooter); + maCBSlideNumber.SetAccessibleRelationMemberOf(&maFLIncludeOnPage); + maCBFooter.SetAccessibleRelationMemberOf(&maFLIncludeOnPage); } // ----------------------------------------------------------------------- diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 488737fa6b56..29a44273225c 100755 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -93,6 +93,8 @@ SdNavigatorWin::SdNavigatorWin( FreeResource(); + maTlbObjects.SetAccessibleName(String(SdResId(STR_OBJECTS_TREE))); + mpNavigatorCtrlItem = new SdNavigatorControllerItem( SID_NAVIGATOR_STATE, this, mpBindings ); mpPageNameCtrlItem = new SdPageNameControllerItem( SID_NAVIGATOR_PAGENAME, this, mpBindings ); mpDocList = new List(); diff --git a/sd/source/ui/dlg/navigatr.src b/sd/source/ui/dlg/navigatr.src old mode 100644 new mode 100755 index 4d4499d3226d..2ae1550ef1df --- a/sd/source/ui/dlg/navigatr.src +++ b/sd/source/ui/dlg/navigatr.src @@ -159,3 +159,8 @@ Window FLT_NAVIGATOR NAVIGATR_IDLIST }; }; + +String STR_OBJECTS_TREE +{ + Text [ en-US ] = "Page Tree"; +}; diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx old mode 100644 new mode 100755 index 473d2f4b452b..9ab846911c63 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -111,6 +111,12 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow, aTmfPause.SetModifyHdl( LINK( this, SdStartPresentationDlg, ChangePauseHdl ) ); aTmfPause.SetFormat( TIMEF_SEC ); + aLbDias.SetAccessibleRelationLabeledBy( &aRbtAtDia ); + aLbDias.SetAccessibleName(aRbtAtDia.GetText()); + aLbCustomshow.SetAccessibleRelationLabeledBy( &aRbtCustomshow ); + aTmfPause.SetAccessibleRelationLabeledBy( &aRbtAuto ); + aTmfPause.SetAccessibleName(aRbtAuto.GetText()); + // Listbox mit Seitennamen fuellen rPageNames.First(); for( UINT16 i = 0; diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index 3c9aad38c332..ac6761dc3d39 100755 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -99,6 +99,9 @@ SdPrintOptions::SdPrintOptions( Window* pParent, const SfxItemSet& rInAttrs ) : #ifndef QUARTZ SetDrawMode(); #endif + + aCbxFront.SetAccessibleRelationLabeledBy( &aRbtBooklet ); + aCbxBack.SetAccessibleRelationLabeledBy( &aRbtBooklet ); } // ----------------------------------------------------------------------- diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index c7404b820ed7..88173c7f6c63 100755 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -144,6 +144,9 @@ SdTPAction::SdTPAction( Window* pWindow, const SfxItemSet& rInAttrs ) : mpDoc ( NULL ), bTreeUpdated ( FALSE ) { + aEdtSound.SetAccessibleName(String(SdResId(STR_PATHNAME))); + aBtnSeek.SetAccessibleRelationMemberOf( &aFlSeparator ); + FreeResource(); aBtnSearch.SetClickHdl( LINK( this, SdTPAction, ClickSearchHdl ) ); diff --git a/sd/source/ui/dlg/tpaction.src b/sd/source/ui/dlg/tpaction.src index a567afebdf5c..79cd333c9300 100644 --- a/sd/source/ui/dlg/tpaction.src +++ b/sd/source/ui/dlg/tpaction.src @@ -173,7 +173,10 @@ TabPage TP_ANIMATION Hide = TRUE ; Text [ en-US ] = "~Find" ; }; - + String STR_PATHNAME + { + Text [ en-US ] = "Path Name"; + }; Text [ en-US ] = "Interaction"; }; diff --git a/sd/source/ui/dlg/vectdlg.src b/sd/source/ui/dlg/vectdlg.src index f66ba0a9454c..17c648bbcad3 100644 --- a/sd/source/ui/dlg/vectdlg.src +++ b/sd/source/ui/dlg/vectdlg.src @@ -182,6 +182,7 @@ ModalDialog DLG_VECTORIZE Border = TRUE ; Pos = MAP_APPFONT ( 6, 98 ) ; Size = MAP_APPFONT ( 92, 100 ) ; + Text [ en-US ] = "Source picture" ; }; FixedText FT_VECTORIZED @@ -196,6 +197,7 @@ ModalDialog DLG_VECTORIZE Border = TRUE ; Pos = MAP_APPFONT ( 101, 98 ) ; Size = MAP_APPFONT ( 93, 100 ) ; + Text [ en-US ] = "Vectorized image" ; }; FixedText GRP_PRGS @@ -211,6 +213,7 @@ ModalDialog DLG_VECTORIZE SVLook = TRUE ; Pos = MAP_APPFONT ( 6, 215 ) ; Size = MAP_APPFONT ( 188, 10 ) ; + Text [ en-US ] = "Progress" ; }; }; diff --git a/sd/source/ui/inc/animobjs.hrc b/sd/source/ui/inc/animobjs.hrc old mode 100644 new mode 100755 index 5c5c8e7852cc..1a6d8291ee59 --- a/sd/source/ui/inc/animobjs.hrc +++ b/sd/source/ui/inc/animobjs.hrc @@ -47,3 +47,6 @@ #define LB_ADJUSTMENT 2 #define LB_LOOP_COUNT 3 #define GRP_ANIMATION_GROUP 2 +//IAccessibility2 Implementation 2009----- +#define STR_DISPLAY 1 +//-----IAccessibility2 Implementation 2009 diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index 7a7a34362c48..82e4c79f8c55 100755 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -124,21 +124,20 @@ private: NumericField aNumFldBitmap; TimeField aTimeField; ListBox aLbLoopCount; - + FixedLine aGrpBitmap; ImageButton aBtnGetOneObject; ImageButton aBtnGetAllObjects; ImageButton aBtnRemoveBitmap; ImageButton aBtnRemoveAll; FixedText aFtCount; FixedInfo aFiCount; - FixedLine aGrpBitmap; + FixedLine aGrpAnimation; RadioButton aRbtGroup; RadioButton aRbtBitmap; FixedText aFtAdjustment; ListBox aLbAdjustment; PushButton aBtnCreateGroup; - FixedLine aGrpAnimation; ::Window* pWin; List aBmpExList; diff --git a/sd/source/ui/inc/copydlg.hxx b/sd/source/ui/inc/copydlg.hxx old mode 100644 new mode 100755 index 2732f4f76c38..b726a473b3c5 --- a/sd/source/ui/inc/copydlg.hxx +++ b/sd/source/ui/inc/copydlg.hxx @@ -64,25 +64,25 @@ private: NumericField maNumFldCopies; ImageButton maBtnSetViewData; + FixedLine maGrpMovement; FixedText maFtMoveX; MetricField maMtrFldMoveX; FixedText maFtMoveY; MetricField maMtrFldMoveY; FixedText maFtAngle; MetricField maMtrFldAngle; - FixedLine maGrpMovement; + FixedLine maGrpEnlargement; FixedText maFtWidth; MetricField maMtrFldWidth; FixedText maFtHeight; MetricField maMtrFldHeight; - FixedLine maGrpEnlargement; + FixedLine maGrpColor; FixedText maFtStartColor; ColorLB maLbStartColor; FixedText maFtEndColor; ColorLB maLbEndColor; - FixedLine maGrpColor; OKButton maBtnOK; CancelButton maBtnCancel; diff --git a/sd/source/ui/inc/dlgfield.hxx b/sd/source/ui/inc/dlgfield.hxx old mode 100644 new mode 100755 index b7f87348ad76..dd08fa5c2d56 --- a/sd/source/ui/inc/dlgfield.hxx +++ b/sd/source/ui/inc/dlgfield.hxx @@ -57,9 +57,9 @@ class SvxFieldData; class SdModifyFieldDlg : public ModalDialog { private: + FixedLine aGrpType; RadioButton aRbtFix; RadioButton aRbtVar; - FixedLine aGrpType; FixedText maFtLanguage; SvxLanguageBox maLbLanguage; FixedText aFtFormat; diff --git a/sd/source/ui/inc/navigatr.hrc b/sd/source/ui/inc/navigatr.hrc old mode 100644 new mode 100755 index 47812c304890..f12932255fe5 --- a/sd/source/ui/inc/navigatr.hrc +++ b/sd/source/ui/inc/navigatr.hrc @@ -25,6 +25,9 @@ * ************************************************************************/ #define FLT_NAVIGATOR 575 +//IAccessibility2 Implementation 2009----- +#define STR_OBJECTS_TREE (FLT_NAVIGATOR+1) +//-----IAccessibility2 Implementation 2009 #define TLB_OBJECTS 1 #define TBI_PEN 2 #define TBI_FIRST 3 @@ -41,3 +44,7 @@ #define IL_NAVIGATR 333 #define ILH_NAVIGATR 444 +//IAccessibility2 Implementation 2009----- +#define STR_DRAGMODE 1 +//-----IAccessibility2 Implementation 2009 + diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc index 7f5086057e5c..97693308ee07 100755 --- a/sd/source/ui/inc/strings.hrc +++ b/sd/source/ui/inc/strings.hrc @@ -500,6 +500,9 @@ #define STR_NAVIGATOR_SHOW_NAMED_SHAPES (RID_APP_START+718) #define STR_NAVIGATOR_SHOW_ALL_SHAPES (RID_APP_START+719) #define STR_NAVIGATOR_SHAPE_BASE_NAME (RID_APP_START+720) +//IAccessibility2 Implementation 2009----- +#define STR_ACC_DIALOG_DESC (RID_APP_START + 730) +//-----IAccessibility2 Implementation 2009 #define STR_RESET_LAYOUT (RID_APP_START+721) #define STR_INSERT_TABLE (RID_APP_START+722) diff --git a/sd/source/ui/inc/tpaction.hrc b/sd/source/ui/inc/tpaction.hrc old mode 100644 new mode 100755 index e273b9cb573c..0c4fe8a265d9 --- a/sd/source/ui/inc/tpaction.hrc +++ b/sd/source/ui/inc/tpaction.hrc @@ -49,3 +49,6 @@ #define FT_TREE 5 #define TP_ANIMATION 787 #define TP_ANIMATION_ACTION 789 +//IAccessibility2 Implementation 2009----- +#define STR_PATHNAME 1 + //-----IAccessibility2 Implementation 2009 -- cgit From 4b059a49b3979c2839edef8d0a539a564517fadc Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 21 Jan 2011 09:08:32 +0100 Subject: gridsort: mac WaE --- toolkit/source/controls/grid/sortablegriddatamodel.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index 11ac5730042b..cee79a5c5e8a 100755 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -158,9 +158,9 @@ namespace toolkit ,SortableGridDataModel_Base( m_aMutex ) ,SortableGridDataModel_PrivateBase() ,m_context( i_copySource.m_context ) - ,m_collator( i_copySource.m_collator ) ,m_isInitialized( true ) ,m_delegator() + ,m_collator( i_copySource.m_collator ) ,m_currentSortColumn( i_copySource.m_currentSortColumn ) ,m_sortAscending( i_copySource.m_sortAscending ) ,m_publicToPrivateRowIndex( i_copySource.m_publicToPrivateRowIndex ) -- cgit From e9ba5cd3ff6a45cde3c2681dcff1787f85e118da Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 10:02:35 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (sfx2 module) --- sfx2/inc/sfx2/dinfdlg.hxx | 2 +- sfx2/inc/sfx2/mgetempl.hxx | 2 +- sfx2/inc/sfx2/sfx.hrc | 3 +++ sfx2/source/appl/sfx.src | 5 +++++ sfx2/source/dialog/dinfdlg.cxx | 11 +++++++++++ sfx2/source/dialog/dinfdlg.hrc | 4 ++++ sfx2/source/dialog/dinfdlg.src | 4 ++++ sfx2/source/dialog/newstyle.cxx | 1 + sfx2/source/dialog/passwd.cxx | 1 + sfx2/source/dialog/passwd.hrc | 3 +++ sfx2/source/dialog/passwd.src | 37 +++++-------------------------------- sfx2/source/dialog/tabdlg.cxx | 5 +++++ sfx2/source/dialog/templdlg.cxx | 2 ++ sfx2/source/dialog/templdlg.hrc | 3 +++ sfx2/source/dialog/templdlg.src | 4 ++++ 15 files changed, 53 insertions(+), 34 deletions(-) diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx index 4a33afde24d5..5a141ca54fcb 100644 --- a/sfx2/inc/sfx2/dinfdlg.hxx +++ b/sfx2/inc/sfx2/dinfdlg.hxx @@ -552,9 +552,9 @@ public: class SfxCustomPropertiesPage : public SfxTabPage { private: - FixedText m_aPropertiesFT; CustomPropertiesControl m_aPropertiesCtrl; PushButton m_aAddBtn; + FixedText m_aPropertiesFT; // Sym2_5121----, Moved by Steve Yin DECL_LINK( AddHdl, PushButton* ); diff --git a/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx index a63f665c1071..9720bfcad74e 100644 --- a/sfx2/inc/sfx2/mgetempl.hxx +++ b/sfx2/inc/sfx2/mgetempl.hxx @@ -70,9 +70,9 @@ class SfxManageStyleSheetPage : public SfxTabPage FixedText aFilterFt; ListBox aFilterLb; + FixedLine aDescGb; FixedInfo aDescFt; MultiLineEdit aDescED; - FixedLine aDescGb; SfxStyleSheetBase *pStyle; SfxStyleFamilies *pFamilies; diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc index 44c00cc93018..911016fdf9d2 100644 --- a/sfx2/inc/sfx2/sfx.hrc +++ b/sfx2/inc/sfx2/sfx.hrc @@ -267,6 +267,9 @@ #define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119) #define STR_SHARED (RID_SFX_START+120) #define RID_XMLSEC_DOCUMENTSIGNED (RID_SFX_START+121) +// IAccessibility2 implementation 2009. ------ +#define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157) +// ------ IAccessibility2 implementation 2009. //========================================================================= diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src index c3b734e327de..3bca517c5fd5 100644 --- a/sfx2/source/appl/sfx.src +++ b/sfx2/source/appl/sfx.src @@ -40,3 +40,8 @@ String STR_STYLE_FILTER_ALL Text [ en-US ] = "All Styles" ; }; +String STR_ACCTITLE_PRODUCTIVITYTOOLS +{ + Text [ en-US ] = "%PRODUCTNAME"; +}; + diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 3d848d4d5648..80c8481707f3 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -828,6 +828,7 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet ) bHandleDelete ( FALSE ) { + aNameED.SetAccessibleName(String(SfxResId(EDIT_FILE_NAME))); FreeResource(); ImplUpdateSignatures(); @@ -1818,6 +1819,11 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR m_aEditLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) ); m_aBoxLoseFocusTimer.SetTimeout( 300 ); m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) ); + + ResMgr* pResMgr = rResId.GetResMgr(); + m_aNameBox.SetAccessibleName( String( ResId( STR_HEADER_NAME, *pResMgr ) ) ); + m_aTypeBox.SetAccessibleName( String( ResId( STR_HEADER_TYPE, *pResMgr ) ) ); + m_aValueEdit.SetAccessibleName( String( ResId( STR_HEADER_VALUE, *pResMgr ) ) ); } CustomPropertiesWindow::~CustomPropertiesWindow() @@ -2064,6 +2070,11 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) //add lose focus handlers of date/time fields pNewLine->m_aTypeBox.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, BoxLoseFocusHdl ) ); + + pNewLine->m_aNameBox.SetAccessibleName(m_aNameBox.GetAccessibleName()); + pNewLine->m_aTypeBox.SetAccessibleName(m_aTypeBox.GetAccessibleName()); + pNewLine->m_aValueEdit.SetAccessibleName(m_aValueEdit.GetAccessibleName()); + long nPos = GetVisibleLineCount() * GetLineHeight(); m_aCustomPropertiesLines.push_back( pNewLine ); Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit, diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc index 5453e3606026..43bd848844a0 100644 --- a/sfx2/source/dialog/dinfdlg.hrc +++ b/sfx2/source/dialog/dinfdlg.hrc @@ -153,6 +153,10 @@ #define STR_HEADER_VALUE 92 #define STR_HEADER_ACTION 93 +//IAccessibility2 Implementation 2009----- +#define EDIT_FILE_NAME 94 +//-----IAccessibility2 Implementation 2009 + #define PB_OK 100 #define PB_CANCEL 101 #define PB_HELP 102 diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index c78347e3dba3..eaa24105bb17 100644 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -303,6 +303,10 @@ TabPage TP_DOCINFODOC { Text [ en-US ] = "unknown" ; }; + String EDIT_FILE_NAME + { + Text [ en-US ] = "File Name" ; + }; }; // TP_DOCINFOUSER -------------------------------------------------------- diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 8235333857d5..17bbee8c126f 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -91,6 +91,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl)); aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl)); aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl)); + aColBox.SetAccessibleName(SfxResId(FL_COL)); SfxStyleSheetBase *pStyle = rPool.First(); while ( pStyle ) diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 455479b9d125..3868d0719fba 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -125,6 +125,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText mbAsciiOnly ( false ) { + maPasswordED.SetAccessibleName(String(SfxResId(TEXT_PASSWD))); FreeResource(); // setup layout diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc index 5c9b07c7a130..dd35a6449dd8 100644 --- a/sfx2/source/dialog/passwd.hrc +++ b/sfx2/source/dialog/passwd.hrc @@ -46,6 +46,9 @@ #define FT_PASSWD_CONFIRM2 27 #define ED_PASSWD_CONFIRM2 28 +//IAccessibility2 Implementation 2009----- +#define TEXT_PASSWD 31 +//-----IAccessibility2 Implementation 2009 #endif // ******************************************************************* EOF diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src index 426fb9986d5a..beb2f96a5e21 100644 --- a/sfx2/source/dialog/passwd.src +++ b/sfx2/source/dialog/passwd.src @@ -129,37 +129,10 @@ ModalDialog DLG_PASSWD Pos = MAP_APPFONT( 144, 43 ); Size = MAP_APPFONT( 50, 14 ); }; -}; - -// ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + String TEXT_PASSWD + { + Text [ en-US ] = "Password" ; + }; +}; diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index d149bea792dc..62ba12946a66 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -697,6 +697,11 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText ) pExampleSet = new SfxItemSet( *pSet ); pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() ); } + + aOKBtn.SetAccessibleRelationMemberOf( &aOKBtn ); + aCancelBtn.SetAccessibleRelationMemberOf( &aCancelBtn ); + aHelpBtn.SetAccessibleRelationMemberOf( &aHelpBtn ); + aResetBtn.SetAccessibleRelationMemberOf( &aResetBtn ); } // ----------------------------------------------------------------------- diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index b10e634be231..82d9f1a7714a 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -778,6 +778,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx bHierarchical ( FALSE ), bBindingUpdate ( TRUE ) { + aFmtLb.SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST)); aFmtLb.SetHelpId( HID_TEMPLATE_FMT ); aFilterLb.SetHelpId( HID_TEMPLATE_FILTER ); aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION ); @@ -1792,6 +1793,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) FillTreeBox(); SelectStyle(aSelectEntry); + pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST)); pTreeBox->Show(); } } diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc index 58563fb9c160..e39108ce57a9 100644 --- a/sfx2/source/dialog/templdlg.hrc +++ b/sfx2/source/dialog/templdlg.hrc @@ -49,4 +49,7 @@ #define BT_VLIST 9 #define BT_TOOL 10 +//IAccessibility2 Implementation 2009----- +#define STR_STYLE_ELEMTLIST 18 +//-----IAccessibility2 Implementation 2009 diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src index 60979450d9f6..ff2661181434 100644 --- a/sfx2/source/dialog/templdlg.src +++ b/sfx2/source/dialog/templdlg.src @@ -143,6 +143,10 @@ ModalDialog RID_STYLECATALOG }; }; // Strings --------------------------------------------------------------- +String STR_STYLE_ELEMTLIST +{ + Text [ en-US ] = "Style List" ; +}; String STR_STYLE_FILTER_HIERARCHICAL { Text [ en-US ] = "Hierarchical" ; -- cgit From 9956d0f9aa51f235c1b26e1ac38de75a5e238a79 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 10:55:35 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (svtools module) --- svtools/inc/svtools/svtools.hrc | 9 +++++++++ svtools/source/contnr/svcontnr.src | 27 ------------------------- svtools/source/control/filectrl.src | 40 +++++++++++++++---------------------- svtools/source/control/tabbar.cxx | 13 +++++++++++- svtools/source/dialogs/colrdlg.hrc | 2 ++ svtools/source/dialogs/colrdlg.src | 38 ++++++----------------------------- svtools/source/dialogs/printdlg.cxx | 5 +++++ svtools/source/inc/filectrl.hrc | 7 +++++++ 8 files changed, 57 insertions(+), 84 deletions(-) mode change 100644 => 100755 svtools/source/control/filectrl.src diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc index 0461064f7d96..a4bd1733de90 100644 --- a/svtools/inc/svtools/svtools.hrc +++ b/svtools/inc/svtools/svtools.hrc @@ -249,6 +249,10 @@ #define STR_SVT_ACC_DESC_FOLDER (STR_SVT_ACC_BEGIN+4) #define STR_SVT_ACC_DESC_FILE (STR_SVT_ACC_BEGIN+5) #define STR_SVT_ACC_EMPTY_FIELD (STR_SVT_ACC_BEGIN+6) +//IAccessible2 implementation +#define STR_SVT_ACC_LISTENTRY_SELCTED_STATE (STR_SVT_ACC_BEGIN+7) +#define STR_SVT_ACC_RULER_VERT_NAME (STR_SVT_ACC_BEGIN+8) +#define STR_SVT_ACC_RULER_HORZ_NAME (STR_SVT_ACC_BEGIN+9) #define STR_SVT_ACC_END (STR_SVT_ACC_EMPTY_FIELD) #define STR_SVT_INDEXENTRY_START (STR_SVT_ACC_END + 1) @@ -387,6 +391,11 @@ #define RID_IMG_PRNDLG_COLLATE_HC (STR_SVT_PRNDLG_START + 31) #define RID_IMG_PRNDLG_NOCOLLATE_HC (STR_SVT_PRNDLG_START + 32) +// IAccessible2 implementation in 2009 +#define STR_PARAGRAPH_START (STR_SVT_PRNDLG_START + 50) +#define STR_PARAGRAPH (STR_PARAGRAPH_START + 0) +#define STR_PARAGRAPH_END (STR_PARAGRAPH) + #endif // #ifndef _SVTOOLS_HRC // ******************************************************************* EOF diff --git a/svtools/source/contnr/svcontnr.src b/svtools/source/contnr/svcontnr.src index bcd1e060664f..e0449fc3f644 100644 --- a/svtools/source/contnr/svcontnr.src +++ b/svtools/source/contnr/svcontnr.src @@ -74,30 +74,3 @@ String STR_SVT_ACC_EMPTY_FIELD Text [ en-US ] = "Empty Field"; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/control/filectrl.src b/svtools/source/control/filectrl.src old mode 100644 new mode 100755 index dc8bbb5905d6..f9d63b65b838 --- a/svtools/source/control/filectrl.src +++ b/svtools/source/control/filectrl.src @@ -31,28 +31,20 @@ String STR_FILECTRL_BUTTONTEXT Text [ en-US ] = "Browse..." ; }; - - - - - - - - - - - - - - - - - - - - - - - - +String STR_TABBAR_PUSHBUTTON_MOVET0HOME +{ + Text [ en-US ] = "Move To Home" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVELEFT +{ + Text [ en-US ] = "Move Left" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVERIGHT +{ + Text [ en-US ] = "Move Right" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVETOEND +{ + Text [ en-US ] = "Move To End" ; +}; diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 0c2800246061..468ae25fca37 100755 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -38,7 +38,8 @@ #include #include #include "svtaccessiblefactory.hxx" - +#include +#include #include // ======================================================================= @@ -397,6 +398,16 @@ void TabBar::ImplInit( WinBits nWinStyle ) mnOffY++; ImplInitControls(); + + if(mpFirstBtn) + mpFirstBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVET0HOME))); + if(mpPrevBtn) + mpPrevBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVELEFT))); + if(mpNextBtn) + mpNextBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVERIGHT))); + if(mpLastBtn) + mpLastBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVETOEND))); + SetSizePixel( Size( 100, CalcWindowSizePixel().Height() ) ); ImplInitSettings( TRUE, TRUE ); } diff --git a/svtools/source/dialogs/colrdlg.hrc b/svtools/source/dialogs/colrdlg.hrc index 41329df6e366..b1e785bd2f17 100644 --- a/svtools/source/dialogs/colrdlg.hrc +++ b/svtools/source/dialogs/colrdlg.hrc @@ -65,3 +65,5 @@ #define BTN_CANCEL 1 #define BTN_HELP 1 +//IAccessibility2 Implementation 2009----- +#define STR_COLORDES 3001 diff --git a/svtools/source/dialogs/colrdlg.src b/svtools/source/dialogs/colrdlg.src index a93642b0bd05..fee6314b28cc 100644 --- a/svtools/source/dialogs/colrdlg.src +++ b/svtools/source/dialogs/colrdlg.src @@ -277,45 +277,19 @@ ModalDialog DLG_COLOR Border = TRUE ; Pos = MAP_APPFONT ( 200 , 109 ) ; Size = MAP_APPFONT ( 26 , 51 + DIFF ) ; - TabStop = TRUE ; + TabStop = FALSE ; }; Control CTL_PREVIEW { Border = TRUE ; Pos = MAP_APPFONT ( 229 , 109 ) ; Size = MAP_APPFONT ( 26 , 51 + DIFF ) ; - TabStop = TRUE ; + TabStop = FALSE ; }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +String STR_COLORDES +{ + Text [ en-US ] = "RGB(%1, %2, %3) Hue:%4 Saturation:%5 Brightness:%6"; +}; diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx index ab8b69fdcda1..1ae01bb96603 100644 --- a/svtools/source/dialogs/printdlg.cxx +++ b/svtools/source/dialogs/printdlg.cxx @@ -148,6 +148,11 @@ PrintDialog::PrintDialog( Window* pWindow, bool bWithSheetsAndCells ) : maRbtAll.Check(); ImplSetImages(); + + maBtnProperties.SetAccessibleRelationMemberOf(&maFlPrinter); + maEdtPages.SetAccessibleRelationLabeledBy(&maRbtPages); + maEdtPages.SetAccessibleRelationLabeledBy( &maRbtPages ); + maEdtPages.SetAccessibleName(maRbtPages.GetText()); } // ----------------------------------------------------------------------- diff --git a/svtools/source/inc/filectrl.hrc b/svtools/source/inc/filectrl.hrc index 1707e306e1b0..150bbba4ac68 100644 --- a/svtools/source/inc/filectrl.hrc +++ b/svtools/source/inc/filectrl.hrc @@ -30,5 +30,12 @@ #define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?! +//IAccessibility2 Implementation 2009----- +#define STR_TABBAR_PUSHBUTTON_MOVET0HOME ( STR_FILECTRL_BUTTONTEXT+ 1) +#define STR_TABBAR_PUSHBUTTON_MOVELEFT ( STR_FILECTRL_BUTTONTEXT+ 2) +#define STR_TABBAR_PUSHBUTTON_MOVERIGHT ( STR_FILECTRL_BUTTONTEXT+ 3) +#define STR_TABBAR_PUSHBUTTON_MOVETOEND ( STR_FILECTRL_BUTTONTEXT+ 4) +//-----IAccessibility2 Implementation 2009 + #endif -- cgit From 72134106b433ecc665c726532a318ede38e6fb87 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 12:23:11 +0100 Subject: accfixes: moved some shared strings to svx --- cui/source/dialogs/cuigaldlg.cxx | 10 +++++++--- cui/source/dialogs/gallery.src | 17 ----------------- cui/source/inc/gallery.hrc | 8 -------- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index fa95cfeaa1d1..c9dd8c10895e 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -54,6 +54,9 @@ #include #include "dialmgr.hxx" #include "gallery.hrc" +#include +#include + // -------------- // - Namespaces - @@ -663,8 +666,9 @@ TPGalleryThemeGeneral::TPGalleryThemeGeneral( Window* pParent, const SfxItemSet& { FreeResource(); - aEdtMSName.SetAccessibleName(GAL_RESID(RID_SVXSTR_GALLERY_THEMENAME)); - aFiMSImage.SetAccessibleName(GAL_RESID(RID_SVXSTR_GALLERY_THEMENAME)); + String aAccName(SVX_RES(RID_SVXSTR_GALLERY_THEMENAME)); + aEdtMSName.SetAccessibleName(aAccName); + aFiMSImage.SetAccessibleName(aAccName); aEdtMSName.SetAccessibleRelationLabeledBy( &aFiMSImage ); } @@ -770,7 +774,7 @@ TPGalleryThemeProperties::TPGalleryThemeProperties( Window* pWindow, const SfxIt FreeResource(); xDialogListener->SetDialogClosedLink( LINK( this, TPGalleryThemeProperties, DialogClosedHdl ) ); - aLbxFound.SetAccessibleName(GAL_RESID(RID_SVXSTR_GALLERY_FILESFOUND)); + aLbxFound.SetAccessibleName(String(SVX_RES(RID_SVXSTR_GALLERY_FILESFOUND))); aWndPreview.SetAccessibleName(aCbxPreview.GetText()); aLbxFound.SetAccessibleRelationLabeledBy(&aLbxFound); } diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index b40edf359d32..f8d035528c71 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -464,23 +464,6 @@ String RID_SVXSTR_GALLERY_ID_EXISTS { Text [ en-US ] = "This ID already exists..." ; }; -String RID_SVXSTR_GALLERY_THEMEITEMS -{ - Text [ en-US ] = "Theme Items"; -}; -String RID_SVXSTR_GALLERY_THEMENAME -{ - Text [ en-US ] = "Theme Name"; -}; -String RID_SVXSTR_GALLERY_FILESFOUND -{ - Text [ en-US ] = "Files Found"; -}; -String RID_SVXSTR_GALLERY_PREVIEW -{ - Text [ en-US ] = "Preview"; -}; - /******************************************************************************/ diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index 985eda3bc257..c9d6729be447 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -49,14 +49,6 @@ #define RID_SVXSTR_GALLERY_ALLFILES (RID_CUI_GALLERY_START + 44) #define RID_SVXSTR_GALLERY_ID_EXISTS (RID_CUI_GALLERY_START + 81) -//IAccessibility2 Implementation 2009----- -#define RID_SVXSTR_GALLERY_THEMEITEMS (RID_CUI_GALLERY_START + 93) -#define RID_SVXSTR_GALLERY_THEMENAME (RID_CUI_GALLERY_START + 94) -#define RID_SVXSTR_GALLERY_FILESFOUND (RID_CUI_GALLERY_START + 95) -#define RID_SVXSTR_GALLERY_PREVIEW (RID_CUI_GALLERY_START + 96) -//-----IAccessibility2 Implementation 2009 - - // Images #define RID_SVXBMP_THEME_NORMAL_BIG (RID_CUI_GALLERY_START + 49) #define RID_SVXBMP_THEME_IMPORTED_BIG (RID_CUI_GALLERY_START + 51) -- cgit From e4b0b442434505ba7ad00e97c4de1cb3c69594ea Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 13:03:36 +0100 Subject: accfixes: moved some shared strings to svx part2 --- cui/source/dialogs/cuigaldlg.cxx | 2 +- cui/source/dialogs/gallery.src | 4 ---- cui/source/inc/gallery.hrc | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index c9dd8c10895e..271264fa9422 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -682,7 +682,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) String aOutStr( String::CreateFromInt32( pThm->GetObjectCount() ) ); String aObjStr( CUI_RES( RID_SVXSTR_GALLERYPROPS_OBJECT ) ); String aAccess; - String aType( CUI_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ); + String aType( SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ); BOOL bReadOnly = pThm->IsReadOnly() && !pThm->IsImported(); aEdtMSName.SetHelpId( HID_GALLERY_EDIT_MSNAME ); diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index f8d035528c71..b1c53e65c706 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -448,10 +448,6 @@ String RID_SVXSTR_GALLERYPROPS_OBJECT { Text [ en-US ] = "Object;Objects" ; }; -String RID_SVXSTR_GALLERYPROPS_GALTHEME -{ - Text [ en-US ] = "Gallery Theme" ; -}; String RID_SVXSTR_GALLERY_READONLY { Text [ en-US ] = " (read-only)" ; diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index c9d6729be447..d813fa7c7f56 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -44,7 +44,6 @@ #define RID_SVXSTR_GALLERY_NOFILES (RID_CUI_GALLERY_START + 12) #define RID_SVXSTR_GALLERY_SEARCH (RID_CUI_GALLERY_START + 30) #define RID_SVXSTR_GALLERYPROPS_OBJECT (RID_CUI_GALLERY_START + 39) -#define RID_SVXSTR_GALLERYPROPS_GALTHEME (RID_CUI_GALLERY_START + 40) #define RID_SVXSTR_GALLERY_READONLY (RID_CUI_GALLERY_START + 43) #define RID_SVXSTR_GALLERY_ALLFILES (RID_CUI_GALLERY_START + 44) #define RID_SVXSTR_GALLERY_ID_EXISTS (RID_CUI_GALLERY_START + 81) -- cgit From 3bd2a893a49240a5ed312c857c9dc39593a7b9a3 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 13:04:02 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (svx module) --- svx/inc/float3d.hrc | 4 +- svx/inc/svx/bmpmask.hxx | 7 +- svx/inc/svx/dialogs.hrc | 16 +++++ svx/inc/svx/float3d.hxx | 26 ++++---- svx/inc/svx/fontworkgallery.hxx | 2 +- svx/inc/svx/hdft.hxx | 2 +- svx/inc/svx/svdstr.hrc | 8 ++- svx/prj/makefile.mk | 2 - svx/source/dialog/_bmpmask.cxx | 43 ++++++++++++- svx/source/dialog/bmpmask.hrc | 6 +- svx/source/dialog/bmpmask.src | 55 ++++------------ svx/source/dialog/ctredlin.cxx | 18 ++++++ svx/source/dialog/ctredlin.hrc | 9 ++- svx/source/dialog/ctredlin.src | 36 ++++++++++- svx/source/dialog/dlgctl3d.cxx | 2 + svx/source/dialog/dlgctrl.src | 7 +- svx/source/dialog/hdft.cxx | 16 ++++- svx/source/dialog/optgrid.cxx | 11 ++++ svx/source/dialog/rubydialog.cxx | 8 +++ svx/source/dialog/srchdlg.cxx | 8 +++ svx/source/engine3d/float3d.cxx | 110 ++++++++++++++++++++++++++++---- svx/source/engine3d/float3d.src | 55 ++-------------- svx/source/gallery2/galbrws1.cxx | 2 + svx/source/gallery2/galbrws2.cxx | 24 ++++++- svx/source/gallery2/gallery.src | 105 +++++++----------------------- svx/source/svdraw/svdstr.src | 82 +++--------------------- svx/source/tbxctrls/colrctrl.cxx | 2 + svx/source/tbxctrls/colrctrl.src | 33 ++-------- svx/source/tbxctrls/fontworkgallery.cxx | 2 +- svx/source/tbxctrls/tbcontrl.cxx | 8 +++ svx/source/tbxctrls/tbcontrl.src | 6 ++ 31 files changed, 394 insertions(+), 321 deletions(-) delete mode 100644 svx/prj/makefile.mk diff --git a/svx/inc/float3d.hrc b/svx/inc/float3d.hrc index 259317275e8b..06b640ebff0e 100644 --- a/svx/inc/float3d.hrc +++ b/svx/inc/float3d.hrc @@ -181,4 +181,6 @@ #define BMP_TEX_CIRCLE_H 159 #define BMP_TEX_FILTER_H 160 #define BMP_COLORDLG_H 161 - +// IAccessibility2 implementation 2009. ------ +#define STR_COLOR_LIGHT_PRE 162 +// ------ IAccessibility2 implementation 2009. diff --git a/svx/inc/svx/bmpmask.hxx b/svx/inc/svx/bmpmask.hxx index 1387b17267c2..d209c4223517 100644 --- a/svx/inc/svx/bmpmask.hxx +++ b/svx/inc/svx/bmpmask.hxx @@ -96,6 +96,9 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow PushButton aBtnExec; FixedLine aGrpQ; + FixedText aFt1; + FixedText aFt2; + FixedText aFt3; CheckBox aCbx1; MaskSet* pQSet1; MetricField aSp1; @@ -119,9 +122,7 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow MaskData* pData; CheckBox aCbxTrans; ColorLB aLbColorTrans; - FixedText aFt1; - FixedText aFt2; - FixedText aFt3; + const XColorTable* pColTab; Color aPipetteColor; SvxBmpMaskSelectItem aSelItem; diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index b28b150bd487..8966c7494248 100755 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -52,6 +52,14 @@ #define RID_SVXSTR_LINESTYLE (RID_SVX_START + 173) #define RID_SVXSTR_FIELDUNIT_TABLE (RID_SVX_START + 311) #define RID_SVXSTR_COLOR_USER (RID_SVX_START + 250) +//IAccessibility2 Implementation 2009----- +#define RID_SVXSTR_GALLERYPROPS_GALTHEME (RID_SVX_GALLERY_START + 92) +#define RID_SVXSTR_GALLERY_THEMEITEMS (RID_SVX_GALLERY_START + 93) +#define RID_SVXSTR_GALLERY_THEMENAME (RID_SVX_GALLERY_START + 94) +#define RID_SVXSTR_GALLERY_FILESFOUND (RID_SVX_GALLERY_START + 95) +#define RID_SVXSTR_GALLERY_PREVIEW (RID_SVX_GALLERY_START + 96) +//-----IAccessibility2 Implementation 2009 + // factory IDs of tabpages implemented in CUI #define RID_SVXPAGE_CHAR_TWOLINES (RID_SVX_START + 242) @@ -956,6 +964,9 @@ #define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1191) +//IAccessibility2 Implementation 2009----- +#define RID_SVXSTR_TEXTCOLOR (RID_SVX_START + 1178) +//-----IAccessibility2 Implementation 2009 // ---------------------------------------------------------------------------- // if we have _a_lot_ time, we should group the resource ids by type, instead // of grouping them by semantics. The reason is that resource ids have to be @@ -1049,5 +1060,10 @@ #define OFA_TP_TABPROPERTIES_TEXT (RID_OFA_START + 245) #define OFA_TP_HELPERPROG (RID_OFA_START + 249) +// IAccessibility2 implementation 2009. ------ +#define STR_COLORTABLE (RID_OFA_START + 257) +#define STR_SWITCH (RID_OFA_START + 258) +// ------ IAccessibility2 implementation 2009. + #endif diff --git a/svx/inc/svx/float3d.hxx b/svx/inc/svx/float3d.hxx index 4b6fd22b2587..fe9bb69d6d5a 100644 --- a/svx/inc/svx/float3d.hxx +++ b/svx/inc/svx/float3d.hxx @@ -84,6 +84,7 @@ private: ImageButton aBtnUpdate; ImageButton aBtnAssign; + FixedLine aFLGeometrie; // Geometrie FixedText aFtPercentDiagonal; MetricField aMtrPercentDiagonal; @@ -93,36 +94,35 @@ private: MetricField aMtrEndAngle; FixedText aFtDepth; MetricField aMtrDepth; - FixedLine aFLGeometrie; + FixedLine aFLSegments; FixedText aFtHorizontal; NumericField aNumHorizontal; FixedText aFtVertical; NumericField aNumVertical; - FixedLine aFLSegments; + FixedLine aFLNormals; ImageButton aBtnNormalsObj; ImageButton aBtnNormalsFlat; ImageButton aBtnNormalsSphere; ImageButton aBtnNormalsInvert; ImageButton aBtnTwoSidedLighting; - FixedLine aFLNormals; ImageButton aBtnDoubleSided; - + FixedLine aFLRepresentation; // Darstellung FixedText aFtShademode; ListBox aLbShademode; + FixedLine aFLShadow; ImageButton aBtnShadow3d; FixedText aFtSlant; MetricField aMtrSlant; - FixedLine aFLShadow; FixedText aFtDistance; MetricField aMtrDistance; FixedText aFtFocalLeng; MetricField aMtrFocalLength; FixedLine aFLCamera; - FixedLine aFLRepresentation; + FixedLine aFLLight; // Beleuchtung ImageButton aBtnLight1; @@ -133,6 +133,7 @@ private: ImageButton aBtnLight6; ImageButton aBtnLight7; ImageButton aBtnLight8; + FixedText aFTLightsource; ColorLB aLbLight1; ColorLB aLbLight2; ColorLB aLbLight3; @@ -143,7 +144,6 @@ private: ColorLB aLbLight8; ImageButton aBtnLightColor; - FixedText aFTLightsource; // #99694# Keyboard shortcuts activate the next control, so the // order needed to be changed here @@ -151,7 +151,7 @@ private: ColorLB aLbAmbientlight; // ListBox ImageButton aBtnAmbientColor; // color button - FixedLine aFLLight; + FixedLine aFLTexture; // Texturen FixedText aFtTexKind; @@ -171,9 +171,9 @@ private: ImageButton aBtnTexCircleY; FixedText aFtTexFilter; ImageButton aBtnTexFilter; - FixedLine aFLTexture; // Material + FixedLine aFLMaterial; // Materialeditor FixedText aFtMatFavorites; ListBox aLbMatFavorites; @@ -183,20 +183,20 @@ private: FixedText aFtMatEmission; ColorLB aLbMatEmission; ImageButton aBtnEmissionColor; + FixedLine aFLMatSpecular; FixedText aFtMatSpecular; ColorLB aLbMatSpecular; ImageButton aBtnSpecularColor; FixedText aFtMatSpecularIntensity; MetricField aMtrMatSpecularIntensity; - FixedLine aFLMatSpecular; - FixedLine aFLMaterial; + + Svx3DPreviewControl aCtlPreview; + SvxLightCtl3D aCtlLightPreview; // Unterer Teil ImageButton aBtnConvertTo3D; ImageButton aBtnLatheObject; ImageButton aBtnPerspective; - Svx3DPreviewControl aCtlPreview; - SvxLightCtl3D aCtlLightPreview; // der Rest ... Image aImgLightOn; diff --git a/svx/inc/svx/fontworkgallery.hxx b/svx/inc/svx/fontworkgallery.hxx index 40ac3cef966a..aa031b0f5770 100644 --- a/svx/inc/svx/fontworkgallery.hxx +++ b/svx/inc/svx/fontworkgallery.hxx @@ -91,8 +91,8 @@ public: class SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog { - ValueSet maCtlFavorites; FixedLine maFLFavorites; + ValueSet maCtlFavorites; OKButton maOKButton; CancelButton maCancelButton; HelpButton maHelpButton; diff --git a/svx/inc/svx/hdft.hxx b/svx/inc/svx/hdft.hxx index b3c425b85b93..6310c8b66f7c 100644 --- a/svx/inc/svx/hdft.hxx +++ b/svx/inc/svx/hdft.hxx @@ -70,6 +70,7 @@ protected: SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rSet, USHORT nSetId ); + FixedLine aFrm; CheckBox aTurnOnBox; CheckBox aCntSharedBox; FixedText aLMLbl; @@ -82,7 +83,6 @@ protected: FixedText aHeightFT; MetricField aHeightEdit; CheckBox aHeightDynBtn; - FixedLine aFrm; SvxPageWindow aBspWin; PushButton aBackgroundBtn; diff --git a/svx/inc/svx/svdstr.hrc b/svx/inc/svx/svdstr.hrc index d778bf40326b..2049bc4c3fdc 100644 --- a/svx/inc/svx/svdstr.hrc +++ b/svx/inc/svx/svdstr.hrc @@ -185,8 +185,12 @@ #define STR_ObjNameSingulMEDIA (STR_ObjNameBegin + 143) #define STR_ObjNamePluralMEDIA (STR_ObjNameBegin + 144) -#define STR_ObjNameEnd (STR_ObjNamePluralMEDIA) - +//#define STR_ObjNameEnd (STR_ObjNamePluralMEDIA) +//IAccessibility2 Implementation 2009----- +#define STR_ObjNameSingulFONTWORK (STR_ObjNameBegin+145) +#define STR_ObjNamePluralFONTWORK (STR_ObjNameBegin+146) +#define STR_ObjNameEnd (STR_ObjNamePluralFONTWORK) +//-----IAccessibility2 Implementation 2009 #define STR_EditBegin (STR_ObjNameEnd+1) #define STR_EditWithCopy (STR_EditBegin + 0) #define STR_EditPosSize (STR_EditBegin + 1) diff --git a/svx/prj/makefile.mk b/svx/prj/makefile.mk deleted file mode 100644 index 2a0b99e72fd5..000000000000 --- a/svx/prj/makefile.mk +++ /dev/null @@ -1,2 +0,0 @@ -all: - cd .. && make -srj9 diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index d010109d34b3..e1e4d26dbb42 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -417,6 +417,10 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx, aBtnExec ( this, BMP_RESID( BTN_EXEC ) ), aGrpQ ( this, BMP_RESID( GRP_Q ) ), + aFt1 ( this, BMP_RESID ( FT_1 ) ), + aFt2 ( this, BMP_RESID ( FT_2 ) ), + aFt3 ( this, BMP_RESID ( FT_3 ) ), + aCbx1 ( this, BMP_RESID( CBX_1 ) ), pQSet1 ( new MaskSet( this, BMP_RESID( QCOL_1 ) ) ), aSp1 ( this, BMP_RESID( SP_1 ) ), @@ -440,9 +444,6 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx, pData ( new MaskData( this, *pBindinx ) ), aCbxTrans ( this, BMP_RESID( CBX_TRANS ) ), aLbColorTrans ( this, BMP_RESID ( LB_TRANS ) ), - aFt1 ( this, BMP_RESID ( FT_1 ) ), - aFt2 ( this, BMP_RESID ( FT_2 ) ), - aFt3 ( this, BMP_RESID ( FT_3 ) ), pColTab ( NULL ), aPipetteColor ( COL_WHITE ), aSelItem ( SID_BMPMASK_EXEC, *this, *pBindinx ), @@ -508,6 +509,42 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx, pQSet2->Show(); pQSet3->Show(); pQSet4->Show(); + + aCbx1.SetAccessibleRelationMemberOf( &aGrpQ ); + pQSet1->SetAccessibleRelationMemberOf( &aGrpQ ); + aSp1.SetAccessibleRelationMemberOf( &aGrpQ ); + aLbColor1.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbx1.SetAccessibleRelationLabeledBy( &aFt1 ); + pQSet1->SetAccessibleRelationLabeledBy( &aFt1 ); + aSp1.SetAccessibleRelationLabeledBy( &aFt2 ); + aLbColor1.SetAccessibleRelationLabeledBy( &aFt3 ); + aCbx2.SetAccessibleRelationMemberOf( &aGrpQ ); + pQSet2->SetAccessibleRelationMemberOf( &aGrpQ ); + aSp2.SetAccessibleRelationMemberOf( &aGrpQ ); + aLbColor2.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbx2.SetAccessibleRelationLabeledBy( &aFt1 ); + pQSet2->SetAccessibleRelationLabeledBy( &aFt1 ); + aSp2.SetAccessibleRelationLabeledBy( &aFt2 ); + aLbColor2.SetAccessibleRelationLabeledBy( &aFt3 ); + aCbx3.SetAccessibleRelationMemberOf( &aGrpQ ); + pQSet3->SetAccessibleRelationMemberOf( &aGrpQ ); + aSp3.SetAccessibleRelationMemberOf( &aGrpQ ); + aLbColor3.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbx3.SetAccessibleRelationLabeledBy( &aFt1 ); + pQSet3->SetAccessibleRelationLabeledBy( &aFt1 ); + aSp3.SetAccessibleRelationLabeledBy( &aFt2 ); + aLbColor3.SetAccessibleRelationLabeledBy( &aFt3 ); + aCbx4.SetAccessibleRelationMemberOf( &aGrpQ ); + pQSet4->SetAccessibleRelationMemberOf( &aGrpQ ); + aSp4.SetAccessibleRelationMemberOf( &aGrpQ ); + aLbColor4.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbx4.SetAccessibleRelationLabeledBy( &aFt1 ); + pQSet4->SetAccessibleRelationLabeledBy( &aFt1 ); + aSp4.SetAccessibleRelationLabeledBy( &aFt2 ); + aLbColor4.SetAccessibleRelationLabeledBy( &aFt3 ); + aLbColorTrans.SetAccessibleRelationLabeledBy( &aCbxTrans ); + aLbColorTrans.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbxTrans.SetAccessibleRelationMemberOf( &aGrpQ ); } //------------------------------------------------------------------------- diff --git a/svx/source/dialog/bmpmask.hrc b/svx/source/dialog/bmpmask.hrc index 99c9eab04b7b..42fcc244c3f7 100644 --- a/svx/source/dialog/bmpmask.hrc +++ b/svx/source/dialog/bmpmask.hrc @@ -27,7 +27,11 @@ #define RID_SVXDLG_BMPMASK (RID_SVX_BMPMASK_START) #define RID_SVXDLG_BMPMASK_STR_TRANSP (RID_SVX_BMPMASK_START + 1) #define RID_SVXDLG_BMPMASK_STR_SOURCECOLOR (RID_SVX_BMPMASK_START + 2) - +/*IAccessibility2 Implementation 2009-----*/ +#define RID_SVXDLG_BMPMASK_STR_PALETTE (RID_SVX_BMPMASK_START + 3) +#define RID_SVXDLG_BMPMASK_STR_TOLERANCE (RID_SVX_BMPMASK_START + 4) +#define RID_SVXDLG_BMPMASK_STR_REPLACEWITH (RID_SVX_BMPMASK_START + 5) +/*-----IAccessibility2 Implementation 2009*/ #define GRP_Q 1 #define CTR_PIPETTE 1 #define CBX_1 1 diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src index a9cd2fe60b2f..8913edcfc210 100644 --- a/svx/source/dialog/bmpmask.src +++ b/svx/source/dialog/bmpmask.src @@ -327,47 +327,16 @@ String RID_SVXDLG_BMPMASK_STR_SOURCECOLOR Text [ en-US ] = "Source Color"; }; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +String RID_SVXDLG_BMPMASK_STR_PALETTE +{ + Text [ en-US ] = "Color Palette"; +}; +String RID_SVXDLG_BMPMASK_STR_TOLERANCE +{ + Text [ en-US ] = "Tolerance"; +}; +String RID_SVXDLG_BMPMASK_STR_REPLACEWITH +{ + Text [ en-US ] = "Replace with"; +}; diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 503814823467..3e57d778c395 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -634,6 +634,7 @@ SvxTPView::SvxTPView( Window * pParent) aTitle5 ( SVX_RES( STR_TITLE5 ) ), aStrMyName ( SVX_RES( STR_VIEW) ) { + aViewData.SetAccessibleName(String(SVX_RES(STR_TREE))); FreeResource(); aViewData.SetHelpId(HID_REDLINING_VIEW_DG_VIEW_TABLE); @@ -826,6 +827,14 @@ SvxTPFilter::SvxTPFilter( Window * pParent) aStrMyName ( SVX_RES( STR_FILTER) ), bModified (FALSE) { + aLbDate.SetAccessibleName( String( SVX_RES( STR_DATE_COMBOX) ) ); + aDfDate.SetAccessibleName( String( SVX_RES( STR_DATE_SPIN) ) ); + aTfDate.SetAccessibleName( String( SVX_RES( STR_DATE_TIME_SPIN) ) ); + aDfDate2.SetAccessibleName( String( SVX_RES( STR_DATE_SPIN1) ) ); + aTfDate2.SetAccessibleName( String( SVX_RES( STR_DATE_TIME_SPIN1) ) ); + aLbAuthor.SetAccessibleName(aCbAuthor.GetText()); + aLbAction.SetAccessibleName( String( SVX_RES( STR_ACTION) ) ); + aEdComment.SetAccessibleName(aCbComment.GetText()); Image aImgTimeHC( SVX_RES( IMG_TIME_H ) ); FreeResource(); @@ -874,6 +883,15 @@ SvxTPFilter::SvxTPFilter( Window * pParent) HideRange(); ShowAction(); bModified=FALSE; + + aLbDate.SetAccessibleRelationLabeledBy(&aCbDate); + aLbAuthor.SetAccessibleRelationLabeledBy(&aCbAuthor); + aLbAction.SetAccessibleRelationLabeledBy(&aCbRange); + aEdRange.SetAccessibleRelationLabeledBy(&aCbRange); + aBtnRange.SetAccessibleRelationLabeledBy(&aCbRange); + aEdComment.SetAccessibleRelationLabeledBy(&aCbComment); + aDfDate2.SetAccessibleRelationLabeledBy(&aDfDate2); + aTfDate2.SetAccessibleRelationLabeledBy(&aTfDate2); } void SvxTPFilter::SetRedlinTable(SvxRedlinTable* pTable) diff --git a/svx/source/dialog/ctredlin.hrc b/svx/source/dialog/ctredlin.hrc index 23cc504c0573..772d985ae8c0 100644 --- a/svx/source/dialog/ctredlin.hrc +++ b/svx/source/dialog/ctredlin.hrc @@ -66,5 +66,12 @@ #define STR_TITLE3 3 #define STR_TITLE4 4 #define STR_TITLE5 5 -// +//IAccessibility2 Implementation 2009----- +#define STR_DATE_COMBOX 6 +#define STR_DATE_SPIN 7 +#define STR_DATE_SPIN1 8 +#define STR_DATE_TIME_SPIN 9 +#define STR_DATE_TIME_SPIN1 10 +#define STR_TREE 11 +//-----IAccessibility2 Implementation 2009 diff --git a/svx/source/dialog/ctredlin.src b/svx/source/dialog/ctredlin.src index e617607ebfad..284ed97ed54e 100644 --- a/svx/source/dialog/ctredlin.src +++ b/svx/source/dialog/ctredlin.src @@ -114,7 +114,10 @@ TabPage SID_REDLIN_FILTER_PAGE ImageBitmap = Bitmap { File = "time.bmp" ; }; MASKCOLOR }; - QuickHelpText [ en-US ] = "Set Date/Time" ; + // IAccessibility2 implementation 2009. ------ + //QuickHelpText [ en-US ] = "Set Date/Time" ; + QuickHelpText [ en-US ] = "Set Start Date/Time" ; + // ------ IAccessibility2 implementation 2009. }; FixedText FT_DATE2 { @@ -170,7 +173,10 @@ TabPage SID_REDLIN_FILTER_PAGE ImageBitmap = Bitmap { File = "time.bmp" ; }; MASKCOLOR }; - QuickHelpText [ en-US ] = "Set Date/Time" ; + // IAccessibility2 implementation 2009. ------ + //QuickHelpText [ en-US ] = "Set Date/Time" ; + QuickHelpText [ en-US ] = "Set End Date/Time" ; + // ------ IAccessibility2 implementation 2009. }; CheckBox CB_AUTOR { @@ -254,6 +260,32 @@ TabPage SID_REDLIN_FILTER_PAGE ImageBitmap = Bitmap { File = "time_h.bmp" ; }; MASKCOLOR }; + /*IAccessibility2 Implementation 2009-----*/ + String STR_DATE_COMBOX + { + Text [ en-US ] = "Date Condition" ; + }; + String STR_DATE_SPIN + { + Text [ en-US ] = "Start Date" ; + }; + String STR_DATE_SPIN1 + { + Text [ en-US ] = "End Date" ; + }; + String STR_DATE_TIME_SPIN + { + Text [ en-US ] = "Start Time" ; + }; + String STR_DATE_TIME_SPIN1 + { + Text [ en-US ] = "End Time" ; + }; + String STR_TREE + { + Text [ en-US ] = "Changes" ; + }; + /*-----IAccessibility2 Implementation 2009*/ }; TabPage SID_REDLIN_VIEW_PAGE { diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 95c27a5dcec8..9efb12e74d14 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -45,6 +45,7 @@ #include #include "helpid.hrc" #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -1012,6 +1013,7 @@ void SvxLightCtl3D::Init() maHorScroller.SetHelpId(HID_CTRL3D_HSCROLL); maVerScroller.SetHelpId(HID_CTRL3D_VSCROLL); maSwitcher.SetHelpId(HID_CTRL3D_SWITCHER); + maSwitcher.SetAccessibleName(String(SVX_RES(STR_SWITCH))); // Light preview maLightControl.Show(); diff --git a/svx/source/dialog/dlgctrl.src b/svx/source/dialog/dlgctrl.src index 2da544673c65..e5962dcef059 100644 --- a/svx/source/dialog/dlgctrl.src +++ b/svx/source/dialog/dlgctrl.src @@ -31,4 +31,9 @@ Bitmap RID_SVXCTRL_RECTBTNS { File = "rectbtns.bmp" ; }; - +/*IAccessibility2 Implementation 2009-----*/ +String STR_SWITCH +{ + Text [ en-US ] = "Switch" ; +}; +/*-----IAccessibility2 Implementation 2009*/ diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 2da5df325dfa..d0248b60ab14 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -146,6 +146,7 @@ SvxHFPage::SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rAttr, U SfxTabPage( pParent, SVX_RES( nResId ), rAttr ), + aFrm ( this, SVX_RES( FL_FRAME ) ), aTurnOnBox ( this, SVX_RES( CB_TURNON ) ), aCntSharedBox ( this, SVX_RES( CB_SHARED ) ), aLMLbl ( this, SVX_RES( FT_LMARGIN ) ), @@ -158,7 +159,6 @@ SvxHFPage::SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rAttr, U aHeightFT ( this, SVX_RES( FT_HEIGHT ) ), aHeightEdit ( this, SVX_RES( ED_HEIGHT ) ), aHeightDynBtn ( this, SVX_RES( CB_HEIGHT_DYN ) ), - aFrm ( this, SVX_RES( FL_FRAME ) ), aBspWin ( this, SVX_RES( WN_BSP ) ), aBackgroundBtn ( this, SVX_RES( BTN_EXTRAS ) ), @@ -182,6 +182,20 @@ SvxHFPage::SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rAttr, U SetFieldUnit( aHeightEdit, eFUnit ); SetFieldUnit( aLMEdit, eFUnit ); SetFieldUnit( aRMEdit, eFUnit ); + + aTurnOnBox.SetAccessibleRelationMemberOf( &aFrm ); + aCntSharedBox.SetAccessibleRelationMemberOf( &aFrm ); + aLMLbl.SetAccessibleRelationMemberOf( &aFrm ); + aLMEdit.SetAccessibleRelationMemberOf( &aFrm ); + aRMLbl.SetAccessibleRelationMemberOf( &aFrm ); + aRMEdit.SetAccessibleRelationMemberOf( &aFrm ); + aDistFT.SetAccessibleRelationMemberOf( &aFrm ); + aDistEdit.SetAccessibleRelationMemberOf( &aFrm ); + aDynSpacingCB.SetAccessibleRelationMemberOf( &aFrm ); + aHeightFT.SetAccessibleRelationMemberOf( &aFrm ); + aHeightEdit.SetAccessibleRelationMemberOf( &aFrm ); + aHeightDynBtn.SetAccessibleRelationMemberOf( &aFrm ); + aBackgroundBtn.SetAccessibleRelationMemberOf(&aFrm); } // ----------------------------------------------------------------------- diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index f281580b93db..5981e70f36a9 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -248,6 +248,17 @@ SvxGridTabPage::SvxGridTabPage( Window* pParent, const SfxItemSet& rCoreSet) : LINK( this, SvxGridTabPage, ChangeDivisionHdl_Impl ) ); aNumFldDivisionY.SetModifyHdl( LINK( this, SvxGridTabPage, ChangeDivisionHdl_Impl ) ); + + ::rtl::OUString sFlResolution( aFlResolution.GetDisplayText() ); + ::rtl::OUString sFtDrawX(aFtDrawX.GetDisplayText()); + ::rtl::OUString sFtDrawY(aFtDrawY.GetDisplayText()); + aMtrFldDrawX.SetAccessibleName( sFtDrawX + sFlResolution ); + aMtrFldDrawY.SetAccessibleName( sFtDrawY + sFlResolution ); + ::rtl::OUString sFlDivision( aFlDivision.GetDisplayText() ); + ::rtl::OUString sFtDivisionX(aFtDivisionX.GetDisplayText()); + ::rtl::OUString sFtDivisionY(aFtDivisionY.GetDisplayText()); + aNumFldDivisionX.SetAccessibleName( sFtDivisionX + sFlDivision ); + aNumFldDivisionY.SetAccessibleName( sFtDivisionY + sFlDivision ); } //------------------------------------------------------------------------ diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index d281802ac40e..bcaa6df4ec88 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -277,6 +277,14 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW, } UpdateColors(); + + String leftLabelName = aLeftFT.GetText(), rightLabelName = aRightFT.GetText(); + aLeft2ED.SetAccessibleName(leftLabelName); + aLeft3ED.SetAccessibleName(leftLabelName); + aLeft4ED.SetAccessibleName(leftLabelName); + aRight2ED.SetAccessibleName(rightLabelName); + aRight3ED.SetAccessibleName(rightLabelName); + aRight4ED.SetAccessibleName(rightLabelName); } /* -----------------------------09.01.01 17:17-------------------------------- diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 9f6d606dc759..23fd4cc69aaa 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -494,6 +494,14 @@ void SvxSearchDialog::Construct_Impl() { aJapMatchFullHalfWidthCB.Hide(); } + + aSimilarityBtn.SetAccessibleRelationLabeledBy(&aSimilarityBox); + aSimilarityBtn.SetAccessibleRelationMemberOf(&aOptionsFL); + aJapOptionsBtn.SetAccessibleRelationLabeledBy(&aJapOptionsCB); + aJapOptionsBtn.SetAccessibleRelationMemberOf(&aOptionsFL); + aRowsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT); + aColumnsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT); + //component extension - show component search buttons if the commands // vnd.sun.star::SearchViaComponent1 and 2 are supported const uno::Reference< frame::XFrame >xFrame = rBindings.GetActiveFrame(); diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index e1e90d88c22f..bb159b47a516 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -119,6 +119,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aBtnMaterial ( this, SVX_RES( BTN_MATERIAL ) ), aBtnUpdate ( this, SVX_RES( BTN_UPDATE ) ), aBtnAssign ( this, SVX_RES( BTN_ASSIGN ) ), + aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ), // Geometrie aFtPercentDiagonal ( this, SVX_RES( FT_PERCENT_DIAGONAL ) ), @@ -129,36 +130,36 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aMtrEndAngle ( this, SVX_RES( MTR_END_ANGLE ) ), aFtDepth ( this, SVX_RES( FT_DEPTH ) ), aMtrDepth ( this, SVX_RES( MTR_DEPTH ) ), - aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ), + aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ), aFtHorizontal ( this, SVX_RES( FT_HORIZONTAL ) ), aNumHorizontal ( this, SVX_RES( NUM_HORIZONTAL ) ), aFtVertical ( this, SVX_RES( FT_VERTICAL ) ), aNumVertical ( this, SVX_RES( NUM_VERTICAL ) ), - aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ), + aFLNormals ( this, SVX_RES( FL_NORMALS ) ), aBtnNormalsObj ( this, SVX_RES( BTN_NORMALS_OBJ ) ), aBtnNormalsFlat ( this, SVX_RES( BTN_NORMALS_FLAT ) ), aBtnNormalsSphere ( this, SVX_RES( BTN_NORMALS_SPHERE ) ), aBtnNormalsInvert ( this, SVX_RES( BTN_NORMALS_INVERT ) ), aBtnTwoSidedLighting( this, SVX_RES( BTN_TWO_SIDED_LIGHTING ) ), - aFLNormals ( this, SVX_RES( FL_NORMALS ) ), aBtnDoubleSided ( this, SVX_RES( BTN_DOUBLE_SIDED ) ), // Darstellung + aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ), aFtShademode ( this, SVX_RES( FT_SHADEMODE ) ), aLbShademode ( this, SVX_RES( LB_SHADEMODE ) ), + aFLShadow ( this, SVX_RES( FL_SHADOW ) ), aBtnShadow3d ( this, SVX_RES( BTN_SHADOW_3D ) ), aFtSlant ( this, SVX_RES( FT_SLANT ) ), aMtrSlant ( this, SVX_RES( MTR_SLANT ) ), - aFLShadow ( this, SVX_RES( FL_SHADOW ) ), aFtDistance ( this, SVX_RES( FT_DISTANCE ) ), aMtrDistance ( this, SVX_RES( MTR_DISTANCE ) ), aFtFocalLeng ( this, SVX_RES( FT_FOCAL_LENGTH ) ), aMtrFocalLength ( this, SVX_RES( MTR_FOCAL_LENGTH ) ), aFLCamera ( this, SVX_RES( FL_CAMERA ) ), - aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ), + aFLLight ( this, SVX_RES( FL_LIGHT ) ), // Beleuchtung aBtnLight1 ( this, SVX_RES( BTN_LIGHT_1 ) ), @@ -169,6 +170,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aBtnLight6 ( this, SVX_RES( BTN_LIGHT_6 ) ), aBtnLight7 ( this, SVX_RES( BTN_LIGHT_7 ) ), aBtnLight8 ( this, SVX_RES( BTN_LIGHT_8 ) ), + aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ), aLbLight1 ( this, SVX_RES( LB_LIGHT_1 ) ), aLbLight2 ( this, SVX_RES( LB_LIGHT_2 ) ), aLbLight3 ( this, SVX_RES( LB_LIGHT_3 ) ), @@ -179,15 +181,13 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aLbLight8 ( this, SVX_RES( LB_LIGHT_8 ) ), aBtnLightColor ( this, SVX_RES( BTN_LIGHT_COLOR ) ), - aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ), // #99694# Keyboard shortcuts activate the next control, so the // order needed to be changed here aFTAmbientlight ( this, SVX_RES( FT_AMBIENTLIGHT ) ), // Text label aLbAmbientlight ( this, SVX_RES( LB_AMBIENTLIGHT ) ), // ListBox aBtnAmbientColor ( this, SVX_RES( BTN_AMBIENT_COLOR ) ), // color button - - aFLLight ( this, SVX_RES( FL_LIGHT ) ), + aFLTexture ( this, SVX_RES( FL_TEXTURE ) ), // Texturen aFtTexKind ( this, SVX_RES( FT_TEX_KIND ) ), @@ -207,7 +207,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aBtnTexCircleY ( this, SVX_RES( BTN_TEX_CIRCLE_Y ) ), aFtTexFilter ( this, SVX_RES( FT_TEX_FILTER ) ), aBtnTexFilter ( this, SVX_RES( BTN_TEX_FILTER ) ), - aFLTexture ( this, SVX_RES( FL_TEXTURE ) ), + aFLMaterial ( this, SVX_RES( FL_MATERIAL ) ), // Material aFtMatFavorites ( this, SVX_RES( FT_MAT_FAVORITES ) ), @@ -218,20 +218,19 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aFtMatEmission ( this, SVX_RES( FT_MAT_EMISSION ) ), aLbMatEmission ( this, SVX_RES( LB_MAT_EMISSION ) ), aBtnEmissionColor ( this, SVX_RES( BTN_EMISSION_COLOR ) ), + aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ), aFtMatSpecular ( this, SVX_RES( FT_MAT_SPECULAR ) ), aLbMatSpecular ( this, SVX_RES( LB_MAT_SPECULAR ) ), aBtnSpecularColor ( this, SVX_RES( BTN_SPECULAR_COLOR ) ), aFtMatSpecularIntensity( this, SVX_RES( FT_MAT_SPECULAR_INTENSITY ) ), aMtrMatSpecularIntensity( this, SVX_RES( MTR_MAT_SPECULAR_INTENSITY ) ), - aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ), - aFLMaterial ( this, SVX_RES( FL_MATERIAL ) ), + aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ), + aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ), // Unterer Bereich aBtnConvertTo3D ( this, SVX_RES( BTN_CHANGE_TO_3D ) ), aBtnLatheObject ( this, SVX_RES( BTN_LATHE_OBJ ) ), aBtnPerspective ( this, SVX_RES( BTN_PERSPECTIVE ) ), - aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ), - aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ), aImgLightOn ( SVX_RES( RID_SVXIMAGE_LIGHT_ON ) ), aImgLightOff ( SVX_RES( RID_SVXIMAGE_LIGHT_OFF ) ), @@ -255,6 +254,11 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, mpRemember2DAttributes(NULL), bOnly3DChanged ( FALSE ) { + String accname(SVX_RES(STR_COLOR_LIGHT_PRE)); + aCtlLightPreview.SetAccessibleName(accname); + aCtlPreview.SetAccessibleName(accname); + aLbAmbientlight.SetAccessibleName(aFTAmbientlight.GetDisplayText()); + SETHCIMAGE( aBtnGeo, BMP_GEO_H ); SETHCIMAGE( aBtnRepresentation, BMP_REPRESENTATION_H ); SETHCIMAGE( aBtnLight, BMP_3DLIGHT_H ); @@ -416,6 +420,86 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, } Reset(); + + aBtnNormalsObj.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnNormalsFlat.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnNormalsSphere.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnNormalsInvert.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnTwoSidedLighting.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnDoubleSided.SetAccessibleRelationMemberOf( &aFLNormals ); + + aBtnLight1.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight2.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight3.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight4.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight5.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight6.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight7.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight8.SetAccessibleRelationMemberOf( &aFLLight ); + + aBtnLight1.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight2.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight3.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight4.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight5.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight6.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight7.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight8.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLightColor.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLightColor.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnAmbientColor.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnAmbientColor.SetAccessibleRelationLabeledBy( &aFTAmbientlight ); + + aBtnSpecularColor.SetAccessibleRelationLabeledBy( &aFtMatSpecular ); + aBtnMatColor.SetAccessibleRelationLabeledBy( &aFtMatColor ); + aBtnEmissionColor.SetAccessibleRelationLabeledBy( &aFtMatEmission ); + aBtnTexLuminance.SetAccessibleRelationLabeledBy( &aFtTexKind ); + aBtnTexColor.SetAccessibleRelationLabeledBy( &aFtTexKind ); + aBtnTexReplace.SetAccessibleRelationLabeledBy( &aFtTexMode ); + aBtnTexModulate.SetAccessibleRelationLabeledBy( &aFtTexMode ); + aBtnTexBlend.SetAccessibleRelationLabeledBy( &aFtTexMode ); + aBtnTexObjectX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); + aBtnTexParallelX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); + aBtnTexCircleX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); + aBtnTexObjectY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); + aBtnTexParallelY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); + aBtnTexCircleY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); + aBtnTexFilter.SetAccessibleRelationLabeledBy( &aFtTexFilter ); + aCtlLightPreview.SetAccessibleRelationLabeledBy( &aCtlLightPreview ); + aBtnNormalsObj.SetAccessibleRelationMemberOf(&aFLNormals); + aBtnNormalsFlat.SetAccessibleRelationMemberOf(&aFLNormals); + aBtnNormalsSphere.SetAccessibleRelationMemberOf(&aFLNormals); + aBtnNormalsInvert.SetAccessibleRelationMemberOf(&aFLNormals); + aBtnTwoSidedLighting.SetAccessibleRelationMemberOf(&aFLNormals); + + aBtnShadow3d.SetAccessibleRelationMemberOf(&aFLShadow); + + aBtnLight1.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight2.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight3.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight4.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight5.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight6.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight7.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight8.SetAccessibleRelationMemberOf(&aFLLight); + + aBtnTexLuminance.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexColor.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexReplace.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexModulate.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexBlend.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexObjectX.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexParallelX.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexCircleX.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexObjectY.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexParallelY.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexCircleY.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexFilter.SetAccessibleRelationMemberOf(&aFLTexture); + + aBtnMatColor.SetAccessibleRelationMemberOf(&aFLMaterial); + aBtnEmissionColor.SetAccessibleRelationMemberOf(&aFLMaterial); + + aBtnSpecularColor.SetAccessibleRelationMemberOf(&aFLMatSpecular); } // ----------------------------------------------------------------------- diff --git a/svx/source/engine3d/float3d.src b/svx/source/engine3d/float3d.src index 1947fead5556..c75ab16e19c2 100644 --- a/svx/source/engine3d/float3d.src +++ b/svx/source/engine3d/float3d.src @@ -1438,53 +1438,10 @@ String RID_SVXFLOAT3D_FIX_B Text [ en-US ] = "B:"; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// IAccessibility2 implementation 2009. ------ +String STR_COLOR_LIGHT_PRE +{ + Text [ en-US ] = "Color Light Preview"; +}; +// ------ IAccessibility2 implementation 2009. diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 04f402804b0c..222f88db0a81 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -41,6 +41,7 @@ #include #include "gallery.hrc" #include +#include #include //CHINA001 //CHINA001 #include //CHINA001 @@ -162,6 +163,7 @@ GalleryBrowser1::GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, mpThemes->SetHelpId( HID_GALLERY_THEMELIST ); mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) ); + mpThemes->SetAccessibleName(String(SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ) ); for( ULONG i = 0, nCount = mpGallery->GetThemeCount(); i < nCount; i++ ) ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) ); diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 045b52aa2e53..0d3f91b6253b 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -54,8 +54,9 @@ #include "gallery.hrc" #include #include -#include //CHINA001 -//CHINA001 #include //CHINA001 +#include +#include +#include // ----------- // - Defines - @@ -338,6 +339,9 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, maViewBox.SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) ); maViewBox.Show(); + mpIconView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpListView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + maInfoBar.Show(); maSeparator.Show(); @@ -347,6 +351,12 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, InitSettings(); SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON ); + + if(maInfoBar.GetText().Len() == 0) + mpIconView->SetAccessibleRelationLabeledBy(mpIconView); + else + mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar); + mpIconView->SetAccessibleRelationMemberOf(mpIconView); } // ----------------------------------------------------------------------------- @@ -641,6 +651,10 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) mpListView = new GalleryListView( this, mpCurTheme ); mpPreview = new GalleryPreview( this, mpCurTheme ); + mpIconView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpListView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpPreview->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_PREVIEW ) )); + const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) ); mpIconView->SetSelectHdl( aSelectHdl ); @@ -655,6 +669,12 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) maViewBox.EnableItem( TBX_ID_ICON, TRUE ); maViewBox.EnableItem( TBX_ID_LIST, TRUE ); maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, TRUE ); + + if(maInfoBar.GetText().Len() == 0) + mpIconView->SetAccessibleRelationLabeledBy(mpIconView); + else + mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar); + mpIconView->SetAccessibleRelationMemberOf(mpIconView); } // ----------------------------------------------------------------------------- diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src index 39ee6e0e6b1b..c7b91daff30f 100644 --- a/svx/source/gallery2/gallery.src +++ b/svx/source/gallery2/gallery.src @@ -178,6 +178,29 @@ String RID_SVXSTR_GALLERY_LISTVIEW Text [ en-US ] = "Detailed View"; }; +String RID_SVXSTR_GALLERYPROPS_GALTHEME +{ + Text [ en-US ] = "Gallery Theme" ; +}; + +//IAccessibility2 Implementation 2009----- +String RID_SVXSTR_GALLERY_THEMEITEMS +{ + Text [ en-US ] = "Theme Items"; +}; +String RID_SVXSTR_GALLERY_THEMENAME +{ + Text [ en-US ] = "Theme Name"; +}; +String RID_SVXSTR_GALLERY_FILESFOUND +{ + Text [ en-US ] = "Files Found"; +}; +String RID_SVXSTR_GALLERY_PREVIEW +{ + Text [ en-US ] = "Preview"; +}; +//-----IAccessibility2 Implementation 2009 /******************************************************************************/ Bitmap RID_SVXBMP_GALLERY @@ -409,85 +432,3 @@ Menu RID_SVXMN_GALLERY2 }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index 6690d4a7618b..6c80ba2c383a 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -2865,76 +2865,14 @@ Bitmap SIP_SA_ACCESSIBILITY_CROP_MARKERS File = "cropmarkersACC.bmp"; }; -// ******************************************************************* EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +//IAccessibility2 Implementation 2009----- +String STR_ObjNameSingulFONTWORK +{ + Text [ en-US ] = "font work" ; +}; +String STR_ObjNamePluralFONTWORK +{ + Text [ en-US ] = "font works" ; +}; +//-----IAccessibility2 Implementation 2009 diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 260a2e2e646c..74c363c2df6e 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -113,6 +113,7 @@ SvxColorValueSet::SvxColorValueSet( Window* _pParent, WinBits nWinStyle ) : DragSourceHelper( this ), bLeft (TRUE) { + SetAccessibleName(String( SVX_RES( STR_COLORTABLE ) ) ); } /************************************************************************* @@ -126,6 +127,7 @@ SvxColorValueSet::SvxColorValueSet( Window* _pParent, const ResId& rResId ) : DragSourceHelper( this ), bLeft (TRUE) { + SetAccessibleName(String( SVX_RES( STR_COLORTABLE ) )); } /************************************************************************* diff --git a/svx/source/tbxctrls/colrctrl.src b/svx/source/tbxctrls/colrctrl.src index 023c271c5455..1fdd6df6a39b 100644 --- a/svx/source/tbxctrls/colrctrl.src +++ b/svx/source/tbxctrls/colrctrl.src @@ -53,32 +53,11 @@ DockingWindow RID_SVXCTRL_COLOR Border = FALSE ; }; }; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - +// IAccessibility2 implementation 2009. ------ +String STR_COLORTABLE +{ + Text [ en-US ] = "Color Palette" ; +}; +// ------ IAccessibility2 implementation 2009. diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 23f2241ab235..7409d00aa3c8 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -83,8 +83,8 @@ const int nLineCount = 4; \************************************************************************/ FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, Window* pParent, sal_uInt16 /*nSID*/ ) : ModalDialog( pParent, SVX_RES( RID_SVX_MDLG_FONTWORK_GALLERY ) ), - maCtlFavorites ( this, SVX_RES( CTL_FAVORITES ) ), maFLFavorites ( this, SVX_RES( FL_FAVORITES ) ), + maCtlFavorites ( this, SVX_RES( CTL_FAVORITES ) ), maOKButton ( this, SVX_RES( BTN_OK ) ), maCancelButton ( this, SVX_RES( BTN_CANCEL ) ), maHelpButton ( this, SVX_RES( BTN_HELP ) ), diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index bd0a39200dd1..a586b492763e 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -856,6 +856,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, { aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD ); aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_TRANSPARENT ) ); + aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_BACKGROUND ) ); } else if ( SID_ATTR_CHAR_COLOR == theSlotId || SID_ATTR_CHAR_COLOR2 == theSlotId || SID_EXTRUSION_3D_COLOR == theSlotId ) { @@ -870,8 +871,13 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, { aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD ); aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_AUTOMATIC ) ); + aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_TEXTCOLOR ) ); } } + else + { + aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_FRAME_COLOR ) ); + } if ( pColorTable ) { @@ -1092,6 +1098,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& SetHelpId( HID_POPUP_FRAME ); SetText( SVX_RESSTR(RID_SVXSTR_FRAME) ); + aFrameSet.SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME) ); aFrameSet.Show(); } /*-- 22.09.2004 12:27:50--------------------------------------------------- @@ -1348,6 +1355,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r aLineSet.SetSelectHdl( LINK( this, SvxLineWindow_Impl, SelectHdl ) ); aLineSet.SetText( SVX_RESSTR(STR_NONE) ); + aLineSet.SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) ); lcl_CalcSizeValueSet( *this, aLineSet, aBmpSize ); SetHelpId( HID_POPUP_LINE ); diff --git a/svx/source/tbxctrls/tbcontrl.src b/svx/source/tbxctrls/tbcontrl.src index f3e068f56226..f49966e9ae17 100644 --- a/svx/source/tbxctrls/tbcontrl.src +++ b/svx/source/tbxctrls/tbcontrl.src @@ -185,5 +185,11 @@ String RID_SVXSTR_MORE Text [ en-US ] = "More..."; }; +//IAccessibility2 Implementation 2009----- +String RID_SVXSTR_TEXTCOLOR +{ + Text [ en-US ] = "Font color"; +}; +//-----IAccessibility2 Implementation 2009 // ********************************************************************** EOF -- cgit From 6ec0a79f441826a97537c13b2c161b6de6aa617d Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 15:13:49 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (sw module) --- sw/inc/access.hrc | 10 ++++++++- sw/inc/colwd.hxx | 2 +- sw/inc/poolfmt.hrc | 9 +++++++- sw/inc/unomap.hxx | 6 ++++-- sw/source/ui/chrdlg/break.cxx | 3 +++ sw/source/ui/chrdlg/chardlg.cxx | 2 ++ sw/source/ui/chrdlg/numpara.cxx | 2 ++ sw/source/ui/chrdlg/swuiccoll.cxx | 4 ++++ sw/source/ui/config/optpage.cxx | 7 ++++++ sw/source/ui/dialog/uiregionsw.cxx | 10 +++++++++ sw/source/ui/docvw/access.src | 19 +++++++++++++++++ sw/source/ui/envelp/labprt.hxx | 4 ++-- sw/source/ui/envelp/swuilabimp.hxx | 7 +++--- sw/source/ui/fldui/fldfunc.cxx | 14 ++++++++++++ sw/source/ui/frmdlg/column.cxx | 34 +++++++++++++++++++++++++++++ sw/source/ui/frmdlg/column.hrc | 8 ++++++- sw/source/ui/frmdlg/column.src | 10 +++++++++ sw/source/ui/frmdlg/frmpage.cxx | 4 ++++ sw/source/ui/inc/bookmark.hxx | 2 +- sw/source/ui/inc/break.hxx | 2 +- sw/source/ui/inc/column.hxx | 6 +++--- sw/source/ui/inc/docstdlg.hxx | 17 +++++++-------- sw/source/ui/inc/drpcps.hxx | 4 ++-- sw/source/ui/inc/frmpage.hxx | 12 +++++------ sw/source/ui/inc/glosbib.hxx | 7 +++--- sw/source/ui/inc/insfnote.hxx | 4 ++-- sw/source/ui/inc/linenum.hxx | 6 +++--- sw/source/ui/inc/num.hxx | 4 ++-- sw/source/ui/inc/numpara.hxx | 2 +- sw/source/ui/inc/optpage.hxx | 2 +- sw/source/ui/inc/outline.hxx | 4 ++-- sw/source/ui/inc/pgfnote.hxx | 4 ++-- sw/source/ui/inc/rowht.hxx | 2 +- sw/source/ui/inc/split.hxx | 4 ++-- sw/source/ui/inc/srtdlg.hxx | 4 ++-- sw/source/ui/inc/swrenamexnameddlg.hxx | 2 +- sw/source/ui/inc/swuicnttab.hxx | 10 ++++----- sw/source/ui/inc/swuiidxmrk.hxx | 2 +- sw/source/ui/inc/tautofmt.hxx | 2 +- sw/source/ui/index/cnttab.cxx | 27 +++++++++++++++++++++++ sw/source/ui/index/cnttab.hrc | 1 + sw/source/ui/index/cnttab.src | 6 ++++++ sw/source/ui/index/swuiidxmrk.cxx | 2 ++ sw/source/ui/misc/docfnote.cxx | 2 ++ sw/source/ui/misc/glossary.cxx | 4 +++- sw/source/ui/misc/glossary.hrc | 4 +++- sw/source/ui/misc/glossary.src | 6 ++++++ sw/source/ui/misc/impfnote.hxx | 8 +++---- sw/source/ui/misc/insfnote.cxx | 4 ++++ sw/source/ui/misc/insfnote.hrc | 4 ++++ sw/source/ui/misc/insfnote.src | 6 ++++++ sw/source/ui/misc/linenum.cxx | 11 ++++++++++ sw/source/ui/misc/num.cxx | 3 +++ sw/source/ui/misc/outline.cxx | 7 +++++- sw/source/ui/misc/pgfnote.cxx | 1 + sw/source/ui/misc/srtdlg.cxx | 39 ++++++++++++++++++++++++++++++++++ sw/source/ui/table/convert.cxx | 2 ++ sw/source/ui/table/convert.hrc | 3 +++ sw/source/ui/table/convert.src | 6 ++++++ sw/source/ui/table/tabledlg.cxx | 20 ++++++++++++++++- sw/source/ui/table/tabledlg.hrc | 3 +++ sw/source/ui/table/tabledlg.src | 6 ++++++ sw/source/ui/table/tablepg.hxx | 3 +-- sw/source/ui/utlui/content.cxx | 18 ---------------- sw/source/ui/utlui/navipi.cxx | 6 +++++- sw/source/ui/utlui/navipi.hrc | 4 ++++ sw/source/ui/utlui/navipi.src | 12 +++++++++++ sw/source/ui/utlui/poolfmt.src | 23 +++++++++++++++++++- 68 files changed, 404 insertions(+), 94 deletions(-) diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index b6c6bb30086e..94fdfc254e7b 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -52,7 +52,15 @@ #define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20) #define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21) -#define ACCESS_ACT_END STR_ACCESS_ANNOTATION_BUTTON_DESC +//IAccessibility2 Implementation 2009----- +#define STR_ACCESS_PREVIEW_DOC_NAME (RC_ACCESS_BEGIN + 22) +//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23) +#define STR_ACCESS_PREVIEW_DOC_SUFFIX (RC_ACCESS_BEGIN + 24) +#define STR_ACCESS_DOC_WORDPROCESSING (RC_ACCESS_BEGIN + 25) +#define STR_ACCESS_DOC_WORDPROCESSING_READONLY (RC_ACCESS_BEGIN + 26) +//-----IAccessibility2 Implementation 2009 + +#define ACCESS_ACT_END STR_ACCESS_DOC_WORDPROCESSING_READONLY #if ACCESS_ACT_END > RC_ACCESS_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx index 3afb1647f4ad..54df3b1b9f24 100644 --- a/sw/inc/colwd.hxx +++ b/sw/inc/colwd.hxx @@ -41,11 +41,11 @@ class SwTableFUNC; class SwTableWidthDlg : public SvxStandardDialog { + FixedLine aWidthFL; FixedText aColFT; NumericField aColEdit; FixedText aWidthFT; MetricField aWidthEdit; - FixedLine aWidthFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc index f191f0fac78c..e68de680c243 100644 --- a/sw/inc/poolfmt.hrc +++ b/sw/inc/poolfmt.hrc @@ -268,7 +268,14 @@ #define STR_POOLNUMRULE_BUL3 (RC_POOLNUMRULE_BEGIN+ 7) #define STR_POOLNUMRULE_BUL4 (RC_POOLNUMRULE_BEGIN+ 8) #define STR_POOLNUMRULE_BUL5 (RC_POOLNUMRULE_BEGIN+ 9) - +//IAccessibility2 Impplementaton 2009----- +//Solution:Define column item's accessible name ID. +#define STR_COLUMN_VALUESET_ITEM0 (RC_POOLNUMRULE_BEGIN + 10 ) +#define STR_COLUMN_VALUESET_ITEM1 (RC_POOLNUMRULE_BEGIN + 11 ) +#define STR_COLUMN_VALUESET_ITEM2 (RC_POOLNUMRULE_BEGIN + 12 ) +#define STR_COLUMN_VALUESET_ITEM3 (RC_POOLNUMRULE_BEGIN + 13 ) +#define STR_COLUMN_VALUESET_ITEM4 (RC_POOLNUMRULE_BEGIN + 14 ) +//-----IAccessibility2 Impplementaton 2009 //----------------- // Paragraph styles //----------------- diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index abeedbd8a0de..6f085bf0d26a 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -129,8 +129,10 @@ #define PROPERTY_MAP_PARA_AUTO_STYLE 96 #define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM 97 #define PROPERTY_MAP_METAFIELD 98 - -#define PROPERTY_MAP_END 99 +//IAccessibility2 Implementation 2009----- +#define PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE 99 +//-----IAccessibility2 Implementation 2009 +#define PROPERTY_MAP_END 100 //S&E #define WID_WORDS 0 diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 63d878006f7e..a70cfe90e168 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -178,6 +178,9 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : bHtmlMode(0 != ::GetHtmlMode(rS.GetView().GetDocShell())) { + aPageNumEdit.SetAccessibleRelationLabeledBy(&aPageNumBox); + aPageNumEdit.SetAccessibleName(aPageNumBox.GetText()); + Link aLk = LINK(this,SwBreakDlg,ClickHdl); aPageBtn.SetClickHdl( aLk ); aLineBtn.SetClickHdl( aLk ); diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 38b1ba906fdd..d1d415fd2c45 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -216,6 +216,8 @@ SwCharURLPage::SwCharURLPage( Window* pParent, { FreeResource(); + aEventPB.SetAccessibleRelationMemberOf(&aURLFL); + const SfxPoolItem* pItem; SfxObjectShell* pShell; if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) || diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index f80130f475e9..1f1380c69ff2 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -111,6 +111,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, SwParagraphNumTabPage, LineCountHdl_Impl)); aRestartParaCountCB.SetClickHdl( LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl)); + aNewStartNF.SetAccessibleName(aNewStartNumberCB.GetText()); + aNewStartNF.SetAccessibleRelationLabeledBy(&aNewStartNumberCB); } /*-----------------31.01.98 08:34------------------- diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 44006ef5cab4..c468cb886c51 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -99,6 +99,10 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) FreeResource(); SetExchangeSupport(); + aRemovePB.SetAccessibleRelationMemberOf(&aConditionFL); + aAssignPB.SetAccessibleRelationMemberOf(&aConditionFL); + aTbLinks.SetAccessibleRelationLabeledBy(&aConditionCB); + // Handler installieren aConditionCB.SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl)); aTbLinks.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl )); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 6e6ed773a33d..db86e39bf02b 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1972,6 +1972,13 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent, aLk = LINK(this, SwRedlineOptionsTabPage, ChangedMaskPrevHdl); aMarkPosLB.SetSelectHdl( aLk ); aMarkColorLB.SetSelectHdl( aLk ); +//IAccessibility2 Impplementaton 2009----- + //solution: set different accessible name of four color box + aInsertColorLB.SetAccessibleName(::rtl::OUString( aInsertFT.GetDisplayText()) + ::rtl::OUString(aInsertColorFT.GetDisplayText())); + aDeletedColorLB.SetAccessibleName(::rtl::OUString( aDeletedFT.GetDisplayText()) + ::rtl::OUString( aDeletedColorFT.GetDisplayText())); + aChangedColorLB.SetAccessibleName(::rtl::OUString( aChangedFT.GetDisplayText()) + ::rtl::OUString( aChangedColorFT.GetDisplayText())); + aMarkColorLB.SetAccessibleName(::rtl::OUString( aMarkPosFT.GetDisplayText()) + ::rtl::OUString( aMarkColorFT.GetDisplayText())); +//-----IAccessibility2 Impplementaton 2009 } SwRedlineOptionsTabPage::~SwRedlineOptionsTabPage() diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 5acc169c4979..83c1b851fbab 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -457,6 +457,10 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) aTree.Select( aTree.First() ); aTree.Show(); bDontCheckPasswd = sal_False; + + aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL); + aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB); + aSubRegionED.SetAccessibleName(aSubRegionFT.GetText()); } /* -----------------------------26.04.01 14:56-------------------------------- @@ -1353,6 +1357,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) rData.SetLinkFilePassword( aEmptyStr ); } rData.SetType(DDE_LINK_SECTION); + aFileNameED.SetAccessibleName(aDDECommandFT.GetText()); } else { @@ -1371,6 +1376,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) rData.SetLinkFilePassword( aEmptyStr ); aFileNameED.SetText(aEmptyStr); } + aFileNameED.SetAccessibleName(aFileNameFT.GetText()); } aFilePB.Enable(bFile && !bDDE); } @@ -1734,6 +1740,7 @@ SwInsertSectionTabPage::SwInsertSectionTabPage( aCurName.SetModifyHdl ( LINK( this, SwInsertSectionTabPage, NameEditHdl)); aDDECB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, DDEHdl )); ChangeProtectHdl(&aProtectCB); + aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL); aSubRegionED.EnableAutocomplete( sal_True, sal_True ); } /* -----------------21.05.99 10:31------------------- @@ -1999,6 +2006,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) aDDECommandFT.Show(); aSubRegionFT.Hide(); aSubRegionED.Hide(); + aFileNameED.SetAccessibleName(aDDECommandFT.GetText()); } else { @@ -2008,6 +2016,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) aSubRegionFT.Show(); aSubRegionED.Show(); aSubRegionED.Enable(bFile); + aFileNameED.SetAccessibleName(aFileNameFT.GetText()); } return 0; } @@ -2375,6 +2384,7 @@ SwSectionIndentTabPage::SwSectionIndentTabPage( Window *pParent, const SfxItemSe Link aLk = LINK(this, SwSectionIndentTabPage, IndentModifyHdl); aBeforeMF.SetModifyHdl(aLk); aAfterMF.SetModifyHdl(aLk); + aPreviewWin.SetAccessibleName(aIndentFL.GetText()); } /*-- 13.06.2003 09:59:23--------------------------------------------------- diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src index 42081d3ab7e7..d455c01d0cf3 100644 --- a/sw/source/ui/docvw/access.src +++ b/sw/source/ui/docvw/access.src @@ -100,3 +100,22 @@ String STR_ACCESS_ANNOTATION_BUTTON_DESC Text [ en-US ] = "Activate this button to open a list of actions which can be performed on this comment and other comments"; }; +//IAccessibility2 Implementation 2009----- +String STR_ACCESS_PREVIEW_DOC_NAME +{ + Text [ en-US ] = "Document preview"; +}; +String STR_ACCESS_PREVIEW_DOC_SUFFIX +{ + Text [ en-US ] = "(Preview mode)"; +}; +String STR_ACCESS_DOC_WORDPROCESSING +{ + Text [ en-US ] = "%PRODUCTNAME Document"; +}; +String STR_ACCESS_DOC_WORDPROCESSING_READONLY +{ + Text [ en-US ] = "(read-only)"; +}; +//-----IAccessibility2 Implementation 2009 + diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index 1f8ff491423d..afebc78b4e82 100644 --- a/sw/source/ui/envelp/labprt.hxx +++ b/sw/source/ui/envelp/labprt.hxx @@ -45,6 +45,7 @@ class SwLabPrtPage : public SfxTabPage { Printer* pPrinter; //Fuer die Schachteinstellug - leider. + FixedLine aFLDontKnow; RadioButton aPageButton; RadioButton aSingleButton; FixedText aColText; @@ -52,11 +53,10 @@ class SwLabPrtPage : public SfxTabPage FixedText aRowText; NumericField aRowField; CheckBox aSynchronCB; - FixedLine aFLDontKnow; + FixedLine aFLPrinter; FixedInfo aPrinterInfo; PushButton aPrtSetup; - FixedLine aFLPrinter; SwLabPrtPage(Window* pParent, const SfxItemSet& rSet); ~SwLabPrtPage(); diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index 2bfcc7e27cae..2bbbc8526f10 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -34,6 +34,7 @@ class SwLabPage : public SfxTabPage String sActDBName; SwLabItem aItem; + FixedLine aWritingFL; FixedText aWritingText; CheckBox aAddrBox; MultiLineEdit aWritingEdit; @@ -45,8 +46,8 @@ class SwLabPage : public SfxTabPage FixedText aDBFieldFT; ListBox aDBFieldLB; // PushButton aDatabaseButton; - FixedLine aWritingFL; + FixedLine aFormatFL; RadioButton aContButton; RadioButton aSheetButton; FixedText aMakeText; @@ -55,7 +56,6 @@ class SwLabPage : public SfxTabPage ListBox aTypeBox; ListBox aHiddenSortTypeBox; FixedInfo aFormatInfo; - FixedLine aFormatFL; sal_Bool m_bLabel; @@ -102,12 +102,11 @@ public: class SwOneExampleFrame; class SwVisitingCardPage : public SfxTabPage { + FixedLine aContentFL; SvTreeListBox aAutoTextLB; FixedText aAutoTextGroupFT; ListBox aAutoTextGroupLB; - FixedLine aContentFL; - Window aExampleWIN; String sVisCardGroup; diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index ae05a35681a7..171e460eb1a5 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -335,12 +335,16 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) aNameFT.SetText(SW_RESSTR(STR_MACNAME)); aValueFT.SetText(SW_RESSTR(STR_PROMPT)); aNameED.SetText(GetFldMgr().GetMacroName()); + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_HIDDENPARAFLD: aNameFT.SetText(SW_RESSTR(STR_COND)); aNameED.SetDropEnable(TRUE); bName = TRUE; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_HIDDENTXTFLD: @@ -352,6 +356,8 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) if (!IsFldEdit() && pSh ) aValueED.SetText(pSh->GetSelTxt()); bName = bValue = TRUE; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); } break; @@ -365,18 +371,24 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) } bName = bValue = TRUE; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_JUMPEDITFLD: aNameFT.SetText(SW_RESSTR(STR_JUMPEDITFLD)); aValueFT.SetText(SW_RESSTR(STR_PROMPT)); bName = bValue = TRUE; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_INPUTFLD: aValueFT.SetText(SW_RESSTR(STR_PROMPT)); bValue = TRUE; // bShowSelection = TRUE; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_COMBINED_CHARS: @@ -388,6 +400,8 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) const USHORT nLen = aNameED.GetText().Len(); if( !nLen || nLen > MAX_COMBINED_CHARACTERS ) bInsert = FALSE; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); } break; case TYP_DROPDOWN : diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 0a3c8cc33623..508b69509d08 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -505,6 +505,15 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) FreeResource(); SetExchangeSupport(); + aBtnDown.SetAccessibleRelationMemberOf(&aFLLayout); + aEd1.SetAccessibleRelationLabeledBy(&aWidthFT); + aEd2.SetAccessibleRelationLabeledBy(&aWidthFT); + aEd3.SetAccessibleRelationLabeledBy(&aWidthFT); + aDistEd1.SetAccessibleRelationLabeledBy(&aDistFT); + aDistEd2.SetAccessibleRelationLabeledBy(&aDistFT); + aBtnUp.SetAccessibleRelationLabeledBy(&aColumnFT); + aBtnDown.SetAccessibleRelationLabeledBy(&aColumnFT); + aDefaultVS.SetHelpId(HID_COLUMN_VALUESET); aDefaultVS.SetColCount( 5 ); aDefaultVS.SetStyle( aDefaultVS.GetStyle() @@ -909,16 +918,41 @@ void SwColumnPage::SetLabels( USHORT nVis ) String sLbl( '~' ); String sLbl2( String::CreateFromInt32( nVis + 1 )); + String tmp1(sLbl2); sLbl2.Insert(sLbl, sLbl2.Len() - 1); aLbl1.SetText(sLbl2); sLbl2 = String::CreateFromInt32( nVis + 2 ); + String tmp2(sLbl2); sLbl2.Insert(sLbl, sLbl2.Len() - 1); aLbl2.SetText(sLbl2); sLbl2 = String::CreateFromInt32( nVis + 3 ); + String tmp3(sLbl2); sLbl2.Insert(sLbl, sLbl2.Len() - 1); aLbl3.SetText(sLbl2); + String sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp1); + aEd1.SetAccessibleName(sColumnWidth); + + sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp2); + aEd2.SetAccessibleName(sColumnWidth); + + sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp3); + aEd3.SetAccessibleName(sColumnWidth); + + String sDist = SW_RESSTR( STR_PAGESETUP_SPACING ) ; + String sDist1 = sDist; + sDist1.SearchAndReplaceAscii("%1", tmp1); + sDist1.SearchAndReplaceAscii("%2", tmp2); + aDistEd1.SetAccessibleName(sDist1); + + String sDist2 = sDist; + sDist2.SearchAndReplaceAscii("%1", tmp2); + sDist2.SearchAndReplaceAscii("%2", tmp3); + aDistEd2.SetAccessibleName(sDist2); } /*------------------------------------------------------------------------ diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc index dd8b81e0c91a..86f23bed3029 100644 --- a/sw/source/ui/frmdlg/column.hrc +++ b/sw/source/ui/frmdlg/column.hrc @@ -79,9 +79,15 @@ #define FT_TEXTDIRECTION 60 #define LB_TEXTDIRECTION 61 #define FL_VERT 62 - +//IAccessibility2 Impplementaton 2009----- +#define STR_PAGESETUP_SPACING 32765 +//-----IAccessibility2 Impplementaton 2009 #define LISTBOX_SELECTION 0 #define LISTBOX_SECTION 1 #define LISTBOX_SECTIONS 2 #define LISTBOX_PAGE 3 #define LISTBOX_FRAME 4 + +//IAccessibility2 Impplementaton 2009----- +#define STR_COLUMN_WIDTH 63 +//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index 04e91ce3560a..10b602f755d6 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -416,4 +416,14 @@ ModalDialog DLG_COLUMN Text [ en-US ] = "Columns"; }; +//IAccessibility2 Impplementaton 2009----- +String STR_PAGESETUP_SPACING +{ + Text [ en-US ] = "Spacing between %1 and %2"; +}; +String STR_COLUMN_WIDTH +{ + Text [ en-US ] = "Column %1 Width"; +}; +//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index c1747efaa962..56af2292371a 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -685,6 +685,8 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : FreeResource(); SetExchangeSupport(); + aRealSizeBT.SetAccessibleRelationMemberOf(&aSizeFL); + Link aLk = LINK(this, SwFrmPage, RangeModifyHdl); aWidthED. SetLoseFocusHdl( aLk ); aHeightED. SetLoseFocusHdl( aLk ); @@ -2354,6 +2356,8 @@ SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) : { FreeResource(); + aBrowseBT.SetAccessibleRelationMemberOf(&aConnectFL); + SetExchangeSupport(); aMirrorHorzBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl)); aMirrorVertBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl)); diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx index 29c3173787a9..ba539d3241e8 100644 --- a/sw/source/ui/inc/bookmark.hxx +++ b/sw/source/ui/inc/bookmark.hxx @@ -65,8 +65,8 @@ public: class SwInsertBookmarkDlg: public SvxStandardDialog { - BookmarkCombo aBookmarkBox; FixedLine aBookmarkFl; + BookmarkCombo aBookmarkBox; OKButton aOkBtn; CancelButton aCancelBtn; PushButton aDeleteBtn; diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx index 447afd8ca567..cd470e286c19 100644 --- a/sw/source/ui/inc/break.hxx +++ b/sw/source/ui/inc/break.hxx @@ -50,6 +50,7 @@ class SwWrtShell; class SwBreakDlg: public SvxStandardDialog { SwWrtShell &rSh; + FixedLine aBreakFL; RadioButton aLineBtn; RadioButton aColumnBtn; RadioButton aPageBtn; @@ -57,7 +58,6 @@ class SwBreakDlg: public SvxStandardDialog ListBox aPageCollBox; CheckBox aPageNumBox; NumericField aPageNumEdit; - FixedLine aBreakFL; OKButton aOkBtn; CancelButton aCancelBtn; diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx index f2a5e37d283b..9bc28ff87508 100644 --- a/sw/source/ui/inc/column.hxx +++ b/sw/source/ui/inc/column.hxx @@ -122,13 +122,14 @@ class ColumnValueSet : public ValueSet --------------------------------------------------------------------*/ class SwColumnPage : public SfxTabPage { + FixedLine aFLGroup; FixedText aClNrLbl; NumericField aCLNrEdt; ColumnValueSet aDefaultVS; ImageList aPreColsIL; CheckBox aBalanceColsCB; - FixedLine aFLGroup; + FixedLine aFLLayout; ImageButton aBtnUp; FixedText aColumnFT; FixedText aWidthFT; @@ -144,15 +145,14 @@ class SwColumnPage : public SfxTabPage ImageButton aBtnDown; CheckBox aAutoWidthBox; - FixedLine aFLLayout; + FixedLine aFLLineType; FixedText aLineTypeLbl; LineListBox aLineTypeDLB; FixedText aLineHeightLbl; MetricField aLineHeightEdit; FixedText aLinePosLbl; ListBox aLinePosDLB; - FixedLine aFLLineType; FixedLine aVertFL; FixedLine aPropertiesFL; diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx index f269693975cc..e0c2056680ab 100644 --- a/sw/source/ui/inc/docstdlg.hxx +++ b/sw/source/ui/inc/docstdlg.hxx @@ -55,22 +55,21 @@ protected: DECL_LINK( UpdateHdl, PushButton*); private: - FixedText aTableLbl; - FixedText aGrfLbl; - FixedText aOLELbl; FixedText aPageLbl; - FixedText aParaLbl; - FixedText aWordLbl; - FixedText aCharLbl; - FixedText aLineLbl; - + FixedInfo aPageNo; + FixedText aTableLbl; FixedInfo aTableNo; + FixedText aGrfLbl; FixedInfo aGrfNo; + FixedText aOLELbl; FixedInfo aOLENo; - FixedInfo aPageNo; + FixedText aParaLbl; FixedInfo aParaNo; + FixedText aWordLbl; FixedInfo aWordNo; + FixedText aCharLbl; FixedInfo aCharNo; + FixedText aLineLbl; FixedInfo aLineNo; PushButton aUpdatePB; diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx index 50140443f726..cb15b885bfe0 100644 --- a/sw/source/ui/inc/drpcps.hxx +++ b/sw/source/ui/inc/drpcps.hxx @@ -72,6 +72,7 @@ class SwDropCapsPage : public SfxTabPage { friend class SwDropCapsPict; + FixedLine aSettingsFL; CheckBox aDropCapsBox; CheckBox aWholeWordCB; FixedText aSwitchText; @@ -80,13 +81,12 @@ friend class SwDropCapsPict; NumericField aLinesField; FixedText aDistanceText; MetricField aDistanceField; - FixedLine aSettingsFL; + FixedLine aContentFL; FixedText aTextText; Edit aTextEdit; FixedText aTemplateText; ListBox aTemplateBox; - FixedLine aContentFL; SwDropCapsPict *pPict; diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index 979f5cf12dd6..9b1f646e6bf7 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -54,6 +54,7 @@ struct SwPosition; class SwFrmPage: public SfxTabPage { // Size + FixedLine aSizeFL; FixedText aWidthFT; FixedText aWidthAutoFT; PercentField aWidthED; @@ -66,11 +67,10 @@ class SwFrmPage: public SfxTabPage CheckBox aAutoHeightCB; CheckBox aFixedRatioCB; PushButton aRealSizeBT; - FixedLine aSizeFL; // Anker - FixedLine aTypeFL; FixedLine aTypeSepFL; + FixedLine aTypeFL; RadioButton aAnchorAtPageRB; RadioButton aAnchorAtParaRB; RadioButton aAnchorAtCharRB; @@ -78,6 +78,7 @@ class SwFrmPage: public SfxTabPage RadioButton aAnchorAtFrameRB; // Position + FixedLine aPositionFL; FixedText aHorizontalFT; ListBox aHorizontalDLB; FixedText aAtHorzPosFT; @@ -93,7 +94,6 @@ class SwFrmPage: public SfxTabPage ListBox aVertRelationLB; // OD 02.10.2003 #i18732# - check box for new option 'FollowTextFlow' CheckBox aFollowTextFlowCB; - FixedLine aPositionFL; // Example SvxSwFrameExample aExampleWN; @@ -286,6 +286,7 @@ public: class SwFrmAddPage : public SfxTabPage { + FixedLine aNamesFL; FixedText aNameFT; Edit aNameED; FixedText aAltNameFT; @@ -294,19 +295,18 @@ class SwFrmAddPage : public SfxTabPage ListBox aPrevLB; FixedText aNextFT; ListBox aNextLB; - FixedLine aNamesFL; + FixedLine aProtectFL; CheckBox aProtectContentCB; CheckBox aProtectFrameCB; CheckBox aProtectSizeCB; - FixedLine aProtectFL; + FixedLine aExtFL; CheckBox aEditInReadonlyCB; CheckBox aPrintFrameCB; FixedText aTextFlowFT; ListBox aTextFlowLB; - FixedLine aExtFL; SwWrtShell* pWrtSh; diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx index c96e4177027b..87f1270557c9 100644 --- a/sw/source/ui/inc/glosbib.hxx +++ b/sw/source/ui/inc/glosbib.hxx @@ -74,9 +74,11 @@ public: class SwGlossaryGroupDlg : public SvxStandardDialog { - + FixedText aBibFT; FEdit aNameED; + FixedText aPathFT; ListBox aPathLB; + FixedText aSelectFT; SwGlossaryGroupTLB aGroupTLB; OKButton aOkPB; @@ -85,9 +87,6 @@ class SwGlossaryGroupDlg : public SvxStandardDialog PushButton aNewPB; PushButton aDelPB; PushButton aRenamePB; - FixedText aBibFT; - FixedText aPathFT; - FixedText aSelectFT; SvStrings* pRemovedArr; SvStrings* pInsertedArr; diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx index c9c51301a100..8d8d6feabf3a 100644 --- a/sw/source/ui/inc/insfnote.hxx +++ b/sw/source/ui/inc/insfnote.hxx @@ -50,16 +50,16 @@ class SwInsFootNoteDlg: public SvxStandardDialog char cExtChar; BOOL bExtCharAvailable; BOOL bEdit; + FixedLine aNumberFL; RadioButton aNumberAutoBtn; RadioButton aNumberCharBtn; Edit aNumberCharEdit; PushButton aNumberExtChar; - FixedLine aNumberFL; //Alles fuer die Auswahl Fussnote/Endnote + FixedLine aTypeFL; RadioButton aFtnBtn; RadioButton aEndNoteBtn; - FixedLine aTypeFL; OKButton aOkBtn; CancelButton aCancelBtn; diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx index 62da2e1925ef..5cf50d3182a7 100644 --- a/sw/source/ui/inc/linenum.hxx +++ b/sw/source/ui/inc/linenum.hxx @@ -66,6 +66,7 @@ public: class SwLineNumberingPage : public SfxTabPage { CheckBox aNumberingOnCB; + FixedLine aDisplayFL; FixedText aCharStyleFT; ListBox aCharStyleLB; FixedText aFormatFT; @@ -77,17 +78,16 @@ class SwLineNumberingPage : public SfxTabPage FixedText aNumIntervalFT; NumericField aNumIntervalNF; FixedText aNumRowsFT; - FixedLine aDisplayFL; + FixedLine aDivisorFL; FixedText aDivisorFT; Edit aDivisorED; FixedText aDivIntervalFT; NumericField aDivIntervalNF; FixedText aDivRowsFT; - FixedLine aDivisorFL; + FixedLine aCountFL; CheckBox aCountEmptyLinesCB; CheckBox aCountFrameLinesCB; CheckBox aRestartEachPageCB; - FixedLine aCountFL; SwWrtShell* pSh; diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx index 2233f9609fe4..be7df96bbd6d 100644 --- a/sw/source/ui/inc/num.hxx +++ b/sw/source/ui/inc/num.hxx @@ -82,13 +82,13 @@ struct SwBmpItemInfo --------------------------------------------------*/ class SwNumPositionTabPage : public SfxTabPage { - FixedLine aPositionFL; - FixedLine aLevelFL; + FixedLine aLevelFL; MultiListBox aLevelLB; // --> OD 2008-02-01 #newlistlevelattrs# // former set of controls shown for numbering rules containing list level // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION + FixedLine aPositionFL; FixedText aDistBorderFT; MetricField aDistBorderMF; CheckBox aRelativeCB; diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx index f8d748c4473c..a69a29394e90 100644 --- a/sw/source/ui/inc/numpara.hxx +++ b/sw/source/ui/inc/numpara.hxx @@ -48,10 +48,10 @@ class SwParagraphNumTabPage : public SfxTabPage FixedText aOutlineLvFT; ListBox aOutlineLvLB; + FixedLine aNewStartFL; FixedText aNumberStyleFT; ListBox aNumberStyleLB; - FixedLine aNewStartFL; TriStateBox aNewStartCB; TriStateBox aNewStartNumberCB; NumericField aNewStartNF; diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index 61b8056aa309..0f8fd5ece7c2 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -135,11 +135,11 @@ class SwAddPrinterTabPage : public SfxTabPage FixedLine aSeparatorRFL; + FixedLine aFL3; RadioButton aNoRB; RadioButton aOnlyRB; RadioButton aEndRB; RadioButton aEndPageRB; - FixedLine aFL3; FixedLine aFL4; CheckBox aPrintEmptyPagesCB; // CheckBox aSingleJobsCB; diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx index 65f57636c02d..438d704eeccd 100644 --- a/sw/source/ui/inc/outline.hxx +++ b/sw/source/ui/inc/outline.hxx @@ -104,9 +104,10 @@ class SwOutlineTabDialog : public SfxTabDialog * --------------------------------------------------*/ class SwOutlineSettingsTabPage : public SfxTabPage { - ListBox aLevelLB; FixedLine aLevelFL; + ListBox aLevelLB; + FixedLine aNumberFL; FixedText aCollLbl; ListBox aCollBox; FixedText aNumberLbl; @@ -122,7 +123,6 @@ class SwOutlineSettingsTabPage : public SfxTabPage Edit aSuffixED; FixedText aStartLbl; NumericField aStartEdit; - FixedLine aNumberFL; NumberingPreview aPreviewWIN; String aNoFmtName; diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx index 31bb0c68fc22..8911e3ad22b2 100644 --- a/sw/source/ui/inc/pgfnote.hxx +++ b/sw/source/ui/inc/pgfnote.hxx @@ -59,13 +59,14 @@ private: SwFootNotePage(Window *pParent, const SfxItemSet &rSet); ~SwFootNotePage(); + FixedLine aPosHeader; RadioButton aMaxHeightPageBtn; RadioButton aMaxHeightBtn; MetricField aMaxHeightEdit; FixedText aDistLbl; MetricField aDistEdit; - FixedLine aPosHeader; + FixedLine aLineHeader; FixedText aLinePosLbl; ListBox aLinePosBox; FixedText aLineTypeLbl; @@ -74,7 +75,6 @@ private: MetricField aLineWidthEdit; FixedText aLineDistLbl; MetricField aLineDistEdit; - FixedLine aLineHeader; DECL_LINK( HeightPage, Button * ); DECL_LINK( HeightMetric, Button * ); diff --git a/sw/source/ui/inc/rowht.hxx b/sw/source/ui/inc/rowht.hxx index e4b497246cd7..6ad4e5f7ab19 100644 --- a/sw/source/ui/inc/rowht.hxx +++ b/sw/source/ui/inc/rowht.hxx @@ -49,9 +49,9 @@ class SwWrtShell; class SwTableHeightDlg : public SvxStandardDialog { + FixedLine aHeightFL; MetricField aHeightEdit; CheckBox aAutoHeightCB; - FixedLine aHeightFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx index eafe394d2b27..c23c30035388 100644 --- a/sw/source/ui/inc/split.hxx +++ b/sw/source/ui/inc/split.hxx @@ -49,13 +49,13 @@ class SwWrtShell; class SwSplitTableDlg : public SvxStandardDialog { + FixedLine aCountFL; FixedText aCountLbl; NumericField aCountEdit; - FixedLine aCountFL; + FixedLine aDirFL; ImageRadioButton aHorzBox; ImageRadioButton aVertBox; CheckBox aPropCB; - FixedLine aDirFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx index 09d91cf64195..42556ce3d6f4 100644 --- a/sw/source/ui/inc/srtdlg.hxx +++ b/sw/source/ui/inc/srtdlg.hxx @@ -51,7 +51,7 @@ class SwSortDlg : public SvxStandardDialog FixedText aTypLbl; FixedText aDirLbl; - FixedLine aDirFL; + FixedLine aSortFL; CheckBox aKeyCB1; NumericField aColEdt1; @@ -71,7 +71,7 @@ class SwSortDlg : public SvxStandardDialog RadioButton aSortUp3RB; RadioButton aSortDn3RB; - FixedLine aSortFL; + FixedLine aDirFL; RadioButton aColumnRB; RadioButton aRowRB; diff --git a/sw/source/ui/inc/swrenamexnameddlg.hxx b/sw/source/ui/inc/swrenamexnameddlg.hxx index 16f3d56852e6..d15c90935c85 100644 --- a/sw/source/ui/inc/swrenamexnameddlg.hxx +++ b/sw/source/ui/inc/swrenamexnameddlg.hxx @@ -50,9 +50,9 @@ * --------------------------------------------------*/ class SwRenameXNamedDlg : public ModalDialog { + FixedLine aNameFL; FixedText aNewNameFT; NoSpaceEdit aNewNameED; - FixedLine aNameFL; OKButton aOk; CancelButton aCancel; HelpButton aHelp; diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx index 4a1294187876..1cd72dfc2cdd 100644 --- a/sw/source/ui/inc/swuicnttab.hxx +++ b/sw/source/ui/inc/swuicnttab.hxx @@ -188,6 +188,7 @@ class SwTOXSelectTabPage : public SfxTabPage // //index only + FixedLine aIdxOptionsFL; CheckBox aCollectSameCB; CheckBox aUseFFCB; CheckBox aUseDashCB; @@ -196,7 +197,6 @@ class SwTOXSelectTabPage : public SfxTabPage CheckBox aKeyAsEntryCB; CheckBox aFromFileCB; MenuButton aAutoMarkPB; - FixedLine aIdxOptionsFL; // index only // object only SwOLENames aFromNames; @@ -363,6 +363,7 @@ class SwTOXEntryTabPage : public SfxTabPage FixedText aLevelFT; SwIdxTreeListBox aLevelLB; + FixedLine aEntryFL; FixedText aTokenFT; SwTokenWindow aTokenWIN; PushButton aAllLevelsPB; @@ -395,14 +396,13 @@ class SwTOXEntryTabPage : public SfxTabPage FixedText aTabPosFT; MetricField aTabPosMF; // tab stop position CheckBox aAutoRightCB; - FixedLine aEntryFL; + FixedLine aFormatFL; CheckBox aRelToStyleCB; // position relative to the right margin of the para style FixedText aMainEntryStyleFT; ListBox aMainEntryStyleLB; // character style of main entries in indexes CheckBox aAlphaDelimCB; CheckBox aCommaSeparatedCB; - FixedLine aFormatFL; RadioButton aSortDocPosRB; RadioButton aSortContentRB; @@ -492,14 +492,14 @@ public: --------------------------------------------------*/ class SwTOXStylesTabPage : public SfxTabPage { + FixedLine aFormatFL; FixedText aLevelFT2; ListBox aLevelLB; + ImageButton aAssignBT; FixedText aTemplateFT; ListBox aParaLayLB; PushButton aStdBT; - ImageButton aAssignBT; PushButton aEditStyleBT; - FixedLine aFormatFL; SwForm* m_pCurrentForm; // void UpdatePattern(); diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx index 3f529f91affe..af80795a97e5 100644 --- a/sw/source/ui/inc/swuiidxmrk.hxx +++ b/sw/source/ui/inc/swuiidxmrk.hxx @@ -71,6 +71,7 @@ class SwIndexMarkDlg : public Window { friend class SwIndexMarkFloatDlg; friend class SwIndexMarkModalDlg; + FixedLine aIndexFL; FixedText aTypeFT; ListBox aTypeDCB; ImageButton aNewBT; @@ -97,7 +98,6 @@ class SwIndexMarkDlg : public Window CheckBox aSearchCaseSensitiveCB; CheckBox aSearchCaseWordOnlyCB; - FixedLine aIndexFL; OKButton aOKBT; CancelButton aCancelBT; diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx index 9c35450eb208..1d8889b8936f 100644 --- a/sw/source/ui/inc/tautofmt.hxx +++ b/sw/source/ui/inc/tautofmt.hxx @@ -63,12 +63,12 @@ class SwAutoFormatDlg : public SfxModalDialog { FixedLine aFlFormat; ListBox aLbFormat; + FixedLine aFlFormats; CheckBox aBtnNumFormat; CheckBox aBtnBorder; CheckBox aBtnFont; CheckBox aBtnPattern; CheckBox aBtnAlignment; - FixedLine aFlFormats; OKButton aBtnOk; CancelButton aBtnCancel; HelpButton aBtnHelp; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a453a46988ee..b7a74a088347 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -374,6 +374,8 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet aShowExampleCB.SetClickHdl(LINK(this, SwMultiTOXTabDialog, ShowPreviewHdl)); aShowExampleCB.Check( SW_MOD()->GetModuleConfig()->IsShowIndexPreview()); + + aExampleContainerWIN.SetAccessibleName(aShowExampleCB.GetText()); SetViewAlign( WINDOWALIGN_LEFT ); // SetViewWindow does not work if the dialog is visible! @@ -807,6 +809,10 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, { FreeResource(); + aHeaderTree.SetAccessibleRelationMemberOf(&aStylesFL); + aLeftPB.SetAccessibleRelationMemberOf(&aStylesFL); + aRightPB.SetAccessibleRelationMemberOf(&aStylesFL); + aLeftPB.SetModeImage( Image( SW_RES( IMG_ALL_LEFT_HC ) ), BMP_COLOR_HIGHCONTRAST ); aRightPB.SetModeImage( Image( SW_RES( IMG_ALL_RIGHT_HC ) ), BMP_COLOR_HIGHCONTRAST ); @@ -1017,6 +1023,11 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS bFirstCall(sal_True) { aBracketLB.InsertEntry(String(SW_RES(ST_NO_BRACKET)), 0); + + aAddStylesPB.SetAccessibleRelationMemberOf(&aCreateFromFL); + aAddStylesPB.SetAccessibleRelationLabeledBy(&aAddStylesCB); + aAddStylesPB.SetAccessibleName(aAddStylesCB.GetText()); + FreeResource(); pIndexEntryWrapper = new IndexEntrySupplierWrapper(); @@ -2124,6 +2135,16 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet m_pCurrentForm(0), bInLevelHdl(sal_False) { + aEditStylePB.SetAccessibleRelationMemberOf(&aEntryFL); + aHyperLinkPB.SetAccessibleRelationMemberOf(&aEntryFL); + aPageNoPB.SetAccessibleRelationMemberOf(&aEntryFL); + aTabPB.SetAccessibleRelationMemberOf(&aEntryFL); + aEntryPB.SetAccessibleRelationMemberOf(&aEntryFL); + aEntryNoPB.SetAccessibleRelationMemberOf(&aEntryFL); + aAllLevelsPB.SetAccessibleRelationMemberOf(&aEntryFL); + aTokenWIN.SetAccessibleRelationMemberOf(&aEntryFL); + aTokenWIN.SetAccessibleRelationLabeledBy(&aTokenFT); + Image aSortUpHC(SW_RES(IMG_SORTUP_HC )); aFirstSortUpRB.SetModeRadioImage(aSortUpHC,BMP_COLOR_HIGHCONTRAST); aSecondSortUpRB.SetModeRadioImage(aSortUpHC,BMP_COLOR_HIGHCONTRAST); @@ -3923,6 +3944,7 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS m_pCurrentForm(0) { FreeResource(); + SetExchangeSupport( sal_True ); aAssignBT.SetModeImage( Image( SW_RES( IMG_ONE_LEFT_HC ) ), BMP_COLOR_HIGHCONTRAST ); @@ -3933,6 +3955,11 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS aParaLayLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl)); aLevelLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl)); aParaLayLB.SetDoubleClickHdl(LINK( this, SwTOXStylesTabPage, DoubleClickHdl)); + + aStdBT.SetAccessibleRelationMemberOf(&aFormatFL); + aAssignBT.SetAccessibleRelationMemberOf(&aFormatFL); + aEditStyleBT.SetAccessibleRelationMemberOf(&aFormatFL); + } /* -----------------25.03.99 15:17------------------- * diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc index c544be2c7a2e..4a3457b3ce81 100644 --- a/sw/source/ui/index/cnttab.hrc +++ b/sw/source/ui/index/cnttab.hrc @@ -173,6 +173,7 @@ #define STR_TOKEN_HELP_AUTHORITY (STR_BUTTON_HELP_TEXT_START + 9) #define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1) + #define TLB_STYLES 100 #define FL_STYLES 101 #define PB_OK 102 diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 9b97b8931b7f..a21d8920c78d 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -1218,6 +1218,9 @@ ModalDialog DLG_ADD_IDX_STYLES }; MaskColor = IMAGE_MASK_COLOR ; }; + //IAccessibility2 Implementation 2009----- + QuickHelpText [ en-US ] = "Left" ; + //-----IAccessibility2 Implementation 2009 }; ImageButton PB_RIGHT { @@ -1233,6 +1236,9 @@ ModalDialog DLG_ADD_IDX_STYLES }; MaskColor = IMAGE_MASK_COLOR ; }; + //IAccessibility2 Implementation 2009----- + QuickHelpText [ en-US ] = "Right" ; + //-----IAccessibility2 Implementation 2009 }; FixedLine FL_STYLES { diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 54d1fab4cc0c..b1b3b7031999 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -167,6 +167,8 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, pTOXMgr(0), pSh(&rWrtShell) { + aNewBT.SetAccessibleRelationMemberOf(&aIndexFL); + if( SvtCJKOptions().IsCJKFontEnabled() ) { uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 67fc32bcf1c9..6e1c52482339 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -156,6 +156,8 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN, aPosChapterBox.SetClickHdl(LINK(this, SwEndNoteOptionPage, PosChapterHdl)); aNumCountBox.SetSelectHdl(LINK(this, SwEndNoteOptionPage, NumCountHdl)); + aPosPageBox.SetAccessibleRelationMemberOf(&aPosFT); + aPosChapterBox.SetAccessibleRelationMemberOf(&aPosFT); } void SwEndNoteOptionPage::Reset( const SfxItemSet& ) diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 2d2c1989d65c..67b5f89d601d 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -152,11 +152,11 @@ class SwNewGlosNameDlg : public ModalDialog NoSpaceEdit aNewShort; OKButton aOk; CancelButton aCancel; - FixedLine aFL; FixedText aONFT; Edit aOldName; FixedText aOSFT; Edit aOldShort; + FixedLine aFL; protected: DECL_LINK( Modify, Edit * ); @@ -298,6 +298,8 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren aCategoryBox.SetNodeDefaultImages( ); + aCategoryBox.SetAccessibleName(SW_RES(STR_SW_CATEGORY)); + aCategoryBox.SetAccessibleRelationLabeledBy(&aInsertTipCB); Init(); } diff --git a/sw/source/ui/misc/glossary.hrc b/sw/source/ui/misc/glossary.hrc index 4ee5aaaa7ede..40c230a2e8c4 100644 --- a/sw/source/ui/misc/glossary.hrc +++ b/sw/source/ui/misc/glossary.hrc @@ -88,4 +88,6 @@ #define FL_NN 9 #define BT_CANCEL 10 #define BT_OKNEW 11 - +//IAccessibility2 Implementation 2009----- +#define STR_SW_CATEGORY 12 +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index 3dddc5218398..745be55bad00 100644 --- a/sw/source/ui/misc/glossary.src +++ b/sw/source/ui/misc/glossary.src @@ -288,6 +288,12 @@ String STR_GLOSSARY { Text [ en-US ] = "AutoText :" ; }; +/*IAccessibility2 Implementation 2009-----*/ +String STR_SW_CATEGORY +{ + Text [ en-US ] = "Category" ; +}; +/*-----IAccessibility2 Implementation 2009*/ ModalDialog DLG_RENAME_GLOS { OutputSize = TRUE ; diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index a1b305b3b7db..ce9f8bd9cd1d 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -46,6 +46,7 @@ class SwWrtShell; class SwEndNoteOptionPage : public SfxTabPage { + FixedLine aNumFL; FixedText aNumTypeFT; SwNumberingTypeListBox aNumViewBox; FixedText aOffsetLbl; @@ -59,25 +60,24 @@ class SwEndNoteOptionPage : public SfxTabPage FixedText aPosFT; RadioButton aPosPageBox; RadioButton aPosChapterBox; - FixedLine aNumFL; + FixedLine aTemplFL; FixedText aParaTemplLbl; ListBox aParaTemplBox; FixedText aPageTemplLbl; ListBox aPageTemplBox; - FixedLine aTemplFL; + FixedLine aCharTemplFL; FixedText aFtnCharAnchorTemplLbl; ListBox aFtnCharAnchorTemplBox; FixedText aFtnCharTextTemplLbl; ListBox aFtnCharTextTemplBox; - FixedLine aCharTemplFL; + FixedLine aContFL; FixedText aContLbl; Edit aContEdit; FixedText aContFromLbl; Edit aContFromEdit; - FixedLine aContFL; String aNumDoc; String aNumPage; diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 5cc82f8473eb..828259a891cd 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -249,6 +249,10 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd aPrevBT (this,SW_RES(BT_PREV)), aNextBT (this,SW_RES(BT_NEXT)) { + aNumberCharEdit.SetAccessibleName(String(SW_RES(STR_CHAR))); + aNumberExtChar.SetAccessibleRelationMemberOf(&aNumberFL); + aNumberCharEdit.SetAccessibleRelationLabeledBy(&aNumberCharBtn); + aNumberAutoBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberAutoBtnHdl)); aNumberExtChar.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberExtCharHdl)); aNumberCharBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberCharHdl)); diff --git a/sw/source/ui/misc/insfnote.hrc b/sw/source/ui/misc/insfnote.hrc index 8ac15b4f9fc3..d8e534f9255a 100644 --- a/sw/source/ui/misc/insfnote.hrc +++ b/sw/source/ui/misc/insfnote.hrc @@ -39,3 +39,7 @@ #define BT_HELP 102 #define BT_PREV 103 #define BT_NEXT 104 + +//IAccessibility2 Implementation 2009----- +#define STR_CHAR 105 +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src index 265ee1e095f6..964f174f189b 100644 --- a/sw/source/ui/misc/insfnote.src +++ b/sw/source/ui/misc/insfnote.src @@ -49,6 +49,12 @@ ModalDialog DLG_INS_FOOTNOTE Group = TRUE ; Left = TRUE ; }; + //IAccessibility2 Implementation 2009----- + String STR_CHAR + { + Text [ en-US ] = "Character" ; + }; + //-----IAccessibility2 Implementation 2009 OKButton BT_OK { Pos = MAP_APPFONT ( 104 , 6 ) ; diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 213c0e99e413..a5e64110c91b 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -129,6 +129,17 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent, aCountFL ( this, SW_RES( FL_COUNT )) { + String sIntervalName = aDivIntervalFT.GetAccessibleName(); + sIntervalName += String::CreateFromAscii("("); + sIntervalName += aDivRowsFT.GetAccessibleName(); + sIntervalName += String::CreateFromAscii(")"); + aDivIntervalNF.SetAccessibleName(sIntervalName); + sIntervalName = aNumIntervalFT.GetAccessibleName(); + sIntervalName += String::CreateFromAscii("("); + sIntervalName += aNumRowsFT.GetAccessibleName(); + sIntervalName += String::CreateFromAscii(")"); + aNumIntervalNF.SetAccessibleName(sIntervalName); + FreeResource(); SwLineNumberingDlg *pDlg = (SwLineNumberingDlg *)GetParent(); pSh = pDlg->GetWrtShell(); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 43c92a72a3f7..60c88a56461b 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -144,6 +144,9 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, SetExchangeSupport(); aPreviewWIN.SetBackground(Wallpaper(Color(COL_TRANSPARENT))); + aStandardPB.SetAccessibleRelationMemberOf(&aPositionFL); + + aRelativeCB.Check(); aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl)); // --> OD 2008-02-01 #newlistlevelattrs# diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 5380a00afbaf..ab4dc7484e40 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -88,6 +88,10 @@ #include // <-- +#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_ +#include +#endif + using namespace ::com::sun::star; /* -----------------------------31.01.01 10:23-------------------------------- @@ -102,9 +106,9 @@ DBG_NAME(outlinehdl) class SwNumNamesDlg: public ModalDialog { + FixedLine aFormFL; Edit aFormEdit; ListBox aFormBox; - FixedLine aFormFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; @@ -241,6 +245,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, pUserButton->SetText(SW_RES(ST_FORM)); pUserButton->SetHelpId(HID_OUTLINE_FORM); pUserButton->SetClickHdl(LINK(this, SwOutlineTabDialog, FormHdl)); + pUserButton->SetAccessibleRole( com::sun::star::accessibility::AccessibleRole::BUTTON_MENU ); FreeResource(); pNumRule = new SwNumRule( *rSh.GetOutlineNumRule() ); diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 9d940b33d332..f569eeb938ea 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -184,6 +184,7 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) : MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134; aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(nHeightValue),FUNIT_TWIP);; + aMaxHeightEdit.SetAccessibleRelationLabeledBy(&aMaxHeightBtn); } SwFootNotePage::~SwFootNotePage() diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index be7622319626..b81c55bf855b 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -185,6 +185,19 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : nX( 99 ), nY( 99 ) { + aColEdt1.SetAccessibleName(aColLbl.GetText()); + aColEdt2.SetAccessibleName(aColLbl.GetText()); + aColEdt3.SetAccessibleName(aColLbl.GetText()); + aTypDLB1.SetAccessibleName(aTypLbl.GetText()); + aTypDLB2.SetAccessibleName(aTypLbl.GetText()); + aTypDLB3.SetAccessibleName(aTypLbl.GetText()); + aSortUpRB.SetAccessibleRelationMemberOf( &aKeyCB1 ); + aSortDnRB.SetAccessibleRelationMemberOf( &aKeyCB1 ); + aSortUp2RB.SetAccessibleRelationMemberOf( &aKeyCB2 ); + aSortDn2RB.SetAccessibleRelationMemberOf( &aKeyCB2 ); + aSortUp3RB.SetAccessibleRelationMemberOf( &aKeyCB3 ); + aSortDn3RB.SetAccessibleRelationMemberOf( &aKeyCB3 ); + aDelimEdt.SetMaxTextLen( 1 ); if(rSh.GetSelectionType() & (nsSelectionType::SEL_TBL|nsSelectionType::SEL_TBL_CELLS) ) @@ -262,6 +275,25 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : aColEdt2.SetMax(nMax); aColEdt3.SetMax(nMax); } + + aDelimEdt.SetAccessibleRelationLabeledBy(&aDelimFreeRB); + aDelimPB.SetAccessibleRelationLabeledBy(&aDelimFreeRB); + aDelimPB.SetAccessibleRelationMemberOf(&aDelimFL); + + aColEdt1.SetAccessibleRelationMemberOf(&aKeyCB1); + aColEdt1.SetAccessibleRelationLabeledBy(&aColLbl); + aTypDLB1.SetAccessibleRelationMemberOf(&aKeyCB1); + aTypDLB1.SetAccessibleRelationLabeledBy(&aTypLbl); + + aColEdt2.SetAccessibleRelationMemberOf(&aKeyCB2); + aColEdt2.SetAccessibleRelationLabeledBy(&aColLbl); + aTypDLB2.SetAccessibleRelationMemberOf(&aKeyCB2); + aTypDLB2.SetAccessibleRelationLabeledBy(&aTypLbl); + + aColEdt3.SetAccessibleRelationMemberOf(&aKeyCB3); + aColEdt3.SetAccessibleRelationLabeledBy(&aColLbl); + aTypDLB3.SetAccessibleRelationMemberOf(&aKeyCB3); + aTypDLB3.SetAccessibleRelationLabeledBy(&aTypLbl); } SwSortDlg::~SwSortDlg() @@ -416,6 +448,9 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck ) aColEdt2.SetMax(nY); aColEdt3.SetMax(nY); + aColEdt1.SetAccessibleName(aColTxt); + aColEdt2.SetAccessibleName(aColTxt); + aColEdt3.SetAccessibleName(aColTxt); } else if( pCheck == ( CheckBox* ) &aColumnRB) { @@ -423,6 +458,10 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck ) aColEdt1.SetMax(nX); aColEdt2.SetMax(nX); aColEdt3.SetMax(nX); + + aColEdt1.SetAccessibleName(aRowTxt); + aColEdt2.SetAccessibleName(aRowTxt); + aColEdt3.SetAccessibleName(aRowTxt); } else if(!aKeyCB1.IsChecked() && !aKeyCB2.IsChecked() && diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 8be2bbdbb498..9b79f73ea15c 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -153,6 +153,8 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) pTAutoFmt( 0 ), pShell( &rView.GetWrtShell() ) { + aOtherEd.SetAccessibleName(String(SW_RES(STR_SYMBOL))); + aOtherEd.SetAccessibleRelationLabeledBy(&aOtherBtn); FreeResource(); if(nSaveButtonState > -1) { diff --git a/sw/source/ui/table/convert.hrc b/sw/source/ui/table/convert.hrc index 7f7cbbec768f..b8a29a17c380 100644 --- a/sw/source/ui/table/convert.hrc +++ b/sw/source/ui/table/convert.hrc @@ -45,3 +45,6 @@ #define BT_AUTOFORMAT 102 #define BT_HELP 103 #define WIN_REPEAT_HEADER 104 +//IAccessibility2 Implementation 2009----- +#define STR_SYMBOL 105 +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src index c15b4ad4456c..911672509611 100644 --- a/sw/source/ui/table/convert.src +++ b/sw/source/ui/table/convert.src @@ -191,6 +191,12 @@ ModalDialog DLG_CONV_TEXT_TABLE Hide = TRUE ; Text [ en-US ] = "Auto~Format..." ; }; + /*IAccessibility2 Implementation 2009-----*/ + String STR_SYMBOL + { + Text [ en-US ] = "Symbol" ; + }; + /*-----IAccessibility2 Implementation 2009*/ }; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 5b26b99d012f..c6cd79b9f107 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -852,6 +852,9 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, FreeResource(); SetExchangeSupport(); + aDownBtn.SetAccessibleRelationMemberOf(&aColFL); + aUpBtn.SetAccessibleRelationMemberOf(&aColFL); + pFieldArr[0] = &aMF1; pFieldArr[1] = &aMF2; pFieldArr[2] = &aMF3; @@ -986,8 +989,16 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) for( USHORT i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ ) { String sEntry('~'); - sEntry += String::CreateFromInt32( aValueTbl[i] + 1 ); + String sIndex = String::CreateFromInt32( aValueTbl[i] + 1 ); + sEntry += sIndex; pTextArr[i]->SetText( sEntry ); +//IAccessibility2 Impplementaton 2009----- + //added by menghu for SODC_5143,12/12/2006 + String sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ); + sColumnWidth.SearchAndReplace( DEFINE_CONST_UNICODE("%1"), sIndex ); + pFieldArr[i]->SetAccessibleName( sColumnWidth ); + //end of SODC_5143 +//-----IAccessibility2 Impplementaton 2009 } aDownBtn.Enable(aValueTbl[0] > 0); @@ -1458,6 +1469,13 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent, { FreeResource(); + aPgBrkRB.SetAccessibleRelationMemberOf(&aPgBrkCB); + aColBrkRB.SetAccessibleRelationMemberOf(&aPgBrkCB); + aPgBrkBeforeRB.SetAccessibleRelationMemberOf(&aPgBrkCB); + aPgBrkAfterRB.SetAccessibleRelationMemberOf(&aPgBrkCB); + aPageCollLB.SetAccessibleRelationLabeledBy(&aPageCollCB); + aPageCollLB.SetAccessibleName(aPageCollCB.GetText()); + aPgBrkCB.SetClickHdl(LINK(this, SwTextFlowPage, PageBreakHdl_Impl)); aPgBrkBeforeRB.SetClickHdl( LINK( this, SwTextFlowPage, PageBreakPosHdl_Impl ) ); diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc index 843bec591d9e..4c858f9fcb98 100644 --- a/sw/source/ui/table/tabledlg.hrc +++ b/sw/source/ui/table/tabledlg.hrc @@ -106,5 +106,8 @@ #define FL_VERT_ORIENT 140 #define RB_FROM_LEFT 144 +//IAccessibility2 Impplementaton 2009----- +#define STR_COLUMN_WIDTH 145 +//-----IAccessibility2 Impplementaton 2009 #define FT_VERTORIENT 150 #define LB_VERTORIENT 151 diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src index 79300699bd33..4ac846597530 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -787,3 +787,9 @@ InfoBox MSG_WRONG_TABLENAME Message [ en-US ] = "The name of the table must not contain spaces." ; }; +//IAccessibility2 Impplementaton 2009----- +String STR_COLUMN_WIDTH +{ + Text [ en-US ] = "Column %1 Width" ; +}; +//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index 86eff4a23f08..129c66bf5735 100644 --- a/sw/source/ui/table/tablepg.hxx +++ b/sw/source/ui/table/tablepg.hxx @@ -121,7 +121,7 @@ class SwTableColumnPage : public SfxTabPage CheckBox aProportionalCB; FixedText aSpaceFT; MetricField aSpaceED; - + FixedLine aColFL; ImageButton aUpBtn; FixedText aFT1; PercentField aMF1; @@ -136,7 +136,6 @@ class SwTableColumnPage : public SfxTabPage FixedText aFT6; PercentField aMF6; ImageButton aDownBtn; - FixedLine aColFL; SwTableRep* pTblData; PercentField* pFieldArr[MET_FIELDS]; diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 6eab64f68a60..851b6793fc0a 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -36,9 +36,7 @@ #include #include #include -#ifndef _HELP_HXX #include -#endif #include #include #include @@ -47,13 +45,9 @@ #include #include #include -#ifndef _VIEW_HXX #include -#endif #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -69,24 +63,12 @@ #include #include #include -#ifndef _CMDID_H #include -#endif -#ifndef _HELPID_H #include -#endif -#ifndef _NAVIPI_HRC #include -#endif -#ifndef _UTLUI_HRC #include -#endif -#ifndef _MISC_HRC #include -#endif -#ifndef _COMCORE_HRC #include -#endif #include #include #include diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 25633a7b691f..53b8b1aa2e54 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -808,7 +808,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, pEdit->SetActionHdl(LINK(this, SwNavigationPI, EditAction)); pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus)); pEdit->SetModifyHdl(LINK(this, SwNavigationPI, PageEditModifyHdl)); - + pEdit->SetAccessibleName(pEdit->GetQuickHelpText()); bPageCtrlsVisible = TRUE; // Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SHOW_ROOT); @@ -933,6 +933,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, UsePage(0); aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl)); aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT); + + aContentTree.SetAccessibleName(SW_RESSTR(ST_TL_CONTENT)); + aGlobalTree.SetAccessibleName(SW_RESSTR(ST_TL_GLOBAL)); + aDocListBox.SetAccessibleName(aStatusArr[3]); } /*------------------------------------------------------------------------ diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc index 8254e2dc92a9..47dfe3ec4bab 100644 --- a/sw/source/ui/utlui/navipi.hrc +++ b/sw/source/ui/utlui/navipi.hrc @@ -89,3 +89,7 @@ #define ST_POSTIT_HIDE (ST_GLOBAL_CONTEXT_FIRST +36) #define ST_POSTIT_DELETE (ST_GLOBAL_CONTEXT_FIRST +37) +//IAccessibility2 Implementation 2009----- +#define ST_TL_GLOBAL ST_GLOBAL_CONTEXT_FIRST +38 +#define ST_TL_CONTENT ST_GLOBAL_CONTEXT_FIRST +39 +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src index 0c45e3203df0..e9d07896f321 100644 --- a/sw/source/ui/utlui/navipi.src +++ b/sw/source/ui/utlui/navipi.src @@ -534,3 +534,15 @@ ImageList IMG_NAVI_ENTRYBMPH MaskColor = IMAGE_MASK_COLOR ; NAVI_ENTRY_IDS }; + +//IAccessibility2 Implementation 2009----- +String ST_TL_GLOBAL +{ + Text [ en-US ] = "Global View"; +}; +String ST_TL_CONTENT +{ + Text [ en-US ] = "Content View"; +}; +//-----IAccessibility2 Implementation 2009 + diff --git a/sw/source/ui/utlui/poolfmt.src b/sw/source/ui/utlui/poolfmt.src index de3f74fb857d..a1d0fcbcfe76 100644 --- a/sw/source/ui/utlui/poolfmt.src +++ b/sw/source/ui/utlui/poolfmt.src @@ -738,7 +738,28 @@ String STR_POOLCHR_RUBYTEXT { Text [ en-US ] = "Rubies"; }; - +//IAccessibility2 Implementation 2009----- +String STR_COLUMN_VALUESET_ITEM0 +{ + Text [ en-US ] = "1 column"; +}; +String STR_COLUMN_VALUESET_ITEM1 +{ + Text [ en-US ] = "2 columns with equal size"; +}; +String STR_COLUMN_VALUESET_ITEM2 +{ + Text [ en-US ] = "3 columns with equal size"; +}; +String STR_COLUMN_VALUESET_ITEM3 +{ + Text [ en-US ] = "2 columns with different size (left > right)"; +}; +String STR_COLUMN_VALUESET_ITEM4 +{ + Text [ en-US ] = "2 columns with different size (left < right)"; +}; +//-----IAccessibility2 Implementation 2009 String STR_POOLCHR_VERT_NUM { Text [ en-US ] = "Vertical Numbering Symbols"; -- cgit From 4a68997f9654a89283f61fc6a4c4268155a9eacc Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 15:19:57 +0100 Subject: accfixes: just some exports in toolkit --- toolkit/inc/toolkit/awt/vclxcontainer.hxx | 2 +- toolkit/inc/toolkit/awt/vclxtopwindow.hxx | 2 +- toolkit/inc/toolkit/awt/vclxwindows.hxx | 2 +- toolkit/source/helper/unowrapper.cxx | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/toolkit/inc/toolkit/awt/vclxcontainer.hxx b/toolkit/inc/toolkit/awt/vclxcontainer.hxx index b854844ae7f1..dbf8c62f4580 100644 --- a/toolkit/inc/toolkit/awt/vclxcontainer.hxx +++ b/toolkit/inc/toolkit/awt/vclxcontainer.hxx @@ -42,7 +42,7 @@ // class VCLXContainer // ---------------------------------------------------- -class VCLXContainer : public ::com::sun::star::awt::XVclContainer, +class TOOLKIT_DLLPUBLIC VCLXContainer : public ::com::sun::star::awt::XVclContainer, public ::com::sun::star::awt::XVclContainerPeer, public VCLXWindow { diff --git a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx index d8e467b01499..d3b130cc8202 100644 --- a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx @@ -91,7 +91,7 @@ public: // class VCLXTopWindow // ---------------------------------------------------- -class VCLXTopWindow: public VCLXTopWindow_Base, +class TOOLKIT_DLLPUBLIC VCLXTopWindow: public VCLXTopWindow_Base, public VCLXContainer { protected: diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx index 36ac2fa51337..10cc22d55c7d 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -377,7 +377,7 @@ public: // ---------------------------------------------------- // class VCLXDialog // ---------------------------------------------------- -class VCLXDialog : public ::com::sun::star::awt::XDialog2, +class TOOLKIT_DLLPUBLIC VCLXDialog : public ::com::sun::star::awt::XDialog2, public VCLXTopWindow { public: diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index c36ae29d4531..953c6b5a785b 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -68,7 +68,6 @@ using namespace ::com::sun::star; // instead of only a instance, especially regarding its // corresponding accessibility API. case WINDOW_METRICBOX: - // <-- case WINDOW_COMBOBOX: return new VCLXComboBox; case WINDOW_SPINFIELD: case WINDOW_NUMERICFIELD: -- cgit From 3b184bbda31958c250bc896aff76a68d30c57a49 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 15:42:55 +0100 Subject: accfixes: accessible name for WINDOW_METRICBOX --- vcl/source/window/window.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 94fa4a89302b..33d4b491ef67 100755 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -9178,7 +9178,7 @@ String Window::GetAccessibleName() const case WINDOW_LISTBOX: case WINDOW_MULTILISTBOX: case WINDOW_TREELISTBOX: - + case WINDOW_METRICBOX: { Window *pLabel = GetAccessibleRelationLabeledBy(); if ( pLabel && pLabel != this ) -- cgit From 164340b77e5d0451f882b554ac2cd8b79af3dc6f Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 15:46:36 +0100 Subject: accfixes: removed obsolete file --- .../standard/vclxaccessiblelistboxlist.hxx | 112 --------------------- 1 file changed, 112 deletions(-) delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx deleted file mode 100644 index 9a266d78bb05..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx +++ /dev/null @@ -1,112 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOXLIST_HXX -#define ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOXLIST_HXX - -#include -#include -#include -#ifndef _COMPHELPER_BROADCASTHELPER_HXX -#include -#endif -#ifndef _COMPHELPER_UNO3_HXX -#include -#endif -#ifndef _CPPUHELPER_IMPLBASE1_HXX -#include -#endif - -typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessibleSelection - > VCLXAccessibleListBoxList_BASE; - - -class ListBox; -/** This class extends the list of the VCLXAccessibleList class - about selection. -*/ -class VCLXAccessibleListBoxList : - public VCLXAccessibleList, - public VCLXAccessibleListBoxList_BASE -{ -public: - VCLXAccessibleListBoxList (VCLXWindow* pVCLXindow, BoxType aBoxType, - const ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible >& _xParent); - - // XInterface - DECLARE_XINTERFACE( ) - - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName (void) - throw (::com::sun::star::uno::RuntimeException); - // Return list box list specific services. - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames (void) - throw (::com::sun::star::uno::RuntimeException); - - // XAccessibleSelection - void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException); - sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - /** Create the specified child and insert it into the list of children. - Sets the child's states. - */ - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - CreateChild (sal_Int32 i); - - -protected: - virtual ~VCLXAccessibleListBoxList (void); - - virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent); - -private: - sal_Int32 m_nLastTopEntry; - USHORT m_nLastSelectedPos; - bool m_bDisableProcessEvent; - - void UpdateEntryRange_Impl (void); - using VCLXAccessibleList::UpdateSelection_Impl; - void UpdateSelection_Impl (void); - using VCLXAccessibleList::checkEntrySelected; - BOOL checkEntrySelected(ListBox* _pListBox, - USHORT _nPos, - ::com::sun::star::uno::Any& _rNewValue, - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxNewAcc); -}; - -#endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOX_HXX - -- cgit From 3aae61d45fc1cb2be6794c55c32fc4813dc28498 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 16:19:41 +0100 Subject: accfixes: added missing include --- svx/source/gallery2/galbrws1.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 222f88db0a81..80761cbdea1d 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -42,6 +42,7 @@ #include "gallery.hrc" #include #include +#include #include //CHINA001 //CHINA001 #include //CHINA001 -- cgit From 8483bc84fca8055630cc91bced28407d5fb5aaa6 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 17:07:29 +0100 Subject: accfixes: global resources need id greater 256 --- sc/inc/sc.hrc | 5 +++++ sc/source/ui/inc/condfrmt.hrc | 6 +++--- sc/source/ui/inc/filter.hrc | 11 ++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 382f106562c8..aa1bb83ea599 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -993,8 +993,13 @@ #define STR_ACC_DATAPILOT_COL_DESCR (STR_START + 179) #define STR_ACC_DATAPILOT_DATA_DESCR (STR_START + 180) #define STR_ACC_DATAPILOT_SEL_DESCR (STR_START + 181) + //IAccessibility2 Implementation 2009----- #define STR_ACC_TOOLBAR_FORMULA (STR_START + 182) +#define STR_ACC_DOC_SPREADSHEET (STR_START + 185) +#define STR_ACC_DOC_PREVIEW_SUFFIX (STR_START + 186) +#define STR_ACC_DOC_SPREADSHEET_READONLY (STR_START + 187) + //-----IAccessibility2 Implementation 2009 // -------------------------------------------------- diff --git a/sc/source/ui/inc/condfrmt.hrc b/sc/source/ui/inc/condfrmt.hrc index 773d57db0470..06af0cd485ce 100644 --- a/sc/source/ui/inc/condfrmt.hrc +++ b/sc/source/ui/inc/condfrmt.hrc @@ -64,9 +64,9 @@ #define FL_SEP2 42 //IAccessibility2 Implementation 2009----- -#define LABEL_FORMARTTING_CONDITIONS 43 -#define LABEL_CONDITIONS 44 -#define LABEL_CONDITION_VALUE 45 +#define LABEL_FORMARTTING_CONDITIONS 5043 +#define LABEL_CONDITIONS 5044 +#define LABEL_CONDITION_VALUE 5045 //-----IAccessibility2 Implementation 2009 #define BTN_OK 31 diff --git a/sc/source/ui/inc/filter.hrc b/sc/source/ui/inc/filter.hrc index e6c2b80ceefe..f62c4d5e015e 100644 --- a/sc/source/ui/inc/filter.hrc +++ b/sc/source/ui/inc/filter.hrc @@ -79,10 +79,11 @@ #define LB_CRITERIA_AREA 51 #define ED_CRITERIA_AREA 52 #define RB_CRITERIA_AREA 53 + //IAccessibility2 Implementation 2009----- -#define STR_COPY_AREA_TO 54 -#define RID_FILTER_OPERATOR 55 -#define RID_FILTER_FIELDNAME 56 -#define RID_FILTER_CONDITION 57 -#define RID_FILTER_VALUE 58 +#define STR_COPY_AREA_TO 5054 +#define RID_FILTER_OPERATOR 5055 +#define RID_FILTER_FIELDNAME 5056 +#define RID_FILTER_CONDITION 5057 +#define RID_FILTER_VALUE 5058 //-----IAccessibility2 Implementation 2009 -- cgit From c9fa5def7645d8dbea676bc88c086e0b493337e5 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 17:34:45 +0100 Subject: accfixes: reverted one change in sc --- sc/source/ui/miscdlgs/highred.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx index 8b0e5ac0dd8f..0f7e3ba1485e 100644 --- a/sc/source/ui/miscdlgs/highred.cxx +++ b/sc/source/ui/miscdlgs/highred.cxx @@ -109,8 +109,8 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind Init(); - aFilterCtr.SetMemberOf(&aFlFilter); } + ScHighlightChgDlg::~ScHighlightChgDlg() { SetDispatcherLock( FALSE ); -- cgit From 1005caba73b82b7bf272a19ffd2801579941129d Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Sat, 22 Jan 2011 13:31:45 +0100 Subject: accfixes: global resources need id greater 256, moved global resources to access.hrc --- sw/inc/access.hrc | 9 +++++++-- sw/source/ui/frmdlg/column.cxx | 10 ++++++---- sw/source/ui/frmdlg/column.hrc | 7 ------- sw/source/ui/frmdlg/column.src | 6 ++++-- sw/source/ui/misc/glossary.cxx | 4 +++- sw/source/ui/misc/glossary.hrc | 4 +--- sw/source/ui/misc/glossary.src | 4 +++- sw/source/ui/table/tabledlg.cxx | 4 +++- sw/source/ui/table/tabledlg.hrc | 4 +--- sw/source/ui/table/tabledlg.src | 7 ------- sw/source/ui/utlui/navipi.cxx | 6 ++++-- sw/source/ui/utlui/navipi.hrc | 5 ----- sw/source/ui/utlui/navipi.src | 5 +++-- 13 files changed, 35 insertions(+), 40 deletions(-) diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index 94fdfc254e7b..b33b19b814c7 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -54,13 +54,18 @@ //IAccessibility2 Implementation 2009----- #define STR_ACCESS_PREVIEW_DOC_NAME (RC_ACCESS_BEGIN + 22) -//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23) +//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23) #define STR_ACCESS_PREVIEW_DOC_SUFFIX (RC_ACCESS_BEGIN + 24) #define STR_ACCESS_DOC_WORDPROCESSING (RC_ACCESS_BEGIN + 25) #define STR_ACCESS_DOC_WORDPROCESSING_READONLY (RC_ACCESS_BEGIN + 26) +#define STR_ACCESS_COLUMN_WIDTH (RC_ACCESS_BEGIN + 27) +#define STR_ACCESS_PAGESETUP_SPACING (RC_ACCESS_BEGIN + 28) +#define STR_ACCESS_SW_CATEGORY (RC_ACCESS_BEGIN + 29) +#define STR_ACCESS_TL_GLOBAL (RC_ACCESS_BEGIN + 30) +#define STR_ACCESS_TL_CONTENT (RC_ACCESS_BEGIN + 31) //-----IAccessibility2 Implementation 2009 -#define ACCESS_ACT_END STR_ACCESS_DOC_WORDPROCESSING_READONLY +#define ACCESS_ACT_END STR_ACCESS_TL_CONTENT #if ACCESS_ACT_END > RC_ACCESS_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 508b69509d08..d4b69ffe26d9 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -68,6 +68,8 @@ #include #include +#include "access.hrc" + #define FRAME_FORMAT_WIDTH 1000 // sw/inc/fmtclds.hxx @@ -931,19 +933,19 @@ void SwColumnPage::SetLabels( USHORT nVis ) String tmp3(sLbl2); sLbl2.Insert(sLbl, sLbl2.Len() - 1); aLbl3.SetText(sLbl2); - String sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; sColumnWidth.SearchAndReplaceAscii("%1", tmp1); aEd1.SetAccessibleName(sColumnWidth); - sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; sColumnWidth.SearchAndReplaceAscii("%1", tmp2); aEd2.SetAccessibleName(sColumnWidth); - sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ) ; + sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; sColumnWidth.SearchAndReplaceAscii("%1", tmp3); aEd3.SetAccessibleName(sColumnWidth); - String sDist = SW_RESSTR( STR_PAGESETUP_SPACING ) ; + String sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ; String sDist1 = sDist; sDist1.SearchAndReplaceAscii("%1", tmp1); sDist1.SearchAndReplaceAscii("%2", tmp2); diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc index 86f23bed3029..e46697a8c618 100644 --- a/sw/source/ui/frmdlg/column.hrc +++ b/sw/source/ui/frmdlg/column.hrc @@ -79,15 +79,8 @@ #define FT_TEXTDIRECTION 60 #define LB_TEXTDIRECTION 61 #define FL_VERT 62 -//IAccessibility2 Impplementaton 2009----- -#define STR_PAGESETUP_SPACING 32765 -//-----IAccessibility2 Impplementaton 2009 #define LISTBOX_SELECTION 0 #define LISTBOX_SECTION 1 #define LISTBOX_SECTIONS 2 #define LISTBOX_PAGE 3 #define LISTBOX_FRAME 4 - -//IAccessibility2 Impplementaton 2009----- -#define STR_COLUMN_WIDTH 63 -//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index 10b602f755d6..c5ba19c9a958 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -30,6 +30,8 @@ #include "frmui.hrc" #include "cmdid.h" #include "helpid.h" +#include "access.hrc" + // #define TP_COLUMN 256 TabPage TP_COLUMN { @@ -417,12 +419,12 @@ ModalDialog DLG_COLUMN }; //IAccessibility2 Impplementaton 2009----- -String STR_PAGESETUP_SPACING +String STR_ACCESS_PAGESETUP_SPACING { Text [ en-US ] = "Spacing between %1 and %2"; }; -String STR_COLUMN_WIDTH +String STR_ACCESS_COLUMN_WIDTH { Text [ en-US ] = "Column %1 Width"; }; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 67b5f89d601d..4634ac4dc9b2 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -91,6 +91,8 @@ #include #include +#include "access.hrc" + #define LONG_LENGTH 60 #define SHORT_LENGTH 30 @@ -298,7 +300,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren aCategoryBox.SetNodeDefaultImages( ); - aCategoryBox.SetAccessibleName(SW_RES(STR_SW_CATEGORY)); + aCategoryBox.SetAccessibleName(SW_RES(STR_ACCESS_SW_CATEGORY)); aCategoryBox.SetAccessibleRelationLabeledBy(&aInsertTipCB); Init(); diff --git a/sw/source/ui/misc/glossary.hrc b/sw/source/ui/misc/glossary.hrc index 40c230a2e8c4..4ee5aaaa7ede 100644 --- a/sw/source/ui/misc/glossary.hrc +++ b/sw/source/ui/misc/glossary.hrc @@ -88,6 +88,4 @@ #define FL_NN 9 #define BT_CANCEL 10 #define BT_OKNEW 11 -//IAccessibility2 Implementation 2009----- -#define STR_SW_CATEGORY 12 -//-----IAccessibility2 Implementation 2009 + diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index 745be55bad00..1302f02fbf9a 100644 --- a/sw/source/ui/misc/glossary.src +++ b/sw/source/ui/misc/glossary.src @@ -29,6 +29,8 @@ #include "glossary.hrc" #include "cmdid.h" #include "helpid.h" +#include "access.hrc" + // #define DLG_GLOSSARY 256 ModalDialog DLG_GLOSSARY { @@ -289,7 +291,7 @@ String STR_GLOSSARY Text [ en-US ] = "AutoText :" ; }; /*IAccessibility2 Implementation 2009-----*/ -String STR_SW_CATEGORY +String STR_ACCESS_SW_CATEGORY { Text [ en-US ] = "Category" ; }; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index c6cd79b9f107..f4e5e8d2bb02 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -53,6 +53,8 @@ #include #include +#include "access.hrc" + #ifndef _DOCSH_HXX #include #endif @@ -994,7 +996,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) pTextArr[i]->SetText( sEntry ); //IAccessibility2 Impplementaton 2009----- //added by menghu for SODC_5143,12/12/2006 - String sColumnWidth = SW_RESSTR( STR_COLUMN_WIDTH ); + String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH); sColumnWidth.SearchAndReplace( DEFINE_CONST_UNICODE("%1"), sIndex ); pFieldArr[i]->SetAccessibleName( sColumnWidth ); //end of SODC_5143 diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc index 4c858f9fcb98..f03aed6afffc 100644 --- a/sw/source/ui/table/tabledlg.hrc +++ b/sw/source/ui/table/tabledlg.hrc @@ -106,8 +106,6 @@ #define FL_VERT_ORIENT 140 #define RB_FROM_LEFT 144 -//IAccessibility2 Impplementaton 2009----- -#define STR_COLUMN_WIDTH 145 -//-----IAccessibility2 Impplementaton 2009 #define FT_VERTORIENT 150 #define LB_VERTORIENT 151 + diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src index 4ac846597530..51248119c5f1 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -786,10 +786,3 @@ InfoBox MSG_WRONG_TABLENAME { Message [ en-US ] = "The name of the table must not contain spaces." ; }; - -//IAccessibility2 Impplementaton 2009----- -String STR_COLUMN_WIDTH -{ - Text [ en-US ] = "Column %1 Width" ; -}; -//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 53b8b1aa2e54..49413fba6e97 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -80,6 +80,8 @@ #include #endif +#include "access.hrc" + #include @@ -934,8 +936,8 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl)); aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT); - aContentTree.SetAccessibleName(SW_RESSTR(ST_TL_CONTENT)); - aGlobalTree.SetAccessibleName(SW_RESSTR(ST_TL_GLOBAL)); + aContentTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT)); + aGlobalTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL)); aDocListBox.SetAccessibleName(aStatusArr[3]); } diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc index 47dfe3ec4bab..70fd1dc6e14a 100644 --- a/sw/source/ui/utlui/navipi.hrc +++ b/sw/source/ui/utlui/navipi.hrc @@ -88,8 +88,3 @@ #define ST_POSTIT_SHOW (ST_GLOBAL_CONTEXT_FIRST +35) #define ST_POSTIT_HIDE (ST_GLOBAL_CONTEXT_FIRST +36) #define ST_POSTIT_DELETE (ST_GLOBAL_CONTEXT_FIRST +37) - -//IAccessibility2 Implementation 2009----- -#define ST_TL_GLOBAL ST_GLOBAL_CONTEXT_FIRST +38 -#define ST_TL_CONTENT ST_GLOBAL_CONTEXT_FIRST +39 -//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src index e9d07896f321..fde6b82f139b 100644 --- a/sw/source/ui/utlui/navipi.src +++ b/sw/source/ui/utlui/navipi.src @@ -29,6 +29,7 @@ #include "utlui.hrc" #include "navipi.hrc" #include "helpid.h" +#include "access.hrc" Window DLG_NAVIGATION_PI { @@ -536,11 +537,11 @@ ImageList IMG_NAVI_ENTRYBMPH }; //IAccessibility2 Implementation 2009----- -String ST_TL_GLOBAL +String STR_ACCESS_TL_GLOBAL { Text [ en-US ] = "Global View"; }; -String ST_TL_CONTENT +String STR_ACCESS_TL_CONTENT { Text [ en-US ] = "Content View"; }; -- cgit From de539c71865e6eec7b1db38031f661d7d8ad0714 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Sat, 22 Jan 2011 13:32:44 +0100 Subject: accfixes: removed include of obsolete header file --- accessibility/source/standard/vclxaccessiblebox.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index 784588938bb8..86b98768736a 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include -- cgit From 7406b40991a58899180e5dd20572d078d878881d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 24 Jan 2011 11:44:36 +0100 Subject: gridsort: re-did the column resizing - introduced XGridColumn.Flexibility, determining to which degree the column is resized during auto-column-resizing - removed XGridColumn.PreferredWidth - there really is no need for this anymore now - documented the relationship between XGridColumn.Flexibility and XGridColumn.Resizeable - re-implemented TableControl_Impl::impl_ni_updateColumnWidths, with (hopefully) less magic --- svtools/inc/svtools/table/tablemodel.hxx | 22 +- svtools/source/table/tablecontrol_impl.cxx | 352 +++++++++++++-------- svtools/source/table/tablecontrol_impl.hxx | 11 +- svtools/source/uno/unogridcolumnfacade.cxx | 32 +- svtools/source/uno/unogridcolumnfacade.hxx | 4 +- .../controls/grid/defaultgridcolumnmodel.cxx | 4 +- toolkit/source/controls/grid/gridcolumn.cxx | 32 +- toolkit/source/controls/grid/gridcolumn.hxx | 6 +- 8 files changed, 273 insertions(+), 190 deletions(-) diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx index b6c0c466edd0..6408efd249a8 100755 --- a/svtools/inc/svtools/table/tablemodel.hxx +++ b/svtools/inc/svtools/table/tablemodel.hxx @@ -223,7 +223,7 @@ namespace svt { namespace table */ virtual void setHelpText( const String& i_helpText ) = 0; - /** determines whether the column can be resized + /** determines whether the column can be interactively resized @see getMinWidth @see getMaxWidth @@ -239,6 +239,9 @@ namespace svt { namespace table */ virtual void setResizable( bool _bResizable ) = 0; + virtual sal_Int32 getFlexibility() const = 0; + virtual void setFlexibility( sal_Int32 const i_flexibility ) = 0; + /** returns the width of the column, in 1/100 millimeters The returned value must be a positive ->TableMetrics value. @@ -306,23 +309,6 @@ namespace svt { namespace table */ virtual void setMaxWidth( TableMetrics _nMaxWidth ) = 0; - /** returns the preferred width of the column, or 0 if the column - does not have a preferred width. - - @see setMaxWidth - @see getMinWidth - @see getWidth - */ - virtual TableMetrics getPreferredWidth() const = 0; - - /** sets the preferred width of the column, to be used when user resizes column - - @see getMaxWidth - @see setMinWidth - @see setWidth - */ - virtual void setPreferredWidth( TableMetrics _nPrefWidth ) = 0; - virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign() = 0; virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign) = 0; /// deletes the column model instance diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index e47419f2ea52..885974a21489 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -52,6 +52,8 @@ #include +#define MIN_COLUMN_WIDTH_PIXEL 4 + //...................................................................................................................... namespace svt { namespace table { @@ -67,21 +69,21 @@ namespace svt { namespace table namespace AccessibleEventId = ::com::sun::star::accessibility::AccessibleEventId; namespace AccessibleTableModelChangeType = ::com::sun::star::accessibility::AccessibleTableModelChangeType; - //==================================================================== - //= TempHideCursor - //==================================================================== - class TempHideCursor + //================================================================================================================== + //= SuppressCursor + //================================================================================================================== + class SuppressCursor { private: ITableControl& m_rTable; public: - TempHideCursor( ITableControl& _rTable ) + SuppressCursor( ITableControl& _rTable ) :m_rTable( _rTable ) { m_rTable.hideCursor(); } - ~TempHideCursor() + ~SuppressCursor() { m_rTable.showCursor(); } @@ -425,6 +427,7 @@ namespace svt { namespace table ,m_nRowHeaderWidthPixel ( 0 ) ,m_nColumnCount ( 0 ) ,m_nRowCount ( 0 ) + ,m_bColumnsFit ( true ) ,m_nCurColumn ( COL_INVALID ) ,m_nCurRow ( ROW_INVALID ) ,m_nLeftColumn ( 0 ) @@ -438,7 +441,6 @@ namespace svt { namespace table ,m_aSelectedRows ( ) ,m_pTableFunctionSet ( new TableFunctionSet( this ) ) ,m_nAnchor ( -1 ) - ,m_bResizingGrid ( false ) ,m_bUpdatingColWidths ( false ) ,m_pAccessibleTable ( NULL ) #if DBG_UTIL @@ -469,7 +471,7 @@ namespace svt { namespace table { DBG_CHECK_ME(); - TempHideCursor aHideCursor( *this ); + SuppressCursor aHideCursor( *this ); if ( !!m_pModel ) m_pModel->removeTableModelListener( shared_from_this() ); @@ -681,7 +683,10 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::tableMetricsChanged() { + long const oldRowHeaderWidthPixel = m_nRowHeaderWidthPixel; impl_ni_updateCachedTableMetrics(); + if ( oldRowHeaderWidthPixel != m_nRowHeaderWidthPixel ) + impl_ni_updateColumnWidths(); impl_ni_updateScrollbars(); m_rAntiImpl.Invalidate(); } @@ -712,7 +717,7 @@ namespace svt { namespace table { if ( !m_bUpdatingColWidths ) { - impl_ni_updateColumnWidths(); + impl_ni_updateColumnWidths( i_column ); impl_ni_updateScrollbars(); } @@ -804,7 +809,7 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void TableControl_Impl::impl_ni_updateColumnWidths() + void TableControl_Impl::impl_ni_updateColumnWidths( ColPos const i_assumeInflexibleColumnsUpToIncluding ) { ENSURE_OR_RETURN_VOID( !m_bUpdatingColWidths, "TableControl_Impl::impl_ni_updateColumnWidths: recursive call detected!" ); @@ -821,95 +826,223 @@ namespace svt { namespace table m_aColumnWidths.reserve( colCount ); - std::vector aPrePixelWidths(0); - long accumulatedPixelWidth = 0; - int lastResizableCol = COL_INVALID; - double gridWidth = m_rAntiImpl.GetOutputSizePixel().Width(); - if ( m_pModel->hasRowHeaders() && ( gridWidth != 0 ) ) - { -#if OSL_DEBUG_LEVEL > 0 - const TableMetrics rowHeaderWidth = m_pModel->getRowHeaderWidth(); - const long rowHeaderWidthPixel = m_rAntiImpl.LogicToPixel( Size( rowHeaderWidth, 0 ), MAP_APPFONT ).Width(); - OSL_ENSURE( rowHeaderWidthPixel == m_nRowHeaderWidthPixel, - "TableControl_Impl::impl_ni_updateColumnWidths: cached row header width is not correct anymore!" ); -#endif - accumulatedPixelWidth += m_nRowHeaderWidthPixel; - gridWidth -= m_nRowHeaderWidthPixel; + // the available horizontal space + long gridWidthPixel = m_rAntiImpl.GetOutputSizePixel().Width(); + if ( m_pModel->hasRowHeaders() && ( gridWidthPixel != 0 ) ) + { + gridWidthPixel -= m_nRowHeaderWidthPixel; + } + if ( m_pModel->getVerticalScrollbarVisibility() != ScrollbarShowNever ) + { + long nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); + gridWidthPixel -= nScrollbarMetrics; } - double colWidthsSum = 0.0; - double colWithoutFixedWidthsSum = 0.0; - double minColWithoutFixedSum = 0.0; + // TODO: shouldn't we take the visibility of the vertical scroll bar into account here, too? + long const gridWidthAppFont = m_rAntiImpl.PixelToLogic( Size( gridWidthPixel, 0 ), MAP_APPFONT ).Width(); + // determine the accumulated current width of all columns for ( ColPos col = 0; col < colCount; ++col ) { const PColumnModel pColumn = m_pModel->getColumnModel( col ); - ENSURE_OR_CONTINUE( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); + ENSURE_OR_THROW( !!pColumn, "invalid column returned by the model!" ); + + } + + // collect some meta data for our columns: + // - their current (appt-font) metrics + long accumulatedCurrentWidth = 0; + ::std::vector< long > currentColWidths; + currentColWidths.reserve( colCount ); + // - their effective minimal and maximal width (app-font!) + typedef ::std::vector< ::std::pair< long, long > > ColumnLimits; + ColumnLimits effectiveColumnLimits; + effectiveColumnLimits.reserve( colCount ); + long accumulatedMinWidth = 0; + long accumulatedMaxWidth = 0; + // - their relative flexibility + ::std::vector< ::sal_Int32 > columnFlexibilities; + columnFlexibilities.reserve( colCount ); + long flexibilityDenominator = 0; + for ( ColPos col = 0; col < colCount; ++col ) + { + PColumnModel const pColumn = m_pModel->getColumnModel( col ); + ENSURE_OR_THROW( !!pColumn, "invalid column returned by the model!" ); + + // current width + TableMetrics const currentWidth = pColumn->getWidth(); + currentColWidths.push_back( currentWidth ); - TableMetrics colWidth = 0; - const TableMetrics colPrefWidth = pColumn->getPreferredWidth(); - const bool bResizable = pColumn->isResizable(); + // accumulated width + accumulatedCurrentWidth += currentWidth; - if ( colPrefWidth != 0) + // flexibility + ::sal_Int32 flexibility = pColumn->getFlexibility(); + OSL_ENSURE( flexibility >= 0, "TableControl_Impl::impl_ni_updateColumnWidths: a column's flexibility should be non-negative." ); + if ( ( flexibility < 0 ) // normalization + || ( !pColumn->isResizable() ) // column not resizeable => no auto-resize + || ( col <= i_assumeInflexibleColumnsUpToIncluding ) // column shall be treated as inflexible => respec this + ) + flexibility = 0; + + // min/max width + long effectiveMin = currentWidth, effectiveMax = currentWidth; + // if the column is not flexible, it will not be asked for min/max, but we assume the current width as limit then + if ( flexibility > 0 ) { - if ( m_bResizingGrid ) - { - colWidth = pColumn->getWidth(); - pColumn->setPreferredWidth(0); - } + long const minWidth = pColumn->getMinWidth(); + if ( minWidth > 0 ) + effectiveMin = minWidth; else - { - colWidth = colPrefWidth; - pColumn->setWidth( colPrefWidth ); - } - } - else - colWidth = pColumn->getWidth(); + effectiveMin = MIN_COLUMN_WIDTH_PIXEL; - const long pixelWidth = m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width(); - if ( bResizable && colPrefWidth == 0 ) - { - colWithoutFixedWidthsSum += pixelWidth; - lastResizableCol = col; + long const maxWidth = pColumn->getMaxWidth(); + OSL_ENSURE( minWidth <= maxWidth, "TableControl_Impl::impl_ni_updateColumnWidths: pretty undecided 'bout its width limits, this column!" ); + if ( ( maxWidth > 0 ) && ( maxWidth >= minWidth ) ) + effectiveMax = maxWidth; + else + effectiveMax = gridWidthAppFont; // TODO: any better guess here? + + if ( effectiveMin == effectiveMax ) + // if the min and the max are identical, this implies no flexibility at all + flexibility = 0; } - colWidthsSum += pixelWidth; - aPrePixelWidths.push_back( pixelWidth ); + + columnFlexibilities.push_back( flexibility ); + flexibilityDenominator += flexibility; + + effectiveColumnLimits.push_back( ::std::pair< long, long >( effectiveMin, effectiveMax ) ); + accumulatedMinWidth += effectiveMin; + accumulatedMaxWidth += effectiveMax; } - double gridWidthWithoutFixed = gridWidth - colWidthsSum + colWithoutFixedWidthsSum; - double scalingFactor = 1.0; - if ( m_bResizingGrid ) + ::std::vector< long > newWidths( currentColWidths ); + if ( flexibilityDenominator == 0 ) { - if ( gridWidthWithoutFixed > ( minColWithoutFixedSum + colWidthsSum - colWithoutFixedWidthsSum ) ) - scalingFactor = gridWidthWithoutFixed / colWithoutFixedWidthsSum; + // no column is flexible => don't adjust anything } - else - { - if ( colWidthsSum < gridWidthWithoutFixed ) + else if ( gridWidthAppFont > accumulatedCurrentWidth ) + { // we have space to give away ... + long distributeAppFontUnits = gridWidthAppFont - accumulatedCurrentWidth; + if ( gridWidthAppFont > accumulatedMaxWidth ) { - if ( colWithoutFixedWidthsSum > 0 ) - scalingFactor = gridWidthWithoutFixed / colWithoutFixedWidthsSum; + // ... but the column's maximal widths are still less than we have + // => set them all to max + for ( size_t i = 0; i < size_t( colCount ); ++i ) + { + newWidths[i] = effectiveColumnLimits[i].second; + } } - } - for ( ColPos i = 0; i < colCount; ++i ) - { - const PColumnModel pColumn = m_pModel->getColumnModel( i ); - ENSURE_OR_CONTINUE( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" ); + else + { + bool startOver = false; + do + { + startOver = false; + // distribute the remaining space amongst all columns with a positive flexibility + for ( size_t i=0; i effectiveColumnLimits[i].second ) + { // that was too much, we hit the col's maximum + // set the new width to exactly this maximum + newColWidth = effectiveColumnLimits[i].second; + // adjust the flexibility denominator ... + flexibilityDenominator -= columnFlexibility; + columnFlexibilities[i] = 0; + // ... and the remaining width ... + long const difference = newColWidth - currentColWidths[i]; + distributeAppFontUnits -= difference; + // ... this way, we ensure that the width not taken up by this column is consumed by the other + // flexible ones (if there are some) + + // and start over with the first column, since there might be earlier columns which need + // to be recalculated now + startOver = true; + } - if ( pColumn->isResizable() && ( pColumn->getPreferredWidth() == 0 ) ) + newWidths[i] = newColWidth; + } + } + while ( startOver ); + } + } + else if ( gridWidthAppFont < accumulatedCurrentWidth ) + { // we need to take away some space from the columns which allow it ... + long takeAwayAppFontUnits = accumulatedCurrentWidth - gridWidthAppFont; + if ( gridWidthAppFont < accumulatedMinWidth ) + { + // ... but the column's minimal widths are still more than we have + // => set them all to min + for ( size_t i = 0; i < size_t( colCount ); ++i ) + { + newWidths[i] = effectiveColumnLimits[i].first; + } + } + else { - aPrePixelWidths[i] *= scalingFactor; - const TableMetrics logicColWidth = m_rAntiImpl.PixelToLogic( Size( aPrePixelWidths[i], 0 ), MAP_APPFONT ).Width(); - pColumn->setWidth( logicColWidth ); + bool startOver = false; + do + { + startOver = false; + // take away the space we need from the columns with a positive flexibility + for ( size_t i=0; i 0 ) + && ( accumulatedWidthPixel - m_aColumnWidths[ m_nLeftColumn - 1 ].getStart() <= gridWidthPixel ) + ) + { + --m_nLeftColumn; } - // care for the horizontal scroll position (as indicated by m_nLeftColumn) + // now adjust the column metrics, since they currently ignore the horizontal scroll position if ( m_nLeftColumn > 0 ) { const long offsetPixel = m_aColumnWidths[ 0 ].getStart() - m_aColumnWidths[ m_nLeftColumn ].getStart(); @@ -921,29 +1054,6 @@ namespace svt { namespace table colPos->move( offsetPixel ); } } - - const long freeSpaceRight = gridWidth - m_aColumnWidths[ colCount-1 ].getEnd(); - if ( ( freeSpaceRight > 0 ) - && ( lastResizableCol != COL_INVALID ) - && ( lastResizableCol >= m_nLeftColumn ) - ) - { - // make the last resizable column wider - MutableColumnMetrics& rResizeColInfo( m_aColumnWidths[ lastResizableCol ] ); - rResizeColInfo.setEnd( rResizeColInfo.getEnd() + freeSpaceRight ); - - // update the column model - const TableMetrics logicColWidth = m_rAntiImpl.PixelToLogic( Size( rResizeColInfo.getWidth(), 0 ), MAP_APPFONT ).Width(); - const PColumnModel pColumn = m_pModel->getColumnModel( lastResizableCol ); - pColumn->setWidth( logicColWidth ); - - // update all other columns after the resized one - ColPos adjustColumn = lastResizableCol; - while ( ++adjustColumn < colCount ) - { - m_aColumnWidths[ adjustColumn ].move( freeSpaceRight ); - } - } } //------------------------------------------------------------------------------------------------------------------ @@ -1055,12 +1165,10 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ void TableControl_Impl::impl_ni_updateScrollbars() { - TempHideCursor aHideCursor( *this ); + SuppressCursor aHideCursor( *this ); // the width/height of a scrollbar, needed several times below - long nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); - if ( m_rAntiImpl.IsZoom() ) - nScrollbarMetrics = (long)( nScrollbarMetrics * (double)m_rAntiImpl.GetZoom() ); + long const nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); // determine the playground for the data cells (excluding headers) // TODO: what if the control is smaller than needed for the headers/scrollbars? @@ -1198,32 +1306,10 @@ namespace svt { namespace table void TableControl_Impl::onResize() { DBG_CHECK_ME(); - if ( m_nRowCount != 0 ) - { - if ( m_nColumnCount != 0 ) - { - impl_ni_updateColumnWidths(); - impl_ni_updateScrollbars(); - checkCursorPosition(); - m_bResizingGrid = true; - } - } - else - { - // In the case that column headers are defined but data hasn't yet been set, - // only column headers will be shown - if ( m_pModel->hasColumnHeaders() ) - { - if ( m_nColHeaderHeightPixel > 1 ) - { - m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel() ); - // update column widths to fit in grid - impl_ni_updateColumnWidths(); - m_bResizingGrid = true; - } - } - impl_ni_updateScrollbars(); - } + + impl_ni_updateColumnWidths(); + impl_ni_updateScrollbars(); + checkCursorPosition(); } //------------------------------------------------------------------------------------------------------------------ @@ -1249,9 +1335,9 @@ namespace svt { namespace table // draw the header column area if ( m_pModel->hasColumnHeaders() ) { - TableRowGeometry aHeaderRow( *this, Rectangle( Point( 0, 0 ), + TableRowGeometry const aHeaderRow( *this, Rectangle( Point( 0, 0 ), aAllCellsWithHeaders.BottomRight() ), ROW_COL_HEADERS ); - Rectangle aColRect(aHeaderRow.getRect()); + Rectangle const aColRect(aHeaderRow.getRect()); pRenderer->PaintHeaderArea( *m_pDataWindow, aColRect, true, false, rStyle ); @@ -2066,7 +2152,7 @@ namespace svt { namespace table return false; } - TempHideCursor aHideCursor( *this ); + SuppressCursor aHideCursor( *this ); m_nCurColumn = _nColumn; m_nCurRow = _nRow; @@ -2083,7 +2169,7 @@ namespace svt { namespace table && ( _nRow >= 0 ) && ( _nRow < m_nRowCount ), "TableControl_Impl::ensureVisible: invalid coordinates!" ); - TempHideCursor aHideCursor( *this ); + SuppressCursor aHideCursor( *this ); if ( _nColumn < m_nLeftColumn ) impl_scrollColumns( _nColumn - m_nLeftColumn ); @@ -2133,7 +2219,7 @@ namespace svt { namespace table if ( m_nTopRow != nOldTopRow ) { DBG_SUSPEND_INV( INV_SCROLL_POSITION ); - TempHideCursor aHideCursor( *this ); + SuppressCursor aHideCursor( *this ); // TODO: call a onStartScroll at our listener (or better an own onStartScroll, // which hides the cursor and then calls the listener) // Same for onEndScroll @@ -2189,7 +2275,7 @@ namespace svt { namespace table if ( m_nLeftColumn != nOldLeftColumn ) { DBG_SUSPEND_INV( INV_SCROLL_POSITION ); - TempHideCursor aHideCursor( *this ); + SuppressCursor aHideCursor( *this ); // TODO: call a onStartScroll at our listener (or better an own onStartScroll, // which hides the cursor and then calls the listener) // Same for onEndScroll diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index dfc8141fa0e9..8d370011c939 100755 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -117,9 +117,13 @@ namespace svt { namespace table /// the number of columns in the table control. Cached model value. TableSize m_nColumnCount; + /// the number of rows in the table control. Cached model value. TableSize m_nRowCount; + /// denotes whether or not the columns fitted into the available width, last time we checked + long m_bColumnsFit; + ColPos m_nCurColumn; RowPos m_nCurRow; ColPos m_nLeftColumn; @@ -147,7 +151,6 @@ namespace svt { namespace table TableFunctionSet* m_pTableFunctionSet; //part of selection engine RowPos m_nAnchor; - bool m_bResizingGrid; bool m_bUpdatingColWidths; Link m_aSelectHdl; @@ -375,8 +378,12 @@ namespace svt { namespace table The method is not bound to the classes public invariants, as it's used in situations where the they must not necessarily be fullfilled. + + @param i_assumeInflexibleColumnsUpToIncluding + the index of a column up to which all columns should be considered as inflexible, or + COL_INVALID. */ - void impl_ni_updateColumnWidths(); + void impl_ni_updateColumnWidths( ColPos const i_assumeInflexibleColumnsUpToIncluding = COL_INVALID ); /** updates the scrollbars of the control diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx index 98078b1fb2d4..c4b21d07b526 100755 --- a/svtools/source/uno/unogridcolumnfacade.cxx +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -345,10 +345,24 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - void UnoGridColumnFacade::setResizable( bool _bResizable ) + void UnoGridColumnFacade::setResizable( bool i_resizable ) { ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); - return lcl_set( m_xGridColumn, &XGridColumn::setResizeable, sal_Bool( _bResizable ) ); + lcl_set( m_xGridColumn, &XGridColumn::setResizeable, sal_Bool( i_resizable ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Int32 UnoGridColumnFacade::getFlexibility() const + { + ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 1 ); + return lcl_get( m_xGridColumn, &XGridColumn::getFlexibility ); + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoGridColumnFacade::setFlexibility( sal_Int32 const i_flexibility ) + { + ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); + lcl_set( m_xGridColumn, &XGridColumn::setFlexibility, i_flexibility ); } //------------------------------------------------------------------------------------------------------------------ @@ -393,20 +407,6 @@ namespace svt { namespace table lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMaxWidth ); } - //------------------------------------------------------------------------------------------------------------------ - TableMetrics UnoGridColumnFacade::getPreferredWidth() const - { - ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 0 ); - return lcl_get( m_xGridColumn, &XGridColumn::getPreferredWidth ); - } - - //------------------------------------------------------------------------------------------------------------------ - void UnoGridColumnFacade::setPreferredWidth( TableMetrics _nPrefWidth ) - { - ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" ); - lcl_set( m_xGridColumn, &XGridColumn::setPreferredWidth, _nPrefWidth ); - } - //------------------------------------------------------------------------------------------------------------------ ::com::sun::star::style::HorizontalAlignment UnoGridColumnFacade::getHorizontalAlign() { diff --git a/svtools/source/uno/unogridcolumnfacade.hxx b/svtools/source/uno/unogridcolumnfacade.hxx index 11d40afa2984..7499621ba8af 100755 --- a/svtools/source/uno/unogridcolumnfacade.hxx +++ b/svtools/source/uno/unogridcolumnfacade.hxx @@ -72,14 +72,14 @@ namespace svt { namespace table virtual void setHelpText( const String& i_helpText ); virtual bool isResizable() const; virtual void setResizable( bool _bResizable ); + virtual sal_Int32 getFlexibility() const; + virtual void setFlexibility( sal_Int32 const i_flexibility ); virtual TableMetrics getWidth() const; virtual void setWidth( TableMetrics _nWidth ); virtual TableMetrics getMinWidth() const; virtual void setMinWidth( TableMetrics _nMinWidth ); virtual TableMetrics getMaxWidth() const; virtual void setMaxWidth( TableMetrics _nMaxWidth ); - virtual TableMetrics getPreferredWidth() const; - virtual void setPreferredWidth( TableMetrics _nPrefWidth ); virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign(); virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign); diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 8c50a7e62ef7..a9d808103821 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -233,7 +233,9 @@ namespace toolkit colTitle.appendAscii( "Column " ); colTitle.append( i + 1 ); pGridColumn->setTitle( colTitle.makeStringAndClear() ); - pGridColumn->setPreferredWidth( 80 /* APPFONT */ ); + pGridColumn->setColumnWidth( 80 /* APPFONT */ ); + pGridColumn->setFlexibility( 1 ); + pGridColumn->setResizeable( sal_True ); pGridColumn->setDataColumnIndex( i ); ContainerEvent aEvent; diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 60873cc1802f..9899b517d259 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -52,9 +52,9 @@ namespace toolkit ,m_nIndex(-1) ,m_nDataColumnIndex(-1) ,m_nColumnWidth(4) - ,m_nPreferredWidth(0) ,m_nMaxWidth(0) ,m_nMinWidth(0) + ,m_nFlexibility(1) ,m_bResizeable(true) ,m_eHorizontalAlign( HorizontalAlignment_LEFT ) { @@ -68,8 +68,8 @@ namespace toolkit ,m_nIndex( -1 ) ,m_nDataColumnIndex( i_copySource.m_nDataColumnIndex ) ,m_nColumnWidth( i_copySource.m_nColumnWidth ) - ,m_nPreferredWidth( i_copySource.m_nPreferredWidth ) ,m_nMaxWidth( i_copySource.m_nMaxWidth ) + ,m_nFlexibility( i_copySource.m_nFlexibility ) ,m_nMinWidth( i_copySource.m_nMinWidth ) ,m_bResizeable( i_copySource.m_bResizeable ) ,m_eHorizontalAlign( i_copySource.m_eHorizontalAlign ) @@ -125,19 +125,6 @@ namespace toolkit impl_set( m_nColumnWidth, value, "ColumnWidth" ); } - //------------------------------------------------------------------------------------------------------------------ - ::sal_Int32 SAL_CALL GridColumn::getPreferredWidth() throw (::com::sun::star::uno::RuntimeException) - { - ::comphelper::ComponentGuard aGuard( *this, rBHelper ); - return m_nPreferredWidth; - } - - //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL GridColumn::setPreferredWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException) - { - impl_set( m_nPreferredWidth, value, "PreferredWidth" ); - } - //------------------------------------------------------------------------------------------------------------------ ::sal_Int32 SAL_CALL GridColumn::getMaxWidth() throw (::com::sun::star::uno::RuntimeException) { @@ -203,6 +190,21 @@ namespace toolkit impl_set( m_bResizeable, value, "Resizeable" ); } + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int32 SAL_CALL GridColumn::getFlexibility() throw (RuntimeException) + { + ::comphelper::ComponentGuard aGuard( *this, rBHelper ); + return m_nFlexibility; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL GridColumn::setFlexibility( ::sal_Int32 i_value ) throw (IllegalArgumentException, RuntimeException) + { + if ( i_value < 0 ) + throw IllegalArgumentException( ::rtl::OUString(), *this, 1 ); + impl_set( m_nFlexibility, i_value, "Flexibility" ); + } + //------------------------------------------------------------------------------------------------------------------ HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException) { diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index a28fd5824160..b1be836a3862 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -60,14 +60,14 @@ public: virtual void SAL_CALL setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getColumnWidth() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setColumnWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getPreferredWidth() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPreferredWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMaxWidth() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setMaxWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getMinWidth() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setMinWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL getResizeable() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setResizeable(::sal_Bool the_value) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getFlexibility() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setFlexibility( ::sal_Int32 _flexibility ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getHelpText() throw (::com::sun::star::uno::RuntimeException); @@ -123,9 +123,9 @@ private: sal_Int32 m_nIndex; sal_Int32 m_nDataColumnIndex; sal_Int32 m_nColumnWidth; - sal_Int32 m_nPreferredWidth; sal_Int32 m_nMaxWidth; sal_Int32 m_nMinWidth; + sal_Int32 m_nFlexibility; sal_Bool m_bResizeable; ::rtl::OUString m_sTitle; ::rtl::OUString m_sHelpText; -- cgit From b7f54d1f8a7388f50f4e3172015dd072ceed5f35 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 24 Jan 2011 11:44:36 +0100 Subject: gridsort: re-did the column resizing - introduced XGridColumn.Flexibility, determining to which degree the column is resized during auto-column-resizing - removed XGridColumn.PreferredWidth - there really is no need for this anymore now - documented the relationship between XGridColumn.Flexibility and XGridColumn.Resizeable - re-implemented TableControl_Impl::impl_ni_updateColumnWidths, with (hopefully) less magic --- offapi/com/sun/star/awt/grid/XGridColumn.idl | 43 ++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index da3d5c8ade91..a73025d7715a 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -51,24 +52,50 @@ interface XGridColumn */ interface ::com::sun::star::util::XCloneable; - /** Specifies the an idendifier of the colomn.**/ + /** specifies an identifier of the column + +

          This identifier will not be evaluated by the grid control, or its model. It is merely for clients + to identify particular columns.

          + */ [attribute] any Identifier; - /** Specifies the default column witdth. **/ + /** specifies the current width of the column. + */ [attribute] long ColumnWidth; - /** Specifies the preferred column witdth. **/ - [attribute] long PreferredWidth; - - /** Specifies the min column witdth. **/ + /** specifies the minimal width the column can have. + */ [attribute] long MinWidth; - /** Specifies the max column witdth. **/ + /** specifies the maximal width the column can have. + */ [attribute] long MaxWidth; - /** Specifies whether column has fixed size or not. **/ + /** controls whether or not the column's width is fixed or not. + +

          If this is , the user can interactively change the column's width. Also, the column is subject to + auto-resizing, if its Flexibility attribute is greater 0.

          + */ [attribute] boolean Resizeable; + /** specifies the flexibility of the column when it is automatically resized due to the grid control as a whole + being resized. + +

          Specify 0 here if you do not want the column to be resized automatically.

          + +

          If a column has a flexibility greater than 0, it is set in relationship to the flexibility of all + other such columns, and the respective widths of the columns are changed in the same relationship.

          + +

          Note that a column's flexibility is ignored if its Resizeable attribute is + .

          + +

          A column's flexibility cannot be negative, attempts to set a negative value will raise an exception.

          + */ + [attribute] long Flexibility + { + set raises ( ::com::sun::star::lang::IllegalArgumentException ); + }; + /** Specifies the horizontal alignment of the content in the control. */ [attribute] ::com::sun::star::style::HorizontalAlignment HorizontalAlign; -- cgit From 0cbc0e3ab6d9ee6597ac8a120ec82cb30ee8cb07 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 24 Jan 2011 12:54:15 +0100 Subject: gridsort: Mac WaE --- toolkit/source/controls/grid/gridcolumn.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 9899b517d259..82f0ff083288 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -69,8 +69,8 @@ namespace toolkit ,m_nDataColumnIndex( i_copySource.m_nDataColumnIndex ) ,m_nColumnWidth( i_copySource.m_nColumnWidth ) ,m_nMaxWidth( i_copySource.m_nMaxWidth ) - ,m_nFlexibility( i_copySource.m_nFlexibility ) ,m_nMinWidth( i_copySource.m_nMinWidth ) + ,m_nFlexibility( i_copySource.m_nFlexibility ) ,m_bResizeable( i_copySource.m_bResizeable ) ,m_eHorizontalAlign( i_copySource.m_eHorizontalAlign ) { -- cgit From d8624c7d123e2ced21e8ddcd6bcee92b6aa10a14 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 24 Jan 2011 15:30:24 +0100 Subject: dr79: #i5759# extend pivot layout dialog: support for unlimited number of fields in all areas --- sc/inc/dpglobal.hxx | 2 - sc/inc/dpobject.hxx | 12 +- sc/inc/global.hxx | 4 - sc/inc/pivot.hxx | 120 +- sc/inc/scabstdlg.hxx | 8 +- sc/source/core/data/dpobject.cxx | 146 +- sc/source/core/data/global2.cxx | 176 +- sc/source/core/data/makefile.mk | 1 + sc/source/core/data/pivot2.cxx | 55 +- .../Accessibility/AccessibleDataPilotControl.cxx | 130 +- sc/source/ui/attrdlg/scdlgfact.cxx | 6 +- sc/source/ui/attrdlg/scdlgfact.hxx | 6 +- sc/source/ui/dbgui/fieldwnd.cxx | 1231 +++++++----- sc/source/ui/dbgui/pivot.hrc | 7 +- sc/source/ui/dbgui/pivot.src | 11 - sc/source/ui/dbgui/pvfundlg.cxx | 12 +- sc/source/ui/dbgui/pvglob.hxx | 42 - sc/source/ui/dbgui/pvlaydlg.cxx | 2081 ++++++-------------- sc/source/ui/inc/AccessibleDataPilotControl.hxx | 6 +- sc/source/ui/inc/fieldwnd.hxx | 358 ++-- sc/source/ui/inc/pvfundlg.hxx | 22 +- sc/source/ui/inc/pvlaydlg.hxx | 283 +-- sc/source/ui/view/gridwin2.cxx | 4 +- sc/source/ui/view/tabvwshc.cxx | 2 +- 24 files changed, 1860 insertions(+), 2865 deletions(-) mode change 100755 => 100644 sc/inc/dpglobal.hxx mode change 100755 => 100644 sc/source/core/data/makefile.mk delete mode 100644 sc/source/ui/dbgui/pvglob.hxx mode change 100755 => 100644 sc/source/ui/inc/fieldwnd.hxx diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx old mode 100755 new mode 100644 index 7de5947cc969..1f850ae40cec --- a/sc/inc/dpglobal.hxx +++ b/sc/inc/dpglobal.hxx @@ -62,8 +62,6 @@ // moved from fieldwnd.hxx, see also SC_DAPI_MAXFIELDS #define MAX_LABELS 256 -#define MAX_PAGEFIELDS 10 // maximum count of fields for page area - #define PIVOT_MAXFUNC 11 #define PIVOT_FUNC_NONE 0x0000 #define PIVOT_FUNC_SUM 0x0001 diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index e1b88919dad6..e42c0eefc3e7 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -208,7 +208,7 @@ public: void ToggleDetails(const ::com::sun::star::sheet::DataPilotTableHeaderData& rElemDesc, ScDPObject* pDestObj); - BOOL FillOldParam(ScPivotParam& rParam, BOOL bForFile) const; + BOOL FillOldParam(ScPivotParam& rParam) const; BOOL FillLabelData(ScPivotParam& rParam); void InitFromOldPivot(const ScPivot& rOld, ScDocument* pDoc, BOOL bSetSource); @@ -251,14 +251,14 @@ public: CreateSource( const ScDPServiceDesc& rDesc ); static void ConvertOrientation( ScDPSaveData& rSaveData, - PivotField* pFields, SCSIZE nCount, USHORT nOrient, + const ScPivotFieldVector& rFields, USHORT nOrient, ScDocument* pDoc, SCROW nRow, SCTAB nTab, const com::sun::star::uno::Reference< com::sun::star::sheet::XDimensionsSupplier>& xSource, - BOOL bOldDefaults, - PivotField* pRefColFields = NULL, SCSIZE nRefColCount = 0, - PivotField* pRefRowFields = NULL, SCSIZE nRefRowCount = 0, - PivotField* pRefPageFields = NULL, SCSIZE nRefPageCount = 0 ); + bool bOldDefaults, + const ScPivotFieldVector* pRefColFields = 0, + const ScPivotFieldVector* pRefRowFields = 0, + const ScPivotFieldVector* pRefPageFields = 0 ); static bool IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags ); }; diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 8178eb4a01d2..d259b39a6f71 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -118,13 +118,9 @@ const sal_Unicode CHAR_ZWNBSP = 0x2060; #ifdef SC_ROWLIMIT_TYPECONVERSION_NOCONVPASS const size_t MAXSUBTOTAL = 3; const size_t MAXQUERY = 8; -const size_t PIVOT_MAXFIELD = 8; -const size_t PIVOT_MAXPAGEFIELD = 10; #else const SCSIZE MAXSUBTOTAL = 3; const SCSIZE MAXQUERY = 8; -const SCSIZE PIVOT_MAXFIELD = 8; -const SCSIZE PIVOT_MAXPAGEFIELD = 10; #endif #define SC_START_INDEX_DB_COLL 50000 diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx index 489f272bc8ba..0c60c7608d91 100644 --- a/sc/inc/pivot.hxx +++ b/sc/inc/pivot.hxx @@ -68,77 +68,14 @@ class SvStream; class ScDocument; class ScUserListData; class ScProgress; -struct ScDPLabelData; -typedef ::boost::shared_ptr ScDPLabelDataRef; - -// ----------------------------------------------------------------------- - -struct PivotField -{ - SCsCOL nCol; - USHORT nFuncMask; - USHORT nFuncCount; - ::com::sun::star::sheet::DataPilotFieldReference maFieldRef; - - explicit PivotField( SCsCOL nNewCol = 0, USHORT nNewFuncMask = PIVOT_FUNC_NONE ); - - bool operator==( const PivotField& r ) const; -}; - -// ----------------------------------------------------------------------- - -// implementation still in global2.cxx -struct ScPivotParam -{ - SCCOL nCol; // Cursor Position / - SCROW nRow; // bzw. Anfang des Zielbereiches - SCTAB nTab; - ::std::vector maLabelArray; - PivotField aPageArr[PIVOT_MAXPAGEFIELD]; - PivotField aColArr[PIVOT_MAXFIELD]; - PivotField aRowArr[PIVOT_MAXFIELD]; - PivotField aDataArr[PIVOT_MAXFIELD]; - SCSIZE nPageCount; - SCSIZE nColCount; - SCSIZE nRowCount; - SCSIZE nDataCount; - BOOL bIgnoreEmptyRows; - BOOL bDetectCategories; - BOOL bMakeTotalCol; - BOOL bMakeTotalRow; - - ScPivotParam(); - ScPivotParam( const ScPivotParam& r ); - ~ScPivotParam(); - - ScPivotParam& operator= ( const ScPivotParam& r ); - BOOL operator== ( const ScPivotParam& r ) const; -//UNUSED2009-05 void Clear (); - void ClearPivotArrays(); - void SetLabelData (const ::std::vector& r); - void SetPivotArrays ( const PivotField* pPageArr, - const PivotField* pColArr, - const PivotField* pRowArr, - const PivotField* pDataArr, - SCSIZE nPageCnt, - SCSIZE nColCnt, - SCSIZE nRowCnt, - SCSIZE nDataCnt ); -}; - -// ----------------------------------------------------------------------- - -typedef PivotField PivotFieldArr[PIVOT_MAXFIELD]; -typedef PivotField PivotPageFieldArr[PIVOT_MAXPAGEFIELD]; - -//------------------------------------------------------------------------ +// ============================================================================ struct ScDPLabelData { ::rtl::OUString maName; /// Original name of the dimension. ::rtl::OUString maLayoutName; /// Layout name (display name) - SCsCOL mnCol; + SCCOL mnCol; USHORT mnFuncMask; /// Page/Column/Row subtotal function. sal_Int32 mnUsedHier; /// Used hierarchy. sal_Int32 mnFlags; /// Flags from the DataPilotSource dimension @@ -167,7 +104,7 @@ struct ScDPLabelData ::com::sun::star::sheet::DataPilotFieldLayoutInfo maLayoutInfo; /// Layout info. ::com::sun::star::sheet::DataPilotFieldAutoShowInfo maShowInfo; /// AutoShow info. - explicit ScDPLabelData( const String& rName, short nCol, bool bIsValue ); + explicit ScDPLabelData( const String& rName, SCCOL nCol, bool bIsValue ); /** * return the name that should be displayed in the dp dialogs i.e. when @@ -176,22 +113,63 @@ struct ScDPLabelData ::rtl::OUString SC_DLLPUBLIC getDisplayName() const; }; +typedef std::vector< ScDPLabelData > ScDPLabelDataVector; + +// ============================================================================ + +struct ScPivotField +{ + SCCOL nCol; + USHORT nFuncMask; + USHORT nFuncCount; + ::com::sun::star::sheet::DataPilotFieldReference maFieldRef; + + explicit ScPivotField( SCCOL nNewCol = 0, USHORT nNewFuncMask = PIVOT_FUNC_NONE ); + + bool operator==( const ScPivotField& r ) const; +}; + +typedef ::std::vector< ScPivotField > ScPivotFieldVector; + +// ============================================================================ + +struct ScPivotParam +{ + SCCOL nCol; // Cursor Position / + SCROW nRow; // bzw. Anfang des Zielbereiches + SCTAB nTab; + ScDPLabelDataVector maLabelArray; + ScPivotFieldVector maPageArr; + ScPivotFieldVector maColArr; + ScPivotFieldVector maRowArr; + ScPivotFieldVector maDataArr; + BOOL bIgnoreEmptyRows; + BOOL bDetectCategories; + BOOL bMakeTotalCol; + BOOL bMakeTotalRow; + + ScPivotParam(); + + bool operator==( const ScPivotParam& r ) const; +}; + // ============================================================================ -struct ScDPFuncData +struct ScPivotFuncData { - short mnCol; + SCCOL mnCol; USHORT mnFuncMask; ::com::sun::star::sheet::DataPilotFieldReference maFieldRef; - explicit ScDPFuncData( short nNewCol, USHORT nNewFuncMask ); - explicit ScDPFuncData( short nNewCol, USHORT nNewFuncMask, + explicit ScPivotFuncData( SCCOL nCol, USHORT nFuncMask ); + explicit ScPivotFuncData( SCCOL nCol, USHORT nFuncMask, const ::com::sun::star::sheet::DataPilotFieldReference& rFieldRef ); }; +typedef ::std::vector< ScPivotFuncData > ScPivotFuncDataVector; + // ============================================================================ -typedef std::vector< ScDPLabelData > ScDPLabelDataVec; typedef std::vector< String > ScDPNameVec; // ============================================================================ diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 40711a200e19..c54c0317960d 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -51,7 +51,7 @@ class ScQueryItem; class ScImportOptions; class SfxStyleSheetBase; class ScDPObject; -struct ScDPFuncData; +struct ScPivotFuncData; struct ScDPNumGroupInfo; // + + + + + + diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx new file mode 100644 index 000000000000..dcf77662c56d --- /dev/null +++ b/binaryurp/source/bridge.cxx @@ -0,0 +1,978 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include +#include +#include +#include +#include + +#include "boost/noncopyable.hpp" +#include "com/sun/star/bridge/InvalidProtocolChangeException.hpp" +#include "com/sun/star/bridge/XBridge.hpp" +#include "com/sun/star/bridge/XInstanceProvider.hpp" +#include "com/sun/star/bridge/XProtocolProperties.hpp" +#include "com/sun/star/connection/XConnection.hpp" +#include "com/sun/star/io/IOException.hpp" +#include "com/sun/star/lang/DisposedException.hpp" +#include "com/sun/star/lang/EventObject.hpp" +#include "com/sun/star/lang/XEventListener.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XInterface.hpp" +#include "cppuhelper/exc_hlp.hxx" +#include "cppuhelper/weak.hxx" +#include "osl/diagnose.h" +#include "osl/mutex.hxx" +#include "osl/thread.hxx" +#include "rtl/byteseq.hxx" +#include "rtl/random.h" +#include "rtl/ref.hxx" +#include "rtl/textenc.h" +#include "rtl/ustrbuf.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typeclass.h" +#include "typelib/typedescription.h" +#include "typelib/typedescription.hxx" +#include "uno/dispatcher.hxx" +#include "uno/environment.hxx" +#include "uno/lbnames.h" + +#include "binaryany.hxx" +#include "bridge.hxx" +#include "bridgefactory.hxx" +#include "incomingreply.hxx" +#include "lessoperators.hxx" +#include "outgoingrequest.hxx" +#include "outgoingrequests.hxx" +#include "proxy.hxx" +#include "reader.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +sal_Int32 random() { + sal_Int32 n; + rtlRandomPool pool = rtl_random_createPool(); + rtl_random_getBytes(pool, &n, sizeof n); + rtl_random_destroyPool(pool); + return n; +} + +extern "C" void SAL_CALL freeProxyCallback(uno_ExtEnvironment *, void * pProxy) +{ + OSL_ASSERT(pProxy != 0); + static_cast< Proxy * >(pProxy)->do_free(); +} + +void joinThread(osl::Thread * thread) { + OSL_ASSERT(thread != 0); + if (thread->getIdentifier() != osl::Thread::getCurrentIdentifier()) { + thread->join(); + } +} + +class AttachThread: private boost::noncopyable { +public: + explicit AttachThread(uno_ThreadPool threadPool); + + ~AttachThread(); + + rtl::ByteSequence getTid() throw (); + +private: + uno_ThreadPool threadPool_; + rtl::ByteSequence tid_; +}; + +AttachThread::AttachThread(uno_ThreadPool threadPool): threadPool_(threadPool) { + sal_Sequence * s = 0; + uno_getIdOfCurrentThread(&s); + tid_ = rtl::ByteSequence(s, rtl::BYTESEQ_NOACQUIRE); + uno_threadpool_attach(threadPool_); +} + +AttachThread::~AttachThread() { + uno_threadpool_detach(threadPool_); + uno_releaseIdFromCurrentThread(); +} + +rtl::ByteSequence AttachThread::getTid() throw () { + return tid_; +} + +class PopOutgoingRequest: private boost::noncopyable { +public: + PopOutgoingRequest( + OutgoingRequests & requests, rtl::ByteSequence const & tid, + OutgoingRequest const & request); + + ~PopOutgoingRequest(); + + void clear(); + +private: + OutgoingRequests & requests_; + rtl::ByteSequence tid_; + bool cleared_; +}; + +PopOutgoingRequest::PopOutgoingRequest( + OutgoingRequests & requests, rtl::ByteSequence const & tid, + OutgoingRequest const & request): + requests_(requests), tid_(tid), cleared_(false) +{ + requests_.push(tid_, request); +} + +PopOutgoingRequest::~PopOutgoingRequest() { + if (!cleared_) { + requests_.pop(tid_); + } +} + +void PopOutgoingRequest::clear() { + cleared_ = true; +} + +} + +struct Bridge::SubStub { + com::sun::star::uno::UnoInterfaceReference object; + + sal_uInt32 references; +}; + +Bridge::Bridge( + rtl::Reference< BridgeFactory > const & factory, rtl::OUString const & name, + css::uno::Reference< css::connection::XConnection > const & connection, + css::uno::Reference< css::bridge::XInstanceProvider > const & provider): + factory_(factory), name_(name), connection_(connection), + provider_(provider), + binaryUno_(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))), + cppToBinaryMapping_( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME)), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))), + binaryToCppMapping_( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)), + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME))), + protPropTid_( + reinterpret_cast< sal_Int8 const * >(".UrpProtocolPropertiesTid"), + RTL_CONSTASCII_LENGTH(".UrpProtocolPropertiesTid")), + protPropOid_(RTL_CONSTASCII_USTRINGPARAM("UrpProtocolProperties")), + protPropType_( + cppu::UnoType< + css::uno::Reference< css::bridge::XProtocolProperties > >::get()), + protPropRequest_( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.bridge.XProtocolProperties::requestChange"))), + protPropCommit_( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.bridge.XProtocolProperties::commitChange"))), + threadPool_(0), currentContextMode_(false), proxies_(0), calls_(0), + normalCall_(false), activeCalls_(0), terminated_(false), + mode_(MODE_REQUESTED) +{ + OSL_ASSERT(factory.is() && connection.is()); + if (!binaryUno_.is()) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("URP: no binary UNO environment")), + css::uno::Reference< css::uno::XInterface >()); + } + if (!(cppToBinaryMapping_.is() && binaryToCppMapping_.is())) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("URP: no C++ UNO mapping")), + css::uno::Reference< css::uno::XInterface >()); + } + passive_.set(); +} + +void Bridge::start() { + OSL_ASSERT(threadPool_ == 0 && !writer_.is() && !reader_.is()); + threadPool_ = uno_threadpool_create(); + OSL_ASSERT(threadPool_ != 0); + writer_.set(new Writer(this)); + writer_->create(); + reader_.set(new Reader(this)); + reader_->create(); +} + +void Bridge::terminate() { + rtl::Reference< Reader > r; + rtl::Reference< Writer > w; + Listeners ls; + { + osl::MutexGuard g(mutex_); + if (terminated_) { + return; + } + std::swap(reader_, r); + std::swap(writer_, w); + ls.swap(listeners_); + terminated_ = true; + } + try { + connection_->close(); + } catch (css::io::IOException & e) { + OSL_TRACE( + OSL_LOG_PREFIX "caught IO exception '%s'", + rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); + } + OSL_ASSERT(w.is()); + w->stop(); + joinThread(r.get()); + joinThread(w.get()); + OSL_ASSERT(threadPool_ != 0); + uno_threadpool_dispose(threadPool_); + Stubs s; + { + osl::MutexGuard g(mutex_); + s.swap(stubs_); + } + for (Stubs::iterator i(s.begin()); i != s.end(); ++i) { + for (Stub::iterator j(i->second.begin()); j != i->second.end(); ++j) { + binaryUno_.get()->pExtEnv->revokeInterface( + binaryUno_.get()->pExtEnv, j->second.object.get()); + } + } + factory_->removeBridge(this); + for (Listeners::iterator i(ls.begin()); i != ls.end(); ++i) { + try { + (*i)->disposing( + css::lang::EventObject( + static_cast< cppu::OWeakObject * >(this))); + } catch (css::uno::RuntimeException & e) { + OSL_TRACE( + OSL_LOG_PREFIX "caught runtime exception '%s'", + rtl::OUStringToOString( + e.Message, RTL_TEXTENCODING_UTF8).getStr()); + } + } +} + +css::uno::Reference< css::connection::XConnection > Bridge::getConnection() + const +{ + return connection_; +} + +css::uno::Reference< css::bridge::XInstanceProvider > Bridge::getProvider() + const +{ + return provider_; +} + +css::uno::Mapping & Bridge::getCppToBinaryMapping() { + return cppToBinaryMapping_; +} + +BinaryAny Bridge::mapCppToBinaryAny(css::uno::Any const & cppAny) { + css::uno::Any in(cppAny); + BinaryAny out; + out.~BinaryAny(); + uno_copyAndConvertData( + out.get(), &in, + css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get()).get(), + cppToBinaryMapping_.get()); + return out; +} + +uno_ThreadPool Bridge::getThreadPool() const { + OSL_ASSERT(threadPool_ != 0); + return threadPool_; +} + +rtl::Reference< Writer > Bridge::getWriter() { + osl::MutexGuard g(mutex_); + if (terminated_) { + throw css::lang::DisposedException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "Binary URP bridge already disposed")), + static_cast< cppu::OWeakObject * >(this)); + } + OSL_ASSERT(writer_.is()); + return writer_; +} + +css::uno::UnoInterfaceReference Bridge::registerIncomingInterface( + rtl::OUString const & oid, css::uno::TypeDescription const & type) +{ + OSL_ASSERT(type.is()); + if (oid.getLength() == 0) { + return css::uno::UnoInterfaceReference(); + } + css::uno::UnoInterfaceReference obj(findStub(oid, type)); + if (!obj.is()) { + binaryUno_.get()->pExtEnv->getRegisteredInterface( + binaryUno_.get()->pExtEnv, + reinterpret_cast< void ** >(&obj.m_pUnoI), oid.pData, + reinterpret_cast< typelib_InterfaceTypeDescription * >(type.get())); + if (obj.is()) { + makeReleaseCall(oid, type); + } else { + obj.set(new Proxy(this, oid, type), SAL_NO_ACQUIRE); + { + osl::MutexGuard g(mutex_); + OSL_ASSERT( + proxies_ < std::numeric_limits< std::size_t >::max()); + ++proxies_; + } + binaryUno_.get()->pExtEnv->registerProxyInterface( + binaryUno_.get()->pExtEnv, + reinterpret_cast< void ** >(&obj.m_pUnoI), &freeProxyCallback, + oid.pData, + reinterpret_cast< typelib_InterfaceTypeDescription * >( + type.get())); + } + } + return obj; +} + +rtl::OUString Bridge::registerOutgoingInterface( + css::uno::UnoInterfaceReference const & object, + css::uno::TypeDescription const & type) +{ + OSL_ASSERT(type.is()); + if (!object.is()) { + return rtl::OUString(); + } + rtl::OUString oid; + if (!Proxy::isProxy(this, object, &oid)) { + binaryUno_.get()->pExtEnv->getObjectIdentifier( + binaryUno_.get()->pExtEnv, &oid.pData, object.get()); + osl::MutexGuard g(mutex_); + Stubs::iterator i(stubs_.find(oid)); + Stub newStub; + Stub * stub = i == stubs_.end() ? &newStub : &i->second; + Stub::iterator j(stub->find(type)); + //TODO: Release sub-stub if it is not successfully sent to remote side + // (otherwise, stub will leak until terminate()): + if (j == stub->end()) { + j = stub->insert(Stub::value_type(type, SubStub())).first; + if (stub == &newStub) { + i = stubs_.insert(Stubs::value_type(oid, Stub())).first; + std::swap(i->second, newStub); + j = i->second.find(type); + OSL_ASSERT(j != i->second.end()); + } + j->second.object = object; + j->second.references = 1; + binaryUno_.get()->pExtEnv->registerInterface( + binaryUno_.get()->pExtEnv, + reinterpret_cast< void ** >(&j->second.object.m_pUnoI), + oid.pData, + reinterpret_cast< typelib_InterfaceTypeDescription * >( + type.get())); + } else { + OSL_ASSERT(stub != &newStub); + if (j->second.references == SAL_MAX_UINT32) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: stub reference count overflow")), + css::uno::Reference< css::uno::XInterface >()); + } + ++j->second.references; + } + } + return oid; +} + +css::uno::UnoInterfaceReference Bridge::findStub( + rtl::OUString const & oid, css::uno::TypeDescription const & type) +{ + OSL_ASSERT(oid.getLength() != 0 && type.is()); + osl::MutexGuard g(mutex_); + Stubs::iterator i(stubs_.find(oid)); + if (i != stubs_.end()) { + Stub::iterator j(i->second.find(type)); + if (j != i->second.end()) { + return j->second.object; + } + for (j = i->second.begin(); j != i->second.end(); ++j) { + if (typelib_typedescription_isAssignableFrom( + type.get(), j->first.get())) + { + return j->second.object; + } + } + } + return css::uno::UnoInterfaceReference(); +} + +void Bridge::releaseStub( + rtl::OUString const & oid, css::uno::TypeDescription const & type) +{ + OSL_ASSERT(oid.getLength() != 0 && type.is()); + css::uno::UnoInterfaceReference obj; + bool unused; + { + osl::MutexGuard g(mutex_); + Stubs::iterator i(stubs_.find(oid)); + if (i == stubs_.end()) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("URP: release unknown stub")), + css::uno::Reference< css::uno::XInterface >()); + } + Stub::iterator j(i->second.find(type)); + if (j == i->second.end()) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("URP: release unknown stub")), + css::uno::Reference< css::uno::XInterface >()); + } + OSL_ASSERT(j->second.references > 0); + --j->second.references; + if (j->second.references == 0) { + obj = j->second.object; + i->second.erase(j); + if (i->second.empty()) { + stubs_.erase(i); + } + } + unused = becameUnused(); + } + if (obj.is()) { + binaryUno_.get()->pExtEnv->revokeInterface( + binaryUno_.get()->pExtEnv, obj.get()); + } + terminateWhenUnused(unused); +} + +void Bridge::resurrectProxy(Proxy & proxy) { + uno_Interface * p = &proxy; + binaryUno_.get()->pExtEnv->registerProxyInterface( + binaryUno_.get()->pExtEnv, + reinterpret_cast< void ** >(&p), &freeProxyCallback, + proxy.getOid().pData, + reinterpret_cast< typelib_InterfaceTypeDescription * >( + proxy.getType().get())); + OSL_ASSERT(p == &proxy); +} + +void Bridge::revokeProxy(Proxy & proxy) { + binaryUno_.get()->pExtEnv->revokeInterface( + binaryUno_.get()->pExtEnv, &proxy); +} + +void Bridge::freeProxy(Proxy & proxy) { + try { + makeReleaseCall(proxy.getOid(), proxy.getType()); + } catch (css::uno::RuntimeException & e) { + OSL_TRACE( + OSL_LOG_PREFIX "caught runtime exception '%s'", + rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); + } catch (std::exception & e) { + OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what()); + } + bool unused; + { + osl::MutexGuard g(mutex_); + OSL_ASSERT(proxies_ > 0); + --proxies_; + unused = becameUnused(); + } + terminateWhenUnused(unused); +} + +void Bridge::incrementCalls(bool normalCall) throw () { + osl::MutexGuard g(mutex_); + OSL_ASSERT(calls_ < std::numeric_limits< std::size_t >::max()); + ++calls_; + normalCall_ |= normalCall; +} + +void Bridge::decrementCalls() { + bool unused; + { + osl::MutexGuard g(mutex_); + OSL_ASSERT(calls_ > 0); + --calls_; + unused = becameUnused(); + } + terminateWhenUnused(unused); +} + +void Bridge::incrementActiveCalls() throw () { + osl::MutexGuard g(mutex_); + OSL_ASSERT( + activeCalls_ <= calls_ && + activeCalls_ < std::numeric_limits< std::size_t >::max()); + ++activeCalls_; + passive_.reset(); +} + +void Bridge::decrementActiveCalls() throw () { + osl::MutexGuard g(mutex_); + OSL_ASSERT(activeCalls_ <= calls_ && activeCalls_ > 0); + --activeCalls_; + if (activeCalls_ == 0) { + passive_.set(); + } +} + +bool Bridge::makeCall( + rtl::OUString const & oid, css::uno::TypeDescription const & member, + bool setter, std::vector< BinaryAny > const & inArguments, + BinaryAny * returnValue, std::vector< BinaryAny > * outArguments) +{ + std::auto_ptr< IncomingReply > resp; + { + AttachThread att(threadPool_); + PopOutgoingRequest pop( + outgoingRequests_, att.getTid(), + OutgoingRequest(OutgoingRequest::KIND_NORMAL, member, setter)); + sendRequest( + att.getTid(), oid, css::uno::TypeDescription(), member, + inArguments); + pop.clear(); + incrementCalls(true); + incrementActiveCalls(); + void * job; + uno_threadpool_enter(threadPool_, &job); + resp.reset(static_cast< IncomingReply * >(job)); + decrementActiveCalls(); + decrementCalls(); + } + if (resp.get() == 0) { + throw css::lang::DisposedException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "Binary URP bridge disposed during call")), + static_cast< cppu::OWeakObject * >(this)); + } + *returnValue = resp->returnValue; + if (!resp->exception) { + *outArguments = resp->outArguments; + } + return resp->exception; +} + +void Bridge::sendRequestChangeRequest() { + OSL_ASSERT(mode_ == MODE_REQUESTED); + random_ = random(); + std::vector< BinaryAny > a; + a.push_back( + BinaryAny( + css::uno::TypeDescription(cppu::UnoType< sal_Int32 >::get()), + &random_)); + sendProtPropRequest(OutgoingRequest::KIND_REQUEST_CHANGE, a); +} + +void Bridge::handleRequestChangeReply( + bool exception, BinaryAny const & returnValue) +{ + throwException(exception, returnValue); + sal_Int32 n = *static_cast< sal_Int32 * >( + returnValue.getValue( + css::uno::TypeDescription(cppu::UnoType< sal_Int32 >::get()))); + sal_Int32 exp = 0; + switch (mode_) { + case MODE_REQUESTED: + case MODE_REPLY_1: + exp = 1; + break; + case MODE_REPLY_MINUS1: + exp = -1; + mode_ = MODE_REQUESTED; + break; + case MODE_REPLY_0: + exp = 0; + mode_ = MODE_WAIT; + break; + default: + OSL_ASSERT(false); // this cannot happen + break; + } + if (n != exp) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: requestChange reply with unexpected return value" + " received")), + static_cast< cppu::OWeakObject * >(this)); + } + decrementCalls(); + switch (exp) { + case -1: + sendRequestChangeRequest(); + break; + case 0: + break; + case 1: + sendCommitChangeRequest(); + break; + default: + OSL_ASSERT(false); // this cannot happen + break; + } +} + +void Bridge::handleCommitChangeReply( + bool exception, BinaryAny const & returnValue) +{ + bool ccMode = true; + try { + throwException(exception, returnValue); + } catch (css::bridge::InvalidProtocolChangeException &) { + ccMode = false; + } + if (ccMode) { + setCurrentContextMode(); + } + OSL_ASSERT(mode_ == MODE_REQUESTED || mode_ == MODE_REPLY_1); + mode_ = MODE_NORMAL; + getWriter()->unblock(); + decrementCalls(); +} + +void Bridge::handleRequestChangeRequest( + rtl::ByteSequence const & tid, std::vector< BinaryAny > const & inArguments) +{ + OSL_ASSERT(inArguments.size() == 1); + switch (mode_) { + case MODE_REQUESTED: + { + sal_Int32 n2 = *static_cast< sal_Int32 * >( + inArguments[0].getValue( + css::uno::TypeDescription( + cppu::UnoType< sal_Int32 >::get()))); + sal_Int32 ret; + if (n2 > random_) { + ret = 1; + mode_ = MODE_REPLY_0; + } else if (n2 == random_) { + ret = -1; + mode_ = MODE_REPLY_MINUS1; + } else { + ret = 0; + mode_ = MODE_REPLY_1; + } + getWriter()->sendDirectReply( + tid, protPropRequest_, false, + BinaryAny( + css::uno::TypeDescription( + cppu::UnoType< sal_Int32 >::get()), + &ret), + std::vector< BinaryAny >()); + break; + } + case MODE_NORMAL: + { + mode_ = MODE_NORMAL_WAIT; + sal_Int32 ret = 1; + getWriter()->queueReply( + tid, protPropRequest_, false, false, + BinaryAny( + css::uno::TypeDescription( + cppu::UnoType< sal_Int32 >::get()), + &ret), + std::vector< BinaryAny >(), false); + break; + } + default: + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: unexpected requestChange request received")), + static_cast< cppu::OWeakObject * >(this)); + } +} + +void Bridge::handleCommitChangeRequest( + rtl::ByteSequence const & tid, std::vector< BinaryAny > const & inArguments) +{ + bool ccMode = false; + bool exc = false; + BinaryAny ret; + OSL_ASSERT(inArguments.size() == 1); + css::uno::Sequence< css::bridge::ProtocolProperty > s; + OSL_VERIFY(mapBinaryToCppAny(inArguments[0]) >>= s); + for (sal_Int32 i = 0; i != s.getLength(); ++i) { + if (s[i].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("CurrentContext"))) + { + ccMode = true; + } else { + ccMode = false; + exc = true; + ret = mapCppToBinaryAny( + css::uno::makeAny( + css::bridge::InvalidProtocolChangeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "InvalidProtocolChangeException")), + css::uno::Reference< css::uno::XInterface >(), s[i], + 1))); + break; + } + } + switch (mode_) { + case MODE_WAIT: + getWriter()->sendDirectReply( + tid, protPropCommit_, exc, ret, std::vector< BinaryAny >()); + if (ccMode) { + setCurrentContextMode(); + mode_ = MODE_NORMAL; + getWriter()->unblock(); + } else { + mode_ = MODE_REQUESTED; + sendRequestChangeRequest(); + } + break; + case MODE_NORMAL_WAIT: + getWriter()->queueReply( + tid, protPropCommit_, false, false, ret, std::vector< BinaryAny >(), + ccMode); + mode_ = MODE_NORMAL; + break; + default: + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: unexpected commitChange request received")), + static_cast< cppu::OWeakObject * >(this)); + } +} + +OutgoingRequest Bridge::lastOutgoingRequest(rtl::ByteSequence const & tid) { + OutgoingRequest req(outgoingRequests_.top(tid)); + outgoingRequests_.pop(tid); + return req; +} + +bool Bridge::isProtocolPropertiesRequest( + rtl::OUString const & oid, css::uno::TypeDescription const & type) const +{ + return oid == protPropOid_ && type.equals(protPropType_); +} + +void Bridge::setCurrentContextMode() { + osl::MutexGuard g(mutex_); + currentContextMode_ = true; +} + +bool Bridge::isCurrentContextMode() { + osl::MutexGuard g(mutex_); + return currentContextMode_; +} + +Bridge::~Bridge() { + if (threadPool_ != 0) { + uno_threadpool_destroy(threadPool_); + } +} + +css::uno::Reference< css::uno::XInterface > Bridge::getInstance( + rtl::OUString const & sInstanceName) throw (css::uno::RuntimeException) +{ + if (sInstanceName.getLength() == 0) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "XBridge::getInstance sInstanceName must be non-empty")), + static_cast< cppu::OWeakObject * >(this)); + } + for (sal_Int32 i = 0; i != sInstanceName.getLength(); ++i) { + if (sInstanceName[i] > 0x7F) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "XBridge::getInstance sInstanceName contains non-ASCII" + " character")), + css::uno::Reference< css::uno::XInterface >()); + } + } + css::uno::TypeDescription ifc( + cppu::UnoType< css::uno::Reference< css::uno::XInterface > >::get()); + typelib_TypeDescription * p = ifc.get(); + std::vector< BinaryAny > inArgs; + inArgs.push_back( + BinaryAny( + css::uno::TypeDescription(cppu::UnoType< css::uno::Type >::get()), + &p)); + BinaryAny ret; + std::vector< BinaryAny> outArgs; + bool exc = makeCall( + sInstanceName, + css::uno::TypeDescription( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.uno.XInterface::queryInterface"))), + false, inArgs, &ret, &outArgs); + throwException(exc, ret); + return css::uno::Reference< css::uno::XInterface >( + static_cast< css::uno::XInterface * >( + binaryToCppMapping_.mapInterface( + *static_cast< uno_Interface ** >(ret.getValue(ifc)), + ifc.get())), + css::uno::UNO_REF_NO_ACQUIRE); +} + +rtl::OUString Bridge::getName() throw (css::uno::RuntimeException) { + return name_; +} + +rtl::OUString Bridge::getDescription() throw (css::uno::RuntimeException) { + rtl::OUStringBuffer b(name_); + b.append(sal_Unicode(':')); + b.append(connection_->getDescription()); + return b.makeStringAndClear(); +} + +void Bridge::dispose() throw (css::uno::RuntimeException) { + terminate(); + // OOo expects dispose to not return while there are still remote calls in + // progress; an external protocol must ensure that dispose is not called + // from within an incoming or outgoing remote call, as passive_.wait() would + // otherwise deadlock: + passive_.wait(); +} + +void Bridge::addEventListener( + css::uno::Reference< css::lang::XEventListener > const & xListener) + throw (css::uno::RuntimeException) +{ + OSL_ASSERT(xListener.is()); + { + osl::MutexGuard g(mutex_); + if (!terminated_) { + listeners_.push_back(xListener); + return; + } + } + xListener->disposing( + css::lang::EventObject(static_cast< cppu::OWeakObject * >(this))); +} + +void Bridge::removeEventListener( + css::uno::Reference< css::lang::XEventListener > const & aListener) + throw (css::uno::RuntimeException) +{ + osl::MutexGuard g(mutex_); + Listeners::iterator i( + std::find(listeners_.begin(), listeners_.end(), aListener)); + if (i != listeners_.end()) { + listeners_.erase(i); + } +} + +void Bridge::sendCommitChangeRequest() { + OSL_ASSERT(mode_ == MODE_REQUESTED || mode_ == MODE_REPLY_1); + css::uno::Sequence< css::bridge::ProtocolProperty > s(1); + s[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CurrentContext")); + std::vector< BinaryAny > a; + a.push_back(mapCppToBinaryAny(css::uno::makeAny(s))); + sendProtPropRequest(OutgoingRequest::KIND_COMMIT_CHANGE, a); +} + +void Bridge::sendProtPropRequest( + OutgoingRequest::Kind kind, std::vector< BinaryAny > const & inArguments) +{ + OSL_ASSERT( + kind == OutgoingRequest::KIND_REQUEST_CHANGE || + kind == OutgoingRequest::KIND_COMMIT_CHANGE); + incrementCalls(false); + css::uno::TypeDescription member( + kind == OutgoingRequest::KIND_REQUEST_CHANGE + ? protPropRequest_ : protPropCommit_); + PopOutgoingRequest pop( + outgoingRequests_, protPropTid_, OutgoingRequest(kind, member, false)); + getWriter()->sendDirectRequest( + protPropTid_, protPropOid_, protPropType_, member, inArguments); + pop.clear(); +} + +void Bridge::makeReleaseCall( + rtl::OUString const & oid, css::uno::TypeDescription const & type) +{ + AttachThread att(threadPool_); + sendRequest( + att.getTid(), oid, type, + css::uno::TypeDescription( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.uno.XInterface::release"))), + std::vector< BinaryAny >()); +} + +void Bridge::sendRequest( + rtl::ByteSequence const & tid, rtl::OUString const & oid, + css::uno::TypeDescription const & type, + css::uno::TypeDescription const & member, + std::vector< BinaryAny > const & inArguments) +{ + getWriter()->queueRequest(tid, oid, type, member, inArguments); +} + +void Bridge::throwException(bool exception, BinaryAny const & value) { + if (exception) { + cppu::throwException(mapBinaryToCppAny(value)); + } +} + +css::uno::Any Bridge::mapBinaryToCppAny(BinaryAny const & binaryAny) { + BinaryAny in(binaryAny); + css::uno::Any out; + out.~Any(); + uno_copyAndConvertData( + &out, in.get(), + css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get()).get(), + binaryToCppMapping_.get()); + return out; +} + +bool Bridge::becameUnused() const { + return stubs_.empty() && proxies_ == 0 && calls_ == 0 && normalCall_; +} + +void Bridge::terminateWhenUnused(bool unused) { + if (unused) { + // That the current thread considers the bridge unused implies that it + // is not within an incoming or outgoing remote call (so calling + // terminate cannot lead to deadlock): + terminate(); + } +} + +} diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx new file mode 100644 index 000000000000..73e32aac0cac --- /dev/null +++ b/binaryurp/source/bridge.hxx @@ -0,0 +1,287 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_BRIDGE_HXX +#define INCLUDED_BINARYURP_SOURCE_BRIDGE_HXX + +#include "sal/config.h" + +#include +#include +#include +#include + +#include "boost/noncopyable.hpp" +#include "com/sun/star/bridge/XBridge.hpp" +#include "com/sun/star/lang/XComponent.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "cppuhelper/implbase2.hxx" +#include "osl/conditn.hxx" +#include "osl/mutex.hxx" +#include "rtl/ref.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "uno/environment.hxx" +#include "uno/mapping.hxx" +#include "uno/threadpool.h" + +#include "outgoingrequest.hxx" +#include "outgoingrequests.hxx" +#include "writer.hxx" + +namespace binaryurp { + class BinaryAny; + class BridgeFactory; + class Proxy; + class Reader; +} +namespace com { namespace sun { namespace star { + namespace bridge { class XInstanceProvider; } + namespace connection { class XConnection; } + namespace lang { class XEventListener; } + namespace uno { + class Any; + class TypeDescription; + class UnoInterfaceReference; + class XInterface; + } +} } } +namespace rtl { class ByteSequence; } + +namespace binaryurp { + +class Bridge: + public cppu::WeakImplHelper2< + com::sun::star::bridge::XBridge, com::sun::star::lang::XComponent >, + private boost::noncopyable +{ +public: + Bridge( + rtl::Reference< BridgeFactory > const & factory, + rtl::OUString const & name, + com::sun::star::uno::Reference< + com::sun::star::connection::XConnection > const & connection, + com::sun::star::uno::Reference< + com::sun::star::bridge::XInstanceProvider > const & provider); + + void start(); + + // Internally waits for all incoming and outgoing remote calls to terminate, + // so must not be called from within such a call: + void terminate(); + + com::sun::star::uno::Reference< com::sun::star::connection::XConnection > + getConnection() const; + + com::sun::star::uno::Reference< com::sun::star::bridge::XInstanceProvider > + getProvider() const; + + com::sun::star::uno::Mapping & getCppToBinaryMapping(); + + BinaryAny mapCppToBinaryAny(com::sun::star::uno::Any const & cppAny); + + uno_ThreadPool getThreadPool() const; + + rtl::Reference< Writer > getWriter(); + + com::sun::star::uno::UnoInterfaceReference registerIncomingInterface( + rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type); + + rtl::OUString registerOutgoingInterface( + com::sun::star::uno::UnoInterfaceReference const & object, + com::sun::star::uno::TypeDescription const & type); + + com::sun::star::uno::UnoInterfaceReference findStub( + rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type); + + void releaseStub( + rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type); + + void resurrectProxy(Proxy & proxy); + + void revokeProxy(Proxy & proxy); + + void freeProxy(Proxy & proxy); + + void incrementCalls(bool normalCall) throw (); + + void decrementCalls(); + + void incrementActiveCalls() throw (); + + void decrementActiveCalls() throw (); + + bool makeCall( + rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & member, bool setter, + std::vector< BinaryAny > const & inArguments, BinaryAny * returnValue, + std::vector< BinaryAny > * outArguments); + + // Only called from reader_ thread: + void sendRequestChangeRequest(); + + // Only called from reader_ thread: + void handleRequestChangeReply( + bool exception, BinaryAny const & returnValue); + + // Only called from reader_ thread: + void handleCommitChangeReply(bool exception, BinaryAny const & returnValue); + + // Only called from reader_ thread: + void handleRequestChangeRequest( + rtl::ByteSequence const & tid, + std::vector< BinaryAny > const & inArguments); + + // Only called from reader_ thread: + void handleCommitChangeRequest( + rtl::ByteSequence const & tid, + std::vector< BinaryAny > const & inArguments); + + OutgoingRequest lastOutgoingRequest(rtl::ByteSequence const & tid); + + bool isProtocolPropertiesRequest( + rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type) const; + + void setCurrentContextMode(); + + bool isCurrentContextMode(); + +private: + virtual ~Bridge(); + + virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > + SAL_CALL getInstance(rtl::OUString const & sInstanceName) + throw (com::sun::star::uno::RuntimeException); + + virtual rtl::OUString SAL_CALL getName() + throw (com::sun::star::uno::RuntimeException); + + virtual rtl::OUString SAL_CALL getDescription() + throw (com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL dispose() + throw (com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL addEventListener( + com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > + const & xListener) + throw (com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL removeEventListener( + com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > + const & aListener) + throw (com::sun::star::uno::RuntimeException); + + // Only called from reader_ thread: + void sendCommitChangeRequest(); + + // Only called from reader_ thread: + void sendProtPropRequest( + OutgoingRequest::Kind kind, + std::vector< BinaryAny > const & inArguments); + + void makeReleaseCall( + rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type); + + void sendRequest( + rtl::ByteSequence const & tid, rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type, + com::sun::star::uno::TypeDescription const & member, + std::vector< BinaryAny > const & inArguments); + + void throwException(bool exception, BinaryAny const & value); + + com::sun::star::uno::Any mapBinaryToCppAny(BinaryAny const & binaryAny); + + bool becameUnused() const; + + void terminateWhenUnused(bool unused); + + typedef + std::list< + com::sun::star::uno::Reference< + com::sun::star::lang::XEventListener > > + Listeners; + + struct SubStub; + + typedef std::map< com::sun::star::uno::TypeDescription, SubStub > Stub; + + typedef std::map< rtl::OUString, Stub > Stubs; + + enum Mode { + MODE_REQUESTED, MODE_REPLY_MINUS1, MODE_REPLY_0, MODE_REPLY_1, + MODE_WAIT, MODE_NORMAL, MODE_NORMAL_WAIT }; + + rtl::Reference< BridgeFactory > factory_; + rtl::OUString name_; + com::sun::star::uno::Reference< com::sun::star::connection::XConnection > + connection_; + com::sun::star::uno::Reference< com::sun::star::bridge::XInstanceProvider > + provider_; + com::sun::star::uno::Environment binaryUno_; + com::sun::star::uno::Mapping cppToBinaryMapping_; + com::sun::star::uno::Mapping binaryToCppMapping_; + rtl::ByteSequence protPropTid_; + rtl::OUString protPropOid_; + com::sun::star::uno::TypeDescription protPropType_; + com::sun::star::uno::TypeDescription protPropRequest_; + com::sun::star::uno::TypeDescription protPropCommit_; + uno_ThreadPool threadPool_; + OutgoingRequests outgoingRequests_; + + osl::Mutex mutex_; + Listeners listeners_; + rtl::Reference< Writer > writer_; + rtl::Reference< Reader > reader_; + bool currentContextMode_; + Stubs stubs_; + std::size_t proxies_; + std::size_t calls_; + bool normalCall_; + std::size_t activeCalls_; + osl::Condition passive_; + // to guarantee that passive_ is eventually set (to avoid deadlock, see + // dispose), activeCalls_ only counts those calls for which it can be + // guaranteed that incrementActiveCalls is indeed followed by + // decrementActiveCalls, without an intervening exception + bool terminated_; + + // Only accessed from reader_ thread: + Mode mode_; + sal_Int32 random_; +}; + +} + +#endif diff --git a/binaryurp/source/bridgefactory.cxx b/binaryurp/source/bridgefactory.cxx new file mode 100644 index 000000000000..16bd9cf1b6f3 --- /dev/null +++ b/binaryurp/source/bridgefactory.cxx @@ -0,0 +1,232 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include + +#include "com/sun/star/connection/XConnection.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implementationentry.hxx" +#include "osl/diagnose.h" +#include "rtl/ref.hxx" +#include "sal/types.h" +#include "uno/lbnames.h" + +#include "bridge.hxx" +#include "bridgefactory.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +} + +css::uno::Reference< css::uno::XInterface > BridgeFactory::static_create( + css::uno::Reference< css::uno::XComponentContext > const & xContext) + SAL_THROW((css::uno::Exception)) +{ + return static_cast< cppu::OWeakObject * >(new BridgeFactory(xContext)); +} + +rtl::OUString BridgeFactory::static_getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.bridge.BridgeFactory")); +} + +css::uno::Sequence< rtl::OUString > +BridgeFactory::static_getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.BridgeFactory")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +void BridgeFactory::removeBridge( + css::uno::Reference< css::bridge::XBridge > const & bridge) +{ + OSL_ASSERT(bridge.is()); + rtl::OUString n(bridge->getName()); + osl::MutexGuard g(*this); + if (n.getLength() == 0) { + BridgeList::iterator i( + std::find(unnamed_.begin(), unnamed_.end(), bridge)); + if (i != unnamed_.end()) { + unnamed_.erase(i); + } + } else { + BridgeMap::iterator i(named_.find(n)); + if (i != named_.end() && i->second == bridge) { + named_.erase(i); + } + } +} + +BridgeFactory::BridgeFactory( + css::uno::Reference< css::uno::XComponentContext > const & context): + BridgeFactoryBase(*static_cast< osl::Mutex * >(this)), context_(context) +{ + OSL_ASSERT(context.is()); +} + +BridgeFactory::~BridgeFactory() {} + +rtl::OUString BridgeFactory::getImplementationName() + throw (css::uno::RuntimeException) +{ + return static_getImplementationName(); +} + +sal_Bool BridgeFactory::supportsService(rtl::OUString const & ServiceName) + throw (css::uno::RuntimeException) +{ + css::uno::Sequence< rtl::OUString > s(getSupportedServiceNames()); + for (sal_Int32 i = 0; i != s.getLength(); ++i) { + if (ServiceName == s[i]) { + return true; + } + } + return false; +} + +css::uno::Sequence< rtl::OUString > BridgeFactory::getSupportedServiceNames() + throw (css::uno::RuntimeException) +{ + return static_getSupportedServiceNames(); +} + +css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( + rtl::OUString const & sName, rtl::OUString const & sProtocol, + css::uno::Reference< css::connection::XConnection > const & aConnection, + css::uno::Reference< css::bridge::XInstanceProvider > const & + anInstanceProvider) + throw ( + css::bridge::BridgeExistsException, css::lang::IllegalArgumentException, + css::uno::RuntimeException) +{ + rtl::Reference< Bridge > b; + { + osl::MutexGuard g(*this); + if (named_.find(sName) != named_.end()) { + throw css::bridge::BridgeExistsException( + sName, static_cast< cppu::OWeakObject * >(this)); + } + if (!(sProtocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("urp")) && + aConnection.is())) + { + throw css::lang::IllegalArgumentException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "BridgeFactory::createBridge: sProtocol != urp ||" + " aConnection == null")), + static_cast< cppu::OWeakObject * >(this), -1); + } + b.set(new Bridge(this, sName, aConnection, anInstanceProvider)); + if (sName.getLength() == 0) { + unnamed_.push_back( + css::uno::Reference< css::bridge::XBridge >(b.get())); + } else { + named_[sName] = b.get(); + } + } + b->start(); + return css::uno::Reference< css::bridge::XBridge >(b.get()); +} + +css::uno::Reference< css::bridge::XBridge > BridgeFactory::getBridge( + rtl::OUString const & sName) throw (css::uno::RuntimeException) +{ + osl::MutexGuard g(*this); + BridgeMap::iterator i(named_.find(sName)); + return i == named_.end() + ? css::uno::Reference< css::bridge::XBridge >() : i->second; +} + +css::uno::Sequence< css::uno::Reference< css::bridge::XBridge > > +BridgeFactory::getExistingBridges() throw (css::uno::RuntimeException) { + osl::MutexGuard g(*this); + if (unnamed_.size() > SAL_MAX_INT32) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "BridgeFactory::getExistingBridges: too many")), + static_cast< cppu::OWeakObject * >(this)); + } + sal_Int32 n = static_cast< sal_Int32 >(unnamed_.size()); + if (named_.size() > static_cast< sal_uInt32 >(SAL_MAX_INT32 - n)) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "BridgeFactory::getExistingBridges: too many")), + static_cast< cppu::OWeakObject * >(this)); + } + n = static_cast< sal_Int32 >(n + named_.size()); + css::uno::Sequence< css::uno::Reference< css::bridge::XBridge > > s(n); + sal_Int32 i = 0; + for (BridgeList::iterator j(unnamed_.begin()); j != unnamed_.end(); ++j) { + s[i++] = *j; + } + for (BridgeMap::iterator j(named_.begin()); j != named_.end(); ++j) { + s[i++] = j->second; + } + return s; +} + +} + +namespace { + +static cppu::ImplementationEntry const services[] = { + { &binaryurp::BridgeFactory::static_create, + &binaryurp::BridgeFactory::static_getImplementationName, + &binaryurp::BridgeFactory::static_getSupportedServiceNames, + &cppu::createSingleComponentFactory, 0, 0 }, + { 0, 0, 0, 0, 0, 0 } +}; + +} + +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( + char const * pImplName, void * pServiceManager, void * pRegistryKey) +{ + return cppu::component_getFactoryHelper( + pImplName, pServiceManager, pRegistryKey, services); +} + +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL +component_getImplementationEnvironment( + char const ** ppEnvTypeName, uno_Environment **) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} diff --git a/binaryurp/source/bridgefactory.hxx b/binaryurp/source/bridgefactory.hxx new file mode 100755 index 000000000000..af6499d61bd0 --- /dev/null +++ b/binaryurp/source/bridgefactory.hxx @@ -0,0 +1,144 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_BRIDGEFACTORY_HXX +#define INCLUDED_BINARYURP_SOURCE_BRIDGEFACTORY_HXX + +#include "sal/config.h" + +#include +#include + +#include "boost/noncopyable.hpp" +#include "com/sun/star/bridge/XBridgeFactory.hpp" +#include "com/sun/star/lang/XServiceInfo.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "cppuhelper/compbase2.hxx" +#include "sal/types.h" + +namespace com { namespace sun { namespace star { + namespace connection { class XConnection; } + namespace uno { + class XComponentContext; + class XInterface; + } +} } } + +namespace binaryurp { + +// That BridgeFactory derives from XComponent appears to be a historic mistake; +// the implementation does not care about a disposed state: + +typedef + cppu::WeakComponentImplHelper2< + com::sun::star::lang::XServiceInfo, + com::sun::star::bridge::XBridgeFactory > + BridgeFactoryBase; + +class BridgeFactory: + private osl::Mutex, public BridgeFactoryBase, private boost::noncopyable +{ +public: + static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > + SAL_CALL static_create( + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + const & xContext) + SAL_THROW((com::sun::star::uno::Exception)); + + static rtl::OUString SAL_CALL static_getImplementationName(); + + static com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + static_getSupportedServiceNames(); + + void removeBridge( + com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > + const & bridge); + + using BridgeFactoryBase::acquire; + using BridgeFactoryBase::release; + +private: + explicit BridgeFactory( + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + const & context); + + virtual ~BridgeFactory(); + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (com::sun::star::uno::RuntimeException); + + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) + throw (com::sun::star::uno::RuntimeException); + + virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException); + + virtual com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > + SAL_CALL createBridge( + rtl::OUString const & sName, rtl::OUString const & sProtocol, + com::sun::star::uno::Reference< + com::sun::star::connection::XConnection > const & aConnection, + com::sun::star::uno::Reference< + com::sun::star::bridge::XInstanceProvider > const & + anInstanceProvider) + throw ( + com::sun::star::bridge::BridgeExistsException, + com::sun::star::lang::IllegalArgumentException, + com::sun::star::uno::RuntimeException); + + virtual com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > + SAL_CALL getBridge( + rtl::OUString const & sName) + throw (com::sun::star::uno::RuntimeException); + + virtual + com::sun::star::uno::Sequence< + com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > > + SAL_CALL getExistingBridges() throw (com::sun::star::uno::RuntimeException); + + typedef + std::list< + com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > > + BridgeList; + + typedef + std::map< + rtl::OUString, + com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > > + BridgeMap; + + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + context_; + BridgeList unnamed_; + BridgeMap named_; +}; + +} + +#endif diff --git a/binaryurp/source/cache.hxx b/binaryurp/source/cache.hxx new file mode 100755 index 000000000000..118b8a07b98d --- /dev/null +++ b/binaryurp/source/cache.hxx @@ -0,0 +1,134 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_CACHE_HXX +#define INCLUDED_BINARYURP_SOURCE_CACHE_HXX + +#include "sal/config.h" + +#include +#include + +#include "boost/noncopyable.hpp" +#include "osl/diagnose.h" +#include "sal/types.h" + +namespace binaryurp { + +namespace cache { + +enum { size = 256, ignore = 0xFFFF }; + +} + +template< typename T > class Cache: private boost::noncopyable { +public: + explicit Cache(std::size_t size): + size_(size), first_(map_.end()), last_(map_.end()) + { + OSL_ASSERT(size < cache::ignore); + } + + sal_uInt16 add(T const & content, bool * found) { + OSL_ASSERT(found != 0); + typename Map::iterator i(map_.find(content)); + *found = i != map_.end(); + if (i == map_.end()) { + typename Map::size_type n = map_.size(); + if (n < size_) { + i = + (map_.insert( + typename Map::value_type( + content, + Entry( + static_cast< sal_uInt16 >(n), map_.end(), + first_)))). + first; + if (first_ == map_.end()) { + last_ = i; + } else { + first_->second.prev = i; + } + first_ = i; + } else if (last_ != map_.end()) { + i = + (map_.insert( + typename Map::value_type( + content, + Entry(last_->second.index, map_.end(), first_)))). + first; + first_->second.prev = i; + first_ = i; + typename Map::iterator j(last_); + last_ = last_->second.prev; + last_->second.next = map_.end(); + map_.erase(j); + } else { + // Reached iff size_ == 0: + return cache::ignore; + } + } else if (i != first_) { + // Move to front (reached only if size_ > 1): + i->second.prev->second.next = i->second.next; + if (i->second.next == map_.end()) { + last_ = i->second.prev; + } else { + i->second.next->second.prev = i->second.prev; + } + i->second.prev = map_.end(); + i->second.next = first_; + first_->second.prev = i; + first_ = i; + } + return i->second.index; + } + +private: + struct Entry; + + typedef std::map< T, Entry > Map; + + struct Entry { + sal_uInt16 index; + typename Map::iterator prev; + typename Map::iterator next; + + Entry( + sal_uInt16 theIndex, typename Map::iterator thePrev, + typename Map::iterator theNext): + index(theIndex), prev(thePrev), next(theNext) {} + }; + + std::size_t size_; + Map map_; + typename Map::iterator first_; + typename Map::iterator last_; +}; + +} + +#endif diff --git a/binaryurp/source/currentcontext.cxx b/binaryurp/source/currentcontext.cxx new file mode 100644 index 000000000000..aed9640d84a0 --- /dev/null +++ b/binaryurp/source/currentcontext.cxx @@ -0,0 +1,80 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "uno/current_context.h" +#include "uno/dispatcher.hxx" +#include "uno/lbnames.h" + +#include "currentcontext.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +} + +namespace current_context { + +css::uno::UnoInterfaceReference get() { + css::uno::UnoInterfaceReference cc; + if (!uno_getCurrentContext( + reinterpret_cast< void ** >(&cc.m_pUnoI), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)).pData, 0)) + { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("uno_getCurrentContext failed")), + css::uno::Reference< css::uno::XInterface >()); + } + return cc; +} + +void set(css::uno::UnoInterfaceReference const & value) { + css::uno::UnoInterfaceReference cc(value); + if (!uno_setCurrentContext( + cc.m_pUnoI, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)).pData, 0)) + { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("uno_setCurrentContext failed")), + css::uno::Reference< css::uno::XInterface >()); + } +} + +} + +} diff --git a/binaryurp/source/currentcontext.hxx b/binaryurp/source/currentcontext.hxx new file mode 100644 index 000000000000..558d9ac04d5c --- /dev/null +++ b/binaryurp/source/currentcontext.hxx @@ -0,0 +1,49 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_CURRENTCONTEXT_HXX +#define INCLUDED_BINARYURP_SOURCE_CURRENTCONTEXT_HXX + +#include "sal/config.h" + +namespace com { namespace sun { namespace star { namespace uno { + class UnoInterfaceReference; +} } } } + +namespace binaryurp { + +namespace current_context { + +com::sun::star::uno::UnoInterfaceReference get(); + +void set(com::sun::star::uno::UnoInterfaceReference const & value); + +} + +} + +#endif diff --git a/binaryurp/source/incomingreply.hxx b/binaryurp/source/incomingreply.hxx new file mode 100644 index 000000000000..654542f701fa --- /dev/null +++ b/binaryurp/source/incomingreply.hxx @@ -0,0 +1,58 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_INCOMINGREPLY_HXX +#define INCLUDED_BINARYURP_SOURCE_INCOMINGREPLY_HXX + +#include "sal/config.h" + +#include + +#include "boost/noncopyable.hpp" + +#include "binaryany.hxx" + +namespace binaryurp { + +struct IncomingReply: private boost::noncopyable { + IncomingReply( + bool theException, BinaryAny const & theReturnValue, + std::vector< BinaryAny > const & theOutArguments): + exception(theException), returnValue(theReturnValue), + outArguments(theOutArguments) + {} + + bool exception; + + BinaryAny returnValue; + + std::vector< BinaryAny > outArguments; +}; + +} + +#endif diff --git a/binaryurp/source/incomingrequest.cxx b/binaryurp/source/incomingrequest.cxx new file mode 100644 index 000000000000..646a868f66fd --- /dev/null +++ b/binaryurp/source/incomingrequest.cxx @@ -0,0 +1,300 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include +#include + +#include "boost/noncopyable.hpp" +#include "com/sun/star/bridge/XInstanceProvider.hpp" +#include "cppuhelper/exc_hlp.hxx" +#include "rtl/byteseq.hxx" +#include "rtl/ref.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typedescription.hxx" +#include "uno/dispatcher.hxx" + +#include "binaryany.hxx" +#include "bridge.hxx" +#include "currentcontext.hxx" +#include "incomingrequest.hxx" +#include "specialfunctionids.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +} + +IncomingRequest::IncomingRequest( + rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid, + rtl::OUString const & oid, css::uno::UnoInterfaceReference const & object, + css::uno::TypeDescription const & type, sal_uInt16 functionId, + bool synchronous, css::uno::TypeDescription const & member, bool setter, + std::vector< BinaryAny > const & inArguments, bool currentContextMode, + css::uno::UnoInterfaceReference const & currentContext): + bridge_(bridge), tid_(tid), oid_(oid), object_(object), type_(type), + functionId_(functionId), synchronous_(synchronous), member_(member), + setter_(setter), inArguments_(inArguments), + currentContextMode_(currentContextMode), currentContext_(currentContext) +{ + OSL_ASSERT(bridge.is() && member.is() && member.get()->bComplete); +} + +IncomingRequest::~IncomingRequest() {} + +void IncomingRequest::execute() const { + BinaryAny ret; + std::vector< BinaryAny > outArgs; + bool isExc; + try { + bool resetCc = false; + css::uno::UnoInterfaceReference oldCc; + if (currentContextMode_) { + oldCc = current_context::get(); + current_context::set(currentContext_); + resetCc = true; + } + try { + try { + isExc = !execute_throw(&ret, &outArgs); + } catch (std::exception & e) { + throw css::uno::RuntimeException( + (rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("caught C++ exception: ")) + + rtl::OStringToOUString( + rtl::OString(e.what()), RTL_TEXTENCODING_ASCII_US)), + css::uno::Reference< css::uno::XInterface >()); + // best-effort string conversion + } + } catch (css::uno::RuntimeException &) { + css::uno::Any exc(cppu::getCaughtException()); + ret = bridge_->mapCppToBinaryAny(exc); + isExc = true; + } + if (resetCc) { + current_context::set(oldCc); + } + } catch (css::uno::RuntimeException &) { + css::uno::Any exc(cppu::getCaughtException()); + ret = bridge_->mapCppToBinaryAny(exc); + isExc = true; + } + if (synchronous_) { + bridge_->decrementActiveCalls(); + try { + bridge_->getWriter()->queueReply( + tid_, member_, setter_, isExc, ret, outArgs, false); + return; + } catch (css::uno::RuntimeException & e) { + OSL_TRACE( + OSL_LOG_PREFIX "caught UNO runtime exception '%s'", + (rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8). + getStr())); + } catch (std::exception & e) { + OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what()); + } + bridge_->terminate(); + } else { + if (isExc) { + OSL_TRACE(OSL_LOG_PREFIX "oneway method raised exception"); + } + bridge_->decrementCalls(); + } +} + +bool IncomingRequest::execute_throw( + BinaryAny * returnValue, std::vector< BinaryAny > * outArguments) const +{ + OSL_ASSERT( + returnValue != 0 && + returnValue->getType().equals( + css::uno::TypeDescription( + cppu::UnoType< cppu::UnoVoidType >::get())) && + outArguments != 0 && outArguments->empty()); + bool isExc = false; + switch (functionId_) { + case SPECIAL_FUNCTION_ID_RESERVED: + OSL_ASSERT(false); // this cannot happen + break; + case SPECIAL_FUNCTION_ID_RELEASE: + bridge_->releaseStub(oid_, type_); + break; + case SPECIAL_FUNCTION_ID_QUERY_INTERFACE: + if (!object_.is()) { + css::uno::Reference< css::uno::XInterface > ifc; + css::uno::Reference< css::bridge::XInstanceProvider > prov( + bridge_->getProvider()); + if (prov.is()) { + try { + ifc = prov->getInstance(oid_); + } catch (css::container::NoSuchElementException & e) { + OSL_TRACE( + (OSL_LOG_PREFIX "initial element '%s':" + " NoSuchElementException '%s'"), + (rtl::OUStringToOString(oid_, RTL_TEXTENCODING_UTF8). + getStr()), + (rtl::OUStringToOString( + e.Message, RTL_TEXTENCODING_UTF8). + getStr())); + } + } + if (ifc.is()) { + css::uno::UnoInterfaceReference unoIfc( + static_cast< uno_Interface * >( + bridge_->getCppToBinaryMapping().mapInterface( + ifc.get(), + (css::uno::TypeDescription( + cppu::UnoType< + css::uno::Reference< + css::uno::XInterface > >::get()). + get()))), + SAL_NO_ACQUIRE); + *returnValue = BinaryAny( + css::uno::TypeDescription( + cppu::UnoType< + css::uno::Reference< + css::uno::XInterface > >::get()), + &unoIfc.m_pUnoI); + } + break; + } + // fall through + default: + { + OSL_ASSERT(object_.is()); + css::uno::TypeDescription retType; + std::list< std::vector< char > > outBufs; + std::vector< void * > args; + switch (member_.get()->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + { + css::uno::TypeDescription t( + reinterpret_cast< + typelib_InterfaceAttributeTypeDescription * >( + member_.get())-> + pAttributeTypeRef); + if (setter_) { + OSL_ASSERT(inArguments_.size() == 1); + args.push_back(inArguments_[0].getValue(t)); + } else { + OSL_ASSERT(inArguments_.empty()); + retType = t; + } + break; + } + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription * mtd = + reinterpret_cast< + typelib_InterfaceMethodTypeDescription * >( + member_.get()); + retType = css::uno::TypeDescription(mtd->pReturnTypeRef); + std::vector< BinaryAny >::const_iterator i( + inArguments_.begin()); + for (sal_Int32 j = 0; j != mtd->nParams; ++j) { + void * p; + if (mtd->pParams[j].bIn) { + p = i++->getValue( + css::uno::TypeDescription( + mtd->pParams[j].pTypeRef)); + } else { + outBufs.push_back( + std::vector< char >( + css::uno::TypeDescription( + mtd->pParams[j].pTypeRef). + get()->nSize)); + p = &outBufs.back()[0]; + } + args.push_back(p); + if (mtd->pParams[j].bOut) { + outArguments->push_back(BinaryAny()); + } + } + OSL_ASSERT(i == inArguments_.end()); + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + std::vector< char > retBuf(retType.is() ? retType.get()->nSize : 0); + uno_Any exc; + uno_Any * pexc = &exc; + (*object_.get()->pDispatcher)( + object_.get(), member_.get(), retBuf.empty() ? 0 : &retBuf[0], + args.empty() ? 0 : &args[0], &pexc); + isExc = pexc != 0; + if (isExc) { + *returnValue = BinaryAny( + css::uno::TypeDescription( + cppu::UnoType< css::uno::Any >::get()), + &exc); + uno_any_destruct(&exc, 0); + } else { + if (!retBuf.empty()) { + *returnValue = BinaryAny(retType, &retBuf[0]); + uno_destructData(&retBuf[0], retType.get(), 0); + } + if (!outArguments->empty()) { + OSL_ASSERT( + member_.get()->eTypeClass == + typelib_TypeClass_INTERFACE_METHOD); + typelib_InterfaceMethodTypeDescription * mtd = + reinterpret_cast< + typelib_InterfaceMethodTypeDescription * >( + member_.get()); + std::vector< BinaryAny >::iterator i(outArguments->begin()); + std::list< std::vector< char > >::iterator j( + outBufs.begin()); + for (sal_Int32 k = 0; k != mtd->nParams; ++k) { + if (mtd->pParams[k].bOut) { + *i++ = BinaryAny( + css::uno::TypeDescription( + mtd->pParams[k].pTypeRef), + args[k]); + } + if (!mtd->pParams[k].bIn) { + uno_type_destructData( + &(*j++)[0], mtd->pParams[k].pTypeRef, 0); + } + } + OSL_ASSERT(i == outArguments->end()); + OSL_ASSERT(j == outBufs.end()); + } + } + break; + } + } + return !isExc; +} + +} diff --git a/binaryurp/source/incomingrequest.hxx b/binaryurp/source/incomingrequest.hxx new file mode 100644 index 000000000000..ead7067f8ae9 --- /dev/null +++ b/binaryurp/source/incomingrequest.hxx @@ -0,0 +1,86 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_INCOMINGREQUEST_HXX +#define INCLUDED_BINARYURP_SOURCE_INCOMINGREQUEST_HXX + +#include "sal/config.h" + +#include + +#include "boost/noncopyable.hpp" +#include "rtl/byteseq.hxx" +#include "rtl/ref.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typedescription.hxx" +#include "uno/dispatcher.hxx" + +namespace binaryurp { + class BinaryAny; + class Bridge; +} + +namespace binaryurp { + +class IncomingRequest: private boost::noncopyable { +public: + IncomingRequest( + rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid, + rtl::OUString const & oid, + com::sun::star::uno::UnoInterfaceReference const & object, + com::sun::star::uno::TypeDescription const & type, + sal_uInt16 functionId, bool synchronous, + com::sun::star::uno::TypeDescription const & member, bool setter, + std::vector< BinaryAny > const & inArguments, bool currentContextMode, + com::sun::star::uno::UnoInterfaceReference const & currentContext); + + ~IncomingRequest(); + + void execute() const; + +private: + bool execute_throw( + BinaryAny * returnValue, std::vector< BinaryAny > * outArguments) const; + + rtl::Reference< Bridge > bridge_; + rtl::ByteSequence tid_; + rtl::OUString oid_; // initial object queryInterface; release + com::sun::star::uno::UnoInterfaceReference object_; + com::sun::star::uno::TypeDescription type_; + sal_uInt16 functionId_; + bool synchronous_; + com::sun::star::uno::TypeDescription member_; + bool setter_; + std::vector< BinaryAny > inArguments_; + bool currentContextMode_; + com::sun::star::uno::UnoInterfaceReference currentContext_; +}; + +} + +#endif diff --git a/binaryurp/source/lessoperators.cxx b/binaryurp/source/lessoperators.cxx new file mode 100644 index 000000000000..354118625ce8 --- /dev/null +++ b/binaryurp/source/lessoperators.cxx @@ -0,0 +1,71 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include + +#include "osl/diagnose.h" +#include "rtl/byteseq.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typeclass.h" +#include "typelib/typedescription.hxx" + +#include "lessoperators.hxx" + +namespace com { namespace sun { namespace star { namespace uno { + +bool operator <(TypeDescription const & left, TypeDescription const & right) { + OSL_ASSERT(left.is() && right.is()); + typelib_TypeClass tc1 = left.get()->eTypeClass; + typelib_TypeClass tc2 = right.get()->eTypeClass; + return tc1 < tc2 || + (tc1 == tc2 && + (rtl::OUString(left.get()->pTypeName) < + rtl::OUString(right.get()->pTypeName))); +} + +} } } } + +namespace rtl { + +bool operator <(ByteSequence const & left, ByteSequence const & right) { + for (sal_Int32 i = 0; i != std::min(left.getLength(), right.getLength()); + ++i) + { + if (left[i] < right[i]) { + return true; + } + if (right[i] < left[i]) { + return false; + } + } + return left.getLength() < right.getLength(); +} + +} diff --git a/binaryurp/source/lessoperators.hxx b/binaryurp/source/lessoperators.hxx new file mode 100644 index 000000000000..014f0f4d56bf --- /dev/null +++ b/binaryurp/source/lessoperators.hxx @@ -0,0 +1,50 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_LESSOPERATORS_HXX +#define INCLUDED_BINARYURP_SOURCE_LESSOPERATORS_HXX + +#include "sal/config.h" + +namespace com { namespace sun { namespace star { namespace uno { + class TypeDescription; +} } } } +namespace rtl { class ByteSequence; } + +namespace com { namespace sun { namespace star { namespace uno { + +bool operator <(TypeDescription const & left, TypeDescription const & right); + +} } } } + +namespace rtl { + +bool operator <(ByteSequence const & left, ByteSequence const & right); + +} + +#endif diff --git a/binaryurp/source/makefile.mk b/binaryurp/source/makefile.mk new file mode 100644 index 000000000000..ca9e7c72b65d --- /dev/null +++ b/binaryurp/source/makefile.mk @@ -0,0 +1,69 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +PRJ = .. +PRJNAME = binaryurp +TARGET = binaryurp + +ENABLE_EXCEPTIONS = TRUE +VISIBILITY_HIDDEN = TRUE + +.INCLUDE: settings.mk + +DLLPRE = + +SLOFILES = \ + $(SLO)/binaryany.obj \ + $(SLO)/bridge.obj \ + $(SLO)/bridgefactory.obj \ + $(SLO)/currentcontext.obj \ + $(SLO)/incomingrequest.obj \ + $(SLO)/lessoperators.obj \ + $(SLO)/marshal.obj \ + $(SLO)/outgoingrequests.obj \ + $(SLO)/proxy.obj \ + $(SLO)/reader.obj \ + $(SLO)/unmarshal.obj \ + $(SLO)/writer.obj + +SHL1IMPLIB = i$(SHL1TARGET) +SHL1OBJS = $(SLOFILES) +SHL1RPATH = URELIB +SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) +SHL1TARGET = binaryurp.uno +SHL1USE_EXPORTS = name +DEF1NAME = $(SHL1TARGET) + +.INCLUDE: target.mk + +ALLTAR : $(MISC)/binaryurp.component + +$(MISC)/binaryurp.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + binaryurp.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt binaryurp.component diff --git a/binaryurp/source/marshal.cxx b/binaryurp/source/marshal.cxx new file mode 100644 index 000000000000..ce520382efac --- /dev/null +++ b/binaryurp/source/marshal.cxx @@ -0,0 +1,314 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include + +#include "boost/noncopyable.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XInterface.hpp" +#include "cppu/unotype.hxx" +#include "osl/diagnose.h" +#include "rtl/byteseq.hxx" +#include "rtl/string.hxx" +#include "rtl/textcvt.h" +#include "rtl/textenc.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typeclass.h" +#include "typelib/typedescription.h" +#include "typelib/typedescription.hxx" +#include "uno/dispatcher.hxx" + +#include "binaryany.hxx" +#include "bridge.hxx" +#include "cache.hxx" +#include "lessoperators.hxx" +#include "marshal.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +void write64(std::vector< unsigned char > * buffer, sal_uInt64 value) { + Marshal::write8(buffer, value >> 56); + Marshal::write8(buffer, (value >> 48) & 0xFF); + Marshal::write8(buffer, (value >> 40) & 0xFF); + Marshal::write8(buffer, (value >> 32) & 0xFF); + Marshal::write8(buffer, (value >> 24) & 0xFF); + Marshal::write8(buffer, (value >> 16) & 0xFF); + Marshal::write8(buffer, (value >> 8) & 0xFF); + Marshal::write8(buffer, value & 0xFF); +} + +void writeCompressed(std::vector< unsigned char > * buffer, sal_uInt32 value) { + if (value < 0xFF) { + Marshal::write8(buffer, static_cast< sal_uInt8 >(value)); + } else { + Marshal::write8(buffer, 0xFF); + Marshal::write32(buffer, value); + } +} + +void writeString( + std::vector< unsigned char > * buffer, rtl::OUString const & value) +{ + OSL_ASSERT(buffer != 0); + rtl::OString v; + if (!value.convertToString( + &v, RTL_TEXTENCODING_UTF8, + (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | + RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))) + { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "UNO string contains invalid UTF-16 sequence")), + css::uno::Reference< css::uno::XInterface >()); + } + writeCompressed(buffer, static_cast< sal_uInt32 >(v.getLength())); + buffer->insert(buffer->end(), v.getStr(), v.getStr() + v.getLength()); +} + +} + +Marshal::Marshal(rtl::Reference< Bridge > const & bridge, WriterState & state): + bridge_(bridge), state_(state) +{ + OSL_ASSERT(bridge.is()); +} + +Marshal::~Marshal() {} + +void Marshal::write8(std::vector< unsigned char > * buffer, sal_uInt8 value) { + OSL_ASSERT(buffer != 0); + buffer->push_back(value); +} + +void Marshal::write16(std::vector< unsigned char > * buffer, sal_uInt16 value) { + write8(buffer, value >> 8); + write8(buffer, value & 0xFF); +} + +void Marshal::write32(std::vector< unsigned char > * buffer, sal_uInt32 value) { + write8(buffer, value >> 24); + write8(buffer, (value >> 16) & 0xFF); + write8(buffer, (value >> 8) & 0xFF); + write8(buffer, value & 0xFF); +} + +void Marshal::writeValue( + std::vector< unsigned char > * buffer, + css::uno::TypeDescription const & type, BinaryAny const & value) +{ + OSL_ASSERT( + type.is() && + (type.get()->eTypeClass == typelib_TypeClass_ANY || + value.getType().equals(type))); + writeValue(buffer, type, value.getValue(type)); +} + +void Marshal::writeType( + std::vector< unsigned char > * buffer, + css::uno::TypeDescription const & value) +{ + value.makeComplete(); + OSL_ASSERT(value.is()); + typelib_TypeClass tc = value.get()->eTypeClass; + if (tc <= typelib_TypeClass_ANY) { + write8(buffer, static_cast< sal_uInt8 >(tc)); + } else { + bool found; + sal_uInt16 idx = state_.typeCache.add(value, &found); + if (found) { + write8(buffer, static_cast< sal_uInt8 >(tc)); + write16(buffer, idx); + } else { + write8(buffer, static_cast< sal_uInt8 >(tc) | 0x80); + write16(buffer, idx); + writeString(buffer, rtl::OUString(value.get()->pTypeName)); + } + } +} + +void Marshal::writeOid( + std::vector< unsigned char > * buffer, rtl::OUString const & oid) +{ + bool found; + sal_uInt16 idx; + if (oid.getLength() == 0) { + found = true; + idx = cache::ignore; + } else { + idx = state_.oidCache.add(oid, &found); + } + if (found) { + write8(buffer, 0); + } else { + writeString(buffer, oid); + } + write16(buffer, idx); +} + +void Marshal::writeTid( + std::vector< unsigned char > * buffer, rtl::ByteSequence const & tid) +{ + bool found; + sal_uInt16 idx = state_.tidCache.add(tid, &found); + if (found) { + write8(buffer, 0); + } else { + sal_Sequence * p = tid.getHandle(); + writeValue( + buffer, + css::uno::TypeDescription( + cppu::UnoType< css::uno::Sequence< sal_Int8 > >::get()), &p); + } + write16(buffer, idx); +} + +void Marshal::writeValue( + std::vector< unsigned char > * buffer, + css::uno::TypeDescription const & type, void const * value) +{ + OSL_ASSERT(buffer != 0 && type.is()); + type.makeComplete(); + switch (type.get()->eTypeClass) { + case typelib_TypeClass_VOID: + break; + case typelib_TypeClass_BOOLEAN: + OSL_ASSERT(*static_cast< sal_uInt8 const * >(value) <= 1); + // fall through + case typelib_TypeClass_BYTE: + write8(buffer, *static_cast< sal_uInt8 const * >(value)); + break; + case typelib_TypeClass_SHORT: + case typelib_TypeClass_UNSIGNED_SHORT: + case typelib_TypeClass_CHAR: + write16(buffer, *static_cast< sal_uInt16 const * >(value)); + break; + case typelib_TypeClass_LONG: + case typelib_TypeClass_UNSIGNED_LONG: + case typelib_TypeClass_FLOAT: + case typelib_TypeClass_ENUM: + write32(buffer, *static_cast< sal_uInt32 const * >(value)); + break; + case typelib_TypeClass_HYPER: + case typelib_TypeClass_UNSIGNED_HYPER: + case typelib_TypeClass_DOUBLE: + write64(buffer, *static_cast< sal_uInt64 const * >(value)); + break; + case typelib_TypeClass_STRING: + writeString( + buffer, + rtl::OUString(*static_cast< rtl_uString * const * >(value))); + break; + case typelib_TypeClass_TYPE: + writeType( + buffer, + css::uno::TypeDescription( + *static_cast< typelib_TypeDescriptionReference * const * >( + value))); + break; + case typelib_TypeClass_ANY: + { + uno_Any const * p = static_cast< uno_Any const * >(value); + css::uno::TypeDescription t(p->pType); + writeType(buffer, t); + writeValue(buffer, t, p->pData); + break; + } + case typelib_TypeClass_SEQUENCE: + { + sal_Sequence * p = *static_cast< sal_Sequence * const * >(value); + writeCompressed(buffer, static_cast< sal_uInt32 >(p->nElements)); + css::uno::TypeDescription ctd( + reinterpret_cast< typelib_IndirectTypeDescription * >( + type.get())-> + pType); + OSL_ASSERT(ctd.is()); + if (ctd.get()->eTypeClass == typelib_TypeClass_BYTE) { + buffer->insert( + buffer->end(), p->elements, p->elements + p->nElements); + } else { + for (sal_Int32 i = 0; i != p->nElements; ++i) { + writeValue(buffer, ctd, p->elements + i * ctd.get()->nSize); + } + } + break; + } + case typelib_TypeClass_STRUCT: + case typelib_TypeClass_EXCEPTION: + writeMemberValues(buffer, type, value); + break; + case typelib_TypeClass_INTERFACE: + writeOid( + buffer, + bridge_->registerOutgoingInterface( + css::uno::UnoInterfaceReference( + *static_cast< uno_Interface * const * >(value)), + type)); + break; + default: + OSL_ASSERT(false); // this cannot happen + break; + } +} + +void Marshal::writeMemberValues( + std::vector< unsigned char > * buffer, + css::uno::TypeDescription const & type, void const * aggregateValue) +{ + OSL_ASSERT( + type.is() && + (type.get()->eTypeClass == typelib_TypeClass_STRUCT || + type.get()->eTypeClass == typelib_TypeClass_EXCEPTION) && + aggregateValue != 0); + type.makeComplete(); + typelib_CompoundTypeDescription * ctd = + reinterpret_cast< typelib_CompoundTypeDescription * >(type.get()); + if (ctd->pBaseTypeDescription != 0) { + writeMemberValues( + buffer, + css::uno::TypeDescription(&ctd->pBaseTypeDescription->aBase), + aggregateValue); + } + for (sal_Int32 i = 0; i != ctd->nMembers; ++i) { + writeValue( + buffer, css::uno::TypeDescription(ctd->ppTypeRefs[i]), + (static_cast< char const * >(aggregateValue) + + ctd->pMemberOffsets[i])); + } +} + +} diff --git a/binaryurp/source/marshal.hxx b/binaryurp/source/marshal.hxx new file mode 100755 index 000000000000..a922ec1008f6 --- /dev/null +++ b/binaryurp/source/marshal.hxx @@ -0,0 +1,95 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_MARSHAL_HXX +#define INCLUDED_BINARYURP_SOURCE_MARSHAL_HXX + +#include "sal/config.h" + +#include + +#include "boost/noncopyable.hpp" +#include "rtl/byteseq.hxx" +#include "rtl/ref.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typedescription.hxx" + +namespace binaryurp { + class BinaryAny; + class Bridge; + struct WriterState; +} + +namespace binaryurp { + +class Marshal: private boost::noncopyable { +public: + Marshal(rtl::Reference< Bridge > const & bridge, WriterState & state); + + ~Marshal(); + + static void write8(std::vector< unsigned char > * buffer, sal_uInt8 value); + + static void write16( + std::vector< unsigned char > * buffer, sal_uInt16 value); + + static void write32( + std::vector< unsigned char > * buffer, sal_uInt32 value); + + void writeValue( + std::vector< unsigned char > * buffer, + com::sun::star::uno::TypeDescription const & type, + BinaryAny const & value); + + void writeType( + std::vector< unsigned char > * buffer, + com::sun::star::uno::TypeDescription const & value); + + void writeOid( + std::vector< unsigned char > * buffer, rtl::OUString const & oid); + + void writeTid( + std::vector< unsigned char > * buffer, rtl::ByteSequence const & tid); + +private: + void writeValue( + std::vector< unsigned char > * buffer, + com::sun::star::uno::TypeDescription const & type, void const * value); + + void writeMemberValues( + std::vector< unsigned char > * buffer, + com::sun::star::uno::TypeDescription const & type, + void const * aggregateValue); + + rtl::Reference< Bridge > bridge_; + WriterState & state_; +}; + +} + +#endif diff --git a/binaryurp/source/outgoingrequest.hxx b/binaryurp/source/outgoingrequest.hxx new file mode 100644 index 000000000000..7fe67bf96a3b --- /dev/null +++ b/binaryurp/source/outgoingrequest.hxx @@ -0,0 +1,55 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_OUTGOINGREQUEST_HXX +#define INCLUDED_BINARYURP_SOURCE_OUTGOINGREQUEST_HXX + +#include "sal/config.h" + +#include "typelib/typedescription.hxx" + +namespace binaryurp { + +struct OutgoingRequest { + enum Kind { KIND_NORMAL, KIND_REQUEST_CHANGE, KIND_COMMIT_CHANGE }; + + OutgoingRequest( + Kind theKind, com::sun::star::uno::TypeDescription const & theMember, + bool theSetter): + kind(theKind), member(theMember), setter(theSetter) + {} + + Kind kind; + + com::sun::star::uno::TypeDescription member; + + bool setter; +}; + +} + +#endif diff --git a/binaryurp/source/outgoingrequests.cxx b/binaryurp/source/outgoingrequests.cxx new file mode 100644 index 000000000000..388b7755466f --- /dev/null +++ b/binaryurp/source/outgoingrequests.cxx @@ -0,0 +1,80 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include "com/sun/star/uno/RuntimeException.hpp" +#include "rtl/byteseq.hxx" +#include "osl/mutex.hxx" + +#include "lessoperators.hxx" +#include "outgoingrequest.hxx" +#include "outgoingrequests.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +} + +OutgoingRequests::OutgoingRequests() {} + +OutgoingRequests::~OutgoingRequests() {} + +void OutgoingRequests::push( + rtl::ByteSequence const & tid, OutgoingRequest const & request) +{ + osl::MutexGuard g(mutex_); + map_[tid].push_back(request); +} + +OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const & tid) { + osl::MutexGuard g(mutex_); + Map::iterator i(map_.find(tid)); + if (i == map_.end()) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("URP: reply for unknown TID")), + css::uno::Reference< css::uno::XInterface >()); + } + OSL_ASSERT(!i->second.empty()); + return i->second.back(); +} + +void OutgoingRequests::pop(rtl::ByteSequence const & tid) throw () { + osl::MutexGuard g(mutex_); + Map::iterator i(map_.find(tid)); + OSL_ASSERT(i != map_.end()); + i->second.pop_back(); + if (i->second.empty()) { + map_.erase(i); + } +} + +} diff --git a/binaryurp/source/outgoingrequests.hxx b/binaryurp/source/outgoingrequests.hxx new file mode 100644 index 000000000000..92ee622bf682 --- /dev/null +++ b/binaryurp/source/outgoingrequests.hxx @@ -0,0 +1,65 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_OUTGOINGREQUESTS_HXX +#define INCLUDED_BINARYURP_SOURCE_OUTGOINGREQUESTS_HXX + +#include "sal/config.h" + +#include +#include + +#include "boost/noncopyable.hpp" +#include "osl/mutex.hxx" + +namespace binaryurp { struct OutgoingRequest; } +namespace rtl { class ByteSequence; } + +namespace binaryurp { + +class OutgoingRequests: private boost::noncopyable { +public: + OutgoingRequests(); + + ~OutgoingRequests(); + + void push(rtl::ByteSequence const & tid, OutgoingRequest const & request); + + OutgoingRequest top(rtl::ByteSequence const & tid); + + void pop(rtl::ByteSequence const & tid) throw (); + +private: + typedef std::map< rtl::ByteSequence, std::vector< OutgoingRequest > > Map; + + osl::Mutex mutex_; + Map map_; +}; + +} + +#endif diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx new file mode 100644 index 000000000000..876199e7bc17 --- /dev/null +++ b/binaryurp/source/proxy.cxx @@ -0,0 +1,260 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include +#include + +#include "cppuhelper/exc_hlp.hxx" +#include "osl/diagnose.h" +#include "rtl/ref.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typedescription.h" +#include "typelib/typedescription.hxx" +#include "uno/any2.h" +#include "uno/dispatcher.h" +#include "uno/dispatcher.hxx" + +#include "binaryany.hxx" +#include "bridge.hxx" +#include "proxy.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +extern "C" void SAL_CALL proxy_acquireInterface(uno_Interface * pInterface) { + OSL_ASSERT(pInterface != 0); + static_cast< Proxy * >(pInterface)->do_acquire(); +} + +extern "C" void SAL_CALL proxy_releaseInterface(uno_Interface * pInterface) { + OSL_ASSERT(pInterface != 0); + static_cast< Proxy * >(pInterface)->do_release(); +} + +extern "C" void SAL_CALL proxy_dispatchInterface( + uno_Interface * pUnoI, typelib_TypeDescription const * pMemberType, + void * pReturn, void ** pArgs, uno_Any ** ppException) +{ + OSL_ASSERT(pUnoI != 0); + static_cast< Proxy * >(pUnoI)->do_dispatch( + pMemberType, pReturn, pArgs, ppException); +} + +} + +Proxy::Proxy( + rtl::Reference< Bridge > const & bridge, rtl::OUString const & oid, + css::uno::TypeDescription const & type): + bridge_(bridge), oid_(oid), type_(type), references_(1) +{ + OSL_ASSERT(bridge.is()); + acquire = &proxy_acquireInterface; + release = &proxy_releaseInterface; + pDispatcher = &proxy_dispatchInterface; +} + +rtl::OUString Proxy::getOid() const { + return oid_; +} + +css::uno::TypeDescription Proxy::getType() const { + return type_; +} + +void Proxy::do_acquire() { + if (osl_incrementInterlockedCount(&references_) == 1) { + bridge_->resurrectProxy(*this); + } +} + +void Proxy::do_release() { + if (osl_decrementInterlockedCount(&references_) == 0) { + bridge_->revokeProxy(*this); + } +} + +void Proxy::do_free() { + bridge_->freeProxy(*this); + delete this; +} + +void Proxy::do_dispatch( + typelib_TypeDescription const * member, void * returnValue, + void ** arguments, uno_Any ** exception) const +{ + try { + try { + do_dispatch_throw(member, returnValue, arguments, exception); + } catch (std::exception & e) { + throw css::uno::RuntimeException( + (rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("caught C++ exception: ")) + + rtl::OStringToOUString( + rtl::OString(e.what()), RTL_TEXTENCODING_ASCII_US)), + css::uno::Reference< css::uno::XInterface >()); + // best-effort string conversion + } + } catch (css::uno::RuntimeException &) { + css::uno::Any exc(cppu::getCaughtException()); + uno_copyAndConvertData( + *exception, &exc, + (css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get()). + get()), + bridge_->getCppToBinaryMapping().get()); + } +} + +bool Proxy::isProxy( + rtl::Reference< Bridge > const & bridge, + css::uno::UnoInterfaceReference const & object, rtl::OUString * oid) +{ + OSL_ASSERT(object.is()); + return object.m_pUnoI->acquire == &proxy_acquireInterface && + static_cast< Proxy * >(object.m_pUnoI)->isProxy(bridge, oid); +} + +Proxy::~Proxy() {} + +void Proxy::do_dispatch_throw( + typelib_TypeDescription const * member, void * returnValue, + void ** arguments, uno_Any ** exception) const +{ + //TODO: Optimize queryInterface: + OSL_ASSERT(member != 0); + bool setter = false; + std::vector< BinaryAny > inArgs; + switch (member->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + setter = returnValue == 0; + if (setter) { + inArgs.push_back( + BinaryAny( + css::uno::TypeDescription( + reinterpret_cast< + typelib_InterfaceAttributeTypeDescription const * >( + member)-> + pAttributeTypeRef), + arguments[0])); + } + break; + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription const * mtd = + reinterpret_cast< + typelib_InterfaceMethodTypeDescription const * >(member); + for (sal_Int32 i = 0; i != mtd->nParams; ++i) { + if (mtd->pParams[i].bIn) { + inArgs.push_back( + BinaryAny( + css::uno::TypeDescription(mtd->pParams[i].pTypeRef), + arguments[i])); + } + } + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + BinaryAny ret; + std::vector< BinaryAny > outArgs; + if (bridge_->makeCall( + oid_, + css::uno::TypeDescription( + const_cast< typelib_TypeDescription * >(member)), + setter, inArgs, &ret, &outArgs)) + { + OSL_ASSERT( + ret.getType().get()->eTypeClass == typelib_TypeClass_EXCEPTION); + uno_any_construct( + *exception, ret.getValue(ret.getType()), ret.getType().get(), 0); + } else { + switch (member->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + if (!setter) { + css::uno::TypeDescription t( + reinterpret_cast< + typelib_InterfaceAttributeTypeDescription const * >( + member)-> + pAttributeTypeRef); + uno_copyData(returnValue, ret.getValue(t), t.get(), 0); + } + break; + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription const * mtd = + reinterpret_cast< + typelib_InterfaceMethodTypeDescription const * >( + member); + css::uno::TypeDescription t(mtd->pReturnTypeRef); + if (t.get()->eTypeClass != typelib_TypeClass_VOID) { + uno_copyData(returnValue, ret.getValue(t), t.get(), 0); + } + std::vector< BinaryAny >::iterator i(outArgs.begin()); + for (sal_Int32 j = 0; j != mtd->nParams; ++j) { + if (mtd->pParams[j].bOut) { + css::uno::TypeDescription pt(mtd->pParams[j].pTypeRef); + if (mtd->pParams[j].bIn) { + uno_assignData( + arguments[j], pt.get(), i++->getValue(pt), + pt.get(), 0, 0, 0); + } else { + uno_copyData( + arguments[j], i++->getValue(pt), pt.get(), 0); + } + } + } + OSL_ASSERT(i == outArgs.end()); + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + *exception = 0; + } +} + +bool Proxy::isProxy( + rtl::Reference< Bridge > const & bridge, rtl::OUString * oid) const +{ + OSL_ASSERT(oid != 0); + if (bridge == bridge_) { + *oid = oid_; + return true; + } else { + return false; + } +} + +} diff --git a/binaryurp/source/proxy.hxx b/binaryurp/source/proxy.hxx new file mode 100644 index 000000000000..c67ab4eb522a --- /dev/null +++ b/binaryurp/source/proxy.hxx @@ -0,0 +1,92 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_PROXY_HXX +#define INCLUDED_BINARYURP_SOURCE_PROXY_HXX + +#include "sal/config.h" + +#include "boost/noncopyable.hpp" +#include "osl/interlck.h" +#include "rtl/ref.hxx" +#include "rtl/ustring.hxx" +#include "typelib/typedescription.h" +#include "typelib/typedescription.hxx" +#include "uno/any2.h" +#include "uno/dispatcher.h" + +namespace binaryurp { class Bridge; } +namespace com { namespace sun { namespace star { namespace uno { + class UnoInterfaceReference; +} } } } + +namespace binaryurp { + +class Proxy: public uno_Interface, private boost::noncopyable { +public: + Proxy( + rtl::Reference< Bridge > const & bridge, rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type); + + rtl::OUString getOid() const; + + com::sun::star::uno::TypeDescription getType() const; + + void do_acquire(); + + void do_release(); + + void do_free(); + + void do_dispatch( + typelib_TypeDescription const * member, void * returnValue, + void ** arguments, uno_Any ** exception) const; + + static bool isProxy( + rtl::Reference< Bridge > const & bridge, + com::sun::star::uno::UnoInterfaceReference const & object, + rtl::OUString * oid); + +private: + ~Proxy(); + + void do_dispatch_throw( + typelib_TypeDescription const * member, void * returnValue, + void ** arguments, uno_Any ** exception) const; + + bool isProxy(rtl::Reference< Bridge > const & bridge, rtl::OUString * oid) + const; + + rtl::Reference< Bridge > bridge_; + rtl::OUString oid_; + com::sun::star::uno::TypeDescription type_; + oslInterlockedCount references_; +}; + +} + +#endif diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx new file mode 100755 index 000000000000..7ffdb34fe89f --- /dev/null +++ b/binaryurp/source/reader.cxx @@ -0,0 +1,552 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include +#include +#include + +#include "com/sun/star/connection/XConnection.hpp" +#include "com/sun/star/io/IOException.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/Type.hxx" +#include "com/sun/star/uno/XCurrentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "cppu/unotype.hxx" +#include "osl/diagnose.h" +#include "rtl/byteseq.h" +#include "rtl/string.h" +#include "rtl/textenc.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typeclass.h" +#include "typelib/typedescription.h" +#include "typelib/typedescription.hxx" +#include "uno/lbnames.h" + +#include "binaryany.hxx" +#include "bridge.hxx" +#include "incomingreply.hxx" +#include "incomingrequest.hxx" +#include "outgoingrequest.hxx" +#include "reader.hxx" +#include "specialfunctionids.hxx" +#include "unmarshal.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +css::uno::Sequence< sal_Int8 > read( + css::uno::Reference< css::connection::XConnection > const & connection, + sal_uInt32 size, bool eofOk) +{ + OSL_ASSERT(connection.is()); + if (size > SAL_MAX_INT32) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Reader: block size too large")), + css::uno::Reference< css::uno::XInterface >()); + } + css::uno::Sequence< sal_Int8 > buf; + sal_Int32 n = connection->read(buf, static_cast< sal_Int32 >(size)); + if (n == 0 && eofOk) { + return css::uno::Sequence< sal_Int8 >(); + } + if (n != static_cast< sal_Int32 >(size)) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Reader: premature end of input")), + css::uno::Reference< css::uno::XInterface >()); + } + OSL_ASSERT(buf.getLength() == static_cast< sal_Int32 >(size)); + return buf; +} + +extern "C" void SAL_CALL request(void * pThreadSpecificData) { + OSL_ASSERT(pThreadSpecificData != 0); + std::auto_ptr< IncomingRequest >( + static_cast< IncomingRequest * >(pThreadSpecificData))-> + execute(); +} + +} + +Reader::Reader(rtl::Reference< Bridge > const & bridge): bridge_(bridge) { + OSL_ASSERT(bridge.is()); + acquire(); +} + +Reader::~Reader() {} + +void Reader::run() { + try { + bridge_->sendRequestChangeRequest(); + css::uno::Reference< css::connection::XConnection > con( + bridge_->getConnection()); + for (;;) { + css::uno::Sequence< sal_Int8 > s(read(con, 8, true)); + if (s.getLength() == 0) { + break; + } + Unmarshal header(bridge_, state_, s); + sal_uInt32 size = header.read32(); + sal_uInt32 count = header.read32(); + header.done(); + if (count == 0) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Reader: block with zero message count" + " received")), + css::uno::Reference< css::uno::XInterface >()); + } + Unmarshal block(bridge_, state_, read(con, size, false)); + for (sal_uInt32 i = 0; i != count; ++i) { + readMessage(block); + } + block.done(); + } + } catch (css::uno::Exception & e) { + OSL_TRACE( + OSL_LOG_PREFIX "caught UNO exception '%s'", + rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); + } catch (std::exception & e) { + OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what()); + } + bridge_->terminate(); +} + +void Reader::onTerminated() { + release(); +} + +void Reader::readMessage(Unmarshal & unmarshal) { + sal_uInt8 flags1 = unmarshal.read8(); + bool newType; + bool newOid; + bool newTid; + bool forceSynchronous; + sal_uInt16 functionId; + if ((flags1 & 0x80) != 0) { // bit 7: LONGHEADER + if ((flags1 & 0x40) == 0) { // bit 6: REQUEST + readReplyMessage(unmarshal, flags1); + return; + } + newType = (flags1 & 0x20) != 0; // bit 5: NEWTYPE + newOid = (flags1 & 0x10) != 0; // bit 4: NEWOID + newTid = (flags1 & 0x08) != 0; // bit 3: NEWTID + if ((flags1 & 0x01) != 0) { // bit 0: MOREFLAGSS + sal_uInt8 flags2 = unmarshal.read8(); + forceSynchronous = (flags2 & 0x80) != 0; // bit 7: MUSTREPLY + if (((flags2 & 0x40) != 0) != forceSynchronous) { + // bit 6: SYNCHRONOUS + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: request message with MUSTREPLY != SYNCHRONOUS" + " received")), + css::uno::Reference< css::uno::XInterface >()); + } + } else { + forceSynchronous = false; + } + functionId = ((flags1 & 0x04) != 0) // bit 2: FUNCTIONID16 + ? unmarshal.read16() : unmarshal.read8(); + } else { + newType = false; + newOid = false; + newTid = false; + forceSynchronous = false; + functionId = ((flags1 & 0x40) != 0) // bit 6: FUNCTIONID14 + ? ((flags1 & 0x3F) << 8) | unmarshal.read8() : flags1 & 0x3F; + } + css::uno::TypeDescription type; + if (newType) { + type = unmarshal.readType(); + lastType_ = type; + } else { + if (!lastType_.is()) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: request message with NEWTYPE received when last" + " interface type has not yet been set")), + css::uno::Reference< css::uno::XInterface >()); + } + type = lastType_; + } + rtl::OUString oid; + if (newOid) { + oid = unmarshal.readOid(); + if (oid.getLength() == 0) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: emtpy OID")), + css::uno::Reference< css::uno::XInterface >()); + } + lastOid_ = oid; + } else { + if (lastOid_.getLength() == 0) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: request message with NEWOID received when last" + " OID has not yet been set")), + css::uno::Reference< css::uno::XInterface >()); + } + oid = lastOid_; + } + rtl::ByteSequence tid(getTid(unmarshal, newTid)); + lastTid_ = tid; + type.makeComplete(); + if (type.get()->eTypeClass != typelib_TypeClass_INTERFACE) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: request message with non-interface interface type" + " received")), + css::uno::Reference< css::uno::XInterface >()); + } + typelib_InterfaceTypeDescription * itd = + reinterpret_cast< typelib_InterfaceTypeDescription * >(type.get()); + if (functionId >= itd->nMapFunctionIndexToMemberIndex) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: request message with unknown function ID received")), + css::uno::Reference< css::uno::XInterface >()); + } + sal_Int32 memberId = itd->pMapFunctionIndexToMemberIndex[functionId]; + css::uno::TypeDescription memberTd(itd->ppAllMembers[memberId]); + memberTd.makeComplete(); + OSL_ASSERT(memberTd.is()); + bool protProps = bridge_->isProtocolPropertiesRequest(oid, type); + bool ccMode = !protProps && functionId != SPECIAL_FUNCTION_ID_RELEASE && + bridge_->isCurrentContextMode(); + css::uno::UnoInterfaceReference cc; + if (ccMode) { + css::uno::TypeDescription t( + cppu::UnoType< css::uno::Reference< css::uno::XCurrentContext > >:: + get()); + cc.set( + *static_cast< uno_Interface ** >( + unmarshal.readValue(t).getValue(t))); + } + bool synchronous; + if (memberTd.get()->eTypeClass == typelib_TypeClass_INTERFACE_METHOD && + (reinterpret_cast< typelib_InterfaceMethodTypeDescription * >( + memberTd.get())-> + bOneWay)) + { + synchronous = forceSynchronous; + } else { + if (forceSynchronous) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: synchronous request message with non-oneway" + " function ID received")), + css::uno::Reference< css::uno::XInterface >()); + } + synchronous = true; + } + bool setter = false; + std::vector< BinaryAny > inArgs; + switch (memberTd.get()->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + setter = itd->pMapMemberIndexToFunctionIndex[memberId] != functionId; + // pMapMemberIndexToFunctionIndex contains function index of + // attribute getter + if (setter) { + inArgs.push_back( + unmarshal.readValue( + css::uno::TypeDescription( + reinterpret_cast< + typelib_InterfaceAttributeTypeDescription * >( + memberTd.get())-> + pAttributeTypeRef))); + } + break; + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription * mtd = + reinterpret_cast< typelib_InterfaceMethodTypeDescription * >( + memberTd.get()); + for (sal_Int32 i = 0; i != mtd->nParams; ++i) { + if (mtd->pParams[i].bIn) { + inArgs.push_back( + unmarshal.readValue( + css::uno::TypeDescription( + mtd->pParams[i].pTypeRef))); + } + } + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + bridge_->incrementCalls( + !protProps && functionId != SPECIAL_FUNCTION_ID_RELEASE); + if (protProps) { + switch (functionId) { + case SPECIAL_FUNCTION_ID_REQUEST_CHANGE: + bridge_->handleRequestChangeRequest(tid, inArgs); + break; + case SPECIAL_FUNCTION_ID_COMMIT_CHANGE: + bridge_->handleCommitChangeRequest(tid, inArgs); + break; + default: + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: request message with UrpProtocolProperties OID" + " and unknown function ID received")), + css::uno::Reference< css::uno::XInterface >()); + } + } else { + css::uno::UnoInterfaceReference obj; + switch (functionId) { + case SPECIAL_FUNCTION_ID_QUERY_INTERFACE: + obj = bridge_->findStub(oid, type); + if (!obj.is()) { + OSL_ASSERT( + inArgs.size() == 1 + && inArgs[0].getType().equals( + css::uno::TypeDescription( + cppu::UnoType< css::uno::Type >::get()))); + if (!(type.equals( + css::uno::TypeDescription( + cppu::UnoType< + css::uno::Reference< + css::uno::XInterface > >::get())) + && (css::uno::TypeDescription( + *static_cast< + typelib_TypeDescriptionReference ** >( + inArgs[0].getValue(inArgs[0].getType()))). + equals( + css::uno::TypeDescription( + cppu::UnoType< + css::uno::Reference< + css::uno::XInterface > >::get()))))) + { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: queryInterface request message with" + " unknown OID received")), + css::uno::Reference< css::uno::XInterface >()); + } + } + break; + case SPECIAL_FUNCTION_ID_RESERVED: + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: request message with unknown function ID 1" + " received")), + css::uno::Reference< css::uno::XInterface >()); + case SPECIAL_FUNCTION_ID_RELEASE: + break; + default: + obj = bridge_->findStub(oid, type); + if (!obj.is()) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: request message with unknown OID received")), + css::uno::Reference< css::uno::XInterface >()); + } + break; + } + std::auto_ptr< IncomingRequest > req( + new IncomingRequest( + bridge_, tid, oid, obj, type, functionId, synchronous, memberTd, + setter, inArgs, ccMode, cc)); + if (synchronous) { + bridge_->incrementActiveCalls(); + } + uno_threadpool_putJob( + bridge_->getThreadPool(), tid.getHandle(), req.get(), &request, + !synchronous); + req.release(); + } +} + +void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) { + rtl::ByteSequence tid(getTid(unmarshal, (flags1 & 0x08) != 0)); + // bit 3: NEWTID + lastTid_ = tid; + OutgoingRequest req(bridge_->lastOutgoingRequest(tid)); + bool exc = (flags1 & 0x20) != 0; // bit 5: EXCEPTION + BinaryAny ret; + std::vector< BinaryAny > outArgs; + if (exc) { + ret = unmarshal.readValue( + css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get())); + if (!typelib_typedescription_isAssignableFrom( + (css::uno::TypeDescription( + cppu::UnoType< css::uno::RuntimeException >::get()). + get()), + ret.getType().get())) + { + sal_Int32 n = 0; + typelib_TypeDescriptionReference ** p = 0; + switch (req.member.get()->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + { + typelib_InterfaceAttributeTypeDescription * atd = + reinterpret_cast< + typelib_InterfaceAttributeTypeDescription * >( + req.member.get()); + n = req.setter ? atd->nSetExceptions : atd->nGetExceptions; + p = req.setter + ? atd->ppSetExceptions : atd->ppGetExceptions; + break; + } + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription * mtd = + reinterpret_cast< + typelib_InterfaceMethodTypeDescription * >( + req.member.get()); + n = mtd->nExceptions; + p = mtd->ppExceptions; + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + bool ok = false; + for (sal_Int32 i = 0; i != n; ++i) { + if (typelib_typedescriptionreference_isAssignableFrom( + p[i], + reinterpret_cast< typelib_TypeDescriptionReference * >( + ret.getType().get()))) + { + ok = true; + break; + } + } + if (!ok) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: reply message with bad exception type" + " received")), + css::uno::Reference< css::uno::XInterface >()); + } + } + } else { + switch (req.member.get()->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + if (!req.setter) { + ret = unmarshal.readValue( + css::uno::TypeDescription( + reinterpret_cast< + typelib_InterfaceAttributeTypeDescription * >( + req.member.get())-> + pAttributeTypeRef)); + } + break; + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription * mtd = + reinterpret_cast< + typelib_InterfaceMethodTypeDescription * >( + req.member.get()); + ret = unmarshal.readValue( + css::uno::TypeDescription(mtd->pReturnTypeRef)); + for (sal_Int32 i = 0; i != mtd->nParams; ++i) { + if (mtd->pParams[i].bOut) { + outArgs.push_back( + unmarshal.readValue( + css::uno::TypeDescription( + mtd->pParams[i].pTypeRef))); + } + } + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + } + switch (req.kind) { + case OutgoingRequest::KIND_NORMAL: + { + std::auto_ptr< IncomingReply > resp( + new IncomingReply(exc, ret, outArgs)); + uno_threadpool_putJob( + bridge_->getThreadPool(), tid.getHandle(), resp.get(), 0, + false); + resp.release(); + break; + } + case OutgoingRequest::KIND_REQUEST_CHANGE: + OSL_ASSERT(outArgs.empty()); + bridge_->handleRequestChangeReply(exc, ret); + break; + case OutgoingRequest::KIND_COMMIT_CHANGE: + OSL_ASSERT(outArgs.empty()); + bridge_->handleCommitChangeReply(exc, ret); + break; + default: + OSL_ASSERT(false); // this cannot happen + break; + } +} + +rtl::ByteSequence Reader::getTid(Unmarshal & unmarshal, bool newTid) const { + if (newTid) { + return unmarshal.readTid(); + } + if (lastTid_.getLength() == 0) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "URP: message with NEWTID received when last TID has not" + " yet been set")), + css::uno::Reference< css::uno::XInterface >()); + } + return lastTid_; +} + +} diff --git a/binaryurp/source/reader.hxx b/binaryurp/source/reader.hxx new file mode 100644 index 000000000000..37d0b9462ae4 --- /dev/null +++ b/binaryurp/source/reader.hxx @@ -0,0 +1,89 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_READER_HXX +#define INCLUDED_BINARYURP_SOURCE_READER_HXX + +#include "sal/config.h" + +#include + +#include "boost/noncopyable.hpp" +#include "osl/thread.hxx" +#include "rtl/byteseq.hxx" +#include "rtl/ref.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "salhelper/simplereferenceobject.hxx" +#include "typelib/typedescription.hxx" + +#include "readerstate.hxx" + +namespace binaryurp { + class BinaryAny; + class Bridge; + class Unmarshal; +} + +namespace binaryurp { + +class Reader: + public osl::Thread, public salhelper::SimpleReferenceObject, + private boost::noncopyable +{ +public: + static void * operator new(std::size_t size) + { return Thread::operator new(size); } + + static void operator delete(void * pointer) + { Thread::operator delete(pointer); } + + explicit Reader(rtl::Reference< Bridge > const & bridge); + +private: + virtual ~Reader(); + + virtual void SAL_CALL run(); + + virtual void SAL_CALL onTerminated(); + + void readMessage(Unmarshal & unmarshal); + + void readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1); + + rtl::ByteSequence getTid(Unmarshal & unmarshal, bool newTid) const; + + rtl::Reference< Bridge > bridge_; + com::sun::star::uno::TypeDescription lastType_; + rtl::OUString lastOid_; + rtl::ByteSequence lastTid_; + ReaderState state_; +}; + +} + +#endif diff --git a/binaryurp/source/readerstate.hxx b/binaryurp/source/readerstate.hxx new file mode 100644 index 000000000000..ef7ed4d7196f --- /dev/null +++ b/binaryurp/source/readerstate.hxx @@ -0,0 +1,52 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_READERSTATE_HXX +#define INCLUDED_BINARYURP_SOURCE_READERSTATE_HXX + +#include "sal/config.h" + +#include "boost/noncopyable.hpp" +#include "rtl/byteseq.hxx" +#include "rtl/ustring.hxx" +#include "typelib/typedescription.hxx" + +#include "cache.hxx" + +namespace binaryurp { + +struct ReaderState: private boost::noncopyable { + com::sun::star::uno::TypeDescription typeCache[cache::size]; + + rtl::OUString oidCache[cache::size]; + + rtl::ByteSequence tidCache[cache::size]; +}; + +} + +#endif diff --git a/binaryurp/source/specialfunctionids.hxx b/binaryurp/source/specialfunctionids.hxx new file mode 100644 index 000000000000..a2a59791ba09 --- /dev/null +++ b/binaryurp/source/specialfunctionids.hxx @@ -0,0 +1,49 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_SPECIALFUNCTIONIDS_HXX +#define INCLUDED_BINARYURP_SOURCE_SPECIALFUNCTIONIDS_HXX + +#include "sal/config.h" + +namespace binaryurp { + +enum SpecialFunctionIds { + SPECIAL_FUNCTION_ID_QUERY_INTERFACE = 0, + + SPECIAL_FUNCTION_ID_RESERVED = 1, + + SPECIAL_FUNCTION_ID_RELEASE = 2, + + SPECIAL_FUNCTION_ID_REQUEST_CHANGE = 4, + + SPECIAL_FUNCTION_ID_COMMIT_CHANGE = 5 +}; + +} + +#endif diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx new file mode 100755 index 000000000000..62f8683e33ad --- /dev/null +++ b/binaryurp/source/unmarshal.cxx @@ -0,0 +1,563 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include +#include +#include + +#include "boost/noncopyable.hpp" +#include "com/sun/star/io/IOException.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XInterface.hpp" +#include "cppu/unotype.hxx" +#include "osl/diagnose.h" +#include "rtl/byteseq.hxx" +#include "rtl/ref.hxx" +#include "rtl/textcvt.h" +#include "rtl/textenc.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "typelib/typeclass.h" +#include "typelib/typedescription.h" +#include "typelib/typedescription.hxx" +#include "uno/any2.h" +#include "uno/data.h" +#include "uno/dispatcher.hxx" + +#include "binaryany.hxx" +#include "bridge.hxx" +#include "cache.hxx" +#include "readerstate.hxx" +#include "unmarshal.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +void * allocate(sal_Size size) { + void * p = rtl_allocateMemory(size); + if (p == 0) { + throw std::bad_alloc(); + } + return p; +} + +std::vector< BinaryAny >::iterator copyMemberValues( + css::uno::TypeDescription const & type, + std::vector< BinaryAny >::iterator const & it, void * buffer) throw () +{ + OSL_ASSERT( + type.is() && + (type.get()->eTypeClass == typelib_TypeClass_STRUCT || + type.get()->eTypeClass == typelib_TypeClass_EXCEPTION) && + buffer != 0); + type.makeComplete(); + std::vector< BinaryAny >::iterator i(it); + typelib_CompoundTypeDescription * ctd = + reinterpret_cast< typelib_CompoundTypeDescription * >(type.get()); + if (ctd->pBaseTypeDescription != 0) { + i = copyMemberValues( + css::uno::TypeDescription(&ctd->pBaseTypeDescription->aBase), i, + buffer); + } + for (sal_Int32 j = 0; j != ctd->nMembers; ++j) { + uno_type_copyData( + static_cast< char * >(buffer) + ctd->pMemberOffsets[j], + const_cast< void * >( + i++->getValue(css::uno::TypeDescription(ctd->ppTypeRefs[j]))), + ctd->ppTypeRefs[j], 0); + } + return i; +} + +} + +Unmarshal::Unmarshal( + rtl::Reference< Bridge > const & bridge, ReaderState & state, + css::uno::Sequence< sal_Int8 > const & buffer): + bridge_(bridge), state_(state), buffer_(buffer) +{ + data_ = reinterpret_cast< sal_uInt8 const * >(buffer_.getConstArray()); + end_ = data_ + buffer_.getLength(); +} + +Unmarshal::~Unmarshal() {} + +sal_uInt8 Unmarshal::read8() { + check(1); + return *data_++; +} + +sal_uInt16 Unmarshal::read16() { + check(2); + sal_uInt16 n = static_cast< sal_uInt16 >(*data_++) << 8; + return n | *data_++; +} + +sal_uInt32 Unmarshal::read32() { + check(4); + sal_uInt32 n = static_cast< sal_uInt32 >(*data_++) << 24; + n |= static_cast< sal_uInt32 >(*data_++) << 16; + n |= static_cast< sal_uInt32 >(*data_++) << 8; + return n | *data_++; +} + +css::uno::TypeDescription Unmarshal::readType() { + sal_uInt8 flags = read8(); + typelib_TypeClass tc = static_cast< typelib_TypeClass >(flags & 0x7F); + switch (tc) { + case typelib_TypeClass_VOID: + case typelib_TypeClass_BOOLEAN: + case typelib_TypeClass_BYTE: + case typelib_TypeClass_SHORT: + case typelib_TypeClass_UNSIGNED_SHORT: + case typelib_TypeClass_LONG: + case typelib_TypeClass_UNSIGNED_LONG: + case typelib_TypeClass_HYPER: + case typelib_TypeClass_UNSIGNED_HYPER: + case typelib_TypeClass_FLOAT: + case typelib_TypeClass_DOUBLE: + case typelib_TypeClass_CHAR: + case typelib_TypeClass_STRING: + case typelib_TypeClass_TYPE: + case typelib_TypeClass_ANY: + if ((flags & 0x80) != 0) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: cache flag of simple type is" + " set")), + css::uno::Reference< css::uno::XInterface >()); + } + return css::uno::TypeDescription( + *typelib_static_type_getByTypeClass( + static_cast< typelib_TypeClass >(tc))); + case typelib_TypeClass_SEQUENCE: + case typelib_TypeClass_ENUM: + case typelib_TypeClass_STRUCT: + case typelib_TypeClass_EXCEPTION: + case typelib_TypeClass_INTERFACE: + { + sal_uInt16 idx = readCacheIndex(); + if ((flags & 0x80) == 0) { + if (idx == cache::ignore || !state_.typeCache[idx].is()) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: unknown type cache" + " index")), + css::uno::Reference< css::uno::XInterface >()); + } + return state_.typeCache[idx]; + } else { + css::uno::TypeDescription t(readString()); + if (!t.is() || + t.get()->eTypeClass != static_cast< typelib_TypeClass >(tc)) + { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: type with unknown" + " name")), + css::uno::Reference< css::uno::XInterface >()); + } + for (css::uno::TypeDescription t2(t); + t2.get()->eTypeClass == typelib_TypeClass_SEQUENCE;) + { + t2.makeComplete(); + t2 = css::uno::TypeDescription( + reinterpret_cast< typelib_IndirectTypeDescription * >( + t2.get())->pType); + if (!t2.is()) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: sequence type with" + " unknown component type")), + css::uno::Reference< css::uno::XInterface >()); + } + switch (t2.get()->eTypeClass) { + case typelib_TypeClass_VOID: + case typelib_TypeClass_EXCEPTION: + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: sequence type with" + " bad component type")), + css::uno::Reference< css::uno::XInterface >()); + default: + break; + } + } + if (idx != cache::ignore) { + state_.typeCache[idx] = t; + } + return t; + } + } + default: + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: type of unknown type class")), + css::uno::Reference< css::uno::XInterface >()); + } +} + +rtl::OUString Unmarshal::readOid() { + rtl::OUString oid(readString()); + for (sal_Int32 i = 0; i != oid.getLength(); ++i) { + if (oid[i] > 0x7F) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: OID contains non-ASCII" + " character")), + css::uno::Reference< css::uno::XInterface >()); + } + } + sal_uInt16 idx = readCacheIndex(); + if (oid.getLength() == 0 && idx != cache::ignore) { + if (state_.oidCache[idx].getLength() == 0) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: unknown OID cache index")), + css::uno::Reference< css::uno::XInterface >()); + } + return state_.oidCache[idx]; + } + if (idx != cache::ignore) { + state_.oidCache[idx] = oid; + } + return oid; +} + +rtl::ByteSequence Unmarshal::readTid() { + rtl::ByteSequence tid( + *static_cast< sal_Sequence * const * >( + readSequence( + css::uno::TypeDescription( + cppu::UnoType< css::uno::Sequence< sal_Int8 > >::get())). + getValue( + css::uno::TypeDescription( + cppu::UnoType< css::uno::Sequence< sal_Int8 > >::get())))); + sal_uInt16 idx = readCacheIndex(); + if (tid.getLength() == 0) { + if (idx == cache::ignore || state_.tidCache[idx].getLength() == 0) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: unknown TID cache index")), + css::uno::Reference< css::uno::XInterface >()); + } + return state_.tidCache[idx]; + } + if (idx != cache::ignore) { + state_.tidCache[idx] = tid; + } + return tid; +} + +BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) { + OSL_ASSERT(type.is()); + switch (type.get()->eTypeClass) { + default: + std::abort(); // this cannot happen + // pseudo fall-through to avoid compiler warnings + case typelib_TypeClass_VOID: + return BinaryAny(); + case typelib_TypeClass_BOOLEAN: + { + sal_uInt8 v = read8(); + if (v > 1) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: boolean of unknown value")), + css::uno::Reference< css::uno::XInterface >()); + } + return BinaryAny(type, &v); + } + case typelib_TypeClass_BYTE: + { + sal_uInt8 v = read8(); + return BinaryAny(type, &v); + } + case typelib_TypeClass_SHORT: + case typelib_TypeClass_UNSIGNED_SHORT: + case typelib_TypeClass_CHAR: + { + sal_uInt16 v = read16(); + return BinaryAny(type, &v); + } + case typelib_TypeClass_LONG: + case typelib_TypeClass_UNSIGNED_LONG: + case typelib_TypeClass_FLOAT: + { + sal_uInt32 v = read32(); + return BinaryAny(type, &v); + } + case typelib_TypeClass_HYPER: + case typelib_TypeClass_UNSIGNED_HYPER: + case typelib_TypeClass_DOUBLE: + { + sal_uInt64 v = read64(); + return BinaryAny(type, &v); + } + case typelib_TypeClass_STRING: + { + rtl::OUString v(readString()); + return BinaryAny(type, &v.pData); + } + case typelib_TypeClass_TYPE: + { + css::uno::TypeDescription v(readType()); + typelib_TypeDescription * p = v.get(); + return BinaryAny(type, &p); + } + case typelib_TypeClass_ANY: + { + css::uno::TypeDescription t(readType()); + if (t.get()->eTypeClass == typelib_TypeClass_ANY) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: any of type ANY")), + css::uno::Reference< css::uno::XInterface >()); + } + return readValue(t); + } + case typelib_TypeClass_SEQUENCE: + type.makeComplete(); + return readSequence(type); + case typelib_TypeClass_ENUM: + { + sal_Int32 v = static_cast< sal_Int32 >(read32()); + type.makeComplete(); + typelib_EnumTypeDescription * etd = + reinterpret_cast< typelib_EnumTypeDescription * >(type.get()); + bool found = false; + for (sal_Int32 i = 0; i != etd->nEnumValues; ++i) { + if (etd->pEnumValues[i] == v) { + found = true; + break; + } + } + if (!found) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: unknown enum value")), + css::uno::Reference< css::uno::XInterface >()); + } + return BinaryAny(type, &v); + } + case typelib_TypeClass_STRUCT: + case typelib_TypeClass_EXCEPTION: + { + std::vector< BinaryAny > as; + readMemberValues(type, &as); + void * buf = allocate(type.get()->nSize); + copyMemberValues(type, as.begin(), buf); + uno_Any raw; + raw.pType = reinterpret_cast< typelib_TypeDescriptionReference * >( + type.get()); + raw.pData = buf; + raw.pReserved = 0; + return BinaryAny(raw); + } + case typelib_TypeClass_INTERFACE: + { + css::uno::UnoInterfaceReference obj( + bridge_->registerIncomingInterface(readOid(), type)); + return BinaryAny(type, &obj.m_pUnoI); + } + } +} + +void Unmarshal::done() const { + if (data_ != end_) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: block contains excess data")), + css::uno::Reference< css::uno::XInterface >()); + } +} + +void Unmarshal::check(sal_Int32 size) const { + if (end_ - data_ < size) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: trying to read past end of block")), + css::uno::Reference< css::uno::XInterface >()); + } +} + +sal_uInt32 Unmarshal::readCompressed() { + sal_uInt8 n = read8(); + return n == 0xFF ? read32() : n; +} + +sal_uInt16 Unmarshal::readCacheIndex() { + sal_uInt16 idx = read16(); + if (idx >= cache::size && idx != cache::ignore) { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: cache index out of range")), + css::uno::Reference< css::uno::XInterface >()); + } + return idx; +} + +sal_uInt64 Unmarshal::read64() { + check(8); + sal_uInt64 n = static_cast< sal_uInt64 >(*data_++) << 56; + n |= static_cast< sal_uInt64 >(*data_++) << 48; + n |= static_cast< sal_uInt64 >(*data_++) << 40; + n |= static_cast< sal_uInt64 >(*data_++) << 32; + n |= static_cast< sal_uInt64 >(*data_++) << 24; + n |= static_cast< sal_uInt64 >(*data_++) << 16; + n |= static_cast< sal_uInt64 >(*data_++) << 8; + return n | *data_++; +} + +rtl::OUString Unmarshal::readString() { + sal_uInt32 n = readCompressed(); + if (n > SAL_MAX_INT32) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: string size too large")), + css::uno::Reference< css::uno::XInterface >()); + } + check(static_cast< sal_Int32 >(n)); + rtl::OUString s; + if (!rtl_convertStringToUString( + &s.pData, reinterpret_cast< char const * >(data_), + static_cast< sal_Int32 >(n), RTL_TEXTENCODING_UTF8, + (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR | + RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR | + RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR))) + { + throw css::io::IOException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: string does not contain UTF-8")), + css::uno::Reference< css::uno::XInterface >()); + } + data_ += n; + return s; +} + +BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) { + OSL_ASSERT( + type.is() && type.get()->eTypeClass == typelib_TypeClass_SEQUENCE); + sal_uInt32 n = readCompressed(); + if (n > SAL_MAX_INT32) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: sequence size too large")), + css::uno::Reference< css::uno::XInterface >()); + } + if (n == 0) { + return BinaryAny(type, 0); + } + css::uno::TypeDescription ctd( + reinterpret_cast< typelib_IndirectTypeDescription * >( + type.get())->pType); + if (ctd.get()->eTypeClass == typelib_TypeClass_BYTE) { + check(static_cast< sal_Int32 >(n)); + rtl::ByteSequence s( + reinterpret_cast< sal_Int8 const * >(data_), + static_cast< sal_Int32 >(n)); + data_ += n; + sal_Sequence * p = s.getHandle(); + return BinaryAny(type, &p); + } + std::vector< BinaryAny > as; + for (sal_uInt32 i = 0; i != n; ++i) { + as.push_back(readValue(ctd)); + } + OSL_ASSERT(ctd.get()->nSize >= 0); + sal_uInt64 size = static_cast< sal_uInt64 >(n) * + static_cast< sal_uInt64 >(ctd.get()->nSize); + // sal_uInt32 * sal_Int32 -> sal_uInt64 cannot overflow + if (size > SAL_MAX_SIZE - SAL_SEQUENCE_HEADER_SIZE) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "binaryurp::Unmarshal: sequence size too large")), + css::uno::Reference< css::uno::XInterface >()); + } + void * buf = allocate( + SAL_SEQUENCE_HEADER_SIZE + static_cast< sal_Size >(size)); + static_cast< sal_Sequence * >(buf)->nRefCount = 0; + static_cast< sal_Sequence * >(buf)->nElements = + static_cast< sal_Int32 >(n); + for (sal_uInt32 i = 0; i != n; ++i) { + uno_copyData( + static_cast< sal_Sequence * >(buf)->elements + i * ctd.get()->nSize, + const_cast< void * >(as[i].getValue(ctd)), ctd.get(), 0); + } + return BinaryAny(type, reinterpret_cast< sal_Sequence ** >(&buf)); +} + +void Unmarshal::readMemberValues( + css::uno::TypeDescription const & type, std::vector< BinaryAny > * values) +{ + OSL_ASSERT( + type.is() && + (type.get()->eTypeClass == typelib_TypeClass_STRUCT || + type.get()->eTypeClass == typelib_TypeClass_EXCEPTION) && + values != 0); + type.makeComplete(); + typelib_CompoundTypeDescription * ctd = + reinterpret_cast< typelib_CompoundTypeDescription * >(type.get()); + if (ctd->pBaseTypeDescription != 0) { + readMemberValues( + css::uno::TypeDescription(&ctd->pBaseTypeDescription->aBase), + values); + } + for (sal_Int32 i = 0; i != ctd->nMembers; ++i) { + values->push_back( + readValue(css::uno::TypeDescription(ctd->ppTypeRefs[i]))); + } +} + +} diff --git a/binaryurp/source/unmarshal.hxx b/binaryurp/source/unmarshal.hxx new file mode 100644 index 000000000000..33a4aafec75e --- /dev/null +++ b/binaryurp/source/unmarshal.hxx @@ -0,0 +1,106 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_UNMARSHAL_HXX +#define INCLUDED_BINARYURP_SOURCE_UNMARSHAL_HXX + +#include "sal/config.h" + +#include + +#include "boost/noncopyable.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "rtl/ref.hxx" +#include "sal/types.h" +#include "typelib/typedescription.hxx" + +namespace binaryurp { + class BinaryAny; + class Bridge; + struct ReaderState; +} +namespace com { namespace sun { namespace star { namespace uno { + class TypeDescription; +} } } } +namespace rtl { + class ByteSequecne; + class OUString; +} + +namespace binaryurp { + +class Unmarshal: private boost::noncopyable { +public: + Unmarshal( + rtl::Reference< Bridge > const & bridge, ReaderState & state, + com::sun::star::uno::Sequence< sal_Int8 > const & buffer); + + ~Unmarshal(); + + sal_uInt8 read8(); + + sal_uInt16 read16(); + + sal_uInt32 read32(); + + com::sun::star::uno::TypeDescription readType(); + + rtl::OUString readOid(); + + rtl::ByteSequence readTid(); + + BinaryAny readValue(com::sun::star::uno::TypeDescription const & type); + + void done() const; + +private: + void check(sal_Int32 size) const; + + sal_uInt32 readCompressed(); + + sal_uInt16 readCacheIndex(); + + sal_uInt64 read64(); + + rtl::OUString readString(); + + BinaryAny readSequence(com::sun::star::uno::TypeDescription const & type); + + void readMemberValues( + com::sun::star::uno::TypeDescription const & type, + std::vector< BinaryAny > * values); + + rtl::Reference< Bridge > bridge_; + ReaderState & state_; + com::sun::star::uno::Sequence< sal_Int8 > buffer_; + sal_uInt8 const * data_; + sal_uInt8 const * end_; +}; + +} + +#endif diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx new file mode 100755 index 000000000000..439b7dba804a --- /dev/null +++ b/binaryurp/source/writer.cxx @@ -0,0 +1,475 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "sal/config.h" + +#include +#include + +#include "com/sun/star/connection/XConnection.hpp" +#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" +#include "com/sun/star/uno/XCurrentContext.hpp" +#include "cppuhelper/exc_hlp.hxx" +#include "osl/mutex.hxx" +#include "rtl/memory.h" +#include "uno/dispatcher.hxx" + +#include "binaryany.hxx" +#include "bridge.hxx" +#include "currentcontext.hxx" +#include "specialfunctionids.hxx" +#include "writer.hxx" + +namespace binaryurp { + +namespace { + +namespace css = com::sun::star; + +bool isProtocolPropertyMessage(rtl::OUString const & oid) { + return oid.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("UrpProtocolProperties")); +} + +} + +Writer::Item::Item() {} + +Writer::Item::Item( + rtl::ByteSequence const & theTid, rtl::OUString const & theOid, + css::uno::TypeDescription const & theType, + css::uno::TypeDescription const & theMember, + std::vector< BinaryAny > const & inArguments, + css::uno::UnoInterfaceReference const & theCurrentContext): + request(true), tid(theTid), oid(theOid), type(theType), member(theMember), + arguments(inArguments), currentContext(theCurrentContext) +{} + +Writer::Item::Item( + rtl::ByteSequence const & theTid, + css::uno::TypeDescription const & theMember, bool theSetter, + bool theException, BinaryAny const & theReturnValue, + std::vector< BinaryAny > const & outArguments, + bool theSetCurrentContextMode): + request(false), tid(theTid), member(theMember), setter(theSetter), + arguments(outArguments), exception(theException), + returnValue(theReturnValue), setCurrentContextMode(theSetCurrentContextMode) +{} + +Writer::Writer(rtl::Reference< Bridge > const & bridge): + bridge_(bridge), marshal_(bridge, state_), stop_(false) +{ + OSL_ASSERT(bridge.is()); + acquire(); +} + +void Writer::sendDirectRequest( + rtl::ByteSequence const & tid, rtl::OUString const & oid, + css::uno::TypeDescription const & type, + css::uno::TypeDescription const & member, + std::vector< BinaryAny > const & inArguments) +{ + OSL_ASSERT(!unblocked_.check()); + sendRequest( + tid, oid, type, member, inArguments, false, + css::uno::UnoInterfaceReference()); +} + +void Writer::sendDirectReply( + rtl::ByteSequence const & tid, css::uno::TypeDescription const & member, + bool exception, BinaryAny const & returnValue, + std::vector< BinaryAny > const & outArguments) +{ + OSL_ASSERT(!unblocked_.check()); + sendReply(tid, member, false, exception, returnValue,outArguments); +} + +void Writer::queueRequest( + rtl::ByteSequence const & tid, rtl::OUString const & oid, + css::uno::TypeDescription const & type, + css::uno::TypeDescription const & member, + std::vector< BinaryAny > const & inArguments) +{ + css::uno::UnoInterfaceReference cc(current_context::get()); + osl::MutexGuard g(mutex_); + queue_.push_back(Item(tid, oid, type, member, inArguments, cc)); + items_.set(); +} + +void Writer::queueReply( + rtl::ByteSequence const & tid, + com::sun::star::uno::TypeDescription const & member, bool setter, + bool exception, BinaryAny const & returnValue, + std::vector< BinaryAny > const & outArguments, bool setCurrentContextMode) +{ + osl::MutexGuard g(mutex_); + queue_.push_back( + Item( + tid, member, setter, exception, returnValue, outArguments, + setCurrentContextMode)); + items_.set(); +} + +void Writer::unblock() { + // Assumes that osl::Condition::set works as a memory barrier, so that + // changes made by preceeding sendDirectRequest/Reply calls are visible to + // subsequent sendRequest/Reply calls: + unblocked_.set(); +} + +void Writer::stop() { + { + osl::MutexGuard g(mutex_); + stop_ = true; + } + unblocked_.set(); + items_.set(); +} + +Writer::~Writer() {} + +void Writer::run() { + try { + unblocked_.wait(); + for (;;) { + items_.wait(); + Item item; + { + osl::MutexGuard g(mutex_); + if (stop_) { + return; + } + OSL_ASSERT(!queue_.empty()); + item = queue_.front(); + queue_.pop_front(); + if (queue_.empty()) { + items_.reset(); + } + } + if (item.request) { + sendRequest( + item.tid, item.oid, item.type, item.member, item.arguments, + (!item.oid.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("UrpProtocolProperties")) && + !item.member.equals( + css::uno::TypeDescription( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.uno.XInterface::" + "release")))) && + bridge_->isCurrentContextMode()), + item.currentContext); + } else { + sendReply( + item.tid, item.member, item.setter, item.exception, + item.returnValue, item.arguments); + if (item.setCurrentContextMode) { + bridge_->setCurrentContextMode(); + } + } + } + } catch (css::uno::Exception & e) { + OSL_TRACE( + OSL_LOG_PREFIX "caught UNO exception '%s'", + rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); + } catch (std::exception & e) { + OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what()); + } + bridge_->terminate(); +} + +void Writer::onTerminated() { + release(); +} + +void Writer::sendRequest( + rtl::ByteSequence const & tid, rtl::OUString const & oid, + css::uno::TypeDescription const & type, + css::uno::TypeDescription const & member, + std::vector< BinaryAny > const & inArguments, bool currentContextMode, + css::uno::UnoInterfaceReference const & currentContext) +{ + OSL_ASSERT(tid.getLength() != 0 && oid.getLength() != 0 && member.is()); + css::uno::TypeDescription t(type); + sal_Int32 functionId = 0; + bool forceSynchronous = false; + member.makeComplete(); + switch (member.get()->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + { + typelib_InterfaceAttributeTypeDescription * atd = + reinterpret_cast< typelib_InterfaceAttributeTypeDescription * >( + member.get()); + OSL_ASSERT(atd->pInterface != 0); + if (!t.is()) { + t = css::uno::TypeDescription(&atd->pInterface->aBase); + } + t.makeComplete(); + functionId = atd->pInterface->pMapMemberIndexToFunctionIndex[ + atd->aBase.nPosition]; + if (!inArguments.empty()) { // setter + ++functionId; + } + break; + } + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription * mtd = + reinterpret_cast< typelib_InterfaceMethodTypeDescription * >( + member.get()); + OSL_ASSERT(mtd->pInterface != 0); + if (!t.is()) { + t = css::uno::TypeDescription(&mtd->pInterface->aBase); + } + t.makeComplete(); + functionId = mtd->pInterface->pMapMemberIndexToFunctionIndex[ + mtd->aBase.nPosition]; + forceSynchronous = mtd->bOneWay && + functionId != SPECIAL_FUNCTION_ID_RELEASE; + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + OSL_ASSERT(functionId >= 0); + if (functionId > SAL_MAX_UINT16) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("function ID too large for URP")), + css::uno::Reference< css::uno::XInterface >()); + } + std::vector< unsigned char > buf; + bool newType = !(lastType_.is() && t.equals(lastType_)); + bool newOid = oid != lastOid_; + bool newTid = tid != lastTid_; + if (newType || newOid || newTid || forceSynchronous || functionId > 0x3FFF) + // > 14 bit function ID + { + Marshal::write8( + &buf, + (0xC0 | (newType ? 0x20 : 0) | (newOid ? 0x10 : 0) | + (newTid ? 0x08 : 0) | (functionId > 0xFF ? 0x04 : 0) | + (forceSynchronous ? 0x01 : 0))); + // bit 7: LONGHEADER, bit 6: REQUEST, bit 5: NEWTYPE, bit 4: NEWOID, + // bit 3: NEWTID, bit 2: FUNCTIONID16, bit 0: MOREFLAGS + if (forceSynchronous) { + Marshal::write8(&buf, 0xC0); // bit 7: MUSTREPLY, bit 6: SYNCHRONOUS + } + if (functionId <= 0xFF) { + Marshal::write8(&buf, static_cast< sal_uInt8 >(functionId)); + } else { + Marshal::write16(&buf, static_cast< sal_uInt16 >(functionId)); + } + if (newType) { + marshal_.writeType(&buf, t); + } + if (newOid) { + marshal_.writeOid(&buf, oid); + } + if (newTid) { + marshal_.writeTid(&buf, tid); + } + } else if (functionId <= 0x3F) { // <= 6 bit function ID + Marshal::write8(&buf, static_cast< sal_uInt8 >(functionId)); + // bit 7: !LONGHEADER, bit 6: !FUNCTIONID14 + } else { + Marshal::write8( + &buf, static_cast< sal_uInt8 >(0x40 | (functionId >> 8))); + // bit 7: !LONGHEADER, bit 6: FUNCTIONID14 + Marshal::write8(&buf, functionId & 0xFF); + } + if (currentContextMode) { + css::uno::UnoInterfaceReference cc(currentContext); + marshal_.writeValue( + &buf, + css::uno::TypeDescription( + cppu::UnoType< + css::uno::Reference< css::uno::XCurrentContext > >::get()), + BinaryAny( + css::uno::TypeDescription( + cppu::UnoType< + css::uno::Reference< + css::uno::XCurrentContext > >::get()), + &cc.m_pUnoI)); + } + switch (member.get()->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + if (!inArguments.empty()) { // setter + OSL_ASSERT(inArguments.size() == 1); + marshal_.writeValue( + &buf, + css::uno::TypeDescription( + reinterpret_cast< + typelib_InterfaceAttributeTypeDescription * >( + member.get())-> + pAttributeTypeRef), + inArguments.front()); + } + break; + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription * mtd = + reinterpret_cast< typelib_InterfaceMethodTypeDescription * >( + member.get()); + std::vector< BinaryAny >::const_iterator i(inArguments.begin()); + for (sal_Int32 j = 0; j != mtd->nParams; ++j) { + if (mtd->pParams[j].bIn) { + marshal_.writeValue( + &buf, + css::uno::TypeDescription(mtd->pParams[j].pTypeRef), + *i++); + } + } + OSL_ASSERT(i == inArguments.end()); + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + sendMessage(buf); + lastType_ = t; + lastOid_ = oid; + lastTid_ = tid; +} + +void Writer::sendReply( + rtl::ByteSequence const & tid, + com::sun::star::uno::TypeDescription const & member, bool setter, + bool exception, BinaryAny const & returnValue, + std::vector< BinaryAny > const & outArguments) +{ + OSL_ASSERT(tid.getLength() != 0 && member.is() && member.get()->bComplete); + std::vector< unsigned char > buf; + bool newTid = tid != lastTid_; + Marshal::write8(&buf, 0x80 | (exception ? 0x20 : 0) | (newTid ? 0x08 : 0)); + // bit 7: LONGHEADER; bit 6: !REQUEST; bit 5: EXCEPTION; bit 3: NEWTID + if (newTid) { + marshal_.writeTid(&buf, tid); + } + if (exception) { + marshal_.writeValue( + &buf, + css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get()), + returnValue); + } else { + switch (member.get()->eTypeClass) { + case typelib_TypeClass_INTERFACE_ATTRIBUTE: + if (!setter) { + marshal_.writeValue( + &buf, + css::uno::TypeDescription( + reinterpret_cast< + typelib_InterfaceAttributeTypeDescription * >( + member.get())-> + pAttributeTypeRef), + returnValue); + } + break; + case typelib_TypeClass_INTERFACE_METHOD: + { + typelib_InterfaceMethodTypeDescription * mtd = + reinterpret_cast< + typelib_InterfaceMethodTypeDescription * >( + member.get()); + marshal_.writeValue( + &buf, css::uno::TypeDescription(mtd->pReturnTypeRef), + returnValue); + std::vector< BinaryAny >::const_iterator i( + outArguments.begin()); + for (sal_Int32 j = 0; j != mtd->nParams; ++j) { + if (mtd->pParams[j].bOut) { + marshal_.writeValue( + &buf, + css::uno::TypeDescription(mtd->pParams[j].pTypeRef), + *i++); + } + } + OSL_ASSERT(i == outArguments.end()); + break; + } + default: + OSL_ASSERT(false); // this cannot happen + break; + } + } + sendMessage(buf); + lastTid_ = tid; + bridge_->decrementCalls(); +} + +void Writer::sendMessage(std::vector< unsigned char > const & buffer) { + std::vector< unsigned char > header; + if (buffer.size() > SAL_MAX_UINT32) { + throw css::uno::RuntimeException( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("message too large for URP")), + css::uno::Reference< css::uno::XInterface >()); + } + Marshal::write32(&header, static_cast< sal_uInt32 >(buffer.size())); + Marshal::write32(&header, 1); + OSL_ASSERT(!buffer.empty()); + unsigned char const * p = &buffer[0]; + std::vector< unsigned char >::size_type n = buffer.size(); + OSL_ASSERT(header.size() <= SAL_MAX_INT32 && SAL_MAX_INT32 <= SAL_MAX_SIZE); + sal_Size k = SAL_MAX_INT32 - header.size(); + if (n < k) { + k = static_cast< sal_Size >(n); + } + css::uno::Sequence< sal_Int8 > s( + static_cast< sal_Int32 >(header.size() + k)); + OSL_ASSERT(!header.empty()); + rtl_copyMemory( + s.getArray(), &header[0], static_cast< sal_Size >(header.size())); + for (;;) { + rtl_copyMemory(s.getArray() + s.getLength() - k, p, k); + try { + bridge_->getConnection()->write(s); + } catch (css::io::IOException & e) { + css::uno::Any exc(cppu::getCaughtException()); + throw css::lang::WrappedTargetRuntimeException( + (rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "Binary URP write raised IO exception: ")) + + e.Message), + css::uno::Reference< css::uno::XInterface >(), exc); + } + n = static_cast< std::vector< unsigned char >::size_type >(n - k); + if (n == 0) { + break; + } + p += k; + k = SAL_MAX_INT32; + if (n < k) { + k = static_cast< sal_Size >(n); + } + s.realloc(k); + } +} + +} diff --git a/binaryurp/source/writer.hxx b/binaryurp/source/writer.hxx new file mode 100644 index 000000000000..fe5dba2cc1d9 --- /dev/null +++ b/binaryurp/source/writer.hxx @@ -0,0 +1,185 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_WRITER_HXX +#define INCLUDED_BINARYURP_SOURCE_WRITER_HXX + +#include "sal/config.h" + +#include +#include +#include + +#include "boost/noncopyable.hpp" +#include "osl/conditn.hxx" +#include "osl/mutex.hxx" +#include "osl/thread.hxx" +#include "rtl/byteseq.hxx" +#include "rtl/ref.hxx" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "salhelper/simplereferenceobject.hxx" +#include "typelib/typedescription.hxx" +#include "uno/dispatcher.hxx" + +#include "binaryany.hxx" +#include "marshal.hxx" +#include "writerstate.hxx" + +namespace binaryurp { class Bridge; } + +namespace binaryurp { + +class Writer: + public osl::Thread, public salhelper::SimpleReferenceObject, + private boost::noncopyable +{ +public: + static void * operator new(std::size_t size) + { return Thread::operator new(size); } + + static void operator delete(void * pointer) + { Thread::operator delete(pointer); } + + explicit Writer(rtl::Reference< Bridge > const & bridge); + + // Only called from Bridge::reader_ thread, and only before Bridge::writer_ + // thread is unblocked: + void sendDirectRequest( + rtl::ByteSequence const & tid, rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type, + com::sun::star::uno::TypeDescription const & member, + std::vector< BinaryAny > const & inArguments); + + // Only called from Bridge::reader_ thread, and only before Bridge::writer_ + // thread is unblocked: + void sendDirectReply( + rtl::ByteSequence const & tid, + com::sun::star::uno::TypeDescription const & member, + bool exception, BinaryAny const & returnValue, + std::vector< BinaryAny > const & outArguments); + + void queueRequest( + rtl::ByteSequence const & tid, rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type, + com::sun::star::uno::TypeDescription const & member, + std::vector< BinaryAny > const & inArguments); + + void queueReply( + rtl::ByteSequence const & tid, + com::sun::star::uno::TypeDescription const & member, bool setter, + bool exception, BinaryAny const & returnValue, + std::vector< BinaryAny > const & outArguments, + bool setCurrentContextMode); + + void unblock(); + + void stop(); + +private: + virtual ~Writer(); + + virtual void SAL_CALL run(); + + virtual void SAL_CALL onTerminated(); + + void sendRequest( + rtl::ByteSequence const & tid, rtl::OUString const & oid, + com::sun::star::uno::TypeDescription const & type, + com::sun::star::uno::TypeDescription const & member, + std::vector< BinaryAny > const & inArguments, bool currentContextMode, + com::sun::star::uno::UnoInterfaceReference const & currentContext); + + void sendReply( + rtl::ByteSequence const & tid, + com::sun::star::uno::TypeDescription const & member, bool setter, + bool exception, BinaryAny const & returnValue, + std::vector< BinaryAny > const & outArguments); + + void sendMessage(std::vector< unsigned char > const & buffer); + + struct Item { + Item(); + + // Request: + Item( + rtl::ByteSequence const & theTid, rtl::OUString const & theOid, + com::sun::star::uno::TypeDescription const & theType, + com::sun::star::uno::TypeDescription const & theMember, + std::vector< BinaryAny > const & inArguments, + com::sun::star::uno::UnoInterfaceReference const & + theCurrentContext); + + // Reply: + Item( + rtl::ByteSequence const & theTid, + com::sun::star::uno::TypeDescription const & theMember, + bool theSetter, bool theException, BinaryAny const & theReturnValue, + std::vector< BinaryAny > const & outArguments, + bool theSetCurrentContextMode); + + bool request; + + rtl::ByteSequence tid; // request + reply + + rtl::OUString oid; // request + + com::sun::star::uno::TypeDescription type; // request + + com::sun::star::uno::TypeDescription member; // request + reply + + bool setter; // reply + + std::vector< BinaryAny > arguments; + // request: inArguments; reply: outArguments + + bool exception; // reply + + BinaryAny returnValue; // reply + + com::sun::star::uno::UnoInterfaceReference currentContext; // request + + bool setCurrentContextMode; // reply + }; + + rtl::Reference< Bridge > bridge_; + WriterState state_; + Marshal marshal_; + com::sun::star::uno::TypeDescription lastType_; + rtl::OUString lastOid_; + rtl::ByteSequence lastTid_; + osl::Condition unblocked_; + osl::Condition items_; + + osl::Mutex mutex_; + std::deque< Item > queue_; + bool stop_; +}; + +} + +#endif diff --git a/binaryurp/source/writerstate.hxx b/binaryurp/source/writerstate.hxx new file mode 100644 index 000000000000..cbb0208ba019 --- /dev/null +++ b/binaryurp/source/writerstate.hxx @@ -0,0 +1,55 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_BINARYURP_SOURCE_WRITERSTATE_HXX +#define INCLUDED_BINARYURP_SOURCE_WRITERSTATE_HXX + +#include "sal/config.h" + +#include "boost/noncopyable.hpp" +#include "rtl/byteseq.hxx" +#include "rtl/ustring.hxx" +#include "typelib/typedescription.hxx" + +#include "cache.hxx" + +namespace binaryurp { + +struct WriterState: private boost::noncopyable { + WriterState(): + typeCache(cache::size), oidCache(cache::size), tidCache(cache::size) {} + + Cache< com::sun::star::uno::TypeDescription > typeCache; + + Cache< rtl::OUString > oidCache; + + Cache< rtl::ByteSequence > tidCache; +}; + +} + +#endif diff --git a/bridges/inc/bridges/remote/bridgeimpl.hxx b/bridges/inc/bridges/remote/bridgeimpl.hxx deleted file mode 100644 index 0257dd5f879a..000000000000 --- a/bridges/inc/bridges/remote/bridgeimpl.hxx +++ /dev/null @@ -1,94 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _BRIDGES_REMOTE_BRIDGEIMPL_HXX_ -#define _BRIDGES_REMOTE_BRIDGEIMPL_HXX_ -#include - -#include - -#include -#include - - -struct remote_BridgeImpl -{ - void (SAL_CALL * m_allThreadsAreGone ) ( uno_Environment * ); - requestClientSideDispatcher m_sendRequest; - oslInterlockedCount m_nRemoteThreads; - sal_Bool m_bDisposed; - sal_Bool m_bReleaseStubsCalled; -}; - -namespace bridges_remote { - - enum RemoteThreadCounter_HoldEnvWeak - { - RTC_HOLDENVWEAK = 0x1 - }; - - class RemoteThreadCounter - { - public: - // performance optimization. In some cases, it is not necessary to acquire the - // environment. - RemoteThreadCounter( uno_Environment *pEnvRemote, RemoteThreadCounter_HoldEnvWeak ) - : m_bReleaseEnvironment( sal_False ) - , m_pEnvRemote( pEnvRemote ) - { - remote_Context *pContext = ((remote_Context *) m_pEnvRemote->pContext ); - osl_incrementInterlockedCount( &( pContext->m_pBridgeImpl->m_nRemoteThreads ) ); - } - - RemoteThreadCounter( uno_Environment *pEnvRemote ) - : m_bReleaseEnvironment( sal_True ) - , m_pEnvRemote( pEnvRemote ) - { - m_pEnvRemote->acquire( m_pEnvRemote ); - - remote_Context *pContext = ((remote_Context *) m_pEnvRemote->pContext ); - osl_incrementInterlockedCount( &( pContext->m_pBridgeImpl->m_nRemoteThreads ) ); - } - - ~RemoteThreadCounter( ) - { - remote_Context *pContext = ((remote_Context *) m_pEnvRemote->pContext ); - if( 0 == osl_decrementInterlockedCount( &( pContext->m_pBridgeImpl->m_nRemoteThreads)) && - pContext->m_pBridgeImpl->m_bDisposed && - ! pContext->m_pBridgeImpl->m_bReleaseStubsCalled ) - { - pContext->m_pBridgeImpl->m_allThreadsAreGone( m_pEnvRemote ); - } - if( m_bReleaseEnvironment ) - m_pEnvRemote->release( m_pEnvRemote ); - } - - sal_Bool m_bReleaseEnvironment; - uno_Environment *m_pEnvRemote; - }; -} - -#endif diff --git a/bridges/inc/bridges/remote/connection.h b/bridges/inc/bridges/remote/connection.h deleted file mode 100644 index b374b73bc8cf..000000000000 --- a/bridges/inc/bridges/remote/connection.h +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _BRIDGES_REMOTE_CONNECTION_H_ -#define _BRIDGES_REMOTE_CONNECTION_H_ -#include - -/** Specfies a C-interface for a bidirectional bytestream, - which is used by a UNO remote environment. - */ -struct remote_Connection -{ - void ( SAL_CALL * acquire ) ( remote_Connection *); - - void ( SAL_CALL * release ) ( remote_Connection *); - - /** - reads nSize bytes from the connection. This method blocks, until - all bytes are available or an error occurs. - @return Number of bytes read. - If the return value is less than nSize, an unrecoverable - i/o error has occured or the connection was closed. - - */ - sal_Int32 (SAL_CALL * read)(remote_Connection *, sal_Int8 *pDest, sal_Int32 nSize ); - - /** - @return Number of bytes written. - if the return value is less than nSize an unrecoverable - i/o error has occured or the connection was closed. - */ - sal_Int32 (SAL_CALL * write)(remote_Connection *, const sal_Int8 *pSource, sal_Int32 nSize ); - - void ( SAL_CALL * flush ) ( remote_Connection * ); - - /** closes the connection. - Any read or write operation after this call shall not be served - anymore. Any ongoing read or write operation must return immeadiatly after this call. - The implementation should cope with multiple calls to this method. - */ - void (SAL_CALL * close) ( remote_Connection * ); -}; - -#endif diff --git a/bridges/inc/bridges/remote/context.h b/bridges/inc/bridges/remote/context.h deleted file mode 100644 index e03310ce5e27..000000000000 --- a/bridges/inc/bridges/remote/context.h +++ /dev/null @@ -1,260 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _BRIDGES_REMOTE_CONTEXT_H_ -#define _BRIDGES_REMOTE_CONTEXT_H_ -#include -#include - -#include - -#include -#include - - -/** Interface for refcounted contexts of uno-environments. - - Not all uno_Contexts need to be refcounted, in case they are, - they should be 'derived' from this struct. - This is used as a base class for the remote_Context. - @see uno_Environment - @see uno_getEnvironment() - @see remote_Context - */ -struct uno_Context -{ - /** increase the refcount of the context - */ - void (SAL_CALL * acquire)( uno_Context *pContext ); - - /** decrements the recount of the context. In case the recount drops to zero, - the context gets destroye. - */ - void (SAL_CALL * release)( uno_Context *pContext); - - /** Allows to query for a different interface of the uno_Context. - The result of the void pointer is unspecified and depends on the concrete context. - */ - void * (SAL_CALL *query ) ( uno_Context *pContext , rtl_uString *pId); -}; - -struct remote_Connection; -struct remote_Context; -struct remote_Interface; - - - -/** performs a query-interface for a certain interface via the remote connection ! - - @param pEnvRemote The environment, that shall perform the call. - @param ppRemoteI in/out parameter contains the interface returned by queryInterface - @param pOid the oid of the 'ghost' object on which the call must be done. - ***/ -typedef void ( SAL_CALL * remote_getInstanceFunc ) ( - uno_Environment *pEnvRemote, - remote_Interface **ppRemoteI, - rtl_uString *pOid, - typelib_TypeDescriptionReference *pInterfaceTypeRef, - uno_Any **ppException ); - - -/** refcounted C-interface, which provides object by name. - */ -struct remote_InstanceProvider -{ - void (SAL_CALL * acquire ) ( remote_InstanceProvider * pProvider ); - void (SAL_CALL * release ) ( remote_InstanceProvider * pProvider ); - void (SAL_CALL * getInstance ) ( remote_InstanceProvider * pProvider , - uno_Environment *pEnvRemote, - remote_Interface **ppRemoteI, - rtl_uString *pInstanceName, - typelib_InterfaceTypeDescription *pType, - uno_Any **ppException ); -}; - -/** refcounted C-interface, which allows to register a listener to an - remote bridge to be informed when the bridge gets disposed. - - @see remote_Context - */ -struct remote_DisposingListener -{ - void (SAL_CALL * acquire ) ( remote_DisposingListener * pProvider ); - void (SAL_CALL * release ) ( remote_DisposingListener * pProvider ); - void (SAL_CALL * disposing ) ( remote_DisposingListener * pProvider, - rtl_uString *pBridgeName ); -}; - - -/** - Try to get an existing context characterized by the pIdString. Each ID-String must - uniquely charcterize a certain connection. The context can't be retrieved via this - function anymore, after it got disposed. - - @return 0 when such a context does not exist, otherwise - a pointer to an acquired remote_Context. - **/ -extern "C" remote_Context * SAL_CALL -remote_getContext( rtl_uString *pIdString ); - -/** - Create an acquired remote context. The Context is weakly held by the context administration - and can be accessed later through remote_getContext() (using the same id-string). - - @param pIdString A string, that uniquely describes the connection. For e.g. a socket connection, - host and port of the local and remote host should be in the string. - - @param pDescription - Description of the connection, that may brought up to the user. - - @param pProtocol - The protocol, that the environment uses for - communicating with the remote process. - The format of the protocol string is : "protocolname,para1=para1value,..." - @return 0, when a context with this name already exists. - - @see remote_getContext() - @see remote_Context - */ -extern "C" remote_Context * SAL_CALL -remote_createContext( remote_Connection *pConnection, - rtl_uString *pIdStr, - rtl_uString *pDescription, - rtl_uString *pProtocol, - remote_InstanceProvider *); - -const sal_Int32 REMOTE_CONTEXT_CREATE = 1; -const sal_Int32 REMOTE_CONTEXT_DESTROY = 2; - -typedef void ( SAL_CALL * remote_contextListenerFunc ) ( - void *pThis, - sal_Int32 nRemoteContextMode, - rtl_uString *sName, - rtl_uString *sDescription - ); - -/** Registers a listener at the context administration, which allows to keep - track of existing remote connections. - @param pObject object which is handed to the listener function, when called. - */ -extern "C" void SAL_CALL -remote_addContextListener( remote_contextListenerFunc listener, void *pObject ); - - -/** Removes a listener from the context administration. - */ -extern "C" void SAL_CALL -remote_removeContextListener( remote_contextListenerFunc listener , void *pObject ); - -/** Allows to retrieve all existing context strings. - - @param pnStringCount out parameter. Contains the number of rtl_uStrings in the array - @param memAlloc a memory allocation function for the array of pointers to rtl_uStrings - - @return array of rtl strings. The caller must call release on all rtl_uString s and must free - the pointer array. - */ -extern "C" rtl_uString ** SAL_CALL -remote_getContextList( - sal_Int32 *pnStringCount, - void * ( SAL_CALL * memAlloc ) ( sal_Size nBytesToAlloc ) ); - - -struct remote_BridgeImpl; - -/** The context structure for a remote bridge. - - @see uno_getEnvironment() - */ -struct remote_Context -{ - struct uno_Context aBase; - - /** - These methods are implemented by context administration - */ - void ( SAL_CALL * addDisposingListener ) ( remote_Context *, - remote_DisposingListener * ); - void ( SAL_CALL * removeDisposingListener ) ( remote_Context *, - remote_DisposingListener * ); - /** - will be called by the environment when it gets disposed - */ - void ( SAL_CALL * dispose ) ( remote_Context * ); - - /** The method is set by the remote-environment during environment initialization. - @see remote_getInstanceFunc - */ - remote_getInstanceFunc getRemoteInstance; - - /** - The protocol, that the environment uses for communicating with the remote process. - The format of the protocol string is : "protocolname,para1=para1value,..." - The parameters are protocol dependend - */ - rtl_uString *m_pProtocol; - - /** - It may be the same as m_pName. - Livetime is handled by the context administration. - */ - rtl_uString *m_pDescription; - - /** - The name of this context at context administration. - A string, that uniquely describes this environment. - Livetime is handled by the context administration. - */ - rtl_uString *m_pName; - - /** The instance-provider, which is used to look up unknown object identifiers. - Is usually called on server side, when the first client request comes in. - Maybe 0. Livetime is handled by the context administration. - */ - remote_InstanceProvider *m_pInstanceProvider; - - /** - The connection of this context. - Livetime is handled by the context administration. - */ - remote_Connection *m_pConnection; - - /** - Here arbitrary data may be stored. It may be used by a connection - service to store environment specific data. The bridge does not - use it. - */ - void *m_pAdditionalInformation; - - /** - here the bridge stores its private per environment data. - */ - struct remote_BridgeImpl *m_pBridgeImpl; -}; - -#endif - diff --git a/bridges/inc/bridges/remote/counter.hxx b/bridges/inc/bridges/remote/counter.hxx deleted file mode 100644 index deead1d2cb1e..000000000000 --- a/bridges/inc/bridges/remote/counter.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _BRIDGES_REMOTE_COUNTER_H_ -#define _BRIDGES_REMOTE_COUNTER_H_ -#include -#if OSL_DEBUG_LEVEL > 1 -struct MyCounter -{ - MyCounter( sal_Char const *pName ) : - m_nCounter( 0 ), - m_pName ( pName ) - { - } - ~MyCounter() - { - if( m_nCounter ) { - printf( - "%s : %ld left\n", m_pName, - sal::static_int_cast< long >(m_nCounter) ); - } - } - void acquire() - { m_nCounter ++; } - void release() - { m_nCounter --; } - - - sal_Int32 m_nCounter; - sal_Char const *m_pName; -}; -#endif - -#endif diff --git a/bridges/inc/bridges/remote/helper.hxx b/bridges/inc/bridges/remote/helper.hxx deleted file mode 100644 index 081e47a5c855..000000000000 --- a/bridges/inc/bridges/remote/helper.hxx +++ /dev/null @@ -1,68 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -typedef void ( SAL_CALL * ReleaseRemoteCallbackFunc ) ( - remote_Interface *ppRemoteI, - rtl_uString *pOid, - typelib_TypeDescriptionReference *pTypeRef, - uno_Environment *pEnvRemote - ); - -typedef void ( SAL_CALL * remote_createStubFunc ) ( - remote_Interface **ppRemoteI, - rtl_uString *pOid , - typelib_TypeDescriptionReference *pTypeRef, - uno_Environment *pEnvRemote, - ReleaseRemoteCallbackFunc callback - ); -namespace bridges_remote -{ - - /** @param callback If the bridge implementation wants to handle the remote release call, - it can do it giving this callback. If callback == 0, the releaseRemote - method of the stub is called. - */ - void SAL_CALL remote_createStub ( - remote_Interface **ppRemoteI, - rtl_uString *pOid , - typelib_TypeDescriptionReference *pType, - uno_Environment *pEnvRemote, - ReleaseRemoteCallbackFunc callback ); - - void SAL_CALL remote_retrieveOidFromProxy( - remote_Interface *pRemtoeI, - rtl_uString **ppOid ); - - void SAL_CALL remote_sendQueryInterface( - uno_Environment *pEnvRemote, - remote_Interface **ppRemoteI, - rtl_uString *pOid , - typelib_TypeDescriptionReference *pType, - uno_Any **ppException - ); -} diff --git a/bridges/inc/bridges/remote/mapping.hxx b/bridges/inc/bridges/remote/mapping.hxx deleted file mode 100644 index 4247c6cc9b65..000000000000 --- a/bridges/inc/bridges/remote/mapping.hxx +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _BRIDGES_REMOTE_MAPPING_HXX_ -#define _BRIDGES_REMOTE_MAPPING_HXX_ - -#include -#include - -#include - -#include - -typedef struct _uno_Environment uno_Environment; - -namespace bridges_remote -{ - extern "C" typedef void SAL_CALL RemoteToUno( - uno_Mapping *pMapping, void **ppOut, void *pInterface, - typelib_InterfaceTypeDescription *pInterfaceTypeDescr ); - RemoteToUno remoteToUno; - - extern "C" typedef void SAL_CALL UnoToRemote( - uno_Mapping *pMapping, void **ppOut, void *pInterface, - typelib_InterfaceTypeDescription *pInterfaceTypeDescr ); - UnoToRemote unoToRemote; - - extern "C" typedef void SAL_CALL FreeRemoteMapping(uno_Mapping * mapping); - FreeRemoteMapping freeRemoteMapping; - - class RemoteMapping : - public remote_Mapping - { - public: - RemoteMapping( uno_Environment *pEnvUno , - uno_Environment *pEnvRemote, - uno_MapInterfaceFunc func , - const ::rtl::OUString sPurpose); - ~RemoteMapping(); - - oslInterlockedCount m_nRef; - ::rtl::OUString m_sPurpose; - }; - -} -#endif diff --git a/bridges/inc/bridges/remote/proxy.hxx b/bridges/inc/bridges/remote/proxy.hxx deleted file mode 100644 index fd1e919b902a..000000000000 --- a/bridges/inc/bridges/remote/proxy.hxx +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -#include -#include -#include - -#include - -namespace bridges_remote { - -extern "C" typedef void SAL_CALL FreeRemote2UnoProxy( - uno_ExtEnvironment * environment, void * proxy); -FreeRemote2UnoProxy freeRemote2UnoProxy; - -// private: -extern "C" typedef void SAL_CALL AcquireRemote2UnoProxy(uno_Interface *); -AcquireRemote2UnoProxy acquireRemote2UnoProxy; - -// private: -extern "C" typedef void SAL_CALL ReleaseRemote2UnoProxy(uno_Interface *); -ReleaseRemote2UnoProxy releaseRemote2UnoProxy; - -// private: -extern "C" typedef void SAL_CALL DispatchRemote2UnoProxy( - uno_Interface *, typelib_TypeDescription const *, void *, void **, - uno_Any **); -DispatchRemote2UnoProxy dispatchRemote2UnoProxy; - -extern "C" void SAL_CALL remote_release( void * ); - -class Remote2UnoProxy : - public uno_Interface -{ -public: - Remote2UnoProxy( - remote_Interface *pRemoteI, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pType , - uno_Environment *pEnvUno, - uno_Environment *pEnvRemote - ); - - ~Remote2UnoProxy(); - -private: - ::rtl::OUString m_sOid; - typelib_InterfaceTypeDescription *m_pType; - remote_Interface *m_pRemoteI; - uno_Environment *m_pEnvUno; - uno_Environment *m_pEnvRemote; - ::com::sun::star::uno::Mapping m_mapRemote2Uno; - ::com::sun::star::uno::Mapping m_mapUno2Remote; - - oslInterlockedCount m_nRef; - - friend void SAL_CALL acquireRemote2UnoProxy(uno_Interface *); - - friend void SAL_CALL releaseRemote2UnoProxy(uno_Interface *); - - friend void SAL_CALL dispatchRemote2UnoProxy( - uno_Interface *, typelib_TypeDescription const *, void *, void **, - uno_Any **); -}; - -} diff --git a/bridges/inc/bridges/remote/remote.h b/bridges/inc/bridges/remote/remote.h deleted file mode 100644 index 0cc4071eab8a..000000000000 --- a/bridges/inc/bridges/remote/remote.h +++ /dev/null @@ -1,93 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _BRIDGES_REMOTE_REMOTE_H -#define _BRIDGES_REMOTE_REMOTE_H -#include -#include - -#include -#include - -#define CORBA_STRING8_NAME "com.sun.star.corba.CorbaString8" -#define CORBA_STRING8_NAME_LENGTH (sizeof(CORBA_STRING8_NAME)-1) - -#define CORBA_UNION_NAME "com.sun.star.corba.CorbaUnion" -#define CORBA_UNION_NAME_LENGTH (sizeof(CORBA_UNION_NAME)-1) - -#define REMOTE_MARSHALED_MSGHDR_SIZE 12 -#define REMOTE_RELEASE_METHOD_INDEX 2 -#define REMOTE_RELEASE_METHOD_NAME "release" - -#define CURRENT_IIOP_PROTOCOL_MAJOR 1 -#define CURRENT_IIOP_PROTOCOL_MINOR 2 - -extern "C" { - -struct remote_Interface; - -/** @internal - */ -typedef void (SAL_CALL * remote_DispatchMethod)( - remote_Interface * pRemoteI, typelib_TypeDescription const * pMemberType, - void * pReturn, void * pArgs[], uno_Any ** ppException ); - -/** - @internal - */ -typedef void ( SAL_CALL * requestClientSideDispatcher ) ( - uno_Environment *pEnvRemote, - typelib_TypeDescription const * pMemberType, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pInterfaceType, - void *pReturn, - void *ppArgs[], - uno_Any **ppException ); - -/** The base class of an UNO interface in a remote environment. - */ -struct remote_Interface -{ - void (SAL_CALL * acquire)( remote_Interface * pInterface ); - - void (SAL_CALL * release)( remote_Interface * pInterface ); - - remote_DispatchMethod pDispatcher; -}; - -/** The mapping between an binary-c-uno and a remote environment. - @internal - */ -struct remote_Mapping -{ - uno_Mapping aBase; - uno_Environment *pEnvRemote; - uno_Environment *pEnvUno; -}; - -} - -#endif diff --git a/bridges/inc/bridges/remote/remote.hxx b/bridges/inc/bridges/remote/remote.hxx deleted file mode 100644 index d5e5397e35cd..000000000000 --- a/bridges/inc/bridges/remote/remote.hxx +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _BRIDGES_REMOTE_REMOTE_HXX_ -#define _BRIDGES_REMOTE_REMOTE_HXX_ -#include - -#include -#include -#include - -#include - -#include -#include - -#include - -namespace bridges_remote { - -extern "C" typedef void SAL_CALL AcquireRemote2RemoteStub( - remote_Interface * pThis); -AcquireRemote2RemoteStub acquireRemote2RemoteStub; - -extern "C" typedef void SAL_CALL FreeRemote2RemoteStub( - uno_ExtEnvironment * environment, void * stub); -FreeRemote2RemoteStub freeRemote2RemoteStub; - -class Remote2RemoteStub : - public remote_Interface -{ -public: - Remote2RemoteStub(rtl_uString *pOid, - typelib_InterfaceTypeDescription *pType, - uno_Environment *pEnvRemote, - requestClientSideDispatcher dispatch ); - ~Remote2RemoteStub(); - - void releaseRemote(); -public: - ::rtl::OUString m_sOid; - typelib_InterfaceTypeDescription *m_pType; - oslInterlockedCount m_nRef; - uno_Environment *m_pEnvRemote; - requestClientSideDispatcher m_dispatch; - oslInterlockedCount m_nReleaseRemote; -}; - -} -#endif diff --git a/bridges/inc/bridges/remote/stub.hxx b/bridges/inc/bridges/remote/stub.hxx deleted file mode 100644 index 5eb21ff37a10..000000000000 --- a/bridges/inc/bridges/remote/stub.hxx +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -#include -#include - -namespace bridges_remote { - -extern "C" typedef void SAL_CALL AcquireUno2RemoteStub( remote_Interface *pThis ); -AcquireUno2RemoteStub acquireUno2RemoteStub; - -extern "C" typedef void SAL_CALL FreeUno2RemoteStub( - uno_ExtEnvironment * environment, void * stub); -FreeUno2RemoteStub freeUno2RemoteStub; - -class Uno2RemoteStub : - public remote_Interface -{ -public: - Uno2RemoteStub( uno_Interface *pUnoI, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pType, - uno_Environment *pEnvUno, - uno_Environment *pEnvRemote ); - ~Uno2RemoteStub(); - -public: - ::rtl::OUString m_sOid; - typelib_InterfaceTypeDescription *m_pType; - uno_Interface *m_pUnoI; - oslInterlockedCount m_nRef; - - uno_Environment *m_pEnvUno; - uno_Environment *m_pEnvRemote; - ::com::sun::star::uno::Mapping m_mapRemote2Uno; - ::com::sun::star::uno::Mapping m_mapUno2Remote; -}; - -} diff --git a/bridges/inc/pch/precompiled_bridges.hxx b/bridges/inc/pch/precompiled_bridges.hxx index 33d5e5f8971f..3c52aed395d2 100644 --- a/bridges/inc/pch/precompiled_bridges.hxx +++ b/bridges/inc/pch/precompiled_bridges.hxx @@ -38,8 +38,6 @@ #include "com/sun/star/bridge/XBridge.hpp" #include "com/sun/star/bridge/XBridgeFactory.hpp" #include "com/sun/star/bridge/XInstanceProvider.hpp" -#include "com/sun/star/bridge/XProtocolProperties.hdl" -#include "com/sun/star/bridge/XProtocolProperties.hpp" #include "com/sun/star/bridge/XUnoUrlResolver.hpp" #include "com/sun/star/connection/ConnectionSetupException.hpp" #include "com/sun/star/connection/NoConnectException.hpp" @@ -49,8 +47,6 @@ #include "com/sun/star/frame/XComponentLoader.hpp" #include "com/sun/star/io/XInputStream.hpp" #include "com/sun/star/io/XOutputStream.hpp" -#include "com/sun/star/lang/DisposedException.hdl" -#include "com/sun/star/lang/DisposedException.hpp" #include "com/sun/star/lang/IllegalArgumentException.hpp" #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" #include "com/sun/star/lang/XComponent.hpp" diff --git a/bridges/prj/build.lst b/bridges/prj/build.lst index 0e7979742562..d6e6d864db04 100644 --- a/bridges/prj/build.lst +++ b/bridges/prj/build.lst @@ -2,9 +2,6 @@ br bridges : cppuhelper jurt jvmaccess salhelper NULL br bridges usr1 - all br_mkout NULL br bridges\inc nmake - all br_inc NULL br bridges\unotypes nmake - all br_unotypes NULL -br bridges\source\remote\static nmake - all br_rem_static br_unotypes br_inc NULL -br bridges\source\remote\urp nmake - all br_rem_urp br_rem_static br_inc NULL -br bridges\source\remote\context nmake - all br_rcon br_unotypes br_inc NULL br bridges\source\cpp_uno\mingw_intel nmake - w br_gcc3i br_cppuno_shared br_unotypes br_inc NULL br bridges\source\cpp_uno\msvc_win32_intel nmake - w br_msci br_cppuno_shared br_unotypes br_inc NULL br bridges\source\cpp_uno\gcc3_linux_intel nmake - u br_gcc3li br_cppuno_shared br_unotypes br_inc NULL diff --git a/bridges/prj/d.lst b/bridges/prj/d.lst index 0b3dd93370d4..1ca453a83c1d 100644 --- a/bridges/prj/d.lst +++ b/bridges/prj/d.lst @@ -1,16 +1,3 @@ -mkdir: %_DEST%\inc%_EXT%\bridges -mkdir: %_DEST%\inc%_EXT%\bridges\remote - -..\inc\bridges\remote\connection.h %_DEST%\inc%_EXT%\bridges\remote\connection.h -..\inc\bridges\remote\context.h %_DEST%\inc%_EXT%\bridges\remote\context.h -..\inc\bridges\remote\remote.h %_DEST%\inc%_EXT%\bridges\remote\remote.h - -..\%__SRC%\lib\irmcxt* %_DEST%\lib%_EXT%\* -..\%__SRC%\lib\librmcxt.*.* %_DEST%\lib%_EXT%\* -..\%__SRC%\bin\rmcxt*.dll %_DEST%\bin%_EXT%\* - -..\%__SRC%\lib\liburp_uno* %_DEST%\lib%_EXT%\liburp_uno* -..\%__SRC%\bin\urp_uno* %_DEST%\bin%_EXT%\urp_uno* ..\%__SRC%\lib\libjava_uno* %_DEST%\lib%_EXT%\libjava_uno* ..\%__SRC%\bin\java_uno* %_DEST%\bin%_EXT%\java_uno* ..\%__SRC%\class\java_uno*.jar %_DEST%\bin%_EXT%\java_uno*.jar @@ -21,8 +8,3 @@ mkdir: %_DEST%\inc%_EXT%\bridges\remote ..\%__SRC%\lib\libgcc3_uno.* %_DEST%\lib%_EXT%\libgcc3_uno.* ..\%__SRC%\bin\gcc3_uno.* %_DEST%\bin%_EXT%\gcc3_uno.* ..\%__SRC%\lib\libsunpro5_uno.* %_DEST%\lib%_EXT%\libsunpro5_uno.* - -..\%__SRC%\lib\rmcxt3.lib %_DEST%\lib%_EXT%\rmcxt.lib - - -linklib: librmcxt.*.* diff --git a/bridges/source/remote/context/context.cxx b/bridges/source/remote/context/context.cxx deleted file mode 100644 index 7a2f3e6e6f66..000000000000 --- a/bridges/source/remote/context/context.cxx +++ /dev/null @@ -1,484 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "rtl/ustring.hxx" -#include "rtl/instance.hxx" - -#include -#include -#include -#include - -using namespace ::std; -using namespace ::osl; -using namespace ::rtl; - -namespace { - -extern "C" typedef void * (SAL_CALL * MemAlloc)(sal_Size); - -} - -namespace remote_context -{ - -class remote_ContextImpl : - public remote_Context -{ -public: - remote_ContextImpl( remote_Connection *pConnection, - rtl_uString *pIdStr, - rtl_uString *pDescription, - rtl_uString *pProtocol, - remote_InstanceProvider *pProvider ); - ~remote_ContextImpl(); - - static void SAL_CALL thisAcquire( uno_Context * ); - static void SAL_CALL thisRelease( uno_Context * ); - static void * SAL_CALL thisQuery( uno_Context * , rtl_uString * ); - static void SAL_CALL thisAddDisposingListener( remote_Context * , remote_DisposingListener * ); - static void SAL_CALL thisRemoveDisposingListener( remote_Context *, remote_DisposingListener *); - static void SAL_CALL thisDispose( remote_Context *); -public: - oslInterlockedCount m_nRef; - sal_Bool m_bDisposed; - list < remote_DisposingListener * > m_lstListener; - Mutex m_mutex; -}; - - - - -struct equalOUString_Impl -{ - sal_Bool operator()(const OUString & s1, const OUString & s2) const - { return s1 == s2; } -}; - -struct hashOUString_Impl -{ - size_t operator()(const OUString & rName) const - { return rName.hashCode(); } -}; - -typedef hash_map -< - OUString, - void *, - hashOUString_Impl, - equalOUString_Impl -> -ContextMap; - -#if OSL_DEBUG_LEVEL > 1 -static MyCounter thisCounter( "DEBUG : Context" ); -#endif - -class ContextAdmin -{ -public: - // listener administration - void addContextListener( remote_contextListenerFunc listener , void *pObject ); - void removeContextListener( remote_contextListenerFunc listener , void *pObject ); - - void fire( sal_Int32 nRemoteContextMode, - rtl_uString *sName, - rtl_uString *sDescription ); - - // context administration - uno_Context *createAndRegisterContext( - remote_Connection *pConnection, - rtl_uString *pIdStr, - rtl_uString *pDescription, - rtl_uString *pProtocol, - remote_InstanceProvider *pInstanceProvider ); - - void revokeContext( uno_Context *pRemoteContext ); - - uno_Context *getContext( rtl_uString *pHost ); - - rtl_uString ** getConnectionList( - sal_Int32 *pnStringCount, MemAlloc memAlloc ); - -private: - ::osl::Mutex m_mutex; - - ContextMap m_mapContext; - - typedef std::list< std::pair< remote_contextListenerFunc, void * > > List; - List m_lstListener; -}; - -void ContextAdmin::addContextListener( remote_contextListenerFunc listener , void *pObject ) -{ - ::osl::MutexGuard guard( m_mutex ); - - m_lstListener.push_back( std::make_pair( listener, pObject ) ); -} - -void ContextAdmin::removeContextListener( remote_contextListenerFunc listener , void *pObject ) -{ - ::osl::MutexGuard guard( m_mutex ); - - for (List::iterator ii(m_lstListener.begin()); ii != m_lstListener.end(); - ++ii) - { - if (ii->first == listener && ii->second == pObject) { - m_lstListener.erase( ii ); - break; - } - } -} - -void ContextAdmin::fire( - sal_Int32 nRemoteContextMode, - rtl_uString *pName, - rtl_uString *sDescription ) -{ - List lst; - { - ::osl::MutexGuard guard( m_mutex ); - lst = m_lstListener; - } - for (List::iterator i(lst.begin()); i != lst.end(); ++i) { - (i->first)(i->second, nRemoteContextMode, pName, sDescription); - } -} - -uno_Context *ContextAdmin::createAndRegisterContext( remote_Connection *pConnection, - rtl_uString *pIdStr, - rtl_uString *pDescription, - rtl_uString *pProtocol, - remote_InstanceProvider *pInstanceProvider ) -{ - ::osl::MutexGuard guard( m_mutex ); - - uno_Context *pContext = getContext( pIdStr ); - if( pContext ) - { - pContext->release( pContext ); - return 0; - } - - remote_ContextImpl *p = new remote_ContextImpl( pConnection, - pIdStr, - pDescription, - pProtocol, - pInstanceProvider ); - - p->aBase.acquire( (uno_Context*) p ); - - m_mapContext[ OUString( pIdStr) ] = (void*) p; - - fire( REMOTE_CONTEXT_CREATE , pIdStr , pDescription ); - return ( uno_Context * )p; -} - - -void ContextAdmin::revokeContext( uno_Context *pRemoteContext ) -{ - ::osl::MutexGuard guard( m_mutex ); - - remote_ContextImpl *p = ( remote_ContextImpl * ) pRemoteContext; - - ContextMap::iterator ii = m_mapContext.find( p->m_pName ); - OSL_ASSERT( ii != m_mapContext.end() ); - m_mapContext.erase( ii ); - - fire( REMOTE_CONTEXT_DESTROY , p->m_pName , p->m_pDescription ); - -} - -uno_Context *ContextAdmin::getContext( rtl_uString *pHost ) -{ - ::osl::MutexGuard guard( m_mutex ); - - ContextMap::iterator ii = m_mapContext.find( OUString( (rtl_uString*)pHost ) ); - if( ii == m_mapContext.end() ) - { - return 0; - } - - uno_Context *p = ( uno_Context * ) (*ii).second; - p->acquire( p ); - return p; -} - - -rtl_uString ** ContextAdmin::getConnectionList( - sal_Int32 *pnStringCount, MemAlloc memAlloc ) -{ - ::osl::MutexGuard guard( m_mutex ); - - *pnStringCount = m_mapContext.size(); - - if (*pnStringCount == 0) - return NULL; - - rtl_uString **ppReturn = ( rtl_uString ** ) - memAlloc( sizeof( rtl_uString * ) * m_mapContext.size() ); - memset( ppReturn , 0 , sizeof( rtl_uString * ) * m_mapContext.size() ); - - sal_Int32 i = 0; - for( ContextMap::iterator ii = m_mapContext.begin() ; - ii != m_mapContext.end(); - ++ii, i++ ) - { - rtl_uString_assign( &( ppReturn[i] ), (*ii).first.pData ); - } - - return ppReturn; -} - - -struct theContextAdmin : public rtl::Static {}; - -/***************************** - * remote_ContextImpl implementation - ****************************/ - - - -remote_ContextImpl::remote_ContextImpl( remote_Connection *pConnection , - rtl_uString *pIdStr, - rtl_uString *pDescription, - rtl_uString *pProtocol, - remote_InstanceProvider *pProvider ) : - m_nRef( 0 ), - m_bDisposed( sal_False ) -{ - m_pConnection = pConnection; - m_pConnection->acquire( m_pConnection ); - - m_pInstanceProvider = pProvider; - if( m_pInstanceProvider ) - { - m_pInstanceProvider->acquire( pProvider ); - } - - m_pName = pIdStr; - rtl_uString_acquire( m_pName ); - - m_pDescription = pDescription; - rtl_uString_acquire( m_pDescription ); - - m_pProtocol = pProtocol; - rtl_uString_acquire( pProtocol ); - - aBase.acquire = thisAcquire; - aBase.release = thisRelease; - addDisposingListener = thisAddDisposingListener; - removeDisposingListener = thisRemoveDisposingListener; - dispose = thisDispose; -#if OSL_DEBUG_LEVEL > 1 - thisCounter.acquire(); -#endif -} - -remote_ContextImpl::~remote_ContextImpl() -{ - // disposed must have been called - OSL_ASSERT( m_bDisposed ); - - rtl_uString_release( m_pName ); - rtl_uString_release( m_pDescription ); - rtl_uString_release( m_pProtocol ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.release(); -#endif - -} - - -void remote_ContextImpl::thisAddDisposingListener( remote_Context *pRemoteC , - remote_DisposingListener *pListener ) -{ - remote_ContextImpl *pImpl = (remote_ContextImpl * ) pRemoteC; - - ::osl::MutexGuard guard( pImpl->m_mutex ); - - pListener->acquire( pListener ); - pImpl->m_lstListener.push_back( pListener ); -} - -void remote_ContextImpl::thisRemoveDisposingListener( remote_Context *pRemoteC, - remote_DisposingListener *pListener) -{ - remote_ContextImpl *pImpl = (remote_ContextImpl * ) pRemoteC; - MutexGuard guard( pImpl->m_mutex ); - - for( list< remote_DisposingListener * >::iterator ii = pImpl->m_lstListener.begin() ; - ii != pImpl->m_lstListener.end(); - ++ii ) - { - if( (*ii) == pListener ) - { - pImpl->m_lstListener.erase( ii ); - pListener->release( pListener ); - break; - } - } -} - -void remote_ContextImpl::thisDispose( remote_Context *pRemoteC ) -{ - remote_ContextImpl *pImpl = ( remote_ContextImpl * )pRemoteC; - - MutexGuard guard( pImpl->m_mutex ); - if( ! pImpl->m_bDisposed ) - { - pImpl->m_bDisposed = sal_True; - theContextAdmin::get().revokeContext( (uno_Context * ) pRemoteC ); - - if( pImpl->m_pInstanceProvider ) - { - pImpl->m_pInstanceProvider->release( pImpl->m_pInstanceProvider ); - pImpl->m_pInstanceProvider = 0; - } - - pImpl->m_pConnection->release( pImpl->m_pConnection ); - pImpl->m_pConnection = 0; - - list< remote_DisposingListener * > lst = pImpl->m_lstListener; - pImpl->m_lstListener.clear(); - - for( list < remote_DisposingListener * >::iterator ii = lst.begin(); - ii != lst.end(); - ++ii ) - { - (*ii)->disposing( (*ii) , pImpl->m_pName ); - (*ii)->release( (*ii) ); - } - - } -} - - - -void remote_ContextImpl::thisAcquire( uno_Context *pRemoteC ) -{ - remote_ContextImpl *p = SAL_REINTERPRET_CAST(remote_ContextImpl * ,pRemoteC ); - osl_incrementInterlockedCount( &(p->m_nRef) ); -} - -void remote_ContextImpl::thisRelease( uno_Context *pRemoteC ) -{ - remote_ContextImpl *p = SAL_REINTERPRET_CAST( remote_ContextImpl * , pRemoteC ); - if (! osl_decrementInterlockedCount( &(p->m_nRef) )) - { - // enshure, that this piece of code is not reentered - osl_incrementInterlockedCount( &(p->m_nRef) ); - - // dispose, if necessary - p->dispose( p ); - - // restore the counter - osl_decrementInterlockedCount( &(p->m_nRef) ); - - if( 0 == p->m_nRef ) - { - delete p; - } - else - { - // reanimated, but disposed ! - } - } -} - -void *remote_ContextImpl::thisQuery( uno_Context * , rtl_uString * ) -{ - return 0; -} - - -} // end namespace remote_context - - -using namespace remote_context; - -//----------------------- -// -// C-Interface -// -//----------------------- -extern "C" remote_Context * SAL_CALL -remote_getContext( rtl_uString *pIdString ) -{ - return (remote_Context *) theContextAdmin::get().getContext(pIdString); -} - - - -extern "C" remote_Context * SAL_CALL -remote_createContext( remote_Connection *pConnection, - rtl_uString *pIdStr, - rtl_uString *pDescription, - rtl_uString *pProtocol, - remote_InstanceProvider *pProvider ) -{ - remote_ContextImpl *p = (remote_ContextImpl * ) - theContextAdmin::get().createAndRegisterContext( - pConnection , - pIdStr , - pDescription, - pProtocol, - pProvider ); - - return (remote_Context * )p; -} - - -extern "C" void SAL_CALL -remote_addContextListener( remote_contextListenerFunc listener, void *pObject ) -{ - theContextAdmin::get().addContextListener( listener , pObject ); -} - -extern "C" void SAL_CALL -remote_removeContextListener( remote_contextListenerFunc listener , void *pObject ) -{ - theContextAdmin::get().removeContextListener( listener , pObject ); -} - -extern "C" rtl_uString ** SAL_CALL -remote_getContextList( sal_Int32 *pnStringCount, MemAlloc memAlloc ) -{ - return theContextAdmin::get().getConnectionList( pnStringCount , memAlloc ); -} diff --git a/bridges/source/remote/context/exports.dxp b/bridges/source/remote/context/exports.dxp deleted file mode 100644 index dcef3c369b10..000000000000 --- a/bridges/source/remote/context/exports.dxp +++ /dev/null @@ -1,5 +0,0 @@ -remote_getContext -remote_createContext -remote_getContextList -remote_removeContextListener -remote_addContextListener \ No newline at end of file diff --git a/bridges/source/remote/context/makefile.mk b/bridges/source/remote/context/makefile.mk deleted file mode 100644 index cc2a52355d25..000000000000 --- a/bridges/source/remote/context/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=bridges -TARGET=rmcxt -ENABLE_EXCEPTIONS=TRUE -USE_DEFFILE=TRUE - -UNIXVERSIONNAMES=UDK - -# --- Settings ----------------------------------------------------- -.INCLUDE : settings.mk -# ------------------------------------------------------------------ - -UNOUCRDEP=$(SOLARUCRDIR)$/uce.rdb -UNOUCRRDB=$(SOLARUCRDIR)$/uce.rdb - -SLOFILES= $(SLO)$/context.obj - -SHL1TARGET= $(TARGET) - -SHL1STDLIBS= \ - $(SALLIB) - -SHL1DEPN= -SHL1IMPLIB= i$(TARGET) -SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1RPATH=URELIB - -SHL1VERSIONMAP= $(TARGET).map - -DEF1NAME= $(SHL1TARGET) -#DEF1EXPORTFILE= exports.dxp - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/bridges/source/remote/context/rmcxt.map b/bridges/source/remote/context/rmcxt.map deleted file mode 100755 index 182f6495ea9d..000000000000 --- a/bridges/source/remote/context/rmcxt.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { - global: - remote_getContext; - remote_createContext; - remote_getContextList; - remote_removeContextListener; - remote_addContextListener; - local: - *; -}; diff --git a/bridges/source/remote/idl/corba.idl b/bridges/source/remote/idl/corba.idl deleted file mode 100644 index b71d16e2eff1..000000000000 --- a/bridges/source/remote/idl/corba.idl +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -module com -{ -module sun -{ -module star -{ - -module corba -{ - - // CosBridging module - typedef unsigned long ObjectSystemID; - typedef sequence< byte > OpaqueData; - - struct OneThreadID - { - ObjectSystemID objSysID; - OpaqueData threadID; - }; - - typedef sequence ThreadIDs; - - struct LogicalThreadID // Service context - { - ThreadIDs IDs; - }; - - struct CorbaString8 - { - string theString; - }; - - struct CorbaUnion - { - long dummy; - }; - - struct ObjectKey - { - CorbaString8 sOid; - CorbaString8 sType; - }; - - enum TCKind - { - tk_null, tk_void, - tk_short, tk_long, tk_ushort, tk_ulong, - tk_float, tk_double, tk_boolean, tk_char, - tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref, - tk_struct, tk_union, tk_enum, tk_string, - tk_sequence, tk_array, tk_alias, tk_except, - tk_longlong, tk_ulonglong, tk_longdouble, - tk_wchar, tk_wstring, tk_fixed, - tk_value, tk_value_box, - tk_native, - tk_abstract_interface - }; -}; - -}; -}; -}; diff --git a/bridges/source/remote/static/helper.cxx b/bridges/source/remote/static/helper.cxx deleted file mode 100644 index 1ad421cedecc..000000000000 --- a/bridges/source/remote/static/helper.cxx +++ /dev/null @@ -1,209 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include - -#include - -#include -#include -#include - -#include - -using namespace ::rtl; -using namespace ::com::sun::star::uno; - -namespace bridges_remote -{ - -void SAL_CALL remote_createStub ( - remote_Interface **ppRemoteI, - rtl_uString *pOid , - typelib_TypeDescriptionReference *pTypeRef, - uno_Environment *pEnvRemote, - ReleaseRemoteCallbackFunc releaseRemoteCallback ) -{ - typelib_TypeDescription *pType = 0; - typelib_typedescriptionreference_getDescription( &pType, pTypeRef ); - - (void) pEnvRemote->pExtEnv->getRegisteredInterface( - pEnvRemote->pExtEnv, - (void **)ppRemoteI, - pOid, - (typelib_InterfaceTypeDescription* )pType ); - - if( *ppRemoteI ) - { - if( (*ppRemoteI)->acquire == acquireRemote2RemoteStub ) { - - if( releaseRemoteCallback ) - { - // use the callback handler, the bridge wants to send the call immeadiatly - releaseRemoteCallback( *ppRemoteI , pOid, pTypeRef , pEnvRemote ); - } - else - { - ((::bridges_remote::Remote2RemoteStub *)*ppRemoteI)->releaseRemote(); - } - } - else - { - // Uno2RemoteStub - // no release necessary - } - } - else - { - remote_BridgeImpl *pImpl = ((remote_Context *)pEnvRemote->pContext)->m_pBridgeImpl; - *ppRemoteI = - new ::bridges_remote::Remote2RemoteStub( - pOid, - (typelib_InterfaceTypeDescription * ) pType, - pEnvRemote, - pImpl->m_sendRequest); - - // ppRemoteI may change during registration - pEnvRemote->pExtEnv->registerProxyInterface( - pEnvRemote->pExtEnv, - (void **) ppRemoteI, - freeRemote2RemoteStub, - pOid, - (typelib_InterfaceTypeDescription * ) pType ); - } - - typelib_typedescription_release( pType ); -} - -void SAL_CALL remote_sendQueryInterface( - uno_Environment *pEnvRemote, - remote_Interface **ppRemoteI, - rtl_uString *pOid , - typelib_TypeDescriptionReference *pTypeRef, - uno_Any **ppException - ) -{ - OSL_ASSERT( ppRemoteI ); - - typelib_InterfaceTypeDescription *pType = 0; - typelib_typedescriptionreference_getDescription( (typelib_TypeDescription ** )&pType, pTypeRef ); - - if( *ppRemoteI ) - { - (*ppRemoteI)->release( *ppRemoteI ); - (*ppRemoteI) = 0; - } - - remote_BridgeImpl *pImpl = ((remote_Context *)pEnvRemote->pContext)->m_pBridgeImpl; - - Type type = ::getCppuType( (Reference < XInterface > *)0 ); - - // get type for queryInterface - OUString sCompleteMethodName = type.getTypeName(); - sCompleteMethodName += OUString::createFromAscii("::queryInterface"); - - typelib_InterfaceMemberTypeDescription *pMemberType = 0; - typelib_typedescription_getByName( - (typelib_TypeDescription **) &pMemberType, - sCompleteMethodName.pData ); - - OSL_ASSERT( pMemberType ); - - uno_Any anyInterface; - anyInterface.pType = 0; - anyInterface.pData = 0; - - void *pReturn = &anyInterface; - void *ppArgs[1]; - - ppArgs[0] = 0; - typelib_TypeDescriptionReference *pRef = 0; - typelib_typedescriptionreference_new( &pRef , - pType->aBase.eTypeClass, - pType->aBase.pTypeName); - - ppArgs[0] = &pRef; - -// uno_Any anyException; -// uno_Any *pAnyException = &anyException; - - // do the queryInterface - pImpl->m_sendRequest( - pEnvRemote, - (typelib_TypeDescription * ) pMemberType, - pOid, - pType, - pReturn, - ppArgs, - ppException ); - - - // now release everything - typelib_typedescriptionreference_release( pRef ); - typelib_typedescription_release( (typelib_TypeDescription * ) pMemberType ); - - if( *ppException ) - { - *ppRemoteI = 0; - } - else - { - // set out parameter - if( typelib_TypeClass_INTERFACE == anyInterface.pType->eTypeClass ) - { - *ppRemoteI = ( remote_Interface * ) anyInterface.pReserved; - } - typelib_typedescriptionreference_release( anyInterface.pType ); - } - - typelib_typedescription_release( (typelib_TypeDescription * ) pType ); -} - - -void SAL_CALL remote_retrieveOidFromProxy( - remote_Interface *pRemoteI, - rtl_uString **ppOid ) -{ - if( pRemoteI->acquire == acquireRemote2RemoteStub ) - { - // Remote2RemoteStub - ::bridges_remote::Remote2RemoteStub *pStub = (::bridges_remote::Remote2RemoteStub * ) pRemoteI; - rtl_uString_newFromString( ppOid , pStub->m_sOid.pData ); - } - else - { - // Uno2RemoteStub - ::bridges_remote::Uno2RemoteStub *pStub = (::bridges_remote::Uno2RemoteStub * ) pRemoteI; - rtl_uString_newFromString( ppOid , pStub->m_sOid.pData ); - pRemoteI->acquire( pRemoteI ); - } -} - -} diff --git a/bridges/source/remote/static/makefile.mk b/bridges/source/remote/static/makefile.mk deleted file mode 100644 index 9b3c2b795f8d..000000000000 --- a/bridges/source/remote/static/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=bridges -TARGET=bridges_remote_static -ENABLE_EXCEPTIONS=TRUE -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# ------------------------------------------------------------------ - -SLOFILES= \ - $(SLO)$/proxy.obj \ - $(SLO)$/stub.obj \ - $(SLO)$/remote.obj \ - $(SLO)$/mapping.obj \ - $(SLO)$/helper.obj \ - $(SLO)$/remote_types.obj - -# Forte6 update 1 on Solaris Intel dies with internal compiler error -# on stub.cxx if optimization is on. Switch it off for now. -# To be reevaluated on compiler upgrade -.IF "$(OS)$(CPU)"=="SOLARISI" -NOOPTFILES=\ - $(SLO)$/stub.obj -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - diff --git a/bridges/source/remote/static/mapping.cxx b/bridges/source/remote/static/mapping.cxx deleted file mode 100644 index 69e079d14eaf..000000000000 --- a/bridges/source/remote/static/mapping.cxx +++ /dev/null @@ -1,218 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include - -#include -#include -#include -#include - -using namespace bridges_remote; - -extern "C" { - -static void SAL_CALL thisAcquire( uno_Mapping *pMap ) -{ - RemoteMapping *p = SAL_REINTERPRET_CAST( RemoteMapping * , pMap ); - if( 1 == osl_incrementInterlockedCount( &(p->m_nRef) ) ) - { - if( remoteToUno == pMap->mapInterface ) - { - uno_registerMapping( &pMap , - freeRemoteMapping, - p->pEnvRemote , - p->pEnvUno , - p->m_sPurpose.pData ); - } - else - { - uno_registerMapping( &pMap , - freeRemoteMapping, - p->pEnvUno , - p->pEnvRemote , - p->m_sPurpose.pData ); - } - - } -} - -static void SAL_CALL thisRelease( uno_Mapping *pMap ) -{ - RemoteMapping *p = SAL_REINTERPRET_CAST( RemoteMapping * , pMap ); - if (! osl_decrementInterlockedCount( &(p->m_nRef) )) - { - uno_revokeMapping( pMap ); - } -} - -} - -namespace bridges_remote { - -void remoteToUno( uno_Mapping *pMapping, void **ppUnoI, void *pRemoteI, - typelib_InterfaceTypeDescription *pTypeDescr ) -{ - remote_Mapping *pRemoteMapping = ( remote_Mapping * ) pMapping; - - OSL_ASSERT( ppUnoI && pTypeDescr ); - if (*ppUnoI) - { - ((uno_Interface *)*ppUnoI)->release( (uno_Interface *)*ppUnoI ); - *ppUnoI = 0; - } - - if (pRemoteI && pTypeDescr) - { - // get object id of interface to be wrapped - rtl_uString * pOid = 0; - pRemoteMapping->pEnvRemote->pExtEnv->getObjectIdentifier( - pRemoteMapping->pEnvRemote->pExtEnv, - &pOid, - pRemoteI ); - - OSL_ASSERT(pOid); - if( ! pOid ) - { - return; - } - - // try to get any known interface from target environment - pRemoteMapping->pEnvUno->pExtEnv->getRegisteredInterface( - pRemoteMapping->pEnvUno->pExtEnv, - ppUnoI, - pOid, - pTypeDescr); - - if ( ! *ppUnoI) // already existing interface - { - // try to publish a new proxy; proxy may be exchanged during registration - *ppUnoI = new Remote2UnoProxy( - ( remote_Interface * ) pRemoteI, - pOid, - pTypeDescr , - pRemoteMapping->pEnvUno, - pRemoteMapping->pEnvRemote); - - pRemoteMapping->pEnvUno->pExtEnv->registerProxyInterface( - pRemoteMapping->pEnvUno->pExtEnv, - ppUnoI, - freeRemote2UnoProxy, - pOid, - pTypeDescr ); - - OSL_ASSERT( *ppUnoI ); - } - rtl_uString_release( pOid ); - } -} - -void unoToRemote( uno_Mapping *pMapping, void **ppRemoteI, void *pUnoI, - typelib_InterfaceTypeDescription *pTypeDescr ) -{ - remote_Mapping *pRemoteMapping = ( remote_Mapping * ) pMapping; - OSL_ASSERT( ppRemoteI && pTypeDescr ); - if (*ppRemoteI) - { - ((remote_Interface *)*ppRemoteI)->release( (remote_Interface *)*ppRemoteI); - *ppRemoteI = 0; - } - if (pUnoI && pTypeDescr) - { - // get object id of interface to be wrapped - rtl_uString * pOid = 0; - pRemoteMapping->pEnvUno->pExtEnv->getObjectIdentifier( - pRemoteMapping->pEnvUno->pExtEnv, - &pOid, - pUnoI ); - - OSL_ASSERT( pOid ); - if( ! pOid ) - { - return; - } - - pRemoteMapping->pEnvRemote->pExtEnv->getRegisteredInterface( - pRemoteMapping->pEnvRemote->pExtEnv, - (void**)ppRemoteI, - pOid, - pTypeDescr ); - - if( !*ppRemoteI ) - { - // try to publish a new proxy; - *ppRemoteI = new Uno2RemoteStub( - ( uno_Interface * ) pUnoI, - pOid, - pTypeDescr, - pRemoteMapping->pEnvUno, - pRemoteMapping->pEnvRemote ); - - // note : ppRemoteI may change during registration - pRemoteMapping->pEnvRemote->pExtEnv->registerProxyInterface( - pRemoteMapping->pEnvRemote->pExtEnv, - (void**) ppRemoteI, - freeUno2RemoteStub, - pOid, - pTypeDescr ); - } - - rtl_uString_release( pOid ); - } -} - -void freeRemoteMapping(uno_Mapping * mapping) { - delete reinterpret_cast< RemoteMapping * >(mapping); -} - -RemoteMapping::RemoteMapping( uno_Environment *pEnvUno_ , - uno_Environment *pEnvRemote_, - uno_MapInterfaceFunc func, - const ::rtl::OUString sPurpose) : - m_nRef( 1 ), - m_sPurpose( sPurpose ) -{ - pEnvUno = pEnvUno_; - pEnvRemote = pEnvRemote_; - - pEnvUno->acquire( pEnvUno ); - pEnvRemote->acquire( pEnvRemote ); - - aBase.mapInterface = func; - aBase.acquire = thisAcquire; - aBase.release = thisRelease; -} - -RemoteMapping::~RemoteMapping( ) -{ - pEnvUno->release( pEnvUno ); - pEnvRemote->release( pEnvRemote ); -} - -} diff --git a/bridges/source/remote/static/proxy.cxx b/bridges/source/remote/static/proxy.cxx deleted file mode 100644 index da67e9bd17ec..000000000000 --- a/bridges/source/remote/static/proxy.cxx +++ /dev/null @@ -1,338 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include -#include - -#include -#include -#include - -#include - -#include - -#include "remote_types.hxx" - -#if OSL_DEBUG_LEVEL > 1 -#include -static MyCounter thisCounter( "DEBUG : Remote2UnoProxy"); -#endif - -using namespace ::bridges_remote; -using namespace ::com::sun::star::uno; - -extern "C" { - -void SAL_CALL remote_release( void *pRemoteI ) -{ - ((remote_Interface * )pRemoteI)->release( (remote_Interface * ) pRemoteI ); -} - -} - -namespace bridges_remote { - -void freeRemote2UnoProxy(uno_ExtEnvironment *, void * proxy) { - delete static_cast< Remote2UnoProxy * >(proxy); -} - -void acquireRemote2UnoProxy( uno_Interface *pThis ) -{ - Remote2UnoProxy *p = ( Remote2UnoProxy * ) pThis; - if( 1 == osl_incrementInterlockedCount( &(p->m_nRef) ) ) - { - p->m_pEnvUno->pExtEnv->registerProxyInterface( - p->m_pEnvUno->pExtEnv, - (void**)&pThis, - freeRemote2UnoProxy, - p->m_sOid.pData, - p->m_pType ); - OSL_ASSERT( (uno_Interface *)p == pThis ); - } -} - -void releaseRemote2UnoProxy( uno_Interface *pThis ) -{ - Remote2UnoProxy *p = ( Remote2UnoProxy * ) pThis; - if ( 0 == osl_decrementInterlockedCount( &(p->m_nRef) )) - { - p->m_pEnvUno->pExtEnv->revokeInterface( p->m_pEnvUno->pExtEnv, p ); - } -} - -void SAL_CALL dispatchRemote2UnoProxy( - uno_Interface * pUnoI, - typelib_TypeDescription const * pType, - void * pReturn, - void * ppArgs[], - uno_Any ** ppException ) -{ - Remote2UnoProxy *p = ( Remote2UnoProxy * ) pUnoI; - RemoteThreadCounter counter( p->m_pEnvRemote ); - - typelib_InterfaceMethodTypeDescription *pMethodType = 0; - typelib_InterfaceAttributeTypeDescription *pAttributeType = 0; - typelib_TypeDescription *pReturnType = 0; - typelib_TypeDescription **ppArgType = 0; - sal_Int32 nArgCount = 0; - sal_Bool *pbIsIn = 0; - sal_Bool *pbIsOut = 0; - sal_Bool *pbConversionNeeded = 0; - sal_Bool bConversionNeededForReturn = 0; - - //-------------------------------- - // Collect all needed types ! - //-------------------------------- - if( typelib_TypeClass_INTERFACE_ATTRIBUTE == pType->eTypeClass ) - { - pAttributeType = ( typelib_InterfaceAttributeTypeDescription * ) pType; - if( pReturn ) - { - TYPELIB_DANGER_GET( &pReturnType , pAttributeType->pAttributeTypeRef ); - bConversionNeededForReturn = remote_relatesToInterface( pReturnType ); - } - else - { - nArgCount = 1; - ppArgType = (typelib_TypeDescription **) alloca( sizeof( void * ) ); - pbIsIn = ( sal_Bool * ) alloca( sizeof( sal_Bool ) ); - pbIsOut = ( sal_Bool * ) alloca( sizeof( sal_Bool ) ); - pbConversionNeeded = ( sal_Bool *) alloca( sizeof( sal_Bool ) ); - - pbIsIn[0] = sal_True; - pbIsOut[0] = sal_False; - ppArgType[0] = 0; - TYPELIB_DANGER_GET( &( ppArgType[0] ) , pAttributeType->pAttributeTypeRef ); - pbConversionNeeded[0] = remote_relatesToInterface( ppArgType[0] ); - - } - } - if( typelib_TypeClass_INTERFACE_METHOD == pType->eTypeClass ) - { - pMethodType = ( typelib_InterfaceMethodTypeDescription * ) pType; - TYPELIB_DANGER_GET( &pReturnType , pMethodType->pReturnTypeRef ); - bConversionNeededForReturn = remote_relatesToInterface( pReturnType ); - nArgCount = pMethodType->nParams; - ppArgType = (typelib_TypeDescription **) alloca( sizeof( void * ) * nArgCount ); - pbIsIn = (sal_Bool * ) alloca( sizeof( sal_Bool ) * nArgCount ); - pbIsOut = (sal_Bool * ) alloca( sizeof( sal_Bool ) * nArgCount ); - pbConversionNeeded = ( sal_Bool *) alloca( sizeof( sal_Bool ) * nArgCount ); - sal_Int32 i; - for( i = 0 ; i < nArgCount ; i ++ ) - { - ppArgType[i] = 0; - TYPELIB_DANGER_GET( & (ppArgType[i]) , pMethodType->pParams[i].pTypeRef ); - pbIsIn[i] = pMethodType->pParams[i].bIn; - pbIsOut[i] = pMethodType->pParams[i].bOut; - pbConversionNeeded[i] = remote_relatesToInterface( ppArgType[i] ); - } - } - - void *pRemoteReturn = 0; - if( pReturnType ) - { - if( bConversionNeededForReturn ) - { - pRemoteReturn = alloca( pReturnType->nSize ); - } - else - { - pRemoteReturn = pReturn; - } - } - - void ** ppRemoteArgs = 0; - if( nArgCount ) - { - ppRemoteArgs = (void**) alloca( sizeof( void * ) * nArgCount ); - } - - sal_Int32 i; - for( i = 0 ; i < nArgCount ; i ++ ) - { - if( pbConversionNeeded[i] ) - { - ppRemoteArgs[i] = alloca( ppArgType[i]->nSize ); - - if( pbIsIn[i] ) { - uno_copyAndConvertData( - ppRemoteArgs[i], - ppArgs[i], - ppArgType[i], - p->m_mapUno2Remote.get() ); - } - } - else - { - ppRemoteArgs[i] = ppArgs[i]; - } - } - - uno_Any any; - uno_Any *pAny = &any; - - p->m_pRemoteI->pDispatcher( p->m_pRemoteI, - pType, - pRemoteReturn, - ppRemoteArgs, - &pAny ); - - if( ! pAny ) - { - if( pReturn && bConversionNeededForReturn ) - { - uno_copyAndConvertData( - pReturn , - pRemoteReturn, - pReturnType, - p->m_mapRemote2Uno.get() ); - uno_destructData( pRemoteReturn , pReturnType , remote_release ); - } - - sal_Int32 j; - for( j = 0 ; j < nArgCount ; j ++ ) - { - if( pbConversionNeeded[j] ) - { - if( pbIsIn[j] ) { - if( pbIsOut[j] ) { - uno_destructData( ppArgs[j] , - ppArgType[j] , - 0 ); - uno_copyAndConvertData( ppArgs[j] , - ppRemoteArgs[j], - ppArgType[j], - p->m_mapRemote2Uno.get() ); - } - } - else // pure out - { - uno_copyAndConvertData( ppArgs[j] , - ppRemoteArgs[j], - ppArgType[j], - p->m_mapRemote2Uno.get() ); - } - uno_destructData( ppRemoteArgs[j], - ppArgType[j], - remote_release ); - } - } - *ppException = 0; - } - else - { - // ----------------------- - // an exception occured - // ----------------------- - typelib_TypeDescription *pAnyType = 0; - getCppuType( (::com::sun::star::uno::Any*) 0 ).getDescription( &pAnyType ); - uno_copyAndConvertData( *ppException , - pAny , - pAnyType, - p->m_mapRemote2Uno.get() ); - uno_destructData( pAny , pAnyType , remote_release ); - typelib_typedescription_release( pAnyType ); - - // destruct remote in parameters ( out parameters have not been constructed ) - for( i = 0 ; i < nArgCount ; i ++ ) - { - if( pbConversionNeeded[i] && pbIsIn[i] ) - { - uno_destructData( ppRemoteArgs[i], - ppArgType[i], - remote_release ); - } - } - } - - //-------------------------- - // release all acquired types - //-------------------------- - if( pReturnType ) - { - TYPELIB_DANGER_RELEASE( pReturnType ); - } - for( i = 0 ; i < nArgCount ; i ++ ) - { - TYPELIB_DANGER_RELEASE( ppArgType[ i] ); - } - -} - -Remote2UnoProxy::Remote2UnoProxy( remote_Interface *pRemoteI, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pType, - uno_Environment *pEnvUno, - uno_Environment *pEnvRemote ) : - m_sOid( pOid ), - m_pType( pType ), - m_pRemoteI( pRemoteI ), - m_pEnvUno( pEnvUno ), - m_pEnvRemote( pEnvRemote ), - m_mapRemote2Uno( pEnvRemote, pEnvUno ), - m_mapUno2Remote( pEnvUno , pEnvRemote ), - m_nRef( 1 ) -{ - typelib_typedescription_acquire( (typelib_TypeDescription * ) m_pType ); - m_pEnvUno->acquire( m_pEnvUno ); - m_pEnvRemote->acquire( m_pEnvRemote ); - - acquire = acquireRemote2UnoProxy; - release = releaseRemote2UnoProxy; - pDispatcher = dispatchRemote2UnoProxy; - - m_pEnvRemote->pExtEnv->registerInterface( - m_pEnvRemote->pExtEnv, - (void**)&m_pRemoteI, - m_sOid.pData, - m_pType ); - m_pRemoteI->acquire( m_pRemoteI ); - -#if OSL_DEBUG_LEVEL > 1 - thisCounter.acquire(); -#endif -} - -Remote2UnoProxy::~Remote2UnoProxy() -{ - // revoke external ref (oid) - m_pEnvRemote->pExtEnv->revokeInterface( m_pEnvRemote->pExtEnv , m_pRemoteI ); - - typelib_typedescription_release( (typelib_TypeDescription * )m_pType ); - m_pRemoteI->release( m_pRemoteI ); - m_pEnvUno->release( m_pEnvUno ); - m_pEnvRemote->release( m_pEnvRemote ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.release(); -#endif -} - -} // end namespace bridge_remote diff --git a/bridges/source/remote/static/remote.cxx b/bridges/source/remote/static/remote.cxx deleted file mode 100644 index 6129d91829ba..000000000000 --- a/bridges/source/remote/static/remote.cxx +++ /dev/null @@ -1,161 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include - -#if OSL_DEBUG_LEVEL > 1 -static MyCounter thisCounter( "DEBUG : Remote2RemoteStub"); -#endif - -using namespace bridges_remote; - -extern "C" { - -static void SAL_CALL thisRelease( remote_Interface *pThis ) -{ - Remote2RemoteStub *p = ( Remote2RemoteStub * ) pThis; - if (! osl_decrementInterlockedCount( &(p->m_nRef) )) - { - p->m_pEnvRemote->pExtEnv->revokeInterface( p->m_pEnvRemote->pExtEnv, pThis ); - - } -} - -static void SAL_CALL thisDispatch( - remote_Interface * pRemoteI, - typelib_TypeDescription const * pMemberType, - void * pReturn, - void * pArgs[], - uno_Any ** ppException ) -{ - Remote2RemoteStub *pThis = ( Remote2RemoteStub * ) pRemoteI; - - pThis->m_dispatch( pThis->m_pEnvRemote, - pMemberType, - pThis->m_sOid.pData, - pThis->m_pType, - pReturn, - pArgs, - ppException ); -} - -} - -namespace bridges_remote { - -void acquireRemote2RemoteStub( remote_Interface *pThis ) -{ - Remote2RemoteStub *p = ( Remote2RemoteStub * ) pThis; - if( 1 == osl_incrementInterlockedCount( &(p->m_nRef) ) ) - { - p->m_pEnvRemote->pExtEnv->registerProxyInterface( - p->m_pEnvRemote->pExtEnv, - (void**)&pThis, - freeRemote2RemoteStub, - p->m_sOid.pData, - p->m_pType ); - OSL_ASSERT( (remote_Interface *)p == pThis ); - } -} - -void freeRemote2RemoteStub(uno_ExtEnvironment *, void * stub) { - delete static_cast< Remote2RemoteStub * >(stub); -} - -Remote2RemoteStub::Remote2RemoteStub( rtl_uString *pOid, - typelib_InterfaceTypeDescription *pType, - uno_Environment *pEnvRemote, - requestClientSideDispatcher dispatch ) : - m_sOid( pOid ), - m_pType( (typelib_InterfaceTypeDescription * ) pType ), - m_nRef( 1 ), - m_pEnvRemote( pEnvRemote ), - m_dispatch( dispatch ), - m_nReleaseRemote( 1 ) -{ - typelib_typedescription_acquire( ( typelib_TypeDescription * ) m_pType ); - m_pEnvRemote->acquire( m_pEnvRemote ); - - acquire = acquireRemote2RemoteStub; - release = thisRelease; - pDispatcher = thisDispatch; -#if OSL_DEBUG_LEVEL > 1 - thisCounter.acquire(); -#endif -} - -Remote2RemoteStub::~Remote2RemoteStub() -{ - - // send a release via the connection ! - sal_Bool bNeedsRelease = sal_False; - if( ! m_pType->aBase.bComplete ) - { - // m_pType may be exchanged during complete, so it needs to be acquired - // (MT : Another thread may use m_pType during e.g. dispatch ! ). - typelib_typedescription_acquire( (typelib_TypeDescription*)m_pType ); - bNeedsRelease = sal_True; - typelib_typedescription_complete( (typelib_TypeDescription **) &m_pType ); - } - - uno_Any any; - uno_Any *pAny = &any; - - typelib_TypeDescription *pReleaseMethod = 0; - typelib_typedescriptionreference_getDescription( - &pReleaseMethod , - m_pType->ppAllMembers[REMOTE_RELEASE_METHOD_INDEX] ); - for( int i = 0 ; i < m_nReleaseRemote ; i ++ ) - { - thisDispatch( this, - pReleaseMethod, - 0, - 0, - &pAny ); - } - typelib_typedescription_release( pReleaseMethod ); - if( bNeedsRelease ) - { - typelib_typedescription_release( (typelib_TypeDescription * ) m_pType ); - } - - typelib_typedescription_release( (typelib_TypeDescription * ) m_pType ); - m_pEnvRemote->release( m_pEnvRemote ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.release(); -#endif -} - -void Remote2RemoteStub::releaseRemote() -{ - osl_incrementInterlockedCount( &m_nReleaseRemote ); -} - -} // end namespace bridges_remote diff --git a/bridges/source/remote/static/remote_types.cxx b/bridges/source/remote/static/remote_types.cxx deleted file mode 100644 index 0be511c987b0..000000000000 --- a/bridges/source/remote/static/remote_types.cxx +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include "remote_types.hxx" - -namespace bridges_remote { - -sal_Bool SAL_CALL remote_relatesToInterface2( typelib_TypeDescription * pTypeDescr ) -{ - switch (pTypeDescr->eTypeClass) - { - case typelib_TypeClass_SEQUENCE: - { - switch (((typelib_IndirectTypeDescription *)pTypeDescr)->pType->eTypeClass) - { - case typelib_TypeClass_SEQUENCE: - case typelib_TypeClass_STRUCT: - case typelib_TypeClass_EXCEPTION: - { - typelib_TypeDescription * pTD = 0; - TYPELIB_DANGER_GET( &pTD, ((typelib_IndirectTypeDescription *)pTypeDescr)->pType ); - sal_Bool bRel = remote_relatesToInterface( pTD ); - TYPELIB_DANGER_RELEASE( pTD ); - return bRel; - } - default: - break; - } - } - case typelib_TypeClass_STRUCT: - case typelib_TypeClass_EXCEPTION: - { - // ...optimized... to avoid getDescription() calls! - typelib_CompoundTypeDescription * pComp = (typelib_CompoundTypeDescription *)pTypeDescr; - typelib_TypeDescriptionReference ** pTypes = pComp->ppTypeRefs; - for ( sal_Int32 nPos = pComp->nMembers; nPos--; ) - { - switch (pTypes[nPos]->eTypeClass) - { - case typelib_TypeClass_INTERFACE: - case typelib_TypeClass_UNION: // might relate to interface - case typelib_TypeClass_ANY: // might relate to interface - return sal_True; - case typelib_TypeClass_SEQUENCE: - case typelib_TypeClass_STRUCT: - case typelib_TypeClass_EXCEPTION: - { - typelib_TypeDescription * pTD = 0; - TYPELIB_DANGER_GET( &pTD, pTypes[nPos] ); - sal_Bool bRel = remote_relatesToInterface( pTD ); - TYPELIB_DANGER_RELEASE( pTD ); - if (bRel) - return sal_True; - break; - } - default: - break; - } - } - if (pComp->pBaseTypeDescription) - return remote_relatesToInterface( (typelib_TypeDescription *)pComp->pBaseTypeDescription ); - break; - } - default: - OSL_ASSERT( 0 ); - } - return sal_False; -} - -} diff --git a/bridges/source/remote/static/remote_types.hxx b/bridges/source/remote/static/remote_types.hxx deleted file mode 100644 index bb7a908a01f9..000000000000 --- a/bridges/source/remote/static/remote_types.hxx +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _BRIDGES_REMOTE_TYPES_HXX_ -#define _BRIDGES_REMOTE_TYPES_HXX_ - -#include -#include -#include - -namespace bridges_remote -{ - -inline sal_Bool SAL_CALL remote_relatesToInterface( typelib_TypeDescription *pTypeDescr ); -sal_Bool SAL_CALL remote_relatesToInterface2( typelib_TypeDescription * pTypeDescr ); - - -/** Determines whether given type might relate or relates to an interface, - i.e. values of this type are interface or may contain interface(s).
          - @param pTypeDescr type description of type - @return true if type might relate to an interface, false otherwise -*/ -inline sal_Bool SAL_CALL remote_relatesToInterface( typelib_TypeDescription * pTypeDescr ) -{ - switch (pTypeDescr->eTypeClass) - { - case typelib_TypeClass_SEQUENCE: - switch (((typelib_IndirectTypeDescription *)pTypeDescr)->pType->eTypeClass) - { - case typelib_TypeClass_INTERFACE: - case typelib_TypeClass_UNION: // might relate to interface - case typelib_TypeClass_ANY: // might relate to interface - return sal_True; - case typelib_TypeClass_SEQUENCE: - case typelib_TypeClass_STRUCT: - case typelib_TypeClass_EXCEPTION: - return remote_relatesToInterface2( pTypeDescr ); - default: - return sal_False; - } - case typelib_TypeClass_STRUCT: - case typelib_TypeClass_EXCEPTION: - return remote_relatesToInterface2( pTypeDescr ); - case typelib_TypeClass_UNION: // might relate to interface - case typelib_TypeClass_ANY: // might relate to interface - case typelib_TypeClass_INTERFACE: - return sal_True; - default: - return sal_False; - } -} - -/** Determines whether given type is a cpp simple type, e.g. int, enum.
          - @param pTypeDescr type description of type - @return true if type is a cpp simple type, false otherwise -*/ -inline sal_Bool SAL_CALL remote_isSimpleType( typelib_TypeDescription * pTypeDescr ) -{ - return (pTypeDescr->eTypeClass <= typelib_TypeClass_ENUM && - pTypeDescr->eTypeClass != typelib_TypeClass_STRING && - pTypeDescr->eTypeClass != typelib_TypeClass_ANY && - pTypeDescr->eTypeClass != typelib_TypeClass_TYPE); -} - -} -#endif diff --git a/bridges/source/remote/static/stub.cxx b/bridges/source/remote/static/stub.cxx deleted file mode 100644 index ec276c801862..000000000000 --- a/bridges/source/remote/static/stub.cxx +++ /dev/null @@ -1,336 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include "remote_types.hxx" - -#if OSL_DEBUG_LEVEL > 1 -#include -static MyCounter thisCounter( "DEBUG : Uno2RemoteStub"); -#endif - -using namespace ::com::sun::star::uno; -using namespace bridges_remote; - -extern "C" { - -void SAL_CALL thisRelease( remote_Interface *pThis ) -{ - Uno2RemoteStub *p = ( Uno2RemoteStub * ) pThis; - if (! osl_decrementInterlockedCount( &(p->m_nRef) )) - { - p->m_pEnvRemote->pExtEnv->revokeInterface( p->m_pEnvRemote->pExtEnv, pThis ); - } -} - -void SAL_CALL thisDispatch( - remote_Interface * pRemoteI, - typelib_TypeDescription const * pType, - void * pReturn, - void * ppArgs[], - uno_Any ** ppException ) -{ - Uno2RemoteStub *p = ( Uno2RemoteStub * ) pRemoteI; - - RemoteThreadCounter counter( p->m_pEnvRemote ); - - typelib_InterfaceMethodTypeDescription *pMethodType = 0; - typelib_InterfaceAttributeTypeDescription *pAttributeType = 0; - typelib_TypeDescription *pReturnType = 0; - typelib_TypeDescription **ppArgType = 0; - sal_Int32 nArgCount = 0; - sal_Bool *pbIsIn = 0; - sal_Bool *pbIsOut = 0; - sal_Bool bConversionNeededForReturn = sal_False; - sal_Bool *pbConversionNeeded = 0; - - sal_Int32 i; - //-------------------------------- - // Collect all needed types ! - //-------------------------------- - if( typelib_TypeClass_INTERFACE_ATTRIBUTE == pType->eTypeClass ) - { - pAttributeType = ( typelib_InterfaceAttributeTypeDescription * ) pType; - if( pReturn ) - { - TYPELIB_DANGER_GET( &pReturnType , pAttributeType->pAttributeTypeRef ); - bConversionNeededForReturn = remote_relatesToInterface( pReturnType ); - } - else - { - nArgCount = 1; - ppArgType = (typelib_TypeDescription **) alloca( sizeof( void * ) ); - pbIsIn = ( sal_Bool * ) alloca( sizeof( sal_Bool ) ); - pbIsOut = ( sal_Bool * ) alloca( sizeof( sal_Bool ) ); - pbConversionNeeded = ( sal_Bool * ) alloca( sizeof( sal_Bool ) ); - pbIsIn[0] = sal_True; - pbIsOut[0] = sal_False; - ppArgType[0] = 0; - TYPELIB_DANGER_GET( &( ppArgType[0] ) , pAttributeType->pAttributeTypeRef ); - pbConversionNeeded[0] = remote_relatesToInterface( ppArgType[0] ); - } - } - if( typelib_TypeClass_INTERFACE_METHOD == pType->eTypeClass ) - { - pMethodType = ( typelib_InterfaceMethodTypeDescription * ) pType; - TYPELIB_DANGER_GET( &pReturnType , pMethodType->pReturnTypeRef ); - bConversionNeededForReturn = remote_relatesToInterface( pReturnType ); - nArgCount = pMethodType->nParams; - ppArgType = (typelib_TypeDescription **) alloca( sizeof( void * ) * nArgCount ); - pbIsIn = (sal_Bool * ) alloca( sizeof( sal_Bool ) * nArgCount ); - pbIsOut = (sal_Bool * ) alloca( sizeof( sal_Bool ) * nArgCount ); - pbConversionNeeded = ( sal_Bool * ) alloca( sizeof( sal_Bool ) * nArgCount ); - - for( i = 0 ; i < nArgCount ; i ++ ) - { - ppArgType[i] = 0; - TYPELIB_DANGER_GET( & (ppArgType[i]) , pMethodType->pParams[i].pTypeRef ); - pbIsIn[i] = pMethodType->pParams[i].bIn; - pbIsOut[i] = pMethodType->pParams[i].bOut; - pbConversionNeeded[i] = remote_relatesToInterface( ppArgType[i] ); - } - } - - // create Mapping - - void *pUnoReturn = 0; - void **ppUnoArgs = 0; - - if( pReturnType ) - { - if( bConversionNeededForReturn ) - { - pUnoReturn = alloca( pReturnType->nSize ); - } - else - { - pUnoReturn = pReturn; - } - } - - ppUnoArgs = (void **) alloca( nArgCount * sizeof( void * ) ); - for( i = 0 ; i < nArgCount ; i ++ ) - { - if( pbConversionNeeded[i] ) - { - ppUnoArgs[i] = alloca( ppArgType[i]->nSize ); - if( pbIsIn[i] ) - { - uno_copyAndConvertData( - ppUnoArgs[i], - ppArgs[i], - ppArgType[i], - p->m_mapRemote2Uno.get() - ); - } - } - else - { - ppUnoArgs[i] = ppArgs[i]; - } - } - - // do the call - uno_Any any; - uno_Any *pAny = &any; - - p->m_pUnoI->pDispatcher( p->m_pUnoI, - pType, - pUnoReturn, - ppUnoArgs, - &pAny); - - if( ! pAny ) - { - // ------------------ - // No Exception - // ------------------ - - // Map return value - if( pReturnType && bConversionNeededForReturn ) - { - uno_copyAndConvertData( - pReturn , - pUnoReturn, - pReturnType, - p->m_mapUno2Remote.get() ); - uno_destructData( pUnoReturn , pReturnType, 0 ); - } - - // map arguments - for( i = 0 ; i < nArgCount ; i ++ ) - { - if( pbConversionNeeded[i] ) - { - if( pbIsIn[i] ) { - if( pbIsOut[i] ) { - uno_destructData( - ppArgs[i] , - ppArgType[i] , - remote_release ); - uno_copyAndConvertData( ppArgs[i] , - ppUnoArgs[i], - ppArgType[i], - p->m_mapUno2Remote.get() ); - } - } - else // pure out - { - uno_copyAndConvertData( ppArgs[i] , - ppUnoArgs[i], - ppArgType[i], - p->m_mapUno2Remote.get() ); - } - uno_destructData( ppUnoArgs[i], - ppArgType[i], - 0 ); - } - } - *ppException = 0; - } - else - { - // ----------------------- - // an exception occured - // ----------------------- - typelib_TypeDescription *pAnyType = 0; - getCppuType( (Any*) 0 ).getDescription( &pAnyType ); - uno_copyAndConvertData( *ppException , - pAny , - pAnyType, - p->m_mapUno2Remote.get() ); - uno_destructData( pAny , pAnyType , 0 ); - typelib_typedescription_release( pAnyType ); - - // destruct uno in parameters ( out parameters have not been constructed ) - for( i = 0 ; i < nArgCount ; i ++ ) - { - if( pbConversionNeeded[i] && pbIsIn[i] ) - { - uno_destructData( ppUnoArgs[i], - ppArgType[i], - 0 ); - } - } - } - - //-------------------------- - // release all acquired types - //-------------------------- - if( pReturnType ) - { - TYPELIB_DANGER_RELEASE( pReturnType ); - } - for( i = 0 ; i < nArgCount ; i ++ ) - { - TYPELIB_DANGER_RELEASE( ppArgType[ i] ); - } -} - -} - -namespace bridges_remote { - -void acquireUno2RemoteStub( remote_Interface *pThis ) -{ - Uno2RemoteStub *p = ( Uno2RemoteStub * ) pThis; - if( 1 == osl_incrementInterlockedCount( &(p->m_nRef) ) ) - { - - p->m_pEnvRemote->pExtEnv->registerProxyInterface( - p->m_pEnvRemote->pExtEnv, - (void**)&pThis, - freeUno2RemoteStub, - p->m_sOid.pData, - p->m_pType ); - - OSL_ASSERT( (remote_Interface*) p == pThis ); - } -} - -void freeUno2RemoteStub(uno_ExtEnvironment *, void * stub) { - delete static_cast< Uno2RemoteStub * >(stub); -} - -Uno2RemoteStub::Uno2RemoteStub( uno_Interface *pUnoI, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pType, - uno_Environment *pEnvUno, - uno_Environment *pEnvRemote ) : - m_sOid( pOid ), - m_pType( pType ), - m_pUnoI( pUnoI ), - m_nRef( 1 ), - m_pEnvUno( pEnvUno ), - m_pEnvRemote( pEnvRemote ), - m_mapRemote2Uno( pEnvRemote, pEnvUno ), - m_mapUno2Remote( pEnvUno, pEnvRemote ) -{ - typelib_typedescription_acquire( (typelib_TypeDescription * )m_pType ); - m_pEnvUno->acquire( m_pEnvUno ); - m_pEnvRemote->acquire( m_pEnvRemote ); - - acquire = acquireUno2RemoteStub; - release = thisRelease; - pDispatcher = thisDispatch; - - m_pEnvUno->pExtEnv->registerInterface( m_pEnvUno->pExtEnv, - (void **)&m_pUnoI, - m_sOid.pData, - m_pType ); - m_pUnoI->acquire( m_pUnoI ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.acquire(); -#endif -} - -Uno2RemoteStub::~Uno2RemoteStub() -{ - m_pEnvUno->pExtEnv->revokeInterface( m_pEnvUno->pExtEnv , m_pUnoI ); - - typelib_typedescription_release( (typelib_TypeDescription * )m_pType ); - m_pUnoI->release( m_pUnoI ); - m_pEnvUno->release( m_pEnvUno ); - m_pEnvRemote->release( m_pEnvRemote ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.release(); -#endif -} - -} // end namespace bridges_remote diff --git a/bridges/source/remote/urp/makefile.mk b/bridges/source/remote/urp/makefile.mk deleted file mode 100644 index eaa3f3a6f146..000000000000 --- a/bridges/source/remote/urp/makefile.mk +++ /dev/null @@ -1,78 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=bridges -TARGET=urp_uno -ENABLE_EXCEPTIONS=TRUE -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# ------------------------------------------------------------------ - -SLOFILES= \ - $(SLO)$/urp_environment.obj \ - $(SLO)$/urp_marshal.obj \ - $(SLO)$/urp_unmarshal.obj \ - $(SLO)$/urp_dispatch.obj \ - $(SLO)$/urp_job.obj \ - $(SLO)$/urp_reader.obj \ - $(SLO)$/urp_writer.obj \ - $(SLO)$/urp_log.obj \ - $(SLO)$/urp_bridgeimpl.obj \ - $(SLO)$/urp_propertyobject.obj \ - $(SLO)$/urp_threadid.obj - -.IF "$(COM)"=="GCC" -NOOPTFILES= \ - $(SLO)$/urp_reader.obj -.ENDIF # "$(COM)"=="GCC" - -SHL1TARGET= $(TARGET) - -SHL1DEF=$(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=..$/..$/bridge_exports.map -SHL1RPATH=URELIB - -SHL1STDLIBS=\ - $(SALLIB)\ - $(CPPULIB) - -SHL1LIBS=\ - $(SLB)$/$(TARGET).lib \ - $(SLB)$/bridges_remote_static.lib - -DEF1NAME= $(SHL1TARGET) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/bridges/source/remote/urp/urp_bridgeimpl.cxx b/bridges/source/remote/urp/urp_bridgeimpl.cxx deleted file mode 100644 index af619c8f3c35..000000000000 --- a/bridges/source/remote/urp/urp_bridgeimpl.cxx +++ /dev/null @@ -1,250 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include - -#include - -#include "urp_bridgeimpl.hxx" - -using namespace ::rtl; -using namespace ::osl; -using namespace ::com::sun::star::uno; -namespace bridges_urp -{ - -template < class t > -inline t mymin( const t & val1, const t & val2 ) -{ - return val1 < val2 ? val1 : val2; -} - -/*********** - * urp_BridgeImpl - ***********/ -urp_BridgeImpl::urp_BridgeImpl( sal_Int32 nCacheSize , sal_uInt32 nInitialMarshalerSize ) : - m_blockMarshaler( this , nInitialMarshalerSize , ::bridges_remote::remote_retrieveOidFromProxy), - m_nMarshaledMessages( 0 ), - m_oidCacheOut( (sal_uInt16)nCacheSize ), - m_tidCacheOut( (sal_uInt16)nCacheSize ), - m_typeCacheOut( (sal_uInt16)nCacheSize ) -{ - m_pOidIn = new OUString[ nCacheSize ]; - m_pTidIn = new ByteSequence[ nCacheSize ]; - m_pTypeIn = new Type[ nCacheSize ]; - m_nRemoteThreads = 0; -} - -urp_BridgeImpl::~urp_BridgeImpl() -{ - delete [] m_pOidIn; - delete [] m_pTidIn; - delete [] m_pTypeIn; -} - - -void urp_BridgeImpl::applyProtocolChanges( const Properties &props ) -{ - if( m_properties.nTypeCacheSize != props.nTypeCacheSize ) - { - if( props.nTypeCacheSize == 0 ) - { - delete [] m_pTypeIn; - m_pTypeIn = 0; - } - else - { - Type *pNew = new Type[props.nTypeCacheSize]; - sal_Int32 i; - sal_Int32 iMin = mymin( m_properties.nTypeCacheSize , props.nTypeCacheSize ); - for( i = 0; i < iMin ; i ++ ) - { - pNew[i] = m_pTypeIn[i]; - } - delete [] m_pTypeIn; - m_pTypeIn = pNew; - } - OSL_ASSERT( props.nTypeCacheSize <= 0xffff ); - m_properties.nTypeCacheSize = props.nTypeCacheSize; - m_typeCacheOut.resize( (sal_uInt16)props.nTypeCacheSize ); - } - - if( m_properties.nOidCacheSize != props.nOidCacheSize ) - { - if( 0 == props.nOidCacheSize ) - { - delete [] m_pOidIn; - m_pOidIn = 0; - } - else - { - OUString *pNew = new OUString[props.nOidCacheSize]; - sal_Int32 i; - sal_Int32 iMin = mymin( m_properties.nOidCacheSize , props.nOidCacheSize ); - for( i = 0; i < iMin ; i ++ ) - { - pNew[i] = m_pOidIn[i]; - } - delete [] m_pOidIn; - m_pOidIn = pNew; - } - OSL_ASSERT( props.nOidCacheSize <= 0xffff ); - m_oidCacheOut.resize( (sal_uInt16)props.nOidCacheSize ); - m_properties.nOidCacheSize = props.nOidCacheSize; - } - - if( m_properties.nTidCacheSize != props.nTidCacheSize ) - { - if( 0 == props.nTidCacheSize ) - { - delete [] m_pTidIn; - m_pTidIn = 0; - } - else - { - ByteSequence *pNew = new ByteSequence[props.nTidCacheSize]; - sal_Int32 i; - sal_Int32 iMin = mymin( m_properties.nTidCacheSize , props.nTidCacheSize ); - for( i = 0; i < iMin ; i ++ ) - { - pNew[i] = m_pTidIn[i]; - } - delete [] m_pTidIn; - m_pTidIn = pNew; - } - OSL_ASSERT( props.nTidCacheSize <= 0xffff ); - m_tidCacheOut.resize( (sal_uInt16)props.nTidCacheSize ); - m_properties.nTidCacheSize = props.nTidCacheSize; - } - - if( m_properties.sVersion != props.sVersion ) - { - m_properties.sVersion = props.sVersion; - } - - if( m_properties.nFlushBlockSize != props.nFlushBlockSize ) - { - m_properties.nFlushBlockSize = props.nFlushBlockSize; - } - - if( m_properties.nOnewayTimeoutMUSEC != props.nOnewayTimeoutMUSEC ) - { - m_properties.nOnewayTimeoutMUSEC = props.nOnewayTimeoutMUSEC; - } - - if( props.bClearCache ) - { - if( m_properties.nTypeCacheSize ) - { - delete [] m_pTypeIn; - m_pTypeIn = new Type[m_properties.nTypeCacheSize]; - m_typeCacheOut.clear(); - } - m_lastInType = Type(); - m_lastOutType = Type(); - - if( m_properties.nOidCacheSize ) - { - delete [] m_pOidIn; - m_pOidIn = new OUString[ m_properties.nOidCacheSize]; - m_oidCacheOut.clear(); - } - m_lastOutOid = OUString(); - m_lastInOid = OUString(); - - if( m_properties.nTidCacheSize ) - { - delete [] m_pTidIn; - m_pTidIn = new ByteSequence[m_properties.nTidCacheSize]; - m_tidCacheOut.clear(); - } - m_lastInTid = ByteSequence(); - m_lastOutTid = ByteSequence(); - } - - if( m_properties.bNegotiate != props.bNegotiate ) - { - m_properties.bNegotiate = props.bNegotiate; - } - - if( m_properties.bForceSynchronous != props.bForceSynchronous ) - { - m_properties.bForceSynchronous = props.bForceSynchronous; - } - - m_properties.bCurrentContext = props.bCurrentContext; -} - -void urp_BridgeImpl::addError( char const *pError ) -{ - OUString message = OUString( RTL_CONSTASCII_USTRINGPARAM( "(tid=" ) ); - message += OUString::valueOf( (sal_Int32 ) osl_getThreadIdentifier( 0 ) ); - message += OUString::createFromAscii( ") " ); - message += OUString::createFromAscii( pError ); - MutexGuard guard( m_errorListMutex ); - m_lstErrors.push_back( message ); -} - -void urp_BridgeImpl::addError( const OUString & error ) -{ - OUString message = OUString( RTL_CONSTASCII_USTRINGPARAM( "(tid=" ) ); - message += OUString::valueOf( (sal_Int32 ) osl_getThreadIdentifier( 0 ) ); - message += OUString::createFromAscii( ") " ); - message += error; - MutexGuard guard( m_errorListMutex ); - m_lstErrors.push_back( message ); -} - -void urp_BridgeImpl::dumpErrors( FILE * f) -{ - MutexGuard guard( m_errorListMutex ); - for( ::std::list< OUString >::iterator ii = m_lstErrors.begin() ; - ii != m_lstErrors.end() ; - ++ii ) - { - OString o = OUStringToOString( *ii , RTL_TEXTENCODING_UTF8 ); - fprintf( f, "%s\n" , o.getStr() ); - } -} - -OUString urp_BridgeImpl::getErrorsAsString( ) -{ - MutexGuard guard( m_errorListMutex ); - OUString ret; - for( ::std::list< OUString >::iterator ii = m_lstErrors.begin() ; - ii != m_lstErrors.end() ; - ++ii ) - { - ret += *ii; - } - return ret; -} - -} diff --git a/bridges/source/remote/urp/urp_bridgeimpl.hxx b/bridges/source/remote/urp/urp_bridgeimpl.hxx deleted file mode 100644 index 53d583bed48d..000000000000 --- a/bridges/source/remote/urp/urp_bridgeimpl.hxx +++ /dev/null @@ -1,133 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _URP_BRIDGEIMPL_HXX_ -#define _URP_BRIDGEIMPL_HXX_ - -#include -#include -#include -#include -#include - -#ifndef _UNO_THREADPOOL_H_ -#include -#endif -#include - -#ifndef _URP_CACHE_HXX_ -#include "urp_cache.hxx" -#endif -#include "urp_marshal_decl.hxx" - -#ifndef _URP_REPLYCONTAINER_HXX_ -#include "urp_replycontainer.hxx" -#endif -#include "urp_property.hxx" - - -namespace bridges_urp -{ - -class PropertyObject; - -struct equalOUString -{ - sal_Int32 operator() ( const ::rtl::OUString &s1, const ::rtl::OUString &s2 ) const - { - return s1 == s2; - } -}; - -struct equalType -{ - sal_Int32 operator() ( const ::com::sun::star::uno::Type &t1, - const ::com::sun::star::uno::Type &t2 ) const - { - return t1 == t2; - } -}; - -class OWriterThread; -class OReaderThread; - -struct urp_BridgeImpl : - public remote_BridgeImpl -{ - urp_BridgeImpl( sal_Int32 nCacheSize , sal_uInt32 nInitialMarshalerSize ); - ~urp_BridgeImpl(); - - void applyProtocolChanges( const Properties & ); - - void startBlockBridge(); - void stopBlockBridge(); - void addError( char const *pError ); - void addError( const ::rtl::OUString &anError ); - void dumpErrors( FILE *f ); - ::rtl::OUString getErrorsAsString(); - - ::osl::Mutex m_marshalingMutex; - ::osl::Mutex m_disposingMutex; - ::osl::Mutex m_errorListMutex; - Marshal m_blockMarshaler; - sal_Int32 m_nMarshaledMessages; - - // Caches for vars, that go from local process to the remote process - Cache < ::rtl::OUString , equalOUString > m_oidCacheOut; - Cache < ::rtl::ByteSequence , EqualThreadId > m_tidCacheOut; - Cache < ::com::sun::star::uno::Type , equalType > m_typeCacheOut; - - ::com::sun::star::uno::Type m_lastOutType; - ::rtl::ByteSequence m_lastOutTid; - ::rtl::OUString m_lastOutOid; - - // Caches for vars, that come from the remote process to the local process - ::rtl::OUString *m_pOidIn; - ::rtl::ByteSequence *m_pTidIn; - ::com::sun::star::uno::Type *m_pTypeIn; - - ::com::sun::star::uno::Type m_lastInType; - ::rtl::ByteSequence m_lastInTid; - ::rtl::OUString m_lastInOid; - - urp_ClientJobContainer m_clientJobContainer; - - OWriterThread *m_pWriter; - OReaderThread *m_pReader; - ::rtl::OString m_sLogFileName; - FILE *m_pLogFile; - ::osl::Condition m_initialized; - ::osl::Condition m_cndWaitForThreads; - - struct Properties m_properties; - class PropertyObject *m_pPropertyObject; - ::std::list< ::rtl::OUString > m_lstErrors; - uno_ThreadPool m_hThreadPool; -}; - - -} -#endif diff --git a/bridges/source/remote/urp/urp_cache.h b/bridges/source/remote/urp/urp_cache.h deleted file mode 100644 index fa06453ef524..000000000000 --- a/bridges/source/remote/urp/urp_cache.h +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -namespace bridges_urp -{ - template < class t , class tequals > - class Cache - { - public: - inline Cache ( sal_uInt16 nMaxEntries ); - inline ~Cache(); - - // puts the value t into the cache. Returns then entry, - // that is used for this value. - inline sal_uInt16 put( const t & ); - - // lookup, if there is an entry for this value - // returns 0xffff, when value cannot be found in the list - inline sal_uInt16 seek( const t & ); - - // resizes the cache, conserving overlapping values - inline void resize( sal_uInt16 nNewMaxEntries ); - - // empties the cache - inline void clear(); - private: - t *m_pCache; - ::std::list< sal_uInt16 > m_lstLeastRecentlyUsed; - sal_uInt16 m_nMaxEntries; - sal_uInt16 m_nEntries; - }; -} diff --git a/bridges/source/remote/urp/urp_cache.hxx b/bridges/source/remote/urp/urp_cache.hxx deleted file mode 100644 index aa366ddaeca7..000000000000 --- a/bridges/source/remote/urp/urp_cache.hxx +++ /dev/null @@ -1,160 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include -#include -#include -#include - -#include "urp_threadid.hxx" -#include "urp_cache.h" - -namespace bridges_urp -{ - - template < class t , class tequals > - inline Cache< t , tequals >::Cache( sal_uInt16 nMaxEntries ) : - m_pCache( new t[nMaxEntries] ), - m_nMaxEntries( nMaxEntries ), - m_nEntries( 0 ) - { - - } - - template < class t , class tequals > - inline Cache< t , tequals >::~Cache( ) - { - delete [] m_pCache; - } - - - template < class t , class tequals > - inline sal_uInt16 Cache< t , tequals >::put( const t & value ) - { - if( ! m_nMaxEntries ) - { - return 0xffff; - } - sal_uInt16 nEntry = 0xffff; - if( m_nEntries < m_nMaxEntries ) - { - // cache has still empty places - m_pCache[m_nEntries] = value; - nEntry = m_nEntries; - m_nEntries ++; - - // add it to the cache - m_lstLeastRecentlyUsed.push_front( nEntry ); - } - else - { - // cache is full, remove an element and insert the new one - nEntry = m_lstLeastRecentlyUsed.back(); - m_lstLeastRecentlyUsed.pop_back(); - m_lstLeastRecentlyUsed.push_front( nEntry ); - - m_pCache[nEntry] = value; - } - return nEntry; - } - - template < class t , class tequals > - inline sal_uInt16 Cache< t , tequals >::seek( const t & value ) - { - for( ::std::list< sal_uInt16 >::iterator ii = m_lstLeastRecentlyUsed.begin() ; - ii != m_lstLeastRecentlyUsed.end() ; - ++ ii ) - { - if( value == m_pCache[*ii] ) - { - sal_uInt16 nEntry = *ii; - m_lstLeastRecentlyUsed.erase( ii ); - m_lstLeastRecentlyUsed.push_front( nEntry ); - return nEntry; - } - } - return 0xffff; - } - - // helper predicate for element removal - template < class t > - struct PredicateOverMax - { - t m_; - inline PredicateOverMax( const t &value ) : m_(value) - {} - sal_Int32 operator () ( const t &value ) const - { return value >= m_; } - }; - - template < class t, class tequals > - inline void Cache < t , tequals >::resize( sal_uInt16 nNewMaxEntries ) - { - if( 0 == nNewMaxEntries ) - { - m_lstLeastRecentlyUsed.clear(); - delete [] m_pCache; - m_pCache = 0; - m_nMaxEntries = 0; - } - else - { - // allocate - t *pNew = new t[nNewMaxEntries]; - sal_Int32 nMin = nNewMaxEntries < m_nMaxEntries ? nNewMaxEntries : m_nMaxEntries; - - // copy - for( sal_Int32 i = 0; i < nMin ; i ++ ) - { - pNew[i] = m_pCache[i]; - } - // delete - delete [] m_pCache; - - // assign - m_pCache = pNew; - - // remove overlapping lru cache entries - ::std::remove_if(m_lstLeastRecentlyUsed.begin(), - m_lstLeastRecentlyUsed.end(), - PredicateOverMax< sal_Int32 > ( nMin ) ); - } - m_nMaxEntries = nNewMaxEntries; - m_nEntries = m_nEntries < m_nMaxEntries ? - m_nEntries : m_nMaxEntries; - } - - template < class t, class tequals > - inline void Cache < t, tequals >:: clear() - { - for( sal_Int32 i = 0; i < m_nMaxEntries ; i ++ ) - { - m_pCache[i] = t(); - } - m_lstLeastRecentlyUsed.clear(); - m_nEntries = 0; - } -} diff --git a/bridges/source/remote/urp/urp_dispatch.cxx b/bridges/source/remote/urp/urp_dispatch.cxx deleted file mode 100644 index ae9f3dff9d54..000000000000 --- a/bridges/source/remote/urp/urp_dispatch.cxx +++ /dev/null @@ -1,116 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include "urp_bridgeimpl.hxx" -#include "urp_marshal.hxx" -#include "urp_dispatch.hxx" -#include "urp_job.hxx" -#include "urp_writer.hxx" -#include "urp_log.hxx" - -using namespace ::rtl; -using namespace ::osl; -using namespace ::com::sun::star::uno; - -namespace bridges_urp -{ - -void SAL_CALL urp_sendCloseConnection( uno_Environment *pEnvRemote ) -{ - remote_Context *pContext = (remote_Context *) pEnvRemote->pContext; - urp_BridgeImpl *pImpl = (urp_BridgeImpl*) ( pContext->m_pBridgeImpl ); - - { - MutexGuard guard( pImpl->m_marshalingMutex ); - - // send immediately - if( ! pImpl->m_blockMarshaler.empty() ) - { - pImpl->m_pWriter->touch( sal_True ); - } - - pImpl->m_pWriter->sendEmptyMessage(); - } -} -extern "C" void SAL_CALL urp_sendRequest( - uno_Environment *pEnvRemote, - typelib_TypeDescription const * pMemberType, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pInterfaceType, - void *pReturn, - void *ppArgs[], - uno_Any **ppException ) -{ - remote_Context *pContext = (remote_Context *) pEnvRemote->pContext; - urp_BridgeImpl *pImpl = (urp_BridgeImpl*) ( pContext->m_pBridgeImpl ); - pImpl->m_initialized.wait(); - urp_sendRequest_internal( - pEnvRemote, pMemberType, pOid, pInterfaceType, pReturn, ppArgs, - ppException ); -} -void SAL_CALL urp_sendRequest_internal( - uno_Environment *pEnvRemote, - typelib_TypeDescription const * pMemberType, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pInterfaceType, - void *pReturn, - void *ppArgs[], - uno_Any **ppException ) -{ - remote_Context *pContext = (remote_Context *) pEnvRemote->pContext; - urp_BridgeImpl *pImpl = (urp_BridgeImpl*) ( pContext->m_pBridgeImpl ); - - ClientJob job( - pEnvRemote, pContext, pImpl, pOid, pMemberType, pInterfaceType, pReturn, - ppArgs, ppException); - - if( job.pack() && ! job.isOneway() ) - { - job.wait(); - } -} - -} - - diff --git a/bridges/source/remote/urp/urp_dispatch.hxx b/bridges/source/remote/urp/urp_dispatch.hxx deleted file mode 100644 index 2f14d89f75c2..000000000000 --- a/bridges/source/remote/urp/urp_dispatch.hxx +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include - -#include - -#include - - -typedef struct _uno_Environment uno_Environment; -struct remote_Interface; - - - -namespace bridges_urp { - - const sal_uInt8 HDRFLAG_LONGHEADER = 0x80; - const sal_uInt8 HDRFLAG_REQUEST = 0x40; - const sal_uInt8 HDRFLAG_NEWTYPE = 0x20; - const sal_uInt8 HDRFLAG_NEWOID = 0x10; - const sal_uInt8 HDRFLAG_NEWTID = 0x08; - const sal_uInt8 HDRFLAG_LONGMETHODID = 0x04; - const sal_uInt8 HDRFLAG_IGNORECACHE = 0x02; - const sal_uInt8 HDRFLAG_MOREFLAGS = 0x01; - const sal_uInt8 HDRFLAG_MUSTREPLY = 0x80; - const sal_uInt8 HDRFLAG_SYNCHRONOUS = 0x40; - - const sal_uInt8 HDRFLAG_EXCEPTION = 0x20; - - void SAL_CALL urp_sendCloseConnection( uno_Environment *pEnvRemote ); - - extern "C" void SAL_CALL urp_sendRequest( - uno_Environment *pEnvRemote, - typelib_TypeDescription const * pMemberType, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pInterfaceType, - void *pReturn, - void *ppArgs[], - uno_Any **ppException - ); - - void SAL_CALL urp_sendRequest_internal( - uno_Environment *pEnvRemote, - typelib_TypeDescription const * pMemberType, - rtl_uString *pOid, - typelib_InterfaceTypeDescription *pInterfaceType, - void *pReturn, - void *ppArgs[], - uno_Any **ppException - ); - -} - diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx deleted file mode 100644 index 1e4f2f3c805c..000000000000 --- a/bridges/source/remote/urp/urp_environment.cxx +++ /dev/null @@ -1,551 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "urp_bridgeimpl.hxx" -#include "urp_writer.hxx" -#include "urp_reader.hxx" -#include "urp_dispatch.hxx" -#include "urp_log.hxx" -#include "urp_propertyobject.hxx" - -using namespace ::rtl; -using namespace ::osl; -using namespace ::com::sun::star::uno; - -namespace bridges_urp -{ -rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - -// static void dumpProperties( struct Properties *p ) -// { -// fprintf( stderr , "FlushBlockSize : %d\n" , p->nFlushBlockSize ); -// fprintf( stderr , "OnewayTimeoutMUSEC : %d\n" , p->nOnewayTimeoutMUSEC ); -// fprintf( stderr , "OidCacheSize : %d\n" , p->nOidCacheSize ); -// fprintf( stderr , "TypeCacheSize : %d\n" , p->nTypeCacheSize ); -// fprintf( stderr , "TidCacheSize : %d\n" , p->nTidCacheSize ); -// OString o = OUStringToOString( p->sSupportedVersions , RTL_TEXTENCODING_ASCII_US ); -// fprintf( stderr , "SupportedVersions : %s\n" , o.pData->buffer ); -// o = OUStringToOString( p->sVersion , RTL_TEXTENCODING_ASCII_US ); -// fprintf( stderr , "Version : %s\n" , o.pData->buffer ); -// fprintf( stderr , "SupportsMultipleSynchronous : %d\n" , p->bSupportsMultipleSynchronous ); -// fprintf( stderr , "SupportsMustReply : %d\n" , p->bSupportsMustReply ); -// fprintf( stderr , "SupportsSynchronous : %d\n" , p->bSupportsSynchronous ); -// } - -// PropertySetterThread -//------------------------------------ -class PropertySetterThread : public ::osl::Thread -{ - urp_BridgeImpl *m_pImpl; - ::rtl::OUString m_sProps; - uno_Environment *m_pEnvRemote; -public: - PropertySetterThread( uno_Environment *pEnvRemote, - urp_BridgeImpl *pImpl, - const ::rtl::OUString & props ) - : m_pImpl( pImpl ) - , m_sProps( props ) - , m_pEnvRemote( pEnvRemote ) - { - if (m_sProps.getLength() > 0) { - m_sProps += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - } - m_sProps += rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("CurrentContext=")); - // hold the environment in case all references are released before this - // thread terminates - m_pEnvRemote->acquire( pEnvRemote ); - } - ~PropertySetterThread() - { - m_pEnvRemote->release( m_pEnvRemote ); - } - - virtual void SAL_CALL run() - { - for (;;) - { - switch ( m_pImpl->m_pPropertyObject->localRequestChange( ) ) - { - case 1: - sal_Bool bExceptionThrown; - m_pImpl->m_pPropertyObject->localCommitChange( m_sProps , &bExceptionThrown ); - OSL_ENSURE( !bExceptionThrown, "properties were not set\n" ); - goto done; - case 0: - OSL_TRACE( "urp-bridge : remote-counterpart won the changing-the-protocol-race\n" ); - goto done; - } - } - done: - m_pImpl->m_initialized.set(); - } - virtual void SAL_CALL onTerminated() - { - delete this; - } -}; -//------------------------------------ - - -void test_cache() -{ - OUString a = OUString( RTL_CONSTASCII_USTRINGPARAM( "a" ) ); - OUString b = OUString( RTL_CONSTASCII_USTRINGPARAM( "b" ) ); - OUString c = OUString( RTL_CONSTASCII_USTRINGPARAM( "c" ) ); - Cache < OUString , equalOUString > cache ( 2 ); - - sal_Int32 n = cache.put( a ); - if (cache.seek( a ) != n) - { - OSL_ASSERT( false ); - } - OSL_ASSERT( 0 == n ); - - n = cache.put( b ); - OSL_ASSERT( 1 == n ); - - cache.put( c ); - - OSL_ASSERT( 0xffff == cache.seek( a ) ); - OSL_ASSERT( 1 == cache.seek( b ) ); - OSL_ASSERT( 0 == cache.seek( c ) ); - - OSL_ASSERT( 1 == cache.put( a ) ); - OSL_ASSERT( 0xffff == cache.seek( b) ); - OSL_ASSERT( 1 == cache.seek( a ) ); - OSL_ASSERT( 0 == cache.seek( c ) ); -} - -/******************* - * Are we within thread, that calls destructors of static objects ? - *******************/ -sal_Bool g_bStaticDestructorsCalled = sal_False; -struct StaticSingleton -{ - ~StaticSingleton() - { - ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() ); - g_bStaticDestructorsCalled = sal_True; - } -}; -StaticSingleton singleton; - -#if OSL_DEBUG_LEVEL > 1 -static MyCounter thisCounter( "Remote Environment" ); -#endif - -void SAL_CALL allThreadsAreGone( uno_Environment * pEnvRemote ) -{ - remote_Context *pContext = (remote_Context *) pEnvRemote->pContext; - urp_BridgeImpl *pImpl = ( urp_BridgeImpl *) pContext->m_pBridgeImpl; - - // if the current thread is not the writer thread, the writer thread - // object is not destroyed up to now, though it may already have run out. - // In both cases, it must be safe to cal pImpl->m_pWriter->getIdentifier() - OSL_ASSERT( pImpl->m_pWriter ); - if( pImpl->m_pWriter->getIdentifier() == osl_getThreadIdentifier(0) ) - { - // This is the writer thread. It has done some release calls, - // and is now the last one, that was active. Because the writer - // thread holds the environment weakly, there may also be a thread within - // the dispose of the bridge ( because the enviroment may have a refcount == 0 ). - // However, this thread MUST wait for the writer thread, so it is perfectly ok, - // not to set m_cndWaitForThreads. ( The check for m_nRemoteThreads is done - // after the join of the writer thread ). - } - else - { - pImpl->m_cndWaitForThreads.set(); - } - -} - -void SAL_CALL releaseStubs( uno_Environment *pEnvRemote ) -{ - - ((remote_Context * ) pEnvRemote->pContext )->m_pBridgeImpl->m_bReleaseStubsCalled = sal_True; - - remote_Interface **ppInterfaces = 0; - sal_Int32 nCount; - pEnvRemote->pExtEnv->getRegisteredInterfaces( pEnvRemote->pExtEnv, - (void***)&ppInterfaces, - &nCount, - rtl_allocateMemory ); - - sal_Int32 i; - for( i = 0 ; i < nCount ; i ++ ) - { - if( ppInterfaces[i]->acquire == bridges_remote::acquireUno2RemoteStub ) - { - // these are freed by the environment, so no release necessary - pEnvRemote->pExtEnv->revokeInterface( pEnvRemote->pExtEnv, ppInterfaces[i] ); - } - else - { - ppInterfaces[i]->release( ppInterfaces[i] ); - } - } - - rtl_freeMemory( (void*) ppInterfaces ); -} - -} // end namespace bridges_urp - -using namespace bridges_urp; - -extern "C" { - -static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote ) -{ - remote_Context *pContext = (remote_Context *) pEnvRemote->pContext; - urp_BridgeImpl *pImpl = ( urp_BridgeImpl *) pContext->m_pBridgeImpl; - - ::osl::ClearableMutexGuard guard( pImpl->m_disposingMutex ); - if( pContext->m_pBridgeImpl->m_bDisposed && - ( ! pImpl->m_pReader || - osl_getThreadIdentifier(0) == - (oslThreadIdentifier) pImpl->m_pReader->getIdentifier() ) ) - { - return; - } - // in case, that the static destructors already have been called, no - // tiding up is done. - bool tidyUp; - { - ::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() ); - tidyUp = ! g_bStaticDestructorsCalled && - ! pContext->m_pBridgeImpl->m_bDisposed; - } - if( tidyUp ) - { - // TODO : not threadsafe - // synchronization with dispatch methods needed ! - - pImpl->m_bDisposed = sal_True; - - - // close the connection - uno_threadpool_dispose( pImpl->m_hThreadPool ); - pImpl->m_pWriter->abortThread(); - pContext->m_pConnection->close( pContext->m_pConnection ); - - if( osl_getThreadIdentifier(0) == - (oslThreadIdentifier) pImpl->m_pReader->getIdentifier() ) - { - // This is the reader thread. Let the thread destroy itself - // the reader thread object must also release the connection at this stage ! - pImpl->m_pReader->destroyYourself(); - pImpl->m_pReader = 0; - } - else - { - // wait for the reader thread - // the reader thread object must also release the connection, - // when terminating !!!! - pImpl->m_pReader->join(); - } - - // wait for the writer thread - pImpl->m_pWriter->join(); - - // now let the context go ! - pContext->dispose( pContext ); - - if( 0 != pImpl->m_nRemoteThreads ) - { - // Wait for all threads - guard.clear(); - pImpl->m_cndWaitForThreads.wait(); - OSL_ASSERT( ! pImpl->m_nRemoteThreads ); - } - else - { - guard.clear(); - } -#ifdef BRIDGES_URP_PROT - if( pImpl->m_pLogFile ) - { - fclose( pImpl->m_pLogFile ); - pImpl->m_pLogFile = 0; - } -#endif -#if OSL_DEBUG_LEVEL > 1 - pImpl->dumpErrors( stderr ); -#endif - - // destroy the threads - delete pImpl->m_pWriter; - pImpl->m_pWriter = 0; - - if( pImpl->m_pReader != 0 ) - { - // This is not the reader thread, so the thread object is deleted - delete pImpl->m_pReader; - pImpl->m_pReader = 0; - } - - bool bReleaseStubs = false; - { - ::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() ); - bReleaseStubs = !g_bStaticDestructorsCalled; - } - if( bReleaseStubs ) - { - releaseStubs( pEnvRemote ); - } - } -} - -static void SAL_CALL RemoteEnvironment_thisDisposing( - uno_Environment *pEnvRemote ) -{ - remote_Context *pContext = (remote_Context * )pEnvRemote->pContext; - urp_BridgeImpl *pImpl = ((urp_BridgeImpl*) pContext->m_pBridgeImpl); - - { - ::osl::ClearableMutexGuard guard( pImpl->m_disposingMutex ); - if( ! pImpl->m_bDisposed ) - { - guard.clear(); - urp_sendCloseConnection( pEnvRemote ); - RemoteEnvironment_thisDispose( pEnvRemote ); - } - } - pImpl->m_pPropertyObject->thisRelease(); - pImpl->m_pPropertyObject = 0; - - uno_threadpool_destroy( pImpl->m_hThreadPool ); - - delete pImpl; - pContext->aBase.release( (uno_Context * ) pContext ); - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.release(); -#endif -} - -static void SAL_CALL RemoteEnvironment_thisComputeObjectIdentifier( - uno_ExtEnvironment *, rtl_uString **, void *) -{ - OSL_ENSURE( 0, "RemoteEnvironment_thisComputeObjectIdentifier should never be called" ); -} - -static void SAL_CALL RemoteEnvironment_thisAcquireInterface( - uno_ExtEnvironment *, void *pInterface ) -{ - ((remote_Interface *)pInterface)->acquire( ( remote_Interface *) pInterface ); -} - -static void SAL_CALL RemoteEnvironment_thisReleaseInterface( - uno_ExtEnvironment *, void *pInterface ) -{ - ((remote_Interface *)pInterface)->release( ( remote_Interface *) pInterface ); -} - -//################################################################################################## -void SAL_CALL uno_initEnvironment( uno_Environment * pEnvRemote ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - // set C-virtual methods - pEnvRemote->environmentDisposing = RemoteEnvironment_thisDisposing; - pEnvRemote->pExtEnv->computeObjectIdentifier = RemoteEnvironment_thisComputeObjectIdentifier; - pEnvRemote->pExtEnv->acquireInterface = RemoteEnvironment_thisAcquireInterface; - pEnvRemote->pExtEnv->releaseInterface = RemoteEnvironment_thisReleaseInterface; - pEnvRemote->dispose = RemoteEnvironment_thisDispose; - - remote_Context *pContext = ( remote_Context * ) pEnvRemote->pContext; - pContext->aBase.acquire( ( uno_Context * ) pContext ); - pContext->getRemoteInstance = ::bridges_remote::remote_sendQueryInterface; - - // Initialize impl struct urp_BridgeImpl - urp_BridgeImpl *pImpl = new ::bridges_urp::urp_BridgeImpl( 256, 8192 ); - pContext->m_pBridgeImpl = pImpl; - - // Initialize threadpool - pImpl->m_hThreadPool = uno_threadpool_create(); - - // take the bridgepointer as id - pImpl->m_properties.seqBridgeID = ByteSequence( (sal_Int8*)&pEnvRemote , sizeof( pEnvRemote ) ); - - pImpl->m_allThreadsAreGone = allThreadsAreGone; - pImpl->m_sendRequest = urp_sendRequest; - pImpl->m_nRemoteThreads = 0; - pImpl->m_bDisposed = sal_False; - pImpl->m_bReleaseStubsCalled = sal_False; - - pImpl->m_pPropertyObject = new PropertyObject( &(pImpl->m_properties ), pEnvRemote, pImpl ); - pImpl->m_pPropertyObject->thisAcquire(); - - OUString sProtocolProperties; - if( pContext->m_pProtocol->length > 3 ) - { - sProtocolProperties = OUString( pContext->m_pProtocol ).copy( 4, pContext->m_pProtocol->length-4); - } - if( sProtocolProperties.getLength() ) - { - struct Properties props = pImpl->m_properties; - assignFromStringToStruct( sProtocolProperties , &props ); - if( ! props.bNegotiate ) - { - // no negotiation takes place, the creator of the bridge knows the parameter - // of the other side ! - pImpl->applyProtocolChanges( props ); - sProtocolProperties = OUString(); - } - } - -#ifdef BRIDGES_URP_PROT - char *p = getenv( "PROT_REMOTE" ); - pImpl->m_pLogFile = 0; - if( p ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - static int counter; - oslProcessInfo data; - data.Size = sizeof( data ); - osl_getProcessInfo( 0 , osl_Process_HEAPUSAGE | osl_Process_IDENTIFIER , &data ); - OString s(p); - s += "_pid"; - s += OString::valueOf( (sal_Int32) data.Ident ); - s += "_"; - s += OString::valueOf( (sal_Int32) counter ); - pImpl->m_sLogFileName = s; - // clear the file - FILE *f = fopen( s.getStr() , "w" ); - OSL_ASSERT( f ); - if( getenv( "PROT_REMOTE_FAST") ) - { - pImpl->m_pLogFile = f; - } - else - { - fclose( f ); - } - counter++; - } -#endif - - // start reader and writer threads - pImpl->m_pWriter = new ::bridges_urp::OWriterThread( pContext->m_pConnection , pImpl, - pEnvRemote); - pImpl->m_pWriter->create(); - - pImpl->m_pReader = new ::bridges_urp::OReaderThread( pContext->m_pConnection , - pEnvRemote, - pImpl->m_pWriter ); - pImpl->m_pReader->create(); - - PropertySetterThread *pPropsSetterThread = - new PropertySetterThread( pEnvRemote, pImpl , sProtocolProperties ); - pPropsSetterThread->create(); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.acquire(); -#endif -} - - -//################################################################################################## -void SAL_CALL uno_ext_getMapping( - uno_Mapping ** ppMapping, - uno_Environment * pFrom, - uno_Environment * pTo ) -{ - OSL_ASSERT( ppMapping && pFrom && pTo ); - if (ppMapping && pFrom && pTo) - { - if (*ppMapping) - ((*ppMapping)->release)( *ppMapping ); - bridges_remote::RemoteMapping * pMapping = 0; - - ::rtl::OUString sFromName = pFrom->pTypeName; - ::rtl::OUString sToName = pTo->pTypeName; - ::rtl::OUString sUno = OUString::createFromAscii( UNO_LB_UNO ); - ::rtl::OUString sRemote = OUString::createFromAscii( "urp" ); - if ( sFromName.equalsIgnoreAsciiCase( sRemote ) && - sToName.equalsIgnoreAsciiCase( sUno ) ) - { - pMapping = new bridges_remote::RemoteMapping( pTo, /* Uno */ - pFrom, /*remote*/ - bridges_remote::remoteToUno, - OUString() ); - } - else if ( sFromName.equalsIgnoreAsciiCase( sUno ) && - sToName.equalsIgnoreAsciiCase( sRemote ) ) - { - pMapping = new bridges_remote::RemoteMapping( pFrom , - pTo , - bridges_remote::unoToRemote, - OUString() ); - } - - *ppMapping = (uno_Mapping * )pMapping; - OUString dummy; - uno_registerMapping( ppMapping , - bridges_remote::freeRemoteMapping, - pFrom , - pTo , - dummy.pData ); - } -} - -sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) -{ - return g_moduleCount.canUnload( &g_moduleCount , pTime ); -} - -} diff --git a/bridges/source/remote/urp/urp_job.cxx b/bridges/source/remote/urp/urp_job.cxx deleted file mode 100644 index 8828f7f37f64..000000000000 --- a/bridges/source/remote/urp/urp_job.cxx +++ /dev/null @@ -1,939 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include "urp_job.hxx" -#include "urp_bridgeimpl.hxx" -#include "urp_writer.hxx" -#include "urp_dispatch.hxx" -#include "urp_log.hxx" -#include "urp_marshal.hxx" -#include "urp_propertyobject.hxx" -#include "urp_reader.hxx" - -using namespace ::std; -using namespace ::rtl; -using namespace ::osl; -using namespace ::com::sun::star::uno; - -using namespace bridges_urp; - -extern "C" { - -static void SAL_CALL doit(void * job) { - ServerMultiJob * p = static_cast< ServerMultiJob * >(job); - p->execute(); - delete p; -} - -} - -namespace bridges_urp -{ - static sal_Bool isDisposedExceptionDescriptionAvail( const Type &type ) - { - static sal_Bool bInit; - static sal_Bool bReturn; - // we don't care for thread safety here, as both threads must come - // to the same result - if( ! bInit ) - { - typelib_TypeDescription *pTD = 0; - typelib_typedescriptionreference_getDescription( & pTD, type.getTypeLibType() ); - if( pTD ) - { - bReturn = sal_True; - typelib_typedescription_release( pTD ); - } - else - { - bReturn = sal_False; - } - bInit = sal_True; - } - return bReturn; - } - - //-------------------------------------------------------------------------------------- - static void prepareRuntimeExceptionClientSide( uno_Any **ppException , const OUString &s) - { - com::sun::star::lang::DisposedException exception( s , Reference< XInterface > () ); - Type type = ::getCppuType( &exception ); - if( !isDisposedExceptionDescriptionAvail( type ) ) - { - // if it is not available (probably missing type library), - // then we are satisfied with throwing a normal runtime exception, - // for which cppu provides a static description - type = getCppuType( ( RuntimeException * ) 0 ); - } - uno_type_any_construct( *ppException , &exception , type.getTypeLibType() , 0 ); - } - - - Job::Job( uno_Environment *pEnvRemote, - remote_Context *pContext, - sal_Sequence *pTid, - struct urp_BridgeImpl *pBridgeImpl, - Unmarshal *pUnmarshal ) - : m_pContext( pContext ) - , m_pUnmarshal( pUnmarshal ) - , m_pBridgeImpl( pBridgeImpl ) - , m_pTid( pTid ) - , m_counter( pEnvRemote ) - { - if ( m_pContext ) - { - m_pContext->aBase.acquire( &m_pContext->aBase ); - } - if( m_pTid ) - rtl_byte_sequence_acquire( pTid ); - } - - Job::~Job() - { - if( m_pTid ) - rtl_byte_sequence_release( m_pTid ); - if ( m_pContext ) - { - m_pContext->aBase.release( &m_pContext->aBase ); - } - } - - - - - //-------------------------------------------------------------------------------------- - sal_Bool ClientJob::extract( ) - { - sal_Bool bReturn = sal_True; - //------------------------------- - // Handle the reply, unpack data - //------------------------------- - if( m_bExceptionOccured ) - { - bReturn = m_pUnmarshal->unpackAny( *m_ppException ); - } - else - { - //--------------------------------- - // alles ist gut - //--------------------------------- - if( m_pMethodType ) - { - if( m_pMethodType->pReturnTypeRef->eTypeClass != typelib_TypeClass_VOID ) - { - typelib_TypeDescription *pType = 0; - TYPELIB_DANGER_GET( &pType , m_pMethodType->pReturnTypeRef ); - bReturn = m_pUnmarshal->unpack( m_pReturn , pType ) && bReturn; - TYPELIB_DANGER_RELEASE( pType ); - } - - // out parameters - sal_Int32 i; - for( i = 0 ; i < m_pMethodType->nParams ; i ++ ) - { - if( m_pMethodType->pParams[i].bOut ) - { - typelib_TypeDescription *pType = 0; - TYPELIB_DANGER_GET( &pType , m_pMethodType->pParams[i].pTypeRef ); - if( m_pMethodType->pParams[i].bIn ) - { - uno_destructData( m_ppArgs[i] , pType , ::bridges_remote::remote_release ); - } - bReturn = m_pUnmarshal->unpack( m_ppArgs[i] , pType ) && bReturn; - TYPELIB_DANGER_RELEASE( pType ); - } - } - } - else if( m_pAttributeType && m_pReturn ) - { - typelib_TypeDescription *pType = 0; - TYPELIB_DANGER_GET( &pType , m_pAttributeType->pAttributeTypeRef ); - bReturn = m_pUnmarshal->unpack( m_pReturn , pType ) && bReturn; - TYPELIB_DANGER_RELEASE( pType ); - } - else if( m_pAttributeType && m_ppArgs ) - { - // nothing to do - } - else - { - OSL_ASSERT( 0 ); - } - } - return bReturn; - } - - //------------------------------------------------------------------------------------------- - void ClientJob::initiate() - { - uno_threadpool_putJob( m_pBridgeImpl->m_hThreadPool, m_pTid , this, 0, sal_False); - } - - //-------------------------------------------------------------------------------------------- - sal_Bool ClientJob::pack() - { - sal_Bool bSuccess = sal_True; - MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); - - if( m_pMethodType && - REMOTE_RELEASE_METHOD_INDEX == m_pMethodType->aBase.nPosition && - ! m_pBridgeImpl->m_bDisposed && - m_pBridgeImpl->m_pWriter->getIdentifier() != ::osl::Thread::getCurrentIdentifier() ) - { - // all release calls are delegated to the writer thread to avoid - // multiple synchron calls with the same thread id and reentrant - // marshaling (in case during destruction of parameters a release is - // invoked ). - m_pBridgeImpl->m_pWriter->insertReleaseRemoteCall( - m_pOid, m_pInterfaceType->aBase.pWeakRef ); - - // No waiting, please - return sal_False; - } - else if ( m_pMethodType && - REMOTE_RELEASE_METHOD_INDEX == m_pMethodType->aBase.nPosition && - m_pBridgeImpl->m_bDisposed ) - { - // no exception for release calls ! - return sal_False; - } - else if( m_pBridgeImpl->m_bDisposed ) - { - OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "URP-Bridge: disposed" ) ); - buf.append( m_pBridgeImpl->getErrorsAsString() ); - prepareRuntimeExceptionClientSide( m_ppException , buf.makeStringAndClear() ); - return sal_False; - } - - // build up the flag byte - sal_Bool bType = sal_False, bOid = sal_False, bTid = sal_False; - sal_uInt8 nFlags = 0; - if( m_pBridgeImpl->m_lastOutType.getTypeLibType() != m_pInterfaceType->aBase.pWeakRef && - ! typelib_typedescriptionreference_equals( - m_pBridgeImpl->m_lastOutType.getTypeLibType(), m_pInterfaceType->aBase.pWeakRef ) ) - { - //new type - nFlags = nFlags | HDRFLAG_NEWTYPE; - bType = sal_True; - } - if( m_pBridgeImpl->m_lastOutOid.pData != m_pOid && - rtl_ustr_compare_WithLength( m_pBridgeImpl->m_lastOutOid.pData->buffer, - m_pBridgeImpl->m_lastOutOid.pData->length, - m_pOid->buffer, - m_pOid->length ) ) - { - //new object id - nFlags = nFlags | HDRFLAG_NEWOID; - bOid = sal_True; - } - if( m_pBridgeImpl->m_lastOutTid.getHandle() != m_pTid && - !(m_pBridgeImpl->m_lastOutTid == *(ByteSequence*) &(m_pTid) ) ) - { - // new threadid - nFlags = nFlags | HDRFLAG_NEWTID; - bTid = sal_True; - } - - if( m_bCallingConventionForced ) - { - nFlags = nFlags | HDRFLAG_MOREFLAGS; - } -#ifdef BRIDGES_URP_PROT - sal_Int32 nLogStart = m_pBridgeImpl->m_blockMarshaler.getPos(); -#endif - // Short request headers can only handle 14-bit method IDs, so - // unconditionally use a long header for method IDs that are too large: - if( nFlags || m_nMethodIndex >= 0xC000 ) - { - // the flag byte is needed + request - nFlags = nFlags | HDRFLAG_LONGHEADER | HDRFLAG_REQUEST; // - - // as long as we do not have customized calls, no MOREFLAGS must be set - if( m_nMethodIndex >= 0x100 ) - { - nFlags = nFlags | HDRFLAG_LONGMETHODID; - } - m_pBridgeImpl->m_blockMarshaler.packInt8( &nFlags ); - - if( nFlags & HDRFLAG_MOREFLAGS ) - { - sal_uInt8 nMoreFlags = 0; - if( ! m_bOneway ) - { - nMoreFlags = HDRFLAG_SYNCHRONOUS |HDRFLAG_MUSTREPLY; - } - m_pBridgeImpl->m_blockMarshaler.packInt8( &nMoreFlags ); - } - if( nFlags & HDRFLAG_LONGMETHODID ) - { - sal_uInt16 nMethod = (sal_uInt16 ) m_nMethodIndex; - m_pBridgeImpl->m_blockMarshaler.packInt16( &nMethod ); - } - else - { - sal_uInt8 nMethod = (sal_uInt8) m_nMethodIndex; - m_pBridgeImpl->m_blockMarshaler.packInt8( &nMethod ); - } - } - else - { - // no flag byte needed, simply marshal the method index - if( m_nMethodIndex >= 64 ) - { - sal_uInt16 nMethod = ( sal_uInt16 ) m_nMethodIndex; - nMethod = nMethod | 0x4000; - m_pBridgeImpl->m_blockMarshaler.packInt16( &nMethod ); - } - else - { - sal_uInt8 nMethod = (sal_uInt8 ) m_nMethodIndex; - m_pBridgeImpl->m_blockMarshaler.packInt8( &nMethod ); - } - } - - // marshal type,oid,tid - if( bType ) - { - m_pBridgeImpl->m_lastOutType = m_pInterfaceType->aBase.pWeakRef; - m_pBridgeImpl->m_blockMarshaler.packType( &(m_pBridgeImpl->m_lastOutType) ); - } - if( bOid ) - { - m_pBridgeImpl->m_lastOutOid = *(OUString *)&m_pOid; - m_pBridgeImpl->m_blockMarshaler.packOid( m_pBridgeImpl->m_lastOutOid ); - } - if( bTid ) - { - m_pBridgeImpl->m_lastOutTid = *(ByteSequence*)&(m_pTid); - m_pBridgeImpl->m_blockMarshaler.packTid( m_pBridgeImpl->m_lastOutTid ); - } - - if ( m_pBridgeImpl->m_properties.bCurrentContext - && m_nMethodIndex != REMOTE_RELEASE_METHOD_INDEX - && m_pContext != 0 ) - { - void * pCc = 0; - rtl::OUString aEnvName( RTL_CONSTASCII_USTRINGPARAM( "urp" ) ); - bSuccess = bSuccess && uno_getCurrentContext( - &pCc, aEnvName.pData, m_pContext ); - typelib_TypeDescription * pType = 0; - TYPELIB_DANGER_GET( - &pType, XCurrentContext::static_type().getTypeLibType() ); - bSuccess = bSuccess && m_pBridgeImpl->m_blockMarshaler.pack( - &pCc, pType ); - TYPELIB_DANGER_RELEASE( pType ); - if ( pCc ) - { - remote_Interface * p = static_cast< remote_Interface * >( pCc ); - p->release( p ); - } - } - - // marshal arguments ! -#ifdef BRIDGES_URP_PROT - sal_Int32 nLogHeader = m_pBridgeImpl->m_blockMarshaler.getPos(); -#endif - if( m_pMethodType ) - { - sal_Int32 i; - for( i = 0 ; i < m_pMethodType->nParams ; i ++ ) - { - if( m_pMethodType->pParams[i].bIn ) - { - typelib_TypeDescription *pType = 0; - TYPELIB_DANGER_GET( &pType , m_pMethodType->pParams[i].pTypeRef ); - if( pType ) - { - bSuccess = - bSuccess && m_pBridgeImpl->m_blockMarshaler.pack( m_ppArgs[i] , pType ); - TYPELIB_DANGER_RELEASE( pType ); - } - else - { - bSuccess = sal_False; - OUStringBuffer buffer( 128 ); - buffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "no typedescription available for type" ) ); - buffer.append( m_pMethodType->pParams[i].pTypeRef->pTypeName ); - m_pBridgeImpl->addError( buffer.makeStringAndClear() ); - } - } - } - } - else if( m_pAttributeType && m_pReturn ) - { - // nothing to do ! - } - else if( m_pAttributeType && m_ppArgs ) - { - typelib_TypeDescription *pType = 0; - TYPELIB_DANGER_GET( &pType , m_pAttributeType->pAttributeTypeRef ); - if( pType ) - { - bSuccess = bSuccess && m_pBridgeImpl->m_blockMarshaler.pack( m_ppArgs[0] , pType ); - TYPELIB_DANGER_RELEASE( pType ); - } - else - { - bSuccess = sal_False; - OUStringBuffer buffer( 128 ); - buffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "no typedescription available for type" ) ); - buffer.append( m_pAttributeType->pAttributeTypeRef->pTypeName ); - m_pBridgeImpl->addError( buffer.makeStringAndClear() ); - } - } - else - { - OSL_ASSERT( 0 ); - } - -#ifdef BRIDGES_URP_PROT - urp_logCall( m_pBridgeImpl, m_pBridgeImpl->m_blockMarshaler.getPos() - nLogStart, - m_pBridgeImpl->m_blockMarshaler.getPos() - nLogHeader, ! m_bOneway, - m_pMethodType ? m_pMethodType->aBase.pMemberName : - m_pAttributeType->aBase.pMemberName ); -#endif - - if( bSuccess ) - { - if( ! m_bOneway ) - { - uno_threadpool_attach( m_pBridgeImpl->m_hThreadPool ); - m_pBridgeImpl->m_clientJobContainer.add( *(ByteSequence*)&(m_pTid), this ); - } - - m_pBridgeImpl->m_nMarshaledMessages ++; - //--------------------------- - // Inform the writer thread, that there is some work to do - //--------------------------- - m_pBridgeImpl->m_pWriter->touch( ! m_bOneway ); - - if( m_bOneway ) - { - *m_ppException = 0; - } - } - else - { - // Something went wrong during packing, which means, that the caches may not be in sync - // anymore. So we have no other choice than to dispose the environment. - m_pEnvRemote->dispose( m_pEnvRemote ); - OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Error during marshaling " ) ); - if( m_pMethodType ) - { - buf.append( m_pMethodType->aBase.aBase.pTypeName ); - } - else if( m_pAttributeType ) - { - buf.append( m_pAttributeType->aBase.aBase.pTypeName ); - } - buf.appendAscii( "\n" ); - buf.append( m_pBridgeImpl->getErrorsAsString() ); - prepareRuntimeExceptionClientSide( m_ppException , buf.makeStringAndClear() ); - } - return bSuccess; - // release the guard - } - - //------------------------------------------------------------------------------------ - void ClientJob::wait() - { - //--------------------------- - // Wait for the reply - //--------------------------- - void * pDisposeReason = 0; - - uno_threadpool_enter(m_pBridgeImpl->m_hThreadPool, &pDisposeReason ); - - if( ! pDisposeReason ) - { - // thread has been disposed ! - // avoid leak due continous calling on a disposed reference. The - // reply may or may not be within the container. If the reader thread - // got into problems during unmarshaling the reply for this request, - // it won't be in the container anymore, but it is eiterway safe to call - // the method - ClientJob *pJob = - m_pBridgeImpl->m_clientJobContainer.remove( *(ByteSequence*) &m_pTid ); - if( pJob != this ) - { - // this is not our job, it is probably one of the callstack below, so - // push it back - m_pBridgeImpl->m_clientJobContainer.add( *(ByteSequence*) &m_pTid , pJob ); - } - - OUStringBuffer sMessage( 256 ); - sMessage.appendAscii( RTL_CONSTASCII_STRINGPARAM( "URP_Bridge : disposed\n" ) ); - sMessage.append( m_pBridgeImpl->getErrorsAsString() ); - prepareRuntimeExceptionClientSide( m_ppException, sMessage.makeStringAndClear() ); - m_bExceptionOccured = sal_True; - } - else - { - OSL_ASSERT( pDisposeReason == (void*)this ); - } - if( !m_bExceptionOccured ) - { - *m_ppException = 0; - } - uno_threadpool_detach( m_pBridgeImpl->m_hThreadPool ); - } - - //------------------------------------------------------------------------------------ - // ServerMultiJob - //------------------------------------------------------------------------------------ - ServerMultiJob::ServerMultiJob( - uno_Environment *pEnvRemote, - remote_Context *pContext, - sal_Sequence *pTid, - struct urp_BridgeImpl *pBridgeImpl, - Unmarshal *pUnmarshal, - sal_Int32 nMaxMessages ) - : Job( pEnvRemote, pContext, pTid, pBridgeImpl, pUnmarshal ) - , m_pEnvRemote( pEnvRemote ) - , m_nCalls( 0 ) - , m_nMaxMessages( nMaxMessages ) - , m_nCurrentMemPosition( 0 ) - { - m_pEnvRemote->acquire( m_pEnvRemote ); - m_nCurrentMemSize = MULTIJOB_STANDARD_MEMORY_SIZE + m_nMaxMessages * ( - MULTIJOB_PER_CALL_MEMORY_SIZE + sizeof(ServerJobEntry) + sizeof(MemberTypeInfo) ); - m_pCurrentMem = ( sal_Int8 * ) rtl_allocateMemory( m_nCurrentMemSize ); - m_aEntries = ( ServerJobEntry * ) getHeap( m_nMaxMessages * sizeof( ServerJobEntry ) ); - m_aTypeInfo = ( MemberTypeInfo * ) getHeap( m_nMaxMessages * sizeof( MemberTypeInfo ) ); - } - - ServerMultiJob::~ServerMultiJob() - { - sal_Int32 i; - for( i = 0 ; i < m_nCalls ; i ++ ) - { - struct MemberTypeInfo *const pMTI = &( m_aTypeInfo[i] ); - struct ServerJobEntry *const pSJE = &( m_aEntries[i] ); - - if( pSJE->m_pRemoteI ) - pSJE->m_pRemoteI->release( pSJE->m_pRemoteI ); - - if( pSJE->m_pOid ) - rtl_uString_release( pSJE->m_pOid ); - - if( pSJE->m_pInterfaceTypeRef ) - typelib_typedescriptionreference_release( pSJE->m_pInterfaceTypeRef ); - - if( pMTI->m_pInterfaceType ) - TYPELIB_DANGER_RELEASE( (typelib_TypeDescription *)pMTI->m_pInterfaceType ); - - for( sal_Int32 iArgs = 0 ; iArgs < pMTI->m_nArgCount ; iArgs ++ ) - { - if( pMTI->m_ppArgType[iArgs] ) - TYPELIB_DANGER_RELEASE( pMTI->m_ppArgType [iArgs] ); - } - if( pMTI->m_pReturnType ) - TYPELIB_DANGER_RELEASE( pMTI->m_pReturnType ); - - if( pMTI->m_pMethodType ) - typelib_typedescription_release( (typelib_TypeDescription*)pMTI->m_pMethodType ); - if( pMTI->m_pAttributeType ) - typelib_typedescription_release( (typelib_TypeDescription*)pMTI->m_pAttributeType ); - } - - rtl_freeMemory( m_pCurrentMem ); - for( list< sal_Int8 *>::iterator ii = m_lstMem.begin() ; ii != m_lstMem.end() ; ++ii ) - rtl_freeMemory( *ii ); - - if( m_pEnvRemote ) - m_pEnvRemote->release( m_pEnvRemote ); - } - - //------------------------------------------------------------------------------------- - void ServerMultiJob::execute() - { - Reference< XCurrentContext > xOldCc; - bool bHasOldCc = false; - for( sal_Int32 i = 0; i < m_nCalls ; i ++ ) - { - struct MemberTypeInfo * const pMTI = &( m_aTypeInfo[i] ); - struct ServerJobEntry * const pSJE = &( m_aEntries[i] ); - - if ( pSJE->m_bHasCurrentContext ) - { - if ( !bHasOldCc ) - { - xOldCc = com::sun::star::uno::getCurrentContext(); - bHasOldCc = true; - } - rtl::OUString aEnvName( RTL_CONSTASCII_USTRINGPARAM( "urp" ) ); - if ( !uno_setCurrentContext( - pSJE->m_pCurrentContext, aEnvName.pData, m_pContext ) ) - { - throw RuntimeException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "fatal: uno_setCurrentContext failed" ) ), - Reference< XInterface >() ); - } - if ( pSJE->m_pCurrentContext ) - { - pSJE->m_pCurrentContext->release( pSJE->m_pCurrentContext ); - } - } - - if( ! pSJE->m_pRemoteI ) - { - // ------------------- - // Initial object ? - // ------------------ - // be robust : Sending a release on a not constructed object - // provokes an segfault. Make sure, the call - // is not a release call. - remote_Context *pRemoteC = ((remote_Context*)m_pEnvRemote->pContext); - - if( ! pMTI->m_bIsReleaseCall && pRemoteC->m_pInstanceProvider ) - { - pSJE->m_pException = &(pSJE->m_exception); - - pRemoteC->m_pInstanceProvider->getInstance( - pRemoteC->m_pInstanceProvider, - m_pEnvRemote, - &(pSJE->m_pRemoteI), - pSJE->m_pOid, - pMTI->m_pInterfaceType, - &(pSJE->m_pException)); - } - else - { - prepareRuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "urp: No instance provider set")),i); - } - } - - if( pSJE->m_pException ) - { - // errors during extracting, do nothing - } - else if( ! pSJE->m_pRemoteI ) - { - // May only occur during the queryInterface call on the initial object !!! - // construct the return value - uno_type_any_construct( (uno_Any*) pSJE->m_pReturn , 0 , 0 , 0 ); - } - else - { - pSJE->m_pException = &(pSJE->m_exception ); - - if( pMTI->m_bIsReleaseCall ) - { - pSJE->m_pRemoteI->release( pSJE->m_pRemoteI ); - pSJE->m_pException = 0; - } - else - { - pSJE->m_pRemoteI->pDispatcher( - pSJE->m_pRemoteI, - pMTI->m_pMethodType ? (typelib_TypeDescription*) pMTI->m_pMethodType : - (typelib_TypeDescription*) pMTI->m_pAttributeType, - pSJE->m_pReturn, - pSJE->m_ppArgs, - &(pSJE->m_pException) ); - } - } - if( pSJE->m_pRemoteI ) - { - /** - Do the release here, in case of ForceSynchronous=1, calls - originated by the destructor of an UNO object must be sent BEFORE the - release returns ( otherwise we don't own the thread anymore ! ) - */ - pSJE->m_pRemoteI->release( pSJE->m_pRemoteI ); - pSJE->m_pRemoteI = 0; - } - - // now destruct parameters and marshal replies - // Note : when call is synchron => m_nCalls == 1 - if( pMTI->m_bIsOneway ) - { - // Oneway call, destruct in parameters - for( sal_Int32 j = 0 ; j < pMTI->m_pMethodType->nParams ; j ++ ) - { - // usually all parameters must be in parameters, but to be robust ... - if( pMTI->m_pbIsIn[j] && !cppu_isSimpleType( pMTI->m_ppArgType[j] ) ) - { - uno_destructData( pSJE->m_ppArgs[j] , pMTI->m_ppArgType[j] , 0 ); - } - } - - if( pSJE->m_pException ) - { - uno_any_destruct( pSJE->m_pException, ::bridges_remote::remote_release ); - } - - } - else - { - // synchron, get the mutex to marshal reply and send immeadiatly - MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); - - sal_Bool bTid = sal_False; - sal_uInt8 nFlags = HDRFLAG_LONGHEADER; - ByteSequence tid = m_pTid; - if( !( tid == m_pBridgeImpl->m_lastOutTid ) || pSJE->m_bIgnoreCache ) - { - // new threadid - nFlags = nFlags | HDRFLAG_NEWTID; - bTid = sal_True; - } - - if( pSJE->m_pException ) - { - nFlags = nFlags | HDRFLAG_EXCEPTION; - } -#ifdef BRIDGES_URP_PROT - sal_Int32 nLogStart = m_pBridgeImpl->m_blockMarshaler.getPos(); -#endif - m_pBridgeImpl->m_blockMarshaler.packInt8( &nFlags ); - - if( bTid ) - { - if( ! pSJE->m_bIgnoreCache ) - { - m_pBridgeImpl->m_lastOutTid = tid; - } - m_pBridgeImpl->m_blockMarshaler.packTid( tid , pSJE->m_bIgnoreCache ); - } - -#ifdef BRIDGES_URP_PROT - sal_Int32 nLogHeader = m_pBridgeImpl->m_blockMarshaler.getPos(); -#endif - - if( pSJE->m_pException ) - { - //-------------------- - // an exception was thrown - //-------------------- - m_pBridgeImpl->m_blockMarshaler.packAny( &(pSJE->m_exception) ); - uno_any_destruct( &(pSJE->m_exception) , ::bridges_remote::remote_release ); - - // destroy in parameters - for( sal_Int32 j = 0 ; j < pMTI->m_nArgCount ; j ++ ) - { - if( pMTI->m_pbIsIn[j] && ! cppu_isSimpleType( pMTI->m_ppArgType[j] )) - { - uno_destructData( pSJE->m_ppArgs[j] , pMTI->m_ppArgType[j] , - ::bridges_remote::remote_release ); - } - } - } - else - { - //--------------------------- - // alles ist gut ... - //-------------------------- - if( pMTI->m_pReturnType ) - { - m_pBridgeImpl->m_blockMarshaler.pack( - pSJE->m_pReturn, pMTI->m_pReturnType ); - if( ! cppu_isSimpleType( pMTI->m_pReturnType ) ) - { - uno_destructData( pSJE->m_pReturn , pMTI->m_pReturnType , - ::bridges_remote::remote_release ); - } - } - for( sal_Int32 j = 0 ; j < pMTI->m_nArgCount ; j ++ ) - { - if( pMTI->m_pbIsOut[j] ) - { - m_pBridgeImpl->m_blockMarshaler.pack( - pSJE->m_ppArgs[j] , pMTI->m_ppArgType[j] ); - } - if( ! cppu_isSimpleType( pMTI->m_ppArgType[j] ) ) - { - uno_destructData( pSJE->m_ppArgs[j], pMTI->m_ppArgType[j] , - ::bridges_remote::remote_release ); - } - } - } - -#ifdef BRIDGES_URP_PROT - { - typelib_InterfaceMemberTypeDescription *pMemberType = - pMTI->m_pMethodType ? - (typelib_InterfaceMemberTypeDescription*)pMTI->m_pMethodType : - (typelib_InterfaceMemberTypeDescription*)pMTI->m_pAttributeType; - - urp_logReplying( m_pBridgeImpl , - m_pBridgeImpl->m_blockMarshaler.getPos() - nLogStart, - m_pBridgeImpl->m_blockMarshaler.getPos() - nLogHeader, - pMemberType->pMemberName ); - } -#endif - - m_pBridgeImpl->m_nMarshaledMessages ++; - // put it on the wire - m_pBridgeImpl->m_pWriter->touch( sal_True ); - } // MutexGuard marshalingMutex - } - if ( bHasOldCc ) - { - if ( !com::sun::star::uno::setCurrentContext( xOldCc ) ) - { - throw RuntimeException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "fatal: com::sun::star::uno::setCurrentContext" - " failed" ) ), - Reference< XInterface >() ); - } - } - } - - //------------------------------------------------------------------------------------- - void ServerMultiJob::prepareRuntimeException( const OUString & sMessage , sal_Int32 nCall ) - { - // ------------------------------- - // Construct the DisposedException - // ------------------------------- - com::sun::star::lang::DisposedException exception( sMessage , Reference< XInterface > () ); - Type type = getCppuType( &exception ); - if( !isDisposedExceptionDescriptionAvail( type ) ) - { - // if it is not available (probably missing type library), - // then we are satisfied with throwing a normal runtime exception, - // for which cppu provides a static description - type = getCppuType( ( RuntimeException * ) 0 ); - } - - m_aEntries[nCall].m_pException = &(m_aEntries[nCall].m_exception); - uno_type_any_construct( m_aEntries[nCall].m_pException , &exception , type.getTypeLibType() , 0 ); - } - - //------------------------------------------------------------------------------------- - void ServerMultiJob::initiate() - { - uno_threadpool_putJob( - m_pBridgeImpl->m_hThreadPool, - m_pTid, - this, - doit, - m_aTypeInfo[0].m_bIsOneway ); - } - - - //------------------------------------------------------------------------------------- - sal_Bool ServerMultiJob::extract() - { - sal_Bool bContinue = sal_True; - struct MemberTypeInfo * const pMTI = &(m_aTypeInfo[m_nCalls]); - struct ServerJobEntry * const pSJE = &(m_aEntries[m_nCalls]); - - pSJE->m_pException = 0; - pSJE->m_ppArgs = 0; - pSJE->m_pReturn = 0; - pMTI->m_pReturnType = 0; - - if( pMTI->m_nArgCount ) - { - pMTI->m_ppArgType = - ( typelib_TypeDescription ** ) getHeap( sizeof(void*) * pMTI->m_nArgCount ); - pSJE->m_ppArgs = (void**) getHeap( sizeof( void * ) * pMTI->m_nArgCount ); - pMTI->m_pbIsIn = (sal_Bool *) getHeap( sizeof( sal_Bool ) * pMTI->m_nArgCount ); - pMTI->m_pbIsOut = (sal_Bool *) getHeap( sizeof( sal_Bool ) * pMTI->m_nArgCount ); - } - if( pMTI->m_pMethodType && - pMTI->m_pMethodType->pReturnTypeRef->eTypeClass != typelib_TypeClass_VOID ) - { - TYPELIB_DANGER_GET( &(pMTI->m_pReturnType), pMTI->m_pMethodType->pReturnTypeRef ); - } - else if( pMTI->m_pAttributeType && ! pMTI->m_nArgCount ) - { - TYPELIB_DANGER_GET( &(pMTI->m_pReturnType) , pMTI->m_pAttributeType->pAttributeTypeRef ); - } - - // normal method - if( pMTI->m_pMethodType ) - { - for( sal_Int32 i = 0 ; i < pMTI->m_nArgCount ; i ++ ) - { - pMTI->m_ppArgType[i] = 0; - TYPELIB_DANGER_GET( & ( pMTI->m_ppArgType[i] ) , pMTI->m_pMethodType->pParams[i].pTypeRef); - pMTI->m_pbIsIn[i] = pMTI->m_pMethodType->pParams[i].bIn; - pMTI->m_pbIsOut[i] = pMTI->m_pMethodType->pParams[i].bOut; - - pSJE->m_ppArgs[i] = getHeap( pMTI->m_ppArgType[i]->nSize ); - if( pMTI->m_pbIsIn[i] ) - { - // everything needs to be constructed - bContinue = m_pUnmarshal->unpack( - pSJE->m_ppArgs[i], pMTI->m_ppArgType[i] ) && bContinue; - } - } - } - else if( pMTI->m_nArgCount ) - { - // set attribut - pMTI->m_ppArgType[0] = 0; - pMTI->m_pbIsIn[0] = sal_True; - pMTI->m_pbIsOut[0] = sal_False; - TYPELIB_DANGER_GET( - & ( pMTI->m_ppArgType[0] ) , pMTI->m_pAttributeType->pAttributeTypeRef ); - pSJE->m_ppArgs[0] = getHeap( pMTI->m_ppArgType[0]->nSize ); - bContinue = m_pUnmarshal->unpack( - pSJE->m_ppArgs[0], pMTI->m_ppArgType[0] ) && bContinue; - } - - if( pMTI->m_pReturnType ) - { - pSJE->m_pReturn = getHeap( pMTI->m_pReturnType->nSize ); - } - - m_nCalls ++; - return bContinue; - } -} - - diff --git a/bridges/source/remote/urp/urp_job.hxx b/bridges/source/remote/urp/urp_job.hxx deleted file mode 100644 index 1bafaf9f5162..000000000000 --- a/bridges/source/remote/urp/urp_job.hxx +++ /dev/null @@ -1,379 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _URP_JOB_HXX_ -#define _URP_JOB_HXX_ -#include -#include -#include -#include -#include -#include "urp_threadid.hxx" -#include "urp_unmarshal.hxx" -#include "urp_bridgeimpl.hxx" - - -namespace bridges_urp -{ -const sal_Int32 MULTIJOB_STANDARD_MEMORY_SIZE = 1024; -const sal_Int32 MULTIJOB_PER_CALL_MEMORY_SIZE = 96; - -class Unmarshal; -struct urp_BridgeImpl; - -template < class t > -inline t mymax( const t &t1 , const t &t2 ) -{ - return t1 > t2 ? t1 : t2; -} - -class Job -{ -public: - Job( uno_Environment *pEnvRemote, - remote_Context *pContext, - sal_Sequence *pTid, - struct urp_BridgeImpl *pBridgeImpl, - Unmarshal *pUnmarshal ); - - Job( uno_Environment *pEnvRemote, - remote_Context *pContext, - struct urp_BridgeImpl *pBridgeImpl, - ::bridges_remote::RemoteThreadCounter_HoldEnvWeak value ) - : m_pContext( pContext ) - , m_pBridgeImpl( pBridgeImpl ) - , m_pTid( 0 ) - , m_counter( pEnvRemote , value ) - { - if ( m_pContext ) - { - m_pContext->aBase.acquire( &m_pContext->aBase ); - } - } - - ~Job(); - -public: - remote_Context *m_pContext; - Unmarshal *m_pUnmarshal; - struct urp_BridgeImpl *m_pBridgeImpl; - sal_Sequence *m_pTid; - ::bridges_remote::RemoteThreadCounter m_counter; -}; - -class ClientJob : private Job -{ -public: - // pContext is null for bridge-internal UrpProtocolProperties requests - inline ClientJob( uno_Environment *pEnvRemote, // weak ! - remote_Context *pContext, - struct urp_BridgeImpl *pBridgeImpl, - rtl_uString *pOid, // weak - typelib_TypeDescription const * pMemberType, // weak - typelib_InterfaceTypeDescription *pInterfaceType, // weak - void *pReturn, - void *ppArgs[], - uno_Any **ppException ); - - // ~ClientJob - // no release for method type and attribute type necessary, because - // it was acquired by the caller of urp_sendRequest. The lifetime - // of the ClientJob object is always shorter than the urp_sendRequest call. - inline ~ClientJob() - { - if( m_bReleaseForTypeDescriptionNecessary ) - typelib_typedescription_release( (typelib_TypeDescription*) m_pInterfaceType ); - uno_releaseIdFromCurrentThread(); - } - - sal_Bool pack(); - void wait(); - sal_Bool extract( ); - void initiate(); - - inline void setBridgePropertyCall() - { m_bBridgePropertyCall = sal_True; } - inline sal_Bool isBridgePropertyCall() - { return m_bBridgePropertyCall; } - inline sal_Bool isOneway() - { return m_bOneway; } - - inline void setUnmarshal( Unmarshal *p ) - { m_pUnmarshal = p; } -public: - typelib_InterfaceMethodTypeDescription *m_pMethodType; - typelib_InterfaceAttributeTypeDescription *m_pAttributeType; - sal_Bool m_bExceptionOccured; - -private: - void **m_ppArgs; - void *m_pReturn; - typelib_InterfaceTypeDescription *m_pInterfaceType; - sal_Bool m_bReleaseForTypeDescriptionNecessary; - - uno_Any **m_ppException; - sal_Bool m_bOneway; - sal_Bool m_bBridgePropertyCall; - sal_uInt16 m_nMethodIndex; - uno_Environment *m_pEnvRemote; - rtl_uString *m_pOid; - sal_Bool m_bCallingConventionForced; -}; - -struct MemberTypeInfo -{ - typelib_InterfaceTypeDescription *m_pInterfaceType; - typelib_InterfaceMethodTypeDescription *m_pMethodType; - typelib_InterfaceAttributeTypeDescription *m_pAttributeType; - sal_Int32 m_nArgCount; - sal_Bool m_bIsReleaseCall; - sal_Bool *m_pbIsIn; - sal_Bool *m_pbIsOut; - sal_Bool m_bIsOneway; - typelib_TypeDescription *m_pReturnType; - typelib_TypeDescription **m_ppArgType; -}; - - -struct ServerJobEntry -{ - rtl_uString *m_pOid; - remote_Interface *m_pRemoteI; - typelib_TypeDescriptionReference *m_pInterfaceTypeRef; - void **m_ppArgs; - void *m_pReturn; - uno_Any m_exception; - uno_Any *m_pException; - remote_Interface *m_pCurrentContext; - sal_Bool m_bHasCurrentContext; - sal_Bool m_bIgnoreCache; -}; - -class ServerMultiJob : private Job -{ -public: - ServerMultiJob( uno_Environment *pEnvRemote, - remote_Context *pContext, - sal_Sequence *pTid, - struct urp_BridgeImpl *pBridgeImpl, - Unmarshal *pUnmarshal, - sal_Int32 nMaxMessages ); - ~ServerMultiJob(); -public: - sal_Bool extract( ); - void initiate(); - void execute(); - -public: - // setMethodType or setAttributeType MUST be called before extract - inline void setMethodType( - typelib_InterfaceMethodTypeDescription *pMethodType, - sal_Bool bIsReleaseCall, - sal_Bool bIsOneway ) - { - m_aTypeInfo[m_nCalls].m_pMethodType = pMethodType; - m_aTypeInfo[m_nCalls].m_pAttributeType = 0; - m_aTypeInfo[m_nCalls].m_nArgCount = pMethodType->nParams; - m_aTypeInfo[m_nCalls].m_bIsReleaseCall = bIsReleaseCall; - m_aTypeInfo[m_nCalls].m_bIsOneway = bIsOneway; - } - - inline void setAttributeType( - typelib_InterfaceAttributeTypeDescription *pAttributeType, sal_Bool bIsSetter, sal_Bool bIsOneway ) - { - m_aTypeInfo[m_nCalls].m_pAttributeType = pAttributeType; - m_aTypeInfo[m_nCalls].m_pMethodType = 0; - m_aTypeInfo[m_nCalls].m_nArgCount = bIsSetter ? 1 : 0; - m_aTypeInfo[m_nCalls].m_bIsReleaseCall = sal_False; - m_aTypeInfo[m_nCalls].m_bIsOneway = bIsOneway; - } - - inline void setType( typelib_TypeDescriptionReference *pTypeRef ) - { - m_aEntries[m_nCalls].m_pInterfaceTypeRef = pTypeRef; - typelib_typedescriptionreference_acquire( m_aEntries[m_nCalls].m_pInterfaceTypeRef ); - TYPELIB_DANGER_GET( - (typelib_TypeDescription ** )&(m_aTypeInfo[m_nCalls].m_pInterfaceType) , - pTypeRef ); - } - // setOid or setInterface MUST be called before extract - inline void setOid( rtl_uString *pOid ) - { - m_aEntries[m_nCalls].m_pOid = pOid; - rtl_uString_acquire( m_aEntries[m_nCalls].m_pOid ); - m_aEntries[m_nCalls].m_pRemoteI = 0; - } - - // setOid or setInterface MUST be called - inline void setInterface( remote_Interface *pRemoteI ) - { - m_aEntries[m_nCalls].m_pRemoteI = pRemoteI; - pRemoteI->acquire( pRemoteI ); - m_aEntries[m_nCalls].m_pOid = 0; - } - - inline void setCurrentContext( - bool bHasCurrentContext, remote_Interface *pCurrentContext ) - { - m_aEntries[m_nCalls].m_pCurrentContext = pCurrentContext; - m_aEntries[m_nCalls].m_bHasCurrentContext = bHasCurrentContext; - } - - inline void setIgnoreCache( sal_Bool bIgnoreCache ) - { - m_aEntries[m_nCalls].m_bIgnoreCache = bIgnoreCache; - } - - inline sal_Bool isFull() - { return m_nCalls >= m_nMaxMessages; } - - inline sal_Int8 *getHeap( sal_Int32 nSizeToAlloc ) - { - if( nSizeToAlloc + m_nCurrentMemPosition > m_nCurrentMemSize ) - { - m_lstMem.push_back( m_pCurrentMem ); - m_nCurrentMemSize = mymax( nSizeToAlloc , MULTIJOB_STANDARD_MEMORY_SIZE ) + - (m_nMaxMessages -m_nCalls)*MULTIJOB_PER_CALL_MEMORY_SIZE; - m_pCurrentMem = (sal_Int8*) rtl_allocateMemory( m_nCurrentMemSize ); - m_nCurrentMemPosition = 0; - } - sal_Int8 *pHeap = m_pCurrentMem + m_nCurrentMemPosition; - m_nCurrentMemPosition += nSizeToAlloc; - - // care for alignment - if( m_nCurrentMemPosition & 0x7 ) - { - m_nCurrentMemPosition = ( ((sal_uInt32)m_nCurrentMemPosition) & ( 0xffffffff - 0x7 )) + 8; - } - return pHeap; - } - void prepareRuntimeException( const ::rtl::OUString &sMessage, sal_Int32 nCall ); - -private: - uno_Environment *m_pEnvRemote; - sal_Int32 m_nCalls; - sal_Int32 m_nMaxMessages; - - ServerJobEntry *m_aEntries; - MemberTypeInfo *m_aTypeInfo; - - sal_Int8 *m_pCurrentMem; - sal_Int32 m_nCurrentMemSize; - sal_Int32 m_nCurrentMemPosition; - - // list of memory pointers, that must be freed - ::std::list< sal_Int8 * > m_lstMem; -}; - - - -//--------------------------------------------------------------------------------------------- -inline ClientJob::ClientJob( - uno_Environment *pEnvRemote, - remote_Context *pContext, - struct urp_BridgeImpl *pBridgeImpl, - rtl_uString *pOid, - typelib_TypeDescription const * pMemberType, - typelib_InterfaceTypeDescription *pInterfaceType, - void *pReturn, - void *ppArgs[], - uno_Any **ppException ) - : Job( - pEnvRemote, pContext, pBridgeImpl, ::bridges_remote::RTC_HOLDENVWEAK ) - , m_bExceptionOccured( false ) - , m_ppArgs( ppArgs ) - , m_pReturn( pReturn ) - , m_pInterfaceType( pInterfaceType ) // weak - , m_bReleaseForTypeDescriptionNecessary( sal_False ) - , m_ppException( ppException ) - , m_bBridgePropertyCall( sal_False ) - , m_pEnvRemote( pEnvRemote ) // weak - , m_pOid( pOid ) // weak - , m_bCallingConventionForced( sal_False ) -{ - uno_getIdOfCurrentThread( &m_pTid ); - - if( typelib_TypeClass_INTERFACE_METHOD == pMemberType->eTypeClass ) - { - m_pMethodType = ( typelib_InterfaceMethodTypeDescription * ) pMemberType; - m_pAttributeType = 0; - } - else if( typelib_TypeClass_INTERFACE_ATTRIBUTE == pMemberType->eTypeClass ) - { - m_pAttributeType = ( typelib_InterfaceAttributeTypeDescription * ) pMemberType; - m_pMethodType = 0; - } - else - { - OSL_ASSERT( ! "wrong member type" ); - } - - // calculate method index - if( ! m_pInterfaceType->aBase.bComplete ) - { - // must be acquired because typedescription may be exchanged - typelib_typedescription_acquire((typelib_TypeDescription*) m_pInterfaceType ); - m_bReleaseForTypeDescriptionNecessary = sal_True; - typelib_typedescription_complete( (typelib_TypeDescription ** ) &m_pInterfaceType ); - } - m_nMethodIndex = (sal_uInt16) m_pInterfaceType->pMapMemberIndexToFunctionIndex[ - ((typelib_InterfaceMemberTypeDescription*)pMemberType)->nPosition ]; - - if( m_pAttributeType && m_ppArgs ) - { - // setter - m_nMethodIndex ++; - } - - if( typelib_TypeClass_INTERFACE_METHOD == pMemberType->eTypeClass ) - { -// if( (( typelib_InterfaceMemberTypeDescription * ) pMemberType)->nPosition -// == REMOTE_RELEASE_METHOD_INDEX ) -// { -// m_bOneway = sal_True; -// } -// else - if( pBridgeImpl->m_properties.bForceSynchronous ) - { - m_bOneway = sal_False; - if( (( typelib_InterfaceMethodTypeDescription * ) pMemberType)->bOneWay ) - { - m_bCallingConventionForced = sal_True; - } - } - else - { - m_bOneway = (( typelib_InterfaceMethodTypeDescription * ) pMemberType)->bOneWay; - } - } - else - { - m_bOneway = sal_False; - } -} - -} -#endif diff --git a/bridges/source/remote/urp/urp_log.cxx b/bridges/source/remote/urp/urp_log.cxx deleted file mode 100644 index 5813f917d7da..000000000000 --- a/bridges/source/remote/urp/urp_log.cxx +++ /dev/null @@ -1,147 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include "urp_bridgeimpl.hxx" -#include "urp_log.hxx" - -using namespace ::rtl; -using namespace ::osl; -namespace bridges_urp -{ -#ifdef BRIDGES_URP_PROT - Mutex g_logFileMutex; - - class FileAccess - { - public: - FileAccess( urp_BridgeImpl *pBridgeImpl_ ) : - pBridgeImpl( pBridgeImpl_ ), - guard( g_logFileMutex ) - { - if( pBridgeImpl->m_pLogFile ) - { - f = pBridgeImpl->m_pLogFile; - } - else - { - f = fopen( pBridgeImpl->m_sLogFileName.getStr() , "a" ); - } - } - ~FileAccess() - { - if( ! pBridgeImpl->m_pLogFile ) - { - fclose( f ); - } - } - FILE *getFile() - { - return f; - } - private: - urp_BridgeImpl *pBridgeImpl; - MutexGuard guard; - FILE *f; - }; - - void urp_logCall( urp_BridgeImpl *pBridgeImpl, sal_Int32 nSize, sal_Int32 nUseData, sal_Bool bSynchron , - const ::rtl::OUString &sMethodName ) - { - if( pBridgeImpl->m_sLogFileName.getLength() && getenv( "PROT_REMOTE_ACTIVATE" ) ) - { - OString sOperation = OUStringToOString( sMethodName,RTL_TEXTENCODING_ASCII_US ); - - FileAccess access( pBridgeImpl ); - fprintf( access.getFile() , - "%06u: calling [size=%d(usedata=%d)] [synchron=%d] [name=%s]\n" , - static_cast< unsigned int > (osl_getGlobalTimer()), - static_cast< int > (nSize), - static_cast< int > (nUseData), - bSynchron, sOperation.pData->buffer ); - } - } - - void urp_logServingRequest( urp_BridgeImpl *pBridgeImpl, - sal_Int32 nSize, sal_Int32 nUseData, sal_Bool bSynchron , - const ::rtl::OUString &sMethodName ) - { - if( pBridgeImpl->m_sLogFileName.getLength() && getenv( "PROT_REMOTE_ACTIVATE" ) ) - { - OString sOperation = OUStringToOString( sMethodName,RTL_TEXTENCODING_ASCII_US ); - - FileAccess access( pBridgeImpl ); - fprintf( - access.getFile(), - "%06u: serving request [size=%d(usedata=%d)] [synchron=%d] [name=%s]\n", - static_cast< unsigned int > (osl_getGlobalTimer()), - static_cast< int > (nSize), - static_cast< int > (nUseData), - bSynchron, - sOperation.pData->buffer - ); - } - } - - void urp_logGettingReply( urp_BridgeImpl *pBridgeImpl, - sal_Int32 nSize, sal_Int32 nUseData, - const ::rtl::OUString &sMethodName ) - { - if( pBridgeImpl->m_sLogFileName.getLength() && getenv( "PROT_REMOTE_ACTIVATE" ) ) - { - OString sOperation = OUStringToOString( sMethodName,RTL_TEXTENCODING_ASCII_US ); - FileAccess access( pBridgeImpl ); - fprintf( access.getFile(), - "%06u: getting reply [size=%d(usedata=%d)][name=%s]\n" , - static_cast< unsigned int > (osl_getGlobalTimer()), - static_cast< int > (nSize), - static_cast< int > (nUseData), - sOperation.pData->buffer); - } - } - - void urp_logReplying( urp_BridgeImpl *pBridgeImpl, - sal_Int32 nSize , sal_Int32 nUseData, - const ::rtl::OUString &sMethodName ) - { - if( pBridgeImpl->m_sLogFileName.getLength() && getenv( "PROT_REMOTE_ACTIVATE" ) ) - { - OString sOperation = OUStringToOString(sMethodName,RTL_TEXTENCODING_ASCII_US); - - FileAccess access( pBridgeImpl ); - fprintf( access.getFile(), - "%06u: replying [size=%d(usedata=%d)] [name=%s]\n", - static_cast< unsigned int > (osl_getGlobalTimer()), - static_cast< int > (nSize), - static_cast< int > (nUseData), - sOperation.pData->buffer); - } - } -#endif -} diff --git a/bridges/source/remote/urp/urp_log.hxx b/bridges/source/remote/urp/urp_log.hxx deleted file mode 100644 index 486ff90c1e92..000000000000 --- a/bridges/source/remote/urp/urp_log.hxx +++ /dev/null @@ -1,50 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -namespace bridges_urp -{ -#ifdef DBG_UTIL -#define BRIDGES_URP_PROT -#endif - -#ifdef BRIDGES_URP_PROT - void urp_logCall( urp_BridgeImpl *pBridgeImpl , - sal_Int32 nSize, sal_Int32 nUseData, sal_Bool bSynchron , - const ::rtl::OUString &sMethodName ); - - void urp_logServingRequest( urp_BridgeImpl *pBridgeImpl, - sal_Int32 nSize, sal_Int32 nUseData, sal_Bool bSynchron , - const ::rtl::OUString &sMethodName ); - - void urp_logGettingReply( urp_BridgeImpl *pBridgeImpl, - sal_Int32 nSize, sal_Int32 nUseData, - const ::rtl::OUString &sMethodName ); - - void urp_logReplying( urp_BridgeImpl *pBridgeImpl, - sal_Int32 nSize , sal_Int32 nUseData, - const ::rtl::OUString &sMethodName ); -#endif -} diff --git a/bridges/source/remote/urp/urp_marshal.cxx b/bridges/source/remote/urp/urp_marshal.cxx deleted file mode 100644 index 7545018ea57f..000000000000 --- a/bridges/source/remote/urp/urp_marshal.cxx +++ /dev/null @@ -1,235 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include -#include - -#include -#include - -#include "urp_marshal.hxx" - -using namespace ::rtl; - -using namespace ::com::sun::star::uno; - -namespace bridges_urp { - -static int g_nDetectLittleEndian = 1; -char g_bMarshalSystemIsLittleEndian = ((char*)&g_nDetectLittleEndian)[0]; - -Marshal::Marshal( urp_BridgeImpl *pBridgeImpl, - sal_Int32 nBufferSize, - urp_extractOidCallback callback) : - m_nBufferSize( nBufferSize ), - m_base( (sal_Int8*)rtl_allocateMemory( nBufferSize ) ), - m_pos( m_base + 2*sizeof( sal_Int32 ) ), - m_pBridgeImpl( pBridgeImpl ), - m_callback( callback ) -{} - -Marshal::~Marshal( ) -{ - rtl_freeMemory( m_base ); -} - -void Marshal::packOid( const ::rtl::OUString & oid ) -{ - sal_uInt16 nIndex; - if( oid.getLength() ) - { - nIndex = m_pBridgeImpl->m_oidCacheOut.seek( oid ); - if( 0xffff == nIndex ) - { - nIndex = m_pBridgeImpl->m_oidCacheOut.put( oid ); - packString( (void*)(&oid.pData) ); - } - else - { - OUString dummy; - packString( &dummy ); - } - } - else - { - // null reference - nIndex = 0xffff; - OUString dummy; - packString( &dummy ); - } - packInt16( &nIndex ); -} - -void Marshal::packTid( const ByteSequence & threadId, sal_Bool bIgnoreCache ) -{ - - sal_uInt16 nIndex = 0xffff; - if( ! bIgnoreCache ) - { - nIndex = m_pBridgeImpl->m_tidCacheOut.seek( threadId ); - } - - if( 0xffff == nIndex ) - { - if( ! bIgnoreCache ) - { - nIndex = m_pBridgeImpl->m_tidCacheOut.put( threadId ); - } - packByteSequence( (sal_Int8*) threadId.getConstArray() ,threadId.getLength()); - } - else - { - packByteSequence( 0 , 0 ); - } - packInt16( &nIndex ); -} - - -void Marshal::packType( void *pSource ) -{ - typelib_TypeDescriptionReference *pRef = - *(typelib_TypeDescriptionReference ** ) pSource; - - OSL_ASSERT( pRef ); - - sal_uInt8 nTypeClass = ( sal_uInt8 ) pRef->eTypeClass; - - if( nTypeClass <= /* any*/ 14 ) - { - packInt8( (sal_Int8*)&nTypeClass ); - } - else - { - OUString sTypeName; - sal_uInt16 nIndex = 0xffff; - - nIndex = m_pBridgeImpl->m_typeCacheOut.seek( *(Type*)&pRef ); - if( 0xffff == nIndex ) - { - // put it into the cache - nIndex = m_pBridgeImpl->m_typeCacheOut.put( *(Type*)&pRef ); - sTypeName = pRef->pTypeName; - nTypeClass = nTypeClass | 0x80; - } - packInt8( &nTypeClass ); - packInt16( &nIndex ); - if( 0x80 & nTypeClass ) - { - packString( &sTypeName ); - } - } -} - -sal_Bool Marshal::packRecursive( void *pSource , typelib_TypeDescription *pType ) -{ - sal_Bool bSuccess = sal_True; - switch( pType->eTypeClass ) - { - case typelib_TypeClass_EXCEPTION: - case typelib_TypeClass_STRUCT: - { - typelib_CompoundTypeDescription * pCompType = (typelib_CompoundTypeDescription*)pType; - - if (pCompType->pBaseTypeDescription) - { - bSuccess = pack( pSource , (typelib_TypeDescription*) pCompType->pBaseTypeDescription ); - } - - // then construct members - typelib_TypeDescriptionReference ** ppTypeRefs = pCompType->ppTypeRefs; - sal_Int32 * pMemberOffsets = pCompType->pMemberOffsets; - sal_Int32 nDescr = pCompType->nMembers; - - for ( sal_Int32 nPos = 0; nPos < nDescr; ++nPos ) - { - typelib_TypeDescription * pMemberType = 0; - TYPELIB_DANGER_GET( &pMemberType, ppTypeRefs[nPos] ); - if( pMemberType ) - { - bSuccess = bSuccess && pack( (char*)pSource + pMemberOffsets[nPos] , pMemberType ); - TYPELIB_DANGER_RELEASE( pMemberType ); - } - else - { - OUStringBuffer buf( 64 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("Couldn't get typedescription for type ")); - buf.append( ppTypeRefs[nPos]->pTypeName ); - m_pBridgeImpl->addError( buf.makeStringAndClear() ); - bSuccess = sal_False; - } - } - break; - } - case typelib_TypeClass_SEQUENCE: - { - typelib_IndirectTypeDescription *pIndirectType = - ( typelib_IndirectTypeDescription* ) pType; - - const sal_Int32 nElements = (*(uno_Sequence **)pSource)->nElements; - char * pSourceElements = (char *)(*(uno_Sequence **)pSource)->elements; - - if( typelib_TypeClass_BYTE == pIndirectType->pType->eTypeClass ) - { - // Byte sequences are optimized - packByteSequence( (sal_Int8*)pSourceElements , nElements ); - } - else - { - typelib_TypeDescription *pElementType = 0; - TYPELIB_DANGER_GET( &pElementType, pIndirectType->pType ); - if( pElementType ) - { - const sal_Int32 nElementSize = pElementType->nSize; - - packCompressedSize( nElements ); - for ( sal_Int32 i = 0 ; i < nElements; i++ ) - { - bSuccess = bSuccess && pack( pSourceElements + (nElementSize*i) , pElementType ); - } - TYPELIB_DANGER_RELEASE( pElementType ); - } - else - { - bSuccess = sal_False; - OUStringBuffer buf( 64 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("Couldn't get typedescription for type ")); - buf.append( pIndirectType->pType->pTypeName ); - m_pBridgeImpl->addError( buf.makeStringAndClear() ); - } - } - break; - } - default: - OSL_ASSERT( 0 ); - } - return bSuccess; -} - -} // end namespace bridges diff --git a/bridges/source/remote/urp/urp_marshal.hxx b/bridges/source/remote/urp/urp_marshal.hxx deleted file mode 100644 index 95812b1a695d..000000000000 --- a/bridges/source/remote/urp/urp_marshal.hxx +++ /dev/null @@ -1,343 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _URP_MARSHAL_HXX_ -#define _URP_MARSHAL_HXX_ -#include -#include -#include -#include "urp_bridgeimpl.hxx" -#include "urp_marshal_decl.hxx" - -#include - -struct remote_Interface; - -namespace bridges_urp -{ - // methods for accessing marshaling buffer - inline void Marshal::finish( sal_Int32 nMessageCount ) - { - sal_Int32 nSize = getSize() - 2*sizeof( sal_Int32 ); - - // save the state - sal_Int8 *pos = m_pos; - m_pos = m_base; - packInt32( &nSize ); - packInt32( &nMessageCount ); - - // reset the state - m_pos = pos; - } - - inline void Marshal::restart() - { - m_pos = m_base + 2*sizeof( sal_Int32 ); - } - - inline sal_Int8 *Marshal::getBuffer() - { - return m_base; - } - - inline sal_Bool Marshal::empty() const - { - return ( m_pos - m_base ) == 2*sizeof( sal_Int32 ); - } - - inline sal_Int32 Marshal::getSize() - { - return ((sal_Int32) (m_pos - m_base)); - } - - inline void Marshal::ensureAdditionalMem( sal_Int32 nMemToAdd ) - { - sal_Int32 nDiff = m_pos - m_base; - if( nDiff + nMemToAdd > m_nBufferSize ) - { - m_nBufferSize = m_nBufferSize * 2 > nDiff + nMemToAdd ? - m_nBufferSize* 2 : - nDiff + nMemToAdd; - - m_base = ( sal_Int8 * ) rtl_reallocateMemory( m_base , m_nBufferSize ); - m_pos = m_base + nDiff; - } - } - - // marshaling methods - inline void Marshal::packInt8( void *pSource ) - { - ensureAdditionalMem( 1 ); - *m_pos = *((sal_Int8*) pSource ); - m_pos++; - } - - inline void Marshal::packInt16( void *pSource ) - { - ensureAdditionalMem( 2 ); - if( isSystemLittleEndian() ) - { - m_pos[0] = ((unsigned char *)pSource)[1]; - m_pos[1] = ((unsigned char *)pSource)[0]; - } - else - { - m_pos[1] = ((unsigned char *)pSource)[1]; - m_pos[0] = ((unsigned char *)pSource)[0]; - } - m_pos +=2; - } - - inline void Marshal::packByteSequence( sal_Int8 *pData , sal_Int32 nLength ) - { - packCompressedSize( nLength ); - - ensureAdditionalMem( nLength ); - memcpy( m_pos , pData , nLength ); - m_pos += nLength; - } - - inline void Marshal::packString( void *pSource ) - { - rtl_uString *p = *( rtl_uString ** ) pSource; - - // to be optimized ! - // static buffer in marshal - ::rtl::OString o = ::rtl::OUStringToOString( p , RTL_TEXTENCODING_UTF8 ); - sal_Int32 nLength = o.pData->length; - packCompressedSize( nLength ); - - ensureAdditionalMem( nLength ); - - memcpy( m_pos , o.pData->buffer , nLength ); - m_pos += nLength; - } - - inline sal_Bool Marshal::packAny( void *pSource ) - { - sal_Bool bSuccess = sal_True; - uno_Any *pAny = (uno_Any * ) pSource; - - // pack the type - packType( &( pAny->pType ) ); - // pack the value - typelib_TypeDescription *pType = 0; - TYPELIB_DANGER_GET( &pType, pAny->pType ); - if( pType ) - { - pack( pAny->pData , pType ); - TYPELIB_DANGER_RELEASE( pType ); - } - else - { - rtl::OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("couldn't get typedescription for type " ) ); - buf.append( pAny->pType->pTypeName ); - m_pBridgeImpl->addError( buf.makeStringAndClear() ); - bSuccess = sal_False; - } - return bSuccess; - } - - inline void Marshal::packInt32( void *pSource ) - { - ensureAdditionalMem( 4 ); - if( isSystemLittleEndian() ) - { - m_pos[0] = ((unsigned char *)pSource)[3]; - m_pos[1] = ((unsigned char *)pSource)[2]; - m_pos[2] = ((unsigned char *)pSource)[1]; - m_pos[3] = ((unsigned char *)pSource)[0]; - } - else { - m_pos[3] = ((unsigned char *)pSource)[3]; - m_pos[2] = ((unsigned char *)pSource)[2]; - m_pos[1] = ((unsigned char *)pSource)[1]; - m_pos[0] = ((unsigned char *)pSource)[0]; - } - m_pos +=4; - } - - inline void Marshal::packCompressedSize( sal_Int32 nSize ) - { - ensureAdditionalMem( 5 ); - - if( nSize < 0xff ) - { - *((sal_uInt8*)m_pos) = (sal_uInt8) nSize; - m_pos ++; - } - else - { - *((sal_uInt8*)m_pos) = 0xff; - m_pos ++; - packInt32( &nSize ); - } - } - - inline sal_Bool Marshal::pack( void *pSource , typelib_TypeDescription *pType ) - { - sal_Bool bSuccess = sal_True; - switch( pType->eTypeClass ) - { - case typelib_TypeClass_BYTE: - { - packInt8( pSource ); - break; - } - case typelib_TypeClass_BOOLEAN: - { - ensureAdditionalMem( 1 ); - *m_pos = ( *((sal_Bool*) pSource ) ) ? 1 : 0; - m_pos++; - break; - } - - case typelib_TypeClass_CHAR: - case typelib_TypeClass_SHORT: - case typelib_TypeClass_UNSIGNED_SHORT: - { - packInt16( pSource ); - break; - } - case typelib_TypeClass_ENUM: - case typelib_TypeClass_LONG: - case typelib_TypeClass_UNSIGNED_LONG: - case typelib_TypeClass_FLOAT: - { - packInt32( pSource ); - break; - } - case typelib_TypeClass_DOUBLE: - case typelib_TypeClass_HYPER: - case typelib_TypeClass_UNSIGNED_HYPER: - { - ensureAdditionalMem( 8 ); - if( isSystemLittleEndian() ) - { - m_pos[0] = ((unsigned char *)pSource)[7]; - m_pos[1] = ((unsigned char *)pSource)[6]; - m_pos[2] = ((unsigned char *)pSource)[5]; - m_pos[3] = ((unsigned char *)pSource)[4]; - m_pos[4] = ((unsigned char *)pSource)[3]; - m_pos[5] = ((unsigned char *)pSource)[2]; - m_pos[6] = ((unsigned char *)pSource)[1]; - m_pos[7] = ((unsigned char *)pSource)[0]; - } - else - { - m_pos[7] = ((unsigned char *)pSource)[7]; - m_pos[6] = ((unsigned char *)pSource)[6]; - m_pos[5] = ((unsigned char *)pSource)[5]; - m_pos[4] = ((unsigned char *)pSource)[4]; - m_pos[3] = ((unsigned char *)pSource)[3]; - m_pos[2] = ((unsigned char *)pSource)[2]; - m_pos[1] = ((unsigned char *)pSource)[1]; - m_pos[0] = ((unsigned char *)pSource)[0]; - } - m_pos += 8; - break; - } - - case typelib_TypeClass_STRING: - { - packString( pSource ); - break; - } - case typelib_TypeClass_TYPE: - { - packType( pSource ); - break; - } - case typelib_TypeClass_ANY: - { - bSuccess = packAny( pSource ); - break; - } - case typelib_TypeClass_TYPEDEF: - { - bSuccess = sal_False; - m_pBridgeImpl->addError( "can't handle typedef typedescriptions" ); - break; - } - case typelib_TypeClass_INTERFACE: - { - remote_Interface *pRemoteI = *( remote_Interface ** )pSource; - - ::rtl::OUString sOid; - sal_uInt16 nIndex = 0xffff; - if( pRemoteI ) - { - m_callback( pRemoteI , &(sOid.pData) ); - - nIndex = m_pBridgeImpl->m_oidCacheOut.seek( sOid ); - if( 0xffff == nIndex ) - { - nIndex = m_pBridgeImpl->m_oidCacheOut.put( sOid ); - } - else - { - // cached ! - sOid = ::rtl::OUString(); - } - } - packString( &sOid ); - packInt16( &nIndex ); - break; - } - case typelib_TypeClass_VOID: - { - // do nothing - break; - } - case typelib_TypeClass_EXCEPTION: - case typelib_TypeClass_STRUCT: - case typelib_TypeClass_SEQUENCE: - { - bSuccess = packRecursive( pSource, pType ); - break; - } - default: - { - bSuccess = sal_False; - rtl::OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "can't handle values with typeclass " ) ); - buf.append( (sal_Int32 ) pType->eTypeClass , 10 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ); - buf.append( pType->pTypeName ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ")" ) ); - m_pBridgeImpl->addError( buf.makeStringAndClear() ); - break; - } - } - return bSuccess; - } -} - - - -#endif - diff --git a/bridges/source/remote/urp/urp_marshal_decl.hxx b/bridges/source/remote/urp/urp_marshal_decl.hxx deleted file mode 100644 index 133760bb33e3..000000000000 --- a/bridges/source/remote/urp/urp_marshal_decl.hxx +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _URP_MARSHAL_DECL_HXX_ -#define _URP_MARSHAL_DECL_HXX_ - -#include -#include - -#include - -namespace bridges_urp -{ - struct urp_BridgeImpl; - - typedef void - ( SAL_CALL * urp_extractOidCallback )( remote_Interface *pRemoteI, rtl_uString **ppOid ); - - extern char g_bMarshalSystemIsLittleEndian; - class Marshal - { - public: - Marshal( /* cache access */ struct urp_BridgeImpl *, - sal_Int32 m_nBufferSize, - urp_extractOidCallback callback = 0 - ); - ~Marshal( ); - - inline sal_Bool pack( void *pSource , typelib_TypeDescription *pType ); - - sal_Bool packRecursive( void *pSource, typelib_TypeDescription *pType ); - - void packTid( const ::rtl::ByteSequence &id, sal_Bool bIgnoreCache = sal_False ); - void packOid( const ::rtl::OUString &oid ); - void packType( void *pSource ); - - inline void packCompressedSize( sal_Int32 nSize ); - inline void packInt8( void *pSource ); - inline void packInt16( void *pSource ); - inline void packInt32( void *pSource ); - inline void packString( void *pSource ); - inline sal_Bool packAny( void *pSource ); - inline void packByteSequence( sal_Int8 *pBuffer , sal_Int32 nSize ); - - // can be called during marshaling, but not between - // finish and restart - // returns true, when nothing has been marshaled - inline sal_Bool empty() const; - - // stops marshaling, inserts size in front of the buffer - // getStart and getSize can now be called - inline void finish( sal_Int32 nMessageCount ); - - // must be called after finish. After calling restart, - // a new marshalling session is started invalidating - // the previous bufer - inline void restart(); - - // is only valid, after finish has been called. - // valid until destructed. - inline sal_Int8 *getBuffer(); - - // is only valid, after finish has been called. - // valid until destructed. - inline sal_Int32 getSize(); - - inline sal_Int32 getPos() - { return m_pos - m_base; } - - inline sal_Bool isSystemLittleEndian() - { return g_bMarshalSystemIsLittleEndian; } - - private: - inline void ensureAdditionalMem( sal_Int32 nMemToAdd ); - sal_Int32 m_nBufferSize; - sal_Int8 *m_base; - sal_Int8 *m_pos; - struct urp_BridgeImpl *m_pBridgeImpl; - urp_extractOidCallback m_callback; - }; -} -#endif diff --git a/bridges/source/remote/urp/urp_property.hxx b/bridges/source/remote/urp/urp_property.hxx deleted file mode 100644 index 59dbe3f22f93..000000000000 --- a/bridges/source/remote/urp/urp_property.hxx +++ /dev/null @@ -1,93 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _URP_PROPERTY_HXX_ -#define _URP_PROPERTY_HXX_ -#ifndef _BRIDGES_REMOTE_REMOTE_H_ -#include -#endif -#include -#include - -namespace bridges_urp -{ - struct Properties - { - ::rtl::ByteSequence seqBridgeID; - sal_Int32 nTypeCacheSize; - sal_Int32 nOidCacheSize; - sal_Int32 nTidCacheSize; - ::rtl::OUString sSupportedVersions; - ::rtl::OUString sVersion; - sal_Int32 nFlushBlockSize; - sal_Int32 nOnewayTimeoutMUSEC; - sal_Bool bSupportsMustReply; - sal_Bool bSupportsSynchronous; - sal_Bool bSupportsMultipleSynchronous; - sal_Bool bClearCache; - sal_Bool bNegotiate; - sal_Bool bForceSynchronous; - sal_Bool bCurrentContext; - - inline Properties() - : nTypeCacheSize( 256 ) - , nOidCacheSize( 256 ) - , nTidCacheSize( 256 ) - , sSupportedVersions( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "1.0" ) ) ) - , sVersion( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "1.0" ))) - , nFlushBlockSize( 4*1024 ) - , nOnewayTimeoutMUSEC( 10000 ) - , bSupportsMustReply( sal_False ) - , bSupportsSynchronous( sal_False ) - , bSupportsMultipleSynchronous( sal_False ) - , bClearCache( sal_False ) - , bNegotiate( sal_True ) - , bForceSynchronous( sal_True ) - , bCurrentContext( sal_False ) - {} - - inline Properties & SAL_CALL operator = ( const Properties &props ) - { - seqBridgeID = props.seqBridgeID; - nTypeCacheSize = props.nTypeCacheSize; - nOidCacheSize = props.nOidCacheSize; - nTidCacheSize = props.nTidCacheSize; - sSupportedVersions = props.sSupportedVersions; - sVersion = props.sVersion; - nFlushBlockSize = props.nFlushBlockSize; - nOnewayTimeoutMUSEC = props.nOnewayTimeoutMUSEC; - bSupportsMustReply = props.bSupportsMustReply; - bSupportsSynchronous = props.bSupportsSynchronous; - bSupportsMultipleSynchronous = props.bSupportsMultipleSynchronous; - bClearCache = props.bClearCache; - bNegotiate = props.bNegotiate; - bForceSynchronous = props.bForceSynchronous; - bCurrentContext = props.bCurrentContext; - return *this; - } - }; -} // end namespace bridges_urp -#endif diff --git a/bridges/source/remote/urp/urp_propertyobject.cxx b/bridges/source/remote/urp/urp_propertyobject.cxx deleted file mode 100644 index 94d3e7edee0a..000000000000 --- a/bridges/source/remote/urp/urp_propertyobject.cxx +++ /dev/null @@ -1,793 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include - -#include - -#include - -#include "com/sun/star/bridge/InvalidProtocolChangeException.hpp" -#include - -#include "urp_propertyobject.hxx" -#include "urp_dispatch.hxx" -#include "urp_bridgeimpl.hxx" -#include "urp_job.hxx" - -using namespace ::rtl; -using namespace ::osl; -using namespace ::com::sun::star::bridge; -using namespace ::com::sun::star::uno; - -using namespace bridges_urp; - -extern "C" { - -static void SAL_CALL staticAcquire( remote_Interface *pRemoteI ) -{ - PropertyObject *pProperties = (PropertyObject *) pRemoteI; - pProperties->thisAcquire(); -} - -static void SAL_CALL staticRelease( remote_Interface *pRemoteI ) -{ - PropertyObject *pProperties = (PropertyObject *) pRemoteI; - pProperties->thisRelease(); -} - -static void SAL_CALL staticDispatch( - remote_Interface * pRemoteI, typelib_TypeDescription const * pMemberType, - void * pReturn, void * pArgs[], uno_Any ** ppException ) -{ - PropertyObject *pProperties = (PropertyObject *) pRemoteI; - pProperties->thisDispatch( pMemberType, pReturn, pArgs, ppException ); -} - -} - -namespace bridges_urp -{ -// some nice constants .... -static const sal_Int32 METHOD_QUERY_INTERFACE = 0; -static const sal_Int32 METHOD_GET_PROPERTIES = 3; -static const sal_Int32 METHOD_REQUEST_CHANGE = 4; -static const sal_Int32 METHOD_COMMIT_CHANGE = 5; - -static const sal_Int32 PROPERTY_BRIDGEID = 0; -static const sal_Int32 PROPERTY_TYPECACHESIZE = 1; -static const sal_Int32 PROPERTY_OIDCACHESIZE = 2; -static const sal_Int32 PROPERTY_TIDCACHESIZE = 3; -static const sal_Int32 PROPERTY_SUPPORTEDVERSIONS = 4; -static const sal_Int32 PROPERTY_VERSION =5; -static const sal_Int32 PROPERTY_FLUSHBLOCKSIZE = 6; -static const sal_Int32 PROPERTY_ONEWAYTIMEOUT_MUSEC = 7; -static const sal_Int32 PROPERTY_SUPPORTSMUSTREPLY = 8; -static const sal_Int32 PROPERTY_SUPPERTSSYNCHRONOUS = 9; -static const sal_Int32 PROPERTY_SUPPORTSMULTIPLESYNCHRONOUS = 10; -static const sal_Int32 PROPERTY_CLEARCACHE = 11; -static const sal_Int32 PROPERTY_NEGOTIATE = 12; -static const sal_Int32 PROPERTY_FORCESYNCHRONOUS = 13; -static const sal_Int32 PROPERTY_CURRENTCONTEXT = 14; - -static const sal_Int32 MAX_PROPERTIES = PROPERTY_CURRENTCONTEXT +1; - -const sal_Char *g_aPropertyName[] = -{ - "BridgeId", - "TypeCacheSize", - "OidCacheSize", - "TidCacheSize", - "SupportedVersion", - "Version", - "FlushBlockSize", - "OnewayTimeoutMUSEC", - "SupportsMustReply", - "SupportsSynchronous", - "SupportsMultipleSynchronous", - "ClearCache", - "Negotiate", - "ForceSynchronous", - "CurrentContext" -}; - -// nice little helper functions for conversion -template< class t > -void assignToIdl( ProtocolProperty *pIdl, sal_Int32 nIndex, const t &value ) -{ - pIdl->Name = OUString::createFromAscii( g_aPropertyName[nIndex] ); - ( *(::com::sun::star::uno::Any *)&(pIdl->Value) ) <<= value; -} - -template< class t > -void assignFromIdl( t * p, const ProtocolProperty & property ) -{ - property.Value >>=*p; -} - -static sal_Int32 getIndexFromIdl( const ProtocolProperty & property ) -{ - sal_Int32 nResult = -1; - for( sal_Int32 i = 0 ; i < MAX_PROPERTIES ; i ++ ) - { - if( 0 == property.Name.compareToAscii( g_aPropertyName[i] ) ) - { - nResult = i; - break; - } - } - return nResult; -} - -static sal_Int32 getIndexFromString( const OUString & property ) -{ - sal_Int32 nResult = -1; - for( sal_Int32 i = 0 ; i < MAX_PROPERTIES ; i ++ ) - { - if( 0 == property.compareToAscii( g_aPropertyName[i] ) ) - { - nResult = i; - break; - } - } - return nResult; -} - -static sal_Bool assignFromIdlToStruct( Properties *pProps, const ProtocolProperty &idl ) -{ - sal_Bool bReturn = sal_True; - - sal_Int32 nIndex = getIndexFromIdl( idl ); - if( nIndex >= 0 ) - { - switch( nIndex ) - { - case PROPERTY_SUPPORTSMULTIPLESYNCHRONOUS: - assignFromIdl( &(pProps->bSupportsMultipleSynchronous) , idl ); - break; - case PROPERTY_SUPPERTSSYNCHRONOUS: - assignFromIdl( &(pProps->bSupportsMustReply) , idl ); - break; - case PROPERTY_SUPPORTSMUSTREPLY: - assignFromIdl( &(pProps->bSupportsSynchronous) , idl ); - break; - case PROPERTY_ONEWAYTIMEOUT_MUSEC: - assignFromIdl( &(pProps->nOnewayTimeoutMUSEC) , idl ); - break; - case PROPERTY_BRIDGEID: - assignFromIdl( (Sequence< sal_Int8 > * )&(pProps->seqBridgeID), idl ); - break; - case PROPERTY_TYPECACHESIZE: - assignFromIdl( &(pProps->nTypeCacheSize) , idl ); - break; - case PROPERTY_OIDCACHESIZE: - assignFromIdl( &(pProps->nOidCacheSize) , idl ); - break; - case PROPERTY_TIDCACHESIZE: - assignFromIdl( &(pProps->nTidCacheSize), idl ); - break; - case PROPERTY_SUPPORTEDVERSIONS: - assignFromIdl( &(pProps->sSupportedVersions) , idl ); - break; - case PROPERTY_VERSION: - assignFromIdl( &(pProps->sVersion) , idl ); - break; - case PROPERTY_FLUSHBLOCKSIZE: - assignFromIdl( &(pProps->nFlushBlockSize) ,idl ); - break; - case PROPERTY_CLEARCACHE: - assignFromIdl( &(pProps->bClearCache) ,idl ); - break; - case PROPERTY_NEGOTIATE: - assignFromIdl( &(pProps->bNegotiate) ,idl ); - break; - case PROPERTY_FORCESYNCHRONOUS: - assignFromIdl( &(pProps->bForceSynchronous) ,idl ); - break; - case PROPERTY_CURRENTCONTEXT: - pProps->bCurrentContext = true; - break; - default: - bReturn = sal_False; - } - } - else - { - bReturn = sal_False; - } - return bReturn; -} - -static void extractTokens( - const ::rtl::OUString &sProps , ::std::list< OUString > &lst ) -{ - sal_Int32 nNext = 0; - while ( sal_True ) - { - sal_Int32 nStart = nNext; - nNext = sProps.indexOf( ',' , nNext ); - if( -1 == nNext ) - { - lst.push_back( sProps.copy( nStart, sProps.getLength() - nStart ) ); - break; - } - lst.push_back( sProps.copy( nStart , nNext - nStart ) ); - nNext ++; - } -} - - -static void assignFromStringToPropSeq( const OUString &sProps, uno_Sequence **ppPropertySeq) -{ - ::std::list< OUString > lst; - extractTokens( sProps , lst ); - - typelib_TypeDescription *pSequenceType = 0; - getCppuType( (Sequence< ProtocolProperty > *)0).getDescription( &pSequenceType ); - uno_Sequence *pSeq = 0; - uno_sequence_construct( &pSeq , pSequenceType , 0, lst.size() , 0 ); - ProtocolProperty *pElements = (ProtocolProperty * ) pSeq->elements; - - sal_Int32 i = 0; - for( ::std::list< OUString >::iterator ii = lst.begin() ; ii != lst.end() ; ++ ii, i++ ) - { - sal_Int32 nAssign = (*ii).indexOf( '=' ); - if( -1 == nAssign ) - { - OString o = OUStringToOString( *ii, RTL_TEXTENCODING_ASCII_US ); - OSL_ENSURE( !"wrong protocol propertyt format, ignored", o.getStr() ); - } - OUString sPropName = (*ii).copy( 0, nAssign ); - OUString sValue = (*ii).copy( nAssign +1, (*ii).getLength() - nAssign -1 ); - - sal_Int32 nIndex = getIndexFromString( sPropName ); - if( -1 == nIndex ) - { - OString o = OUStringToOString( sPropName , RTL_TEXTENCODING_ASCII_US); - OSL_ENSURE( !"unknown protocol property, ignored", o.getStr() ); - } - switch( nIndex ) - { - // voids - case PROPERTY_CURRENTCONTEXT: - pElements[i].Name = OUString::createFromAscii( - g_aPropertyName[nIndex] ); - break; - // bools - case PROPERTY_CLEARCACHE: - case PROPERTY_NEGOTIATE: - case PROPERTY_FORCESYNCHRONOUS: - { - sal_Bool bClearCache = (sal_Bool ) sValue.toInt32(); - assignToIdl( &(pElements[i]) , nIndex , bClearCache ); - break; - } - // ints - case PROPERTY_TYPECACHESIZE: - case PROPERTY_OIDCACHESIZE: - case PROPERTY_TIDCACHESIZE: - case PROPERTY_FLUSHBLOCKSIZE: - case PROPERTY_ONEWAYTIMEOUT_MUSEC: - { - sal_Int32 nValue = sValue.toInt32(); - assignToIdl( &(pElements[i]) , nIndex , nValue ); - break; - } - - // strings - case PROPERTY_VERSION: - assignToIdl( &(pElements[i]) , nIndex , sValue ); - break; - default: - OString o = OUStringToOString( sPropName, RTL_TEXTENCODING_ASCII_US ); - OSL_ENSURE( !"readonly protocol property, ignored" , o.getStr() ); - } - } - *ppPropertySeq = pSeq; - typelib_typedescription_release( pSequenceType ); -} - -static void assignFromPropSeqToStruct( uno_Sequence *pSeq , struct Properties *pProps ) -{ - sal_Int32 i; - ProtocolProperty *pElements = (ProtocolProperty *)pSeq->elements; - for( i = 0 ; i < pSeq->nElements ; i ++ ) - { - assignFromIdlToStruct( pProps , pElements[i] ); - } -} - -void assignFromStringToStruct( const OUString & sProps , struct Properties *pProps ) -{ - uno_Sequence *pSeq = 0; - assignFromStringToPropSeq( sProps , &pSeq ); - assignFromPropSeqToStruct( pSeq , pProps ); - uno_type_destructData( &pSeq, getCppuType( (Sequence< ProtocolProperty > *)0).getTypeLibType(),0); -} - - -//---------------------------------------------------------------------------------------------- -// PropertyObject implementation -PropertyObject::PropertyObject( - struct Properties *pLocalSetting , uno_Environment *pEnvRemote, urp_BridgeImpl *pImpl ) - : m_commitChangeCondition( osl_createCondition() ) - , m_nRefCount( 0 ) - , m_pBridgeImpl( pImpl ) - , m_pLocalSetting( pLocalSetting ) - , m_pEnvRemote( pEnvRemote ) - , m_bRequestChangeHasBeenCalled( sal_False ) - , m_bServerWaitingForCommit( sal_False ) - , m_bApplyProperties( sal_False ) -{ - acquire = staticAcquire; - release = staticRelease; - pDispatcher = staticDispatch; -} - -PropertyObject::~PropertyObject() -{ - osl_destroyCondition( m_commitChangeCondition ); -} - -void SAL_CALL PropertyObject::thisDispatch( - typelib_TypeDescription const * pMemberType, void * pReturn, void * ppArgs[], - uno_Any ** ppException ) -{ - OSL_ASSERT( pMemberType->eTypeClass == typelib_TypeClass_INTERFACE_METHOD ); - - typelib_InterfaceMethodTypeDescription *pMethodType = - ( typelib_InterfaceMethodTypeDescription * ) pMemberType; - - switch( pMethodType->aBase.nPosition ) - { - case METHOD_QUERY_INTERFACE: - OSL_ENSURE( 0 , "not implemented yet !" ); - break; - case METHOD_GET_PROPERTIES: - { - implGetProperties( (uno_Sequence **) pReturn ); - *ppException = 0; - break; - } - case METHOD_COMMIT_CHANGE: - { - implCommitChange( *(uno_Sequence ** ) ppArgs[0] , ppException ); - break; - } - case METHOD_REQUEST_CHANGE: - { - *(sal_Int32 *) pReturn = implRequestChange( *(sal_Int32 *)ppArgs[0], ppException ); - break; - } - default: - OSL_ENSURE( 0 , "unkown method !" ); - } -} - -void SAL_CALL PropertyObject::localGetPropertiesFromRemote( struct Properties *pR ) -{ - OUString oid = OUString::createFromAscii( g_NameOfUrpProtocolPropertiesObject ); - - typelib_TypeDescription *pInterfaceType = 0; - getCppuType( (Reference< XProtocolProperties > *) 0 ).getDescription( &pInterfaceType ); - - if( !pInterfaceType->bComplete ) - { - typelib_typedescription_complete( &pInterfaceType ); - } - - typelib_TypeDescription *pMethodType = 0; - typelib_typedescriptionreference_getDescription( - &pMethodType, - ((typelib_InterfaceTypeDescription*) pInterfaceType)->ppAllMembers[METHOD_GET_PROPERTIES] ); - - - uno_Sequence *pResult = 0; - uno_Any exception; - uno_Any *pException = &exception; - urp_sendRequest( m_pEnvRemote, - pMethodType, - oid.pData, - (typelib_InterfaceTypeDescription*) pInterfaceType, - &pResult, - 0, - &pException ); - - if( pException ) - { - OSL_ENSURE( 0 , "remote urp-bridge doesn't support property-object" ); - uno_any_destruct( pException , 0 ); - return; - } - - ProtocolProperty *pP = (ProtocolProperty * ) pResult->elements; - for( sal_Int32 i = 0; i < pResult->nElements ; i ++ ) - { - if( ! assignFromIdlToStruct( pR , pP[i] ) ) - { - OSL_ENSURE( 0 , "unknown property !!!!" ); - } - } - - typelib_typedescription_release( pInterfaceType ); - typelib_typedescription_release( pMethodType ); -} - - -// implementation for call from remote -void SAL_CALL PropertyObject::implGetProperties( uno_Sequence **ppReturnValue ) -{ - typelib_TypeDescription *pElementType= 0; - getCppuType( (Sequence< ProtocolProperty > *)0).getDescription( &pElementType ); - - OSL_ENSURE( pElementType , "Couldn't get property type" ); - - *ppReturnValue = 0; - uno_sequence_construct( ppReturnValue , pElementType , 0, MAX_PROPERTIES , 0 ); - ProtocolProperty *pElements = (ProtocolProperty * ) ( *ppReturnValue )->elements; - Properties *pP = m_pLocalSetting; - - assignToIdl( &(pElements[PROPERTY_BRIDGEID]),PROPERTY_BRIDGEID, *(Sequence< sal_Int8 > *)&(pP->seqBridgeID) ); - assignToIdl( &(pElements[PROPERTY_TYPECACHESIZE]),PROPERTY_TYPECACHESIZE,pP->nTypeCacheSize ); - assignToIdl( &(pElements[PROPERTY_OIDCACHESIZE]),PROPERTY_OIDCACHESIZE, pP->nOidCacheSize ); - assignToIdl( &(pElements[PROPERTY_TIDCACHESIZE]),PROPERTY_TIDCACHESIZE, pP->nTidCacheSize ); - assignToIdl( &(pElements[PROPERTY_SUPPORTEDVERSIONS]),PROPERTY_SUPPORTEDVERSIONS, pP->sSupportedVersions ); - assignToIdl( &(pElements[PROPERTY_VERSION]),PROPERTY_VERSION, pP->sVersion ); - assignToIdl( &(pElements[PROPERTY_FLUSHBLOCKSIZE]), PROPERTY_FLUSHBLOCKSIZE,pP->nFlushBlockSize ); - assignToIdl( &(pElements[PROPERTY_ONEWAYTIMEOUT_MUSEC]), PROPERTY_ONEWAYTIMEOUT_MUSEC, pP->nOnewayTimeoutMUSEC ); - assignToIdl( &(pElements[PROPERTY_SUPPORTSMUSTREPLY]), PROPERTY_SUPPORTSMUSTREPLY, pP->bSupportsMustReply ); - assignToIdl( &(pElements[PROPERTY_SUPPERTSSYNCHRONOUS]), PROPERTY_SUPPERTSSYNCHRONOUS, pP->bSupportsSynchronous ); - assignToIdl( &(pElements[PROPERTY_SUPPORTSMULTIPLESYNCHRONOUS]), PROPERTY_SUPPORTSMULTIPLESYNCHRONOUS, pP->bSupportsMultipleSynchronous ); - assignToIdl( &(pElements[PROPERTY_CLEARCACHE]), PROPERTY_CLEARCACHE, pP->bClearCache ); - - typelib_typedescription_release( pElementType ); -} - -//---------------------------------------------------------------------------------------------- -sal_Int32 SAL_CALL PropertyObject::localRequestChange( ) -{ - sal_Int32 nResult = 0; - sal_Bool bCall = sal_True; - - // disallow marshaling NOW ! - ClearableMutexGuard marshalingGuard( m_pBridgeImpl->m_marshalingMutex ); - { - MutexGuard guard( m_mutex ); - if( m_bRequestChangeHasBeenCalled || m_bServerWaitingForCommit ) - { - // another transaction is already underway - // try again later ! - bCall = sal_False; - } - m_bRequestChangeHasBeenCalled = sal_True; - - if( bCall ) - { - // calulate random number - rtlRandomPool pool = rtl_random_createPool (); - rtl_random_getBytes( pool , &m_nRandomNumberOfRequest, sizeof( m_nRandomNumberOfRequest ) ); - rtl_random_destroyPool( pool ); - } - } - - if( bCall ) - { - OUString oid = OUString::createFromAscii( g_NameOfUrpProtocolPropertiesObject ); - - // gather types for calling - typelib_TypeDescription *pInterfaceType = 0; - getCppuType( (Reference< XProtocolProperties > *) 0 ).getDescription( &pInterfaceType ); - - if( !pInterfaceType->bComplete ) - { - typelib_typedescription_complete( &pInterfaceType ); - } - - typelib_TypeDescription *pMethodType = 0; - typelib_typedescriptionreference_getDescription( - &pMethodType, - ((typelib_InterfaceTypeDescription*) pInterfaceType)->ppAllMembers[METHOD_REQUEST_CHANGE] ); - - void *pArg1 = &m_nRandomNumberOfRequest; - void **ppArgs = &pArg1; - - uno_Any exception; - uno_Any *pException = &exception; - - ClientJob job( m_pEnvRemote, - 0, - m_pBridgeImpl, - oid.pData, - pMethodType, - (typelib_InterfaceTypeDescription*) pInterfaceType, - &nResult, - ppArgs, - &pException ); - - // put the call on the line ! - sal_Bool bSuccess = job.pack(); - - // now allow writing on wire again. - // NOTE : this has been locked, because it is inevitable to set m_bRequestChangeHasBeenCalled - // and call requestChange in an atomar operation. Otherwise, implRequestChange may be called - // inbetween and reply, before the request is put on the wire. This certainly would - // be confusing for the remote counterpart ! - marshalingGuard.clear(); - - // wait for the reply ... - if( bSuccess ) - { - job.wait(); - - if( pException ) - { - // the object is unknown on the other side. - uno_any_destruct( pException , 0 ); - nResult = 0; - } - } - else - { - nResult = 0; - } - typelib_typedescription_release( pInterfaceType ); - typelib_typedescription_release( pMethodType ); - } - - { - MutexGuard guard( m_mutex ); - m_bRequestChangeHasBeenCalled = sal_False; - m_bServerWaitingForCommit = ( 0 == nResult ); - } - return nResult; -} - -// implementation for call from remote -sal_Int32 SAL_CALL PropertyObject::implRequestChange( sal_Int32 nRandomNumber, uno_Any **ppException ) -{ - sal_Int32 nResult = 0; - MutexGuard guard( m_mutex ); - if( m_bRequestChangeHasBeenCalled ) - { - // this side has also called requestChange, now negotiate, which side is allowed - // to commit the change ! - if( m_nRandomNumberOfRequest > nRandomNumber ) - { - // this side may commit !!!! - nResult = 0; - } - else if( m_nRandomNumberOfRequest == nRandomNumber ) - { - // sorry, try again ! - nResult = -1; - } - else if( m_nRandomNumberOfRequest < nRandomNumber ) - { - // the other side may commit ! - nResult = 1; - // m_bServerWaitingForCommit will be set by localRequestChange - } - } - else - { - // This side has NOT called requestChange, so the other side may commit - nResult = 1; - m_bServerWaitingForCommit = sal_True; - } - - *ppException = 0; - return nResult; -} - - - -void SAL_CALL PropertyObject::localCommitChange( const ::rtl::OUString &sProps , sal_Bool *pbExceptionThrown ) -{ - // lock the bridge NOW ! - // NOTE: it is not allowed for other threads to call, when a commit change is underway. - // The remote counterpart cannot if the call following the commit already uses - // the new properties or not. - MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); - - OUString oid = OUString::createFromAscii( g_NameOfUrpProtocolPropertiesObject ); - - osl_resetCondition( m_commitChangeCondition ); - - Properties props = *m_pLocalSetting; - - typelib_TypeDescription *pInterfaceType = 0; - getCppuType( (Reference< XProtocolProperties > *) 0 ).getDescription( &pInterfaceType ); - - if( !pInterfaceType->bComplete ) - { - typelib_typedescription_complete( &pInterfaceType ); - } - - typelib_TypeDescription *pMethodType = 0; - typelib_typedescriptionreference_getDescription( - &pMethodType, - ((typelib_InterfaceTypeDescription*) pInterfaceType)->ppAllMembers[METHOD_COMMIT_CHANGE] ); - -// typelib_TypeDescription *pSequenceType= 0; - - - // extract name/value pairs - uno_Sequence *pSeq = 0; - assignFromStringToPropSeq( sProps, &pSeq ); - assignFromPropSeqToStruct( pSeq , &props ); -// ::std::list< OUString > lst; -// extractTokens( sProps , lst ); - -// getCppuType( (Sequence< ProtocolProperty > *)0).getDescription( &pSequenceType ); -// uno_sequence_construct( &pSeq , pSequenceType , 0, lst.size() , 0 ); -// ProtocolProperty *pElements = (ProtocolProperty * ) pSeq->elements; - -// sal_Int32 i = 0; -// for( ::std::list< OUString >::iterator ii = lst.begin() ; ii != lst.end() ; ++ ii, i++ ) -// { -// sal_Int32 nAssign = (*ii).indexOf( '=' ); -// if( -1 == nAssign ) -// { -// OString o = OUStringToOString( *ii, RTL_TEXTENCODING_ASCII_US ); -// OSL_ENSURE( !"wrong protocol propertyt format, ignored", o.getStr() ); -// } -// OUString sPropName = (*ii).copy( 0, nAssign ); -// OUString sValue = (*ii).copy( nAssign +1, (*ii).getLength() - nAssign -1 ); - -// sal_Int32 nIndex = getIndexFromString( sPropName ); -// if( -1 == nIndex ) -// { -// OString o = OUStringToOString( sPropName , RTL_TEXTENCODING_ASCII_US); -// OSL_ENSURE( !"unknown protocol property, ignored", o.getStr() ); -// } -// switch( nIndex ) -// { -// // bools -// case PROPERTY_CLEARCACHE: -// { -// sal_Bool bClearCache = (sal_Bool ) sValue.toInt32(); -// assignToIdl( &(pElements[i]) , nIndex , bClearCache ); -// break; -// } -// // ints -// case PROPERTY_TYPECACHESIZE: -// case PROPERTY_OIDCACHESIZE: -// case PROPERTY_TIDCACHESIZE: -// case PROPERTY_FLUSHBLOCKSIZE: -// case PROPERTY_ONEWAYTIMEOUT_MUSEC: -// { -// sal_Int32 nValue = sValue.toInt32(); -// assignToIdl( &(pElements[i]) , nIndex , nValue ); -// break; -// } - -// // strings -// case PROPERTY_VERSION: -// assignToIdl( &(pElements[i]) , nIndex , sValue ); -// break; -// default: -// OString o = OUStringToOString( sPropName, RTL_TEXTENCODING_ASCII_US ); -// OSL_ENSURE( !"readonly protocol property, ignored" , o.getStr() ); -// } -// assignFromIdlToStruct( &props, pElements[i] ); -// } - - void *pArg1 = &pSeq; - uno_Any exception; - uno_Any *pException = &exception; - - ClientJob job( m_pEnvRemote, - 0, - m_pBridgeImpl, - oid.pData, - pMethodType, - (typelib_InterfaceTypeDescription*) pInterfaceType, - 0, - &pArg1, - &pException ); - job.setBridgePropertyCall(); - if( job.pack() ) - { - job.wait(); - } - else - { - OSL_ASSERT( pException != NULL ); - } - - ::uno_type_destructData( - &pSeq, getCppuType( (Sequence< ProtocolProperty > *)0).getTypeLibType(), 0 ); - - *pbExceptionThrown = pException ? sal_True : sal_False; - - if( pException ) - { - OString o = OUStringToOString( ((com::sun::star::uno::Exception*)pException->pData)->Message, - RTL_TEXTENCODING_ASCII_US); - OSL_ENSURE( !"exception thrown during calling on PropertyObject",o.getStr() ); - uno_any_destruct( pException , 0 ); - } - else - { - m_pBridgeImpl->applyProtocolChanges( props ); - m_bServerWaitingForCommit = sal_False; - m_bApplyProperties = sal_False; - } - - // let the reader thread go ... - osl_setCondition( m_commitChangeCondition ); - - typelib_typedescription_release( pMethodType ); - typelib_typedescription_release( pInterfaceType ); -} - -void SAL_CALL PropertyObject::implCommitChange( uno_Sequence *pSequence, uno_Any **ppException ) -{ - MutexGuard guard( m_mutex ); - m_propsToBeApplied = *m_pLocalSetting; - - ProtocolProperty *pP = (ProtocolProperty * ) pSequence->elements; - for( sal_Int32 i = 0; i < pSequence->nElements ; i ++ ) - { - if( ! assignFromIdlToStruct( &m_propsToBeApplied , pP[i] ) ) - { - InvalidProtocolChangeException exception; - Type type = getCppuType( &exception ); - exception.Message = OUString::createFromAscii( "urp: unknown Property " ); - exception.Message += pP[i].Name; - exception.invalidProperty = pP[i]; - exception.reason = 1; - - uno_type_any_construct( *ppException, &exception, type.getTypeLibType() , 0 ); - - m_bApplyProperties = sal_False; - m_bServerWaitingForCommit = sal_False; - return; - } - } - - m_bApplyProperties = sal_True; - *ppException = 0; -} - -Properties SAL_CALL PropertyObject::getCommitedChanges() -{ - MutexGuard guard( m_mutex ); - OSL_ASSERT( m_bApplyProperties ); - m_bApplyProperties = sal_False; - m_bServerWaitingForCommit = sal_False; - return m_propsToBeApplied; -} - -void SAL_CALL PropertyObject::waitUntilChangesAreCommitted() -{ - osl_waitCondition( m_commitChangeCondition , 0 ); -} -} diff --git a/bridges/source/remote/urp/urp_propertyobject.hxx b/bridges/source/remote/urp/urp_propertyobject.hxx deleted file mode 100644 index 3b6bd1824e27..000000000000 --- a/bridges/source/remote/urp/urp_propertyobject.hxx +++ /dev/null @@ -1,108 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include -#include -#include - -#ifndef _OSL_CONDITN_H_ -#include -#endif -#include -#include - -#ifndef _BRIDGES_REMOTE_REMOTE_H_ -#include -#endif -#include "urp_property.hxx" - -namespace bridges_urp { - -struct urp_BridgeImpl; -const sal_Char g_NameOfUrpProtocolPropertiesObject[] = "UrpProtocolProperties"; - -// helper functions -void assignFromStringToStruct( const ::rtl::OUString & sProps , struct Properties *pProps ); - -class PropertyObject : public remote_Interface -{ -private: - ::osl::Mutex m_mutex; - oslCondition m_commitChangeCondition; - oslInterlockedCount m_nRefCount; - urp_BridgeImpl *m_pBridgeImpl; - struct Properties *m_pLocalSetting; - struct Properties m_propsToBeApplied; - - uno_Environment *m_pEnvRemote; - sal_Int32 m_nRandomNumberOfRequest; - sal_Bool m_bRequestChangeHasBeenCalled; - sal_Bool m_bServerWaitingForCommit; - sal_Bool m_bApplyProperties; - -public: - PropertyObject( - struct Properties *pLocalSetting , uno_Environment *pEnvRemote, urp_BridgeImpl *pImpl ); - ~PropertyObject(); - - void SAL_CALL thisAcquire( ) - { - osl_incrementInterlockedCount( &m_nRefCount ); - } - - void SAL_CALL thisRelease() - { - if( ! osl_decrementInterlockedCount( &m_nRefCount ) ) - { - delete this; - } - } - - void SAL_CALL thisDispatch( typelib_TypeDescription const * pMemberType, - void * pReturn, - void * pArgs[], - uno_Any ** ppException ); - -public: // local - sal_Int32 SAL_CALL localRequestChange( ); - void SAL_CALL localCommitChange( const ::rtl::OUString &properties, sal_Bool *pbExceptionThrown ); - void SAL_CALL localGetPropertiesFromRemote( struct Properties * ); - - // returns 0, if nothing was commited. - inline sal_Bool SAL_CALL changesHaveBeenCommited() - { return m_bApplyProperties; } - Properties SAL_CALL getCommitedChanges(); - - void SAL_CALL waitUntilChangesAreCommitted(); - -protected: - // these methods are called by thisDispatch - void SAL_CALL implGetProperties( uno_Sequence **ppReturnValue ); - sal_Int32 SAL_CALL implRequestChange( sal_Int32 nRandomNumber, uno_Any **ppException ); - void SAL_CALL implCommitChange( uno_Sequence *seqOfProperties, uno_Any **ppException ); -}; - -} diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx deleted file mode 100644 index fda6c5e322eb..000000000000 --- a/bridges/source/remote/urp/urp_reader.cxx +++ /dev/null @@ -1,832 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include "urp_reader.hxx" -#include "urp_writer.hxx" -#include "urp_dispatch.hxx" -#include "urp_job.hxx" -#include "urp_bridgeimpl.hxx" -#include "urp_log.hxx" -#include "urp_propertyobject.hxx" - -using namespace ::rtl; -using namespace ::osl; -using namespace ::com::sun::star::uno; - -#if OSL_DEBUG_LEVEL > 1 -static MyCounter thisCounter( "DEBUG : ReaderThread" ); -#endif - -namespace bridges_urp -{ - - /** - * This callback is used to ensure, that the release call is sent for the correct type. - * - ***/ - void SAL_CALL urp_releaseRemoteCallback ( - remote_Interface *, rtl_uString *pOid, - typelib_TypeDescriptionReference *pTypeRef, uno_Environment *pEnvRemote ) - { - remote_Context *pContext = (remote_Context *) pEnvRemote->pContext; - urp_BridgeImpl *pImpl = (urp_BridgeImpl*) ( pContext->m_pBridgeImpl ); - - pImpl->m_pWriter->insertReleaseRemoteCall( pOid , pTypeRef ); - } - - - struct MessageFlags - { - sal_uInt16 nMethodId; - sal_Bool bRequest; - sal_Bool bType; - sal_Bool bOid; - sal_Bool bTid; - sal_Bool bException; - sal_Bool bMustReply; - sal_Bool bSynchronous; - sal_Bool bMoreFlags; - sal_Bool bIgnoreCache; - sal_Bool bBridgePropertyCall; - ///-------------------------- - inline MessageFlags() - { - bTid = sal_False; - bOid = sal_False; - bType = sal_False; - bException = sal_False; - bMoreFlags = sal_False; - bIgnoreCache = sal_False; - bBridgePropertyCall = sal_False; - } - //--------------------------- - }; // end struct MessageFlags - -inline sal_Bool OReaderThread::getMemberTypeDescription( - typelib_InterfaceAttributeTypeDescription **ppAttributeType, - typelib_InterfaceMethodTypeDescription **ppMethodType, - sal_Bool *pbIsSetter, - sal_uInt16 nMethodId , - typelib_TypeDescriptionReference * pITypeRef ) -{ - if( pITypeRef->eTypeClass != typelib_TypeClass_INTERFACE ) - { - OUStringBuffer sMessage; - sMessage.appendAscii( "interface type is not of typeclass interface (" ); - sMessage.append( (sal_Int32) pITypeRef->eTypeClass ); - m_pBridgeImpl->addError( sMessage.makeStringAndClear() ); - OSL_ENSURE( 0 , "type is not an interface" ); - return sal_False; - } - - typelib_InterfaceTypeDescription *pInterfaceType = 0; - TYPELIB_DANGER_GET( - (typelib_TypeDescription **)&pInterfaceType , pITypeRef ); - if( ! pInterfaceType ) - { - OUStringBuffer sMessage; - sMessage.appendAscii( "No typedescription can be retrieved for type " ); - sMessage.append( OUString( pITypeRef->pTypeName ) ); - m_pBridgeImpl->addError( sMessage.makeStringAndClear() ); - OSL_ENSURE( 0 , "urp: unknown type " ); - return sal_False; - } - - if( ! pInterfaceType->aBase.bComplete ) - { - typelib_typedescription_complete( (typelib_TypeDescription **) &pInterfaceType ); - } - - if ( nMethodId >= pInterfaceType->nMapFunctionIndexToMemberIndex ) - { - OUStringBuffer sMessage; - sMessage.appendAscii( "vtable out of range for type " ); - sMessage.append( OUString( pITypeRef->pTypeName ) ); - sMessage.appendAscii( " (" ); - sMessage.append( (sal_Int32) nMethodId ); - sMessage.appendAscii( " )" ); - m_pBridgeImpl->addError( sMessage.makeStringAndClear() ); - - OSL_ENSURE( 0 , "vtable index out of range" ); - return sal_False; - } - - sal_Int32 nMemberIndex = pInterfaceType->pMapFunctionIndexToMemberIndex[ nMethodId ]; - - if( !( pInterfaceType->nAllMembers > nMemberIndex && nMemberIndex >= 0 ) ) - { - OUStringBuffer sMessage; - sMessage.appendAscii( "vtable out of range for type " ); - sMessage.append( OUString( pITypeRef->pTypeName ) ); - sMessage.appendAscii( " (" ); - sMessage.append( (sal_Int32) nMethodId ); - sMessage.appendAscii( " )" ); - m_pBridgeImpl->addError( sMessage.makeStringAndClear() ); - - OSL_ENSURE( 0 , "vtable index out of range" ); - return sal_False; - } - - typelib_InterfaceMemberTypeDescription *pMemberType = 0; - typelib_typedescriptionreference_getDescription( - (typelib_TypeDescription **) &pMemberType,pInterfaceType->ppAllMembers[nMemberIndex]); - - if(! pMemberType ) - { - OUStringBuffer sMessage; - sMessage.appendAscii( "unknown method type description for type" ); - sMessage.append( OUString( pITypeRef->pTypeName ) ); - sMessage.appendAscii( " (" ); - sMessage.append( (sal_Int32) nMethodId ); - sMessage.appendAscii( " )" ); - m_pBridgeImpl->addError( sMessage.makeStringAndClear() ); - - OSL_ENSURE( 0 , "unknown method type description" ); - return sal_False; - } - - if( typelib_TypeClass_INTERFACE_ATTRIBUTE == pMemberType->aBase.eTypeClass ) - { - // Note: pMapMemberIndexToFunctionIndex always contains the function - // index of the attribute getter! setter function index is getter index - // + 1. - *ppAttributeType = (typelib_InterfaceAttributeTypeDescription *) pMemberType; - *pbIsSetter = ! ( - pInterfaceType->pMapMemberIndexToFunctionIndex[nMemberIndex] == nMethodId ); - } - else - { - *ppMethodType = (typelib_InterfaceMethodTypeDescription *) pMemberType; - } - - TYPELIB_DANGER_RELEASE( (typelib_TypeDescription * )pInterfaceType ); - return sal_True; -} - -OReaderThread::OReaderThread( remote_Connection *pConnection, - uno_Environment *pEnvRemote, - OWriterThread * pWriterThread ) : - m_pConnection( pConnection ), - m_pEnvRemote( pEnvRemote ), - m_pWriterThread( pWriterThread ), - m_bDestroyMyself( sal_False ), - m_bContinue( sal_True ), - m_pBridgeImpl((struct urp_BridgeImpl*) - ((remote_Context *)pEnvRemote->pContext)->m_pBridgeImpl ), - m_unmarshal( m_pBridgeImpl, m_pEnvRemote, ::bridges_remote::remote_createStub ) -{ - m_pEnvRemote->acquireWeak( m_pEnvRemote ); - m_pConnection->acquire( m_pConnection ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.acquire(); -#endif -} - - -OReaderThread::~OReaderThread( ) -{ - m_pEnvRemote->releaseWeak( m_pEnvRemote ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.release(); -#endif -} - -// may only be called in the callstack of this thread !!!!! -// run() -> dispose() -> destroyYourself() -void OReaderThread::destroyYourself() -{ - m_bDestroyMyself = sal_True; - m_pConnection->release( m_pConnection ); - m_pConnection = 0; - m_bContinue = sal_False; -} - -void OReaderThread::onTerminated() -{ - if( m_bDestroyMyself ) - { - delete this; - } -} - - -void OReaderThread::disposeEnvironment() -{ - struct remote_Context *pContext = - ( struct remote_Context * ) m_pEnvRemote->pContext; - m_bContinue = sal_False; - if( ! pContext->m_pBridgeImpl->m_bDisposed ) - { - uno_Environment *pEnvRemote = 0; - m_pEnvRemote->harden( &pEnvRemote , m_pEnvRemote ); - if( pEnvRemote ) - { - pEnvRemote->dispose( m_pEnvRemote ); - pEnvRemote->release( m_pEnvRemote ); - } - else - { - // environment has been disposed eitherway ! - } - } -} - -inline sal_Bool OReaderThread::readBlock( sal_Int32 *pnMessageCount ) -{ - m_unmarshal.setSize( 8 ); - if( 8 != m_pConnection->read( m_pConnection , m_unmarshal.getBuffer(), 8 ) ) - { - OUString s( RTL_CONSTASCII_USTRINGPARAM( "Unexpected connection closure" ) ); - m_pBridgeImpl->addError( s ); - return sal_False; - } - - sal_Int32 nSize; - m_unmarshal.unpackInt32( &nSize ); - m_unmarshal.unpackInt32( pnMessageCount ); - - if( nSize < 0 ) - { - // buffer too big - // no exception can be thrown, because there is no thread id, which could be - // used. -> terminate ! - OUStringBuffer s; - s.appendAscii( "Packet-size too big (" ); - s.append( (sal_Int64) (sal_uInt32 ) nSize ); - s.append( sal_Unicode( ')' ) ); - m_pBridgeImpl->addError( s.makeStringAndClear() ); - OSL_ENSURE( 0 , "urp bridge: Packet-size too big" ); - return sal_False; - } - - if( 0 == nSize ) - { - // normal termination ! - return sal_False; - } - - // allocate the necessary memory - if( ! m_unmarshal.setSize( nSize ) ) - { - OUStringBuffer s; - s.appendAscii( "Packet-size too big, couln't allocate necessary memory (" ); - s.append( (sal_Int64) (sal_uInt32 ) nSize ); - s.append( sal_Unicode( ')' ) ); - m_pBridgeImpl->addError( s.makeStringAndClear() ); - OSL_ENSURE( 0 , "urp bridge: messages size too large, terminating connection" ); - return sal_False; - } - - sal_Int32 nRead = m_pConnection->read( m_pConnection , m_unmarshal.getBuffer() , nSize ); - - if( nSize != nRead ) - { - OUStringBuffer s; - s.appendAscii( "Unexpected connection closure, inconsistent packet (" ); - s.append( (sal_Int64) (sal_uInt32 ) nSize ); - s.appendAscii( " asked, " ); - s.append( (sal_Int64) (sal_uInt32 ) nRead ); - s.appendAscii( " got )" ); - m_pBridgeImpl->addError( s.makeStringAndClear() ); - // couldn't get the asked amount of bytes, quit - // should only occur, when the environment has already been disposed - OSL_ENSURE( m_pBridgeImpl->m_bDisposed , "urp bridge: inconsistent packet, terminating connection." ); - return sal_False; - } - return sal_True; -} - -inline sal_Bool OReaderThread::readFlags( struct MessageFlags *pFlags ) -{ - sal_uInt8 nBitField; - if( ! m_unmarshal.unpackInt8( &nBitField ) ) - { - m_pBridgeImpl->addError( "Unexpected end of message header (1)" ); - return sal_False; - } - - if( HDRFLAG_LONGHEADER & nBitField ) - { - // this is a long header, interpret the byte as bitfield - pFlags->bTid = (HDRFLAG_NEWTID & nBitField ); - pFlags->bRequest = (HDRFLAG_REQUEST & nBitField); - - if( pFlags->bRequest ) - { - // request - pFlags->bType = ( HDRFLAG_NEWTYPE & nBitField ); - pFlags->bOid = ( HDRFLAG_NEWOID & nBitField ); - pFlags->bIgnoreCache = ( HDRFLAG_IGNORECACHE & nBitField ); - pFlags->bMoreFlags = ( HDRFLAG_MOREFLAGS & nBitField ); - - if( pFlags->bMoreFlags ) - { - // another byte with flags - sal_Int8 moreFlags; - if( ! m_unmarshal.unpackInt8( &moreFlags ) ) - { - m_pBridgeImpl->addError( "Unexpected end of message header (2)" ); - return sal_False; - } - pFlags->bSynchronous = ( HDRFLAG_SYNCHRONOUS & moreFlags ); - pFlags->bMustReply = ( HDRFLAG_MUSTREPLY & moreFlags ); - OSL_ENSURE( (pFlags->bSynchronous && pFlags->bMustReply) || - (!pFlags->bSynchronous && !pFlags->bMustReply), - "urp-bridge : customized calls currently not supported !"); - } - - if( HDRFLAG_LONGMETHODID & nBitField ) - { - // methodid as unsigned short - if( ! m_unmarshal.unpackInt16( &(pFlags->nMethodId )) ) - { - m_pBridgeImpl->addError( "Unexpected end of message header (3)" ); - return sal_False; - } - } - else - { - sal_uInt8 id; - if( ! m_unmarshal.unpackInt8( &id ) ) - { - m_pBridgeImpl->addError( "Unexpected end of message header (4)" ); - return sal_False; - } - pFlags->nMethodId = (sal_uInt16) id; - } - } - else - { - // reply - pFlags->bRequest = sal_False; - pFlags->bException = ( HDRFLAG_EXCEPTION & nBitField ); - } - } - else - { - // short request - pFlags->bRequest = sal_True; - if( 0x40 & nBitField ) - { - sal_uInt8 lower; - if( ! m_unmarshal.unpackInt8( &lower ) ) - { - m_pBridgeImpl->addError( "Unexpected end of message header (5)" ); - return sal_False; - } - pFlags->nMethodId = ( nBitField & 0x3f ) << 8 | lower; - } - else - { - pFlags->nMethodId = ( nBitField & 0x3f ); - } - } - return sal_True; -} - -void OReaderThread::run() -{ - // This vars are needed to hold oid,tid and type information, which should not be cached. - Type lastTypeNoCache; - OUString lastOidNoCache; - ByteSequence lastTidNoCache; - - while( m_bContinue ) - { - sal_Int32 nMessageCount; - if( ! readBlock( &nMessageCount ) ) - { - disposeEnvironment(); - break; - } - - uno_Environment *pEnvRemote = 0; - m_pEnvRemote->harden( &pEnvRemote , m_pEnvRemote ); - if( !pEnvRemote ) - { - // environment has been disposed already, quit here - break; - } - ServerMultiJob *pMultiJob = 0; - remote_Interface *pLastRemoteI = 0; - while( ! m_unmarshal.finished() ) - { -#ifdef BRIDGES_URP_PROT - sal_uInt32 nLogStart = m_unmarshal.getPos(); - sal_Bool bIsOneWay = sal_False; - OUString sMemberName; -#endif - MessageFlags flags; - - if( ! readFlags( &flags ) ) - { - m_pBridgeImpl->addError( "incomplete message, skipping block" ); - OSL_ENSURE ( 0 , "urp-bridge : incomplete message, skipping block" ); - break; - } - - // use these ** to access the ids fast ( avoid acquire/release calls ) - sal_Sequence **ppLastTid = flags.bIgnoreCache ? - (sal_Sequence **) &lastTidNoCache : - (sal_Sequence **) &(m_pBridgeImpl->m_lastInTid); - rtl_uString **ppLastOid = flags.bIgnoreCache ? - (rtl_uString ** ) &lastOidNoCache : - (rtl_uString ** ) &(m_pBridgeImpl->m_lastInOid); - typelib_TypeDescriptionReference **ppLastType = - flags.bIgnoreCache ? - (typelib_TypeDescriptionReference ** ) &lastTypeNoCache : - (typelib_TypeDescriptionReference ** ) &(m_pBridgeImpl->m_lastInType); - - // get new type - if( flags.bType ) - { - typelib_TypeDescriptionReference *pTypeRef = 0; - if( m_unmarshal.unpackType( &pTypeRef ) ) - { - // release the old type - typelib_typedescriptionreference_release( *ppLastType ); - // set the new type - *ppLastType = pTypeRef; - - // no release on pTypeRef necessary (will be released by type dtor) - } - else - { - typelib_typedescriptionreference_release( pTypeRef ); - m_pBridgeImpl->addError( "error during unpacking (maybe cached) interface type" ); - OSL_ENSURE( 0 , "urp-bridge : error during unpacking interface type, terminating connection" ); - disposeEnvironment(); - break; - } - if( m_pBridgeImpl->m_lastInType.getTypeClass() != TypeClass_INTERFACE ) - { - OUStringBuffer sMessage; - sMessage.appendAscii( "interface type is not of typeclass interface (" ); - sMessage.append( (sal_Int32) m_pBridgeImpl->m_lastInType.getTypeClass() ); - m_pBridgeImpl->addError( sMessage.makeStringAndClear() ); - OSL_ENSURE( 0 , "urp-bridge : not an interface type" ); - disposeEnvironment(); - break; - } - } - if( flags.bOid ) - { - rtl_uString *pOid = 0; - if( m_unmarshal.unpackOid( &pOid ) ) - { - rtl_uString_release( *ppLastOid ); - *ppLastOid = pOid; - } - else - { - rtl_uString_release( pOid ); - m_pBridgeImpl->addError( "error during unpacking (maybe cached) oid" ); - OSL_ENSURE( 0 , "urp-bridge : error during unpacking cached data, terminating connection" ); - disposeEnvironment(); - break; - } - } - - if( flags.bTid ) - { - sal_Sequence *pSeq = 0; - if( m_unmarshal.unpackTid( &pSeq ) ) - { - rtl_byte_sequence_release( *ppLastTid ); - *ppLastTid = pSeq; - } - else - { - rtl_byte_sequence_release( pSeq ); - - m_pBridgeImpl->addError( "error during unpacking (maybe cached) tid" ); - OSL_ENSURE( 0 , "urp-bridge : error during unpacking cached data, terminating connection" ); - disposeEnvironment(); - break; - } - } - - // do the job - if( flags.bRequest ) - { - bool bHasCc = m_pBridgeImpl->m_properties.bCurrentContext - && flags.nMethodId != REMOTE_RELEASE_METHOD_INDEX - && !rtl::OUString( *ppLastOid ).equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - g_NameOfUrpProtocolPropertiesObject ) ); - remote_Interface * pCc = 0; - if ( bHasCc ) - { - typelib_TypeDescription * pType = 0; - TYPELIB_DANGER_GET( - &pType, - XCurrentContext::static_type().getTypeLibType() ); - bool ok = m_unmarshal.unpack( &pCc, pType ); - TYPELIB_DANGER_RELEASE( pType ); - if ( !ok ) - { - OSL_ENSURE( - false, - ("urp_bridge: error while unpacking current" - " context") ); - disposeEnvironment(); - break; - } - } - - //-------------------------- - // handle request - //-------------------------- - // get the membertypedescription - typelib_InterfaceMethodTypeDescription *pMethodType = 0; - typelib_InterfaceAttributeTypeDescription *pAttributeType = 0; - sal_Bool bIsSetter = sal_False; - - if( getMemberTypeDescription( - &pAttributeType, &pMethodType, &bIsSetter, - flags.nMethodId, *ppLastType ) ) - { - if( ! pLastRemoteI || flags.bOid || flags.bType ) - { - // a new interface must be retrieved - - // retrieve the interface NOW from the environment - // (avoid race conditions : oneway followed by release ) - typelib_InterfaceTypeDescription *pInterfaceType = 0; - - TYPELIB_DANGER_GET( - (typelib_TypeDescription ** ) &pInterfaceType , - *ppLastType ); - if( !pInterfaceType ) - { - OUStringBuffer sMessage; - sMessage.appendAscii( "Couldn't retrieve type description for type " ); - sMessage.append( OUString( (*ppLastType)->pTypeName ) ); - m_pBridgeImpl->addError( sMessage.makeStringAndClear() ); - delete pMultiJob; - pMultiJob = 0; - disposeEnvironment(); - pLastRemoteI = 0; // stubs are released during dispose eitherway - break; - } - pEnvRemote->pExtEnv->getRegisteredInterface( - pEnvRemote->pExtEnv, ( void ** ) &pLastRemoteI, - *ppLastOid, pInterfaceType ); - TYPELIB_DANGER_RELEASE( (typelib_TypeDescription * )pInterfaceType ); - - if( !pLastRemoteI && - REMOTE_RELEASE_METHOD_INDEX != flags.nMethodId && - 0 == rtl_ustr_ascii_compare_WithLength( - (*ppLastOid)->buffer, (*ppLastOid)->length, g_NameOfUrpProtocolPropertiesObject ) ) - { - // check for bridge internal propertyobject - pLastRemoteI = m_pBridgeImpl->m_pPropertyObject; - pLastRemoteI->acquire( pLastRemoteI ); - flags.bBridgePropertyCall = sal_True; - } - - // NOTE : Instance provider is called in the executing thread - // Otherwise, instance provider may block the bridge - } - - sal_Bool bCallIsOneway = sal_False; - if( flags.bMoreFlags ) - { - // flags override the default ! - bCallIsOneway = ! flags.bSynchronous; - } - else if( pMethodType && pMethodType->bOneWay ) - { - bCallIsOneway = sal_True; - } - - if( pMultiJob && ! flags.bTid && bCallIsOneway && ! pMultiJob->isFull()) - { - // add to the existing multijob, nothing to do here - } - else - { - // create a new multijob - if( pMultiJob ) - { - // there exists an old one, start it first. - pMultiJob->initiate(); - } - - pMultiJob = new ServerMultiJob( - pEnvRemote, - static_cast< remote_Context * >( - pEnvRemote->pContext ), - *ppLastTid, m_pBridgeImpl, &m_unmarshal, - nMessageCount ); - } - - pMultiJob->setCurrentContext( bHasCc, pCc ); - pMultiJob->setIgnoreCache( flags.bIgnoreCache ); - pMultiJob->setType( *ppLastType ); - if( pMethodType ) - { - pMultiJob->setMethodType( pMethodType , - REMOTE_RELEASE_METHOD_INDEX == flags.nMethodId, - bCallIsOneway ); - } - else if( pAttributeType ) - { - pMultiJob->setAttributeType( pAttributeType, bIsSetter, bCallIsOneway ); - } - else - { - OSL_ASSERT( 0 ); - } - - if( pLastRemoteI ) - pMultiJob->setInterface( pLastRemoteI ); - else - pMultiJob->setOid( *ppLastOid ); - } /* getMemberTypeDescription */ - else - { - delete pMultiJob; - pMultiJob = 0; - pLastRemoteI = 0; // stubs are released during dispose eitherway - disposeEnvironment(); - break; - } -#ifdef BRIDGES_URP_PROT - bIsOneWay = pMethodType && pMethodType->bOneWay; - sMemberName = pMethodType ? - pMethodType->aBase.pMemberName : - pAttributeType->aBase.pMemberName; - sal_uInt32 nLogHeader = m_unmarshal.getPos(); -#endif - if( ! pMultiJob->extract( ) ) - { - // severe error during extracting, dispose - delete pMultiJob; - pMultiJob = 0; - pLastRemoteI = 0; // stubs are released during dispose eitherway - disposeEnvironment(); - break; - } - -#ifdef BRIDGES_URP_PROT - urp_logServingRequest( - m_pBridgeImpl, m_unmarshal.getPos() - nLogStart, - m_unmarshal.getPos() - nLogHeader, - !bIsOneWay, - sMemberName ); -#endif - if ( flags.bBridgePropertyCall ) - { - // call to the bridge internal object. - // these calls MUST be executed within the dispatcher thread in order - // to synchronize properly with protocol changes - // NOTE : Threadid is not preserved for this call. - - // lock the marshaling NOW ! - { - MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); - - pMultiJob->execute(); - - if( m_pBridgeImpl->m_pPropertyObject->changesHaveBeenCommited() ) - { - Properties props; - props = m_pBridgeImpl->m_pPropertyObject->getCommitedChanges(); - - // This call modified the protocol, apply the changes NOW ! - m_pBridgeImpl->applyProtocolChanges( props ); - } - } - delete pMultiJob; - pMultiJob = 0; - } - } - else - { - //-------------------------- - // handle reply - //-------------------------- - if( pMultiJob ) - { - pMultiJob->initiate(); - pMultiJob = 0; - } - if( pLastRemoteI ) - { - pLastRemoteI->release( pLastRemoteI ); - pLastRemoteI = 0; - } - ClientJob *pClientJob = - m_pBridgeImpl->m_clientJobContainer.remove( *( ByteSequence * )ppLastTid ); - - // Bridge MUST be already disposed, otherwise we got a wrong threadid - // from remote ! - OSL_ASSERT( pClientJob || m_pBridgeImpl->m_bDisposed ); - if( ! pClientJob ) - { - OUStringBuffer error( 128 ); - error.appendAscii( "ThreadID " ); - OString o = byteSequence2HumanReadableString( *(ByteSequence* )ppLastTid ); - error.appendAscii( o.getStr(), o.getLength() ); - error.appendAscii( " unknown, so couldn't unmarshal reply" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - pLastRemoteI = 0; - disposeEnvironment(); - break; - } - - pClientJob->m_bExceptionOccured = flags.bException; - - pClientJob->setUnmarshal( &m_unmarshal ); -#ifdef BRIDGES_URP_PROT - sMemberName = pClientJob->m_pMethodType ? - pClientJob->m_pMethodType->aBase.pMemberName : - pClientJob->m_pAttributeType->aBase.pMemberName; - sal_uInt32 nLogHeader = m_unmarshal.getPos(); -#endif - if( ! pClientJob->extract( ) ) - { - // severe error during extracting, dispose - pLastRemoteI = 0; // stubs are released during dispose eitherway - disposeEnvironment(); - break; - } -#ifdef BRIDGES_URP_PROT - urp_logGettingReply( - m_pBridgeImpl, m_unmarshal.getPos() - nLogStart, - m_unmarshal.getPos() - nLogHeader, sMemberName ); -#endif - sal_Bool bBridgePropertyCallAndWaitingForReply = - pClientJob->isBridgePropertyCall(); - - pClientJob->initiate(); - - if( bBridgePropertyCallAndWaitingForReply ) - { - // NOTE : This must be the reply for commit change. The new properties - // are now applied by the clientJob thread, but the reader thread - // must wait for it, because the next message on the wire already - // uses the new protocol settings. - // waiting for the commit change reply - m_pBridgeImpl->m_pPropertyObject->waitUntilChangesAreCommitted(); - } - } - } // end while( !m_unmarshal.finished() ) - - if( pLastRemoteI ) - pLastRemoteI->release( pLastRemoteI ); - - if( pMultiJob ) - pMultiJob->initiate(); - - if( pEnvRemote ) - pEnvRemote->release( pEnvRemote ); - } - - if( m_pConnection ) - { - m_pConnection->release( m_pConnection ); - m_pConnection = 0; - } -} -} diff --git a/bridges/source/remote/urp/urp_reader.hxx b/bridges/source/remote/urp/urp_reader.hxx deleted file mode 100644 index 85968a57f70d..000000000000 --- a/bridges/source/remote/urp/urp_reader.hxx +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -#include "urp_unmarshal.hxx" - -struct remote_Connection; -typedef struct _uno_Environment uno_Environment; - -namespace bridges_urp -{ - -class OWriterThread; -struct MessageFlags; - -class OReaderThread : - public ::osl::Thread -{ -public: - OReaderThread( remote_Connection *pConnection , - uno_Environment *pEnvRemote, - OWriterThread *pWriterThread ); - ~OReaderThread(); - - // may only be called in the callstack of this thread !!!!! - // run() -> disposeEnvironment() -> dispose() -> destroyYourself() - void destroyYourself(); - -private: - virtual void SAL_CALL run(); - virtual void SAL_CALL onTerminated(); - - inline sal_Bool readBlock( sal_Int32 *pnMessageCount ); - inline sal_Bool readFlags( struct MessageFlags *pFlags ); - - void disposeEnvironment(); - - inline sal_Bool getMemberTypeDescription( - typelib_InterfaceAttributeTypeDescription **ppAttributeType, - typelib_InterfaceMethodTypeDescription **ppMethodType, - sal_Bool *pbIsSetter, - sal_uInt16 nMethodId , - typelib_TypeDescriptionReference *pITypeRef); - - remote_Connection *m_pConnection; - uno_Environment *m_pEnvRemote; - OWriterThread *m_pWriterThread; - sal_Bool m_bDestroyMyself; - sal_Bool m_bContinue; - urp_BridgeImpl *m_pBridgeImpl; - Unmarshal m_unmarshal; -}; - -} diff --git a/bridges/source/remote/urp/urp_replycontainer.hxx b/bridges/source/remote/urp/urp_replycontainer.hxx deleted file mode 100644 index afb1d951f5a0..000000000000 --- a/bridges/source/remote/urp/urp_replycontainer.hxx +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include -#include - -#include -#include - -#include "urp_threadid.hxx" - -namespace bridges_urp -{ - class ClientJob; - typedef ::std::hash_map< ::rtl::ByteSequence , - ::std::list < ClientJob * > , - HashThreadId , - EqualThreadId > Id2ClientJobStackMap; - - class urp_ClientJobContainer - { - public: - void add( const ::rtl::ByteSequence &id , ClientJob *p ) - { - ::osl::MutexGuard guard( m_mutex ); - m_map[id].push_back( p ); - } - - ClientJob *remove( const ::rtl::ByteSequence & id ) - { - ::osl::MutexGuard guard( m_mutex ); - Id2ClientJobStackMap::iterator ii = m_map.find( id ); - - ClientJob *p = 0; - if( ii != m_map.end() ) - { - p = (*ii).second.back(); - (*ii).second.pop_back(); - if( (*ii).second.empty() ) - { - m_map.erase( ii ); - } - } - - return p; - } - - private: - ::osl::Mutex m_mutex; - Id2ClientJobStackMap m_map; - }; -} diff --git a/bridges/source/remote/urp/urp_threadid.cxx b/bridges/source/remote/urp/urp_threadid.cxx deleted file mode 100644 index 6d8d165be26e..000000000000 --- a/bridges/source/remote/urp/urp_threadid.cxx +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include "urp_threadid.hxx" - -#include - -using namespace rtl; - -namespace bridges_urp -{ - rtl::OString byteSequence2HumanReadableString( const rtl::ByteSequence &a ) - { - const sal_uInt8 *p = (const sal_uInt8 * ) a.getConstArray(); - sal_Int32 nLength = a.getLength(); - OStringBuffer buf( a.getLength() * 2 + 2 ); - buf.append( RTL_CONSTASCII_STRINGPARAM( "0x" ) ); - for( sal_Int32 i = 0 ; i < nLength ; i ++ ) - buf.append( (sal_Int32) p[i] , 16 ); - return buf.makeStringAndClear(); - } -} diff --git a/bridges/source/remote/urp/urp_threadid.hxx b/bridges/source/remote/urp/urp_threadid.hxx deleted file mode 100644 index cd95d89b2af2..000000000000 --- a/bridges/source/remote/urp/urp_threadid.hxx +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _URP_THREADID_HXX_ -#define _URP_THREADID_HXX_ - -#include -#include -#include - -namespace bridges_urp -{ - - struct EqualThreadId - { - sal_Int32 operator () ( const ::rtl::ByteSequence &a , const ::rtl::ByteSequence &b ) const - { - return a == b; - } - }; - - struct HashThreadId - { - sal_Int32 operator () ( const ::rtl::ByteSequence &a ) const - { - if( a.getLength() >= 4 ) - { - return *(sal_Int32*) a.getConstArray(); - } - return 0; - } - }; - - rtl::OString byteSequence2HumanReadableString( const rtl::ByteSequence &a ); -} -#endif diff --git a/bridges/source/remote/urp/urp_unmarshal.cxx b/bridges/source/remote/urp/urp_unmarshal.cxx deleted file mode 100644 index 79335bfeb6f0..000000000000 --- a/bridges/source/remote/urp/urp_unmarshal.cxx +++ /dev/null @@ -1,707 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include - -#include - -#include -#include - -#include -#include -#include - -#include - -#include "urp_unmarshal.hxx" -#include "urp_bridgeimpl.hxx" - - -using namespace ::rtl; -using namespace ::com::sun::star::uno; - -namespace bridges_urp -{ -static int g_nDetectLittleEndian = 1; -char g_bSystemIsLittleEndian = ((char*)&g_nDetectLittleEndian)[0]; - - -Unmarshal::Unmarshal( struct urp_BridgeImpl *pBridgeImpl, - uno_Environment *pEnvRemote, - remote_createStubFunc callback ) : - m_nBufferSize( 4096 ), - m_base( (sal_Int8*) rtl_allocateMemory( m_nBufferSize ) ), - m_pos( m_base ), - m_nLength( 0 ), - m_callback( callback ), - m_pEnvRemote( pEnvRemote ), - m_pBridgeImpl( pBridgeImpl ) -{ -} - -Unmarshal::~Unmarshal() -{ - rtl_freeMemory( m_base ); -} - -// special unpacks -sal_Bool Unmarshal::unpackTid( sal_Sequence **ppThreadId ) -{ - sal_Int32 nSize; - sal_Bool bReturn = unpackCompressedSize( &nSize ); - if( bReturn ) - { - if( nSize ) - { - rtl_byte_sequence_constructFromArray( ppThreadId , m_pos , nSize ); - m_pos += nSize; - sal_uInt16 nIndex; - bReturn = unpackInt16( &nIndex ); - if( nIndex < m_pBridgeImpl->m_properties.nTidCacheSize ) - { - m_pBridgeImpl->m_pTidIn[nIndex] = *(ByteSequence * )ppThreadId; - } - else if( 0xffff != nIndex ) - { - bReturn = sal_False; - rtl_byte_sequence_construct( ppThreadId , 0 ); - - OUStringBuffer error( 128 ); - error.appendAscii( "cache index for tid " ); - OString o = byteSequence2HumanReadableString( *(ByteSequence * ) ppThreadId ); - error.appendAscii( o.getStr(), o.getLength() ); - error.appendAscii( "out of range(0x"); - error.append( (sal_Int32) nIndex ,16 ); - error.appendAscii( ")" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - } - else - { - sal_uInt16 nIndex; - bReturn = unpackInt16( &nIndex ); - if( nIndex < m_pBridgeImpl->m_properties.nTidCacheSize ) - { - *ppThreadId = m_pBridgeImpl->m_pTidIn[nIndex].getHandle(); - rtl_byte_sequence_acquire( *ppThreadId ); - } - else - { - bReturn = sal_False; - rtl_byte_sequence_construct( ppThreadId , 0 ); - OUStringBuffer error(128); - error.appendAscii( "cache index for tids out of range(0x" ); - error.append( (sal_Int32) nIndex ,16 ); - error.appendAscii( ")" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - } - } - else - { - m_pBridgeImpl->addError( "couldn't unpack thread id because of previous errors" ); - } - return bReturn; -} - -sal_Bool Unmarshal::unpackOid( rtl_uString **ppOid ) -{ - sal_Bool bReturn = sal_True; - sal_uInt16 nCacheIndex = 0; - - bReturn = bReturn && unpackString( ppOid ); - bReturn = bReturn && unpackInt16( &nCacheIndex ); - - if( bReturn && - ! ( 0xffff == nCacheIndex && 0 == (*ppOid)->length ) /* null reference */ ) - { - if( (*ppOid)->length ) - { - // new unknown reference - if( 0xffff != nCacheIndex ) - { - // oid should be cached ? - if( nCacheIndex < m_pBridgeImpl->m_properties.nOidCacheSize ) - { - m_pBridgeImpl->m_pOidIn[nCacheIndex] = *ppOid; - } - else - { - OUStringBuffer error( 128 ); - error.appendAscii( "new oid provided (" ); - error.append( *ppOid ); - error.appendAscii( "), but new cache index is out of range(0x"); - error.append( (sal_Int32) nCacheIndex ,16 ); - error.appendAscii( ")" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - - bReturn = sal_False; - rtl_uString_new( ppOid ); - } - } - } - else - { - // reference in cache ! - if( nCacheIndex < m_pBridgeImpl->m_properties.nOidCacheSize ) - { - rtl_uString_assign( ppOid , m_pBridgeImpl->m_pOidIn[nCacheIndex].pData ); - } - else - { - bReturn = sal_False; - rtl_uString_new( ppOid ); - - OUStringBuffer error( 128 ); - error.appendAscii( "cache index for oids out of range(0x"); - error.append( (sal_Int32) nCacheIndex ,16 ); - error.appendAscii( ")" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - } - } - - return bReturn; -} - -sal_Bool Unmarshal::unpack( void *pDestination , - typelib_TypeDescription *pTypeDescr ) -{ - // Note: We implement unpack functionality without recursions in order - // to avoid stack overflows caused by rotten URP blocks. - - m_aItemsToUnpack.push( UnpackItem( pDestination, pTypeDescr ) ); - - sal_Bool bReturn = sal_True; - do - { - void * pDest = m_aItemsToUnpack.top().pDest; - typelib_TypeDescription * pType = m_aItemsToUnpack.top().pType; - m_aItemsToUnpack.pop(); - - switch( pType->eTypeClass ) - { - case typelib_TypeClass_VOID: - // do nothing - break; - case typelib_TypeClass_BYTE: - { - bReturn = unpackInt8( pDest ); - break; - } - case typelib_TypeClass_BOOLEAN: - { - bReturn = ! checkOverflow( 1 ); - if( bReturn ) - { - *((sal_Bool*)pDest) = (sal_Bool ) ( *m_pos); - m_pos ++; - } - else - { - *((sal_Bool*)pDest) = 0; - } - break; - } - - case typelib_TypeClass_CHAR: - case typelib_TypeClass_SHORT: - case typelib_TypeClass_UNSIGNED_SHORT: - { - unpackInt16( pDest ); - break; - } - case typelib_TypeClass_ENUM: - case typelib_TypeClass_FLOAT: - case typelib_TypeClass_LONG: - case typelib_TypeClass_UNSIGNED_LONG: - { - bReturn = unpackInt32( pDest ); - break; - } - case typelib_TypeClass_DOUBLE: - case typelib_TypeClass_HYPER: - case typelib_TypeClass_UNSIGNED_HYPER: - { - sal_Int8 * p = static_cast< sal_Int8 * >(pDest); - bReturn = ! checkOverflow( 8 ); - if( bReturn ) - { - if( isSystemLittleEndian() ) - { - p[7] = m_pos[0]; - p[6] = m_pos[1]; - p[5] = m_pos[2]; - p[4] = m_pos[3]; - p[3] = m_pos[4]; - p[2] = m_pos[5]; - p[1] = m_pos[6]; - p[0] = m_pos[7]; - } - else - { - p[0] = m_pos[0]; - p[1] = m_pos[1]; - p[2] = m_pos[2]; - p[3] = m_pos[3]; - p[4] = m_pos[4]; - p[5] = m_pos[5]; - p[6] = m_pos[6]; - p[7] = m_pos[7]; - } - m_pos += 8; - } - else - { - // Do not trigger alignment errors: - p[0] = p[1] = p[2] = p[3] = p[4] = p[5] = p[6] = p[7] = 0; - } - break; - } - case typelib_TypeClass_STRING: - { - unpackString( pDest ); - break; - } - case typelib_TypeClass_ANY: - { - uno_Any *pAny = ( uno_Any * )pDest; - - pAny->pType = 0; - // Type is acquired with typelib_typedescription_acquire - - bReturn = unpackType( &(pAny->pType) ); - - typelib_TypeDescription *pDataType = 0; - if( bReturn && pAny->pType ) - { - typelib_typedescriptionreference_getDescription( &pDataType , pAny->pType ); - - if( pDataType ) - { - switch (pDataType->eTypeClass) - { - case typelib_TypeClass_HYPER: - case typelib_TypeClass_UNSIGNED_HYPER: - if (sizeof(void *) < sizeof(sal_Int64)) - { - pAny->pData = rtl_allocateMemory( sizeof(sal_Int64) ); - } - else - { - pAny->pData = &pAny->pReserved; - } - break; - case typelib_TypeClass_FLOAT: - if (sizeof(void *) < sizeof(float)) - { - pAny->pData = rtl_allocateMemory( sizeof(float) ); - } - else - { - pAny->pData = &pAny->pReserved; - } - break; - case typelib_TypeClass_DOUBLE: - if (sizeof(void *) < sizeof(double)) - { - pAny->pData = rtl_allocateMemory( sizeof(double) ); - } - else - { - pAny->pData = &pAny->pReserved; - } - break; - case typelib_TypeClass_STRUCT: - case typelib_TypeClass_UNION: - case typelib_TypeClass_EXCEPTION: - case typelib_TypeClass_ARRAY: - pAny->pData = rtl_allocateMemory( pDataType->nSize ); - break; - case typelib_TypeClass_ANY: - { - m_pBridgeImpl->addError( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "can't unmarshal any: any in any not supported!" ) ) ); - - pAny->pData = 0; - Type type; // void - pAny->pType = type.getTypeLibType(); - typelib_typedescriptionreference_acquire( pAny->pType ); - - bReturn = sal_False; - break; - } - default: - pAny->pData = &pAny->pReserved; - } - - if ( bReturn ) - { - m_aItemsToUnpack.push( - UnpackItem( pAny->pData, pDataType ) ); - } - } - else - { - OUStringBuffer error; - error.appendAscii( "can't unmarshal any because typedescription for " ); - error.append( pAny->pType->pTypeName ); - error.appendAscii( " is missing" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - } - - if( pDataType ) - { - typelib_typedescription_release( pDataType ); - } - else - { - pAny->pData = 0; - Type type; // void - pAny->pType = type.getTypeLibType(); - typelib_typedescriptionreference_acquire( pAny->pType ); - - bReturn = sal_False; - } - - break; - } - case typelib_TypeClass_INTERFACE: - { - *(remote_Interface**)pDest = 0; - - rtl_uString *pString = 0; - bReturn = unpackOid( &pString ) && bReturn; - - if( bReturn && pString && pString->length ) - { - m_callback( (remote_Interface**) pDest , - pString, - pType->pWeakRef , - m_pEnvRemote, - urp_releaseRemoteCallback ); - } - if( pString ) - { - rtl_uString_release( pString ); - } - break; - } - case typelib_TypeClass_TYPE: - { - bReturn = unpackType( pDest ); - break; - } - case typelib_TypeClass_STRUCT: - case typelib_TypeClass_EXCEPTION: - { - typelib_CompoundTypeDescription * pCompType = - (typelib_CompoundTypeDescription *)pType; - - // direct members - typelib_TypeDescriptionReference ** ppTypeRefs = pCompType->ppTypeRefs; - sal_Int32 * pMemberOffsets = pCompType->pMemberOffsets; - sal_Int32 nDescr = pCompType->nMembers; - - // at least assume 1 byte per member - bReturn = bReturn && ! checkOverflow( nDescr * 1 ); - for ( sal_Int32 nPos = nDescr; nPos; --nPos ) - { - typelib_TypeDescription * pMemberType = 0; - typelib_typedescriptionreference_getDescription( - &pMemberType, ppTypeRefs[ nPos - 1 ] ); - - m_aItemsToUnpack.push( - UnpackItem( (char*)pDest + pMemberOffsets[ nPos - 1 ], - pMemberType, - true /* construct even in error case */ ) ); - - m_aTypesToRelease.push_back( pMemberType ); - } - - // parent - if (pCompType->pBaseTypeDescription) - { - m_aItemsToUnpack.push( - UnpackItem( pDest, - (typelib_TypeDescription *) - pCompType->pBaseTypeDescription ) ); - } - break; - } - case typelib_TypeClass_SEQUENCE: - { - sal_Int32 nLen; - bReturn = unpackCompressedSize( &nLen ); - - // urp protocol does not allow to use the elementsize as a guess, if enough data - // is available. However, at least one byte per member must be within the message - bReturn = bReturn && ! checkOverflow( 1 * nLen ); - uno_Sequence *pSequence = 0; - if( nLen && bReturn ) - { - typelib_TypeDescriptionReference * pETRef = - ((typelib_IndirectTypeDescription *)pType)->pType; - - typelib_TypeDescription * pET = 0; - typelib_typedescriptionreference_getDescription( &pET , pETRef ); - - if( pET ) - { - sal_Int32 nElementSize = pET->nSize; - - pSequence = (uno_Sequence *)rtl_allocateMemory( - SAL_SEQUENCE_HEADER_SIZE + nElementSize * nLen ); - pSequence->nRefCount = 1; - pSequence->nElements = nLen; - - if( typelib_TypeClass_BYTE == pET->eTypeClass ) - { - memcpy( pSequence->elements , m_pos , nLen ); - m_pos += nLen; - } - else - { - for ( sal_Int32 i = nLen; i; --i ) - { - m_aItemsToUnpack.push( - UnpackItem( - ((char*)pSequence->elements) - + (i - 1) * nElementSize, - pET ) ); - } - } - m_aTypesToRelease.push_back( pET ); - } - else - { - bReturn = sal_False; - uno_constructData( &pSequence , pType ); - OUStringBuffer error; - error.appendAscii( "can't unmarshal sequence, because there is no typedescription for element type " ); - error.append( pETRef->pTypeName ); - error.appendAscii( " available" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - } - else - { - uno_constructData( &pSequence , pType ); - } - - *((uno_Sequence **)pDest) = pSequence; - break; - } - case typelib_TypeClass_UNION: - case typelib_TypeClass_ARRAY: - case typelib_TypeClass_SERVICE: - case typelib_TypeClass_MODULE: - case typelib_TypeClass_INTERFACE_METHOD: - case typelib_TypeClass_INTERFACE_ATTRIBUTE: - case typelib_TypeClass_UNKNOWN: - default: - { - ::rtl::OUStringBuffer buffer( 128 ); - buffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Unsupported typeclass during unmarshaling (")); - buffer.append( ( sal_Int32 ) pType->eTypeClass , 10 ); - buffer.appendAscii( ")" ); - m_pBridgeImpl->addError( buffer.makeStringAndClear() ); - bReturn = sal_False; - } - } - - if ( !bReturn ) - { - // construct default data for every remaining item. - while ( !m_aItemsToUnpack.empty() ) - { - const UnpackItem & rItem = m_aItemsToUnpack.top(); - - if ( rItem.bMustBeConstructed ) - uno_constructData( rItem.pDest , rItem.pType ); - - m_aItemsToUnpack.pop(); - } - } - } - while ( !m_aItemsToUnpack.empty() ); - - // release pending type descriptions - TypeDescVector::const_iterator it = m_aTypesToRelease.begin(); - const TypeDescVector::const_iterator end = m_aTypesToRelease.end(); - while ( it != end ) - { - typelib_typedescription_release( *it ); - it++; - } - m_aTypesToRelease.clear(); - - return bReturn; -} - -sal_Bool Unmarshal::unpackType( void *pDest ) -{ - *(typelib_TypeDescriptionReference **) pDest = 0; - - sal_uInt8 nTypeClass; - sal_Bool bReturn = unpackInt8( &nTypeClass ); - - typelib_TypeDescriptionReference *pTypeRef = 0; - if( bReturn ) - { - if( nTypeClass <= 14 /* any */ ) - { - pTypeRef = * typelib_static_type_getByTypeClass((typelib_TypeClass )nTypeClass); - typelib_typedescriptionreference_acquire( pTypeRef ); - } - else - { - sal_uInt16 nCacheIndex = 0; - bReturn = bReturn && unpackInt16( &nCacheIndex ); - - if( bReturn ) - { - if( nTypeClass & 0x80 ) - { - // new type - rtl_uString *pString = 0; - bReturn = bReturn && unpackString( &pString ); - if( bReturn ) - { - typelib_TypeDescription *pType = 0; - typelib_typedescription_getByName( &pType, pString ); - if( pType ) - { - // type is known in this process - if( (typelib_TypeClass )(nTypeClass & 0x7f) == pType->eTypeClass ) - { - //typename and typeclass match, this is as it should be - pTypeRef = pType->pWeakRef; - typelib_typedescriptionreference_acquire( pTypeRef ); - } - else - { - // typename and typeclass do not match, dispose the bridge - // as there must be inconsistent type base between both processes - // or trash comes over the wire ... - bReturn = sal_False; - OUStringBuffer error( 128 ); - error.appendAscii( "it is tried to introduce type " ); - error.append( pString ); - error.appendAscii( "with typeclass " ); - error.append( (sal_Int32)( nTypeClass & 0x7f ) , 10 ); - error.appendAscii( " , which does not match with typeclass " ); - error.append( (sal_Int32) pType->eTypeClass ,10 ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - typelib_typedescription_release( pType ); - pType = 0; - } - else - { - // a type by this name is not known in the process. - if( (nTypeClass & 0x7f) < typelib_TypeClass_UNKNOWN ) - { - // typeclass is within a valid range, introduce the new - // type. - typelib_typedescriptionreference_new( - &pTypeRef, (typelib_TypeClass )(nTypeClass & 0x7f), pString ); - } - else - { - // typeclass is out of range ! - bReturn = sal_False; - OUStringBuffer error( 128 ); - error.appendAscii( "it is tried to introduce type " ); - error.append( pString ); - error.appendAscii( "with an out of range typeclass " ); - error.append( (sal_Int32)( nTypeClass & 0x7f ) , 10 ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - } - - if( bReturn && nCacheIndex != 0xffff ) - { - if( nCacheIndex < m_pBridgeImpl->m_properties.nTypeCacheSize ) - { - m_pBridgeImpl->m_pTypeIn[nCacheIndex] = *( Type * )&pTypeRef; - } - else - { - bReturn = sal_False; - OUStringBuffer error( 128 ); - error.appendAscii( "cache index for type " ); - error.append( pString ); - error.appendAscii( "out of range(0x" ); - error.append( (sal_Int32) nCacheIndex ,16 ); - error.appendAscii( ")" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - } - } - if( pString ) - { - rtl_uString_release( pString ); - } - } - else - { - if( nCacheIndex < m_pBridgeImpl->m_properties.nTypeCacheSize ) - { - pTypeRef = m_pBridgeImpl->m_pTypeIn[nCacheIndex].getTypeLibType(); - typelib_typedescriptionreference_acquire( pTypeRef ); - } - else - { - bReturn = sal_False; - OUStringBuffer error; - error.appendAscii( "cache index for types out of range(0x" ); - error.append( (sal_Int32) nCacheIndex ,16 ); - error.appendAscii( ")" ); - m_pBridgeImpl->addError( error.makeStringAndClear() ); - } - } - } - } - } - if( ! pTypeRef ) - { - pTypeRef = * typelib_static_type_getByTypeClass(typelib_TypeClass_VOID); - typelib_typedescriptionreference_acquire( pTypeRef ); - } - // pTypeRef is already acquired - *(typelib_TypeDescriptionReference**)pDest = pTypeRef; - return bReturn; -} - -} - diff --git a/bridges/source/remote/urp/urp_unmarshal.hxx b/bridges/source/remote/urp/urp_unmarshal.hxx deleted file mode 100644 index 60da3f2d8b95..000000000000 --- a/bridges/source/remote/urp/urp_unmarshal.hxx +++ /dev/null @@ -1,280 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _URP_UNMARSHAL_HXX_ -#define _URP_UNMARSHAL_HXX_ - -#include -#include -#include -#include -#include - -#ifndef _BRIDGES_REMOTE_HELPER_HXX_ -#include -#endif -#include -#include "urp_bridgeimpl.hxx" - -typedef struct _uno_Environment uno_Environment; -struct remote_Interface; - -namespace bridges_urp -{ - -extern char g_bSystemIsLittleEndian; -class ThreadId; -struct urp_BridgeImpl; -void SAL_CALL urp_releaseRemoteCallback( - remote_Interface *pRemoteI,rtl_uString *pOid, - typelib_TypeDescriptionReference *pTypeRef, - uno_Environment *pEnvRemote ); - -struct UnpackItem -{ - void * pDest; - typelib_TypeDescription * pType; - bool bMustBeConstructed; - - UnpackItem() - : pDest( 0 ), pType( 0 ), bMustBeConstructed( false ) {} - UnpackItem( void * d, typelib_TypeDescription * t, bool b = false ) - : pDest( d ), pType( t ), bMustBeConstructed( b ) {} -}; - -typedef std::stack< UnpackItem > UnpackItemStack; -typedef std::vector< typelib_TypeDescription * > TypeDescVector; - -class Unmarshal -{ -public: - Unmarshal( - struct urp_BridgeImpl *, - uno_Environment *pEnvRemote, - remote_createStubFunc callback ); - ~Unmarshal(); - - inline sal_Bool finished() - { return m_base + m_nLength == m_pos; } - inline sal_uInt32 getPos() - { return (sal_uInt32 ) (m_pos - m_base); } - - inline sal_Bool setSize( sal_Int32 nSize ); - - sal_Bool unpack( void *pDest, typelib_TypeDescription *pType ); - inline sal_Bool unpackCompressedSize( sal_Int32 *pData ); - inline sal_Bool unpackInt8( void *pDest ); - inline sal_Bool unpackString( void *pDest ); - inline sal_Bool unpackInt16( void *pDest ); - inline sal_Bool unpackInt32( void *pDest ); - sal_Bool unpackType( void *pDest ); - - inline sal_Bool unpackAny( void *pDest ); - sal_Bool unpackOid( rtl_uString **ppOid ); - sal_Bool unpackTid( sal_Sequence **ppThreadId ); - - sal_Int8 *getBuffer() - { return m_base; } - inline sal_Bool isSystemLittleEndian() - { return g_bSystemIsLittleEndian; } - -private: - inline sal_Bool checkOverflow( sal_Int32 nNextMem ); - - UnpackItemStack m_aItemsToUnpack; - TypeDescVector m_aTypesToRelease; - - sal_Int32 m_nBufferSize; - sal_Int8 *m_base; - sal_Int8 *m_pos; - sal_Int32 m_nLength; - - remote_createStubFunc m_callback; - uno_Environment *m_pEnvRemote; - urp_BridgeImpl *m_pBridgeImpl; -}; - -inline sal_Bool Unmarshal::setSize( sal_Int32 nSize ) -{ - if( nSize > m_nBufferSize ) - { - // adjust buffer size and length. - sal_Int8 * base = - (sal_Int8*)rtl_reallocateMemory (m_base, sal_Size(nSize)); - if (base != 0) - { - m_base = base; - m_nLength = m_nBufferSize = nSize; - } - } - else - { - // adjust buffer length, only. - m_nLength = nSize; - } - - // reset buffer position, and leave. - m_pos = m_base; - return (m_nLength == nSize); -} - -inline sal_Bool Unmarshal::checkOverflow( sal_Int32 nNextMem ) -{ - sal_Bool bOverflow = nNextMem < 0 || - (((sal_Int32)( m_pos - m_base )) + nNextMem ) > m_nLength; - if( bOverflow ) - m_pBridgeImpl->addError( "message too short" ); - return bOverflow; -} - - -inline sal_Bool Unmarshal::unpackInt8( void *pDest ) -{ - sal_Bool bReturn = ! checkOverflow( 1 ); - if( bReturn ) - { - *((sal_Int8*)pDest ) = *m_pos; - m_pos++; - } - else - { - *((sal_Int8*)pDest ) = 0; - } - return bReturn; -} - -inline sal_Bool Unmarshal::unpackInt32( void *pDest ) -{ - sal_uInt32 *p = ( sal_uInt32 * ) pDest; - sal_Bool bReturn = ! checkOverflow(4); - if( bReturn ) - { - if( isSystemLittleEndian() ) - { - ((sal_Int8*) p )[3] = m_pos[0]; - ((sal_Int8*) p )[2] = m_pos[1]; - ((sal_Int8*) p )[1] = m_pos[2]; - ((sal_Int8*) p )[0] = m_pos[3]; - } - else - { - ((sal_Int8*) p )[3] = m_pos[3]; - ((sal_Int8*) p )[2] = m_pos[2]; - ((sal_Int8*) p )[1] = m_pos[1]; - ((sal_Int8*) p )[0] = m_pos[0]; - } - m_pos += 4; - } - else - { - *p = 0; - } - return bReturn; -} - -inline sal_Bool Unmarshal::unpackInt16( void *pDest ) -{ - sal_uInt16 *p = ( sal_uInt16 * ) pDest; - - sal_Bool bReturn = ! checkOverflow( 2 ); - if( bReturn ) - { - if( isSystemLittleEndian() ) - { - ((sal_Int8*) p )[1] = m_pos[0]; - ((sal_Int8*) p )[0] = m_pos[1]; - } - else - { - ((sal_Int8*) p )[1] = m_pos[1]; - ((sal_Int8*) p )[0] = m_pos[0]; - } - m_pos ++; - m_pos ++; - } - else - { - *p = 0; - } - return bReturn; -} - -inline sal_Bool Unmarshal::unpackString( void *pDest ) -{ - sal_Int32 nLength; - sal_Bool bReturn = unpackCompressedSize( &nLength ); - - bReturn = bReturn && ! checkOverflow( nLength ); - if( bReturn ) - { - *(rtl_uString **) pDest = 0; - rtl_string2UString( (rtl_uString**) pDest, (const sal_Char * )m_pos , nLength, - RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS ); - m_pos += nLength; - } - else - { - *(rtl_uString ** ) pDest = 0; - rtl_uString_new( (rtl_uString **) pDest ); - } - return bReturn; -} - -inline sal_Bool Unmarshal::unpackCompressedSize( sal_Int32 *pData ) -{ - sal_uInt8 n8Size; - sal_Bool bReturn = unpackInt8( &n8Size ); - if( bReturn ) - { - if( n8Size == 0xff ) - { - unpackInt32( pData ); - } - else - { - *pData = (sal_Int32 ) n8Size; - } - } - return bReturn; -} - -inline sal_Bool Unmarshal::unpackAny( void *pDest ) -{ - typelib_TypeDescriptionReference *pTypeRef = - * typelib_static_type_getByTypeClass( typelib_TypeClass_ANY ); - - typelib_TypeDescription * pTD = 0; - typelib_typedescriptionreference_getDescription( &pTD, pTypeRef ); - - sal_Bool bReturn = unpack( pDest, pTD ); - - typelib_typedescription_release( pTD ); - - return bReturn; -} - -} -#endif diff --git a/bridges/source/remote/urp/urp_writer.cxx b/bridges/source/remote/urp/urp_writer.cxx deleted file mode 100644 index 610b6653a06c..000000000000 --- a/bridges/source/remote/urp/urp_writer.cxx +++ /dev/null @@ -1,269 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" -#include -#include - -#include -#include - -#include - -#include -#include - -#include - -#include - -#include "urp_writer.hxx" -#include "urp_bridgeimpl.hxx" -#include "urp_marshal.hxx" -#include "urp_dispatch.hxx" - -#if OSL_DEBUG_LEVEL > 1 -static MyCounter thisCounter( "DEBUG : WriterThread" ); -#endif - -using namespace ::osl; - -namespace bridges_urp { - -OWriterThread::OWriterThread( remote_Connection *pConnection, urp_BridgeImpl *pBridgeImpl, - uno_Environment *pEnvRemote) : - m_bAbort( sal_False ), - m_bInBlockingWait( sal_False ), - m_bEnterBlockingWait( sal_False ), - m_pConnection( pConnection ), - m_pBridgeImpl( pBridgeImpl ), - m_pEnvRemote( pEnvRemote ) - -{ - m_oslCondition = osl_createCondition(); - osl_resetCondition( m_oslCondition ); - m_pConnection->acquire( m_pConnection ); - -#if OSL_DEBUG_LEVEL > 1 - thisCounter.acquire(); -#endif -} - -OWriterThread::~OWriterThread() -{ - osl_destroyCondition( m_oslCondition ); - m_pConnection->release( m_pConnection ); -#if OSL_DEBUG_LEVEL > 1 - thisCounter.release(); -#endif -} - - -// touch is called with locked m_marshalingMutex -void OWriterThread::touch( sal_Bool bImmediately ) -{ - if( bImmediately || m_pBridgeImpl->m_blockMarshaler.getPos() > m_pBridgeImpl->m_properties.nFlushBlockSize ) - { - write(); - } - else - { - // wake the writer thread up - if( m_bInBlockingWait ) - { - m_bInBlockingWait = sal_False; - osl_setCondition( m_oslCondition ); - } - else - { - // ensure, that the writing thread does not enter blocking mode - m_bEnterBlockingWait = sal_False; - } - } -} - - -void OWriterThread::abortThread() -{ - MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); - - m_bAbort = sal_True; - m_bEnterBlockingWait = sal_False; - if( m_bInBlockingWait ) - { - m_bInBlockingWait = sal_False; - osl_setCondition( m_oslCondition ); - } -} - - -// must be called with locked marshaling mutex -void OWriterThread::write() -{ - if( ! m_pBridgeImpl->m_blockMarshaler.empty() && ! m_bAbort ) - { - m_pBridgeImpl->m_blockMarshaler.finish( m_pBridgeImpl->m_nMarshaledMessages); - m_pBridgeImpl->m_nMarshaledMessages = 0; - - sal_Int32 nLength = m_pBridgeImpl->m_blockMarshaler.getSize(); - sal_Int8 *pBuf = m_pBridgeImpl->m_blockMarshaler.getBuffer(); - - if( nLength != m_pConnection->write( m_pConnection, pBuf, nLength )) - { - m_pBridgeImpl->m_blockMarshaler.restart(); - return; - } - m_pConnection->flush( m_pConnection ); - m_pBridgeImpl->m_blockMarshaler.restart(); - } -} - -void OWriterThread::sendEmptyMessage() -{ - // must be called with locked marshaling mutex - sal_Int32 a[2] = {0,0}; - m_pConnection->write( m_pConnection , (sal_Int8*) a , sizeof( sal_Int32) *2 ); -} - -void OWriterThread::insertReleaseRemoteCall( - rtl_uString *pOid,typelib_TypeDescriptionReference *pTypeRef) -{ - { - ::osl::MutexGuard guard( m_releaseCallMutex ); - - struct RemoteReleaseCall call; - call.sOid = pOid; - call.typeInterface = pTypeRef; - m_lstReleaseCalls.push_back( call ); - } - { - MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); - if( m_bInBlockingWait ) - { - m_bInBlockingWait = sal_False; - osl_setCondition( m_oslCondition ); - } - else - { - // ensure, that the writing thread does not enter blocking mode - m_bEnterBlockingWait = sal_False; - } - } -} - -/* The release calls for doubled interfaces - * - * - ***/ -void OWriterThread::executeReleaseRemoteCalls() -{ - ::std::list< struct RemoteReleaseCall > lstReleaseCalls; - { - ::osl::MutexGuard guard( m_releaseCallMutex ); - lstReleaseCalls.swap( m_lstReleaseCalls ); - } - - for( ::std::list< struct RemoteReleaseCall >::iterator ii = lstReleaseCalls.begin(); - ii != lstReleaseCalls.end(); - ++ ii ) - { - struct RemoteReleaseCall &call = (*ii) ; - - typelib_TypeDescription *pInterfaceTypeDesc = 0; - typelib_TypeDescription *pReleaseMethod = 0; - - call.typeInterface.getDescription( &pInterfaceTypeDesc ); - if( ! pInterfaceTypeDesc->bComplete ) - { - typelib_typedescription_complete( &pInterfaceTypeDesc ); - } - - uno_Any any; - uno_Any *pAny = &any; - - typelib_typedescriptionreference_getDescription( - &pReleaseMethod , - ((typelib_InterfaceTypeDescription*)pInterfaceTypeDesc)->ppAllMembers[REMOTE_RELEASE_METHOD_INDEX] ); - - urp_sendRequest_internal( - m_pEnvRemote , pReleaseMethod, call.sOid.pData, - (typelib_InterfaceTypeDescription*) pInterfaceTypeDesc, 0, 0, - &pAny ); - - typelib_typedescription_release( pReleaseMethod ); - typelib_typedescription_release( pInterfaceTypeDesc ); - } -} - - -void OWriterThread::run() -{ - while( ! m_bAbort ) - { - sal_Bool bWait; - { - MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); - bWait = m_bEnterBlockingWait; - if( bWait ) - { - osl_resetCondition( m_oslCondition ); - m_bInBlockingWait = sal_True; - } - m_bEnterBlockingWait = sal_True; - } - - // wait for some notification - if( bWait ) - osl_waitCondition( m_oslCondition , 0 ); - // (m_bInBlockingWait = sal_False was set by the activating thread) - - if( m_bAbort ) - break; - - // Wait for the timeout - TimeValue value = { 0 , 1000 * m_pBridgeImpl->m_properties.nOnewayTimeoutMUSEC }; - osl_resetCondition( m_oslCondition ); - osl_waitCondition( m_oslCondition , &value ); - - // check if there are some release calls to be sent .... - executeReleaseRemoteCalls(); - - { - // write to the socket - MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); - if( ! m_pBridgeImpl->m_blockMarshaler.empty() ) - { - write(); - } - } - } -} - - -} - diff --git a/bridges/source/remote/urp/urp_writer.hxx b/bridges/source/remote/urp/urp_writer.hxx deleted file mode 100644 index f789c092fb98..000000000000 --- a/bridges/source/remote/urp/urp_writer.hxx +++ /dev/null @@ -1,83 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -#include -#include - -#include - -#include - -#include - -struct remote_Connection; - -namespace bridges_urp -{ - struct RemoteReleaseCall - { - ::rtl::OUString sOid; - ::com::sun::star::uno::Type typeInterface; - }; - - struct urp_BridgeImpl; - class OWriterThread : - public ::osl::Thread - { - public: - OWriterThread( remote_Connection *pConnection, - urp_BridgeImpl *m_pBridgeImpl, - uno_Environment *pEnvRemote); - ~OWriterThread( ); - - virtual void SAL_CALL run(); - - void touch( sal_Bool bImmediately ); - void sendEmptyMessage(); - - void abortThread(); - - void SAL_CALL insertReleaseRemoteCall ( - rtl_uString *pOid,typelib_TypeDescriptionReference *pTypeRef); - void SAL_CALL executeReleaseRemoteCalls(); - - private: - void write(); - oslCondition m_oslCondition; - sal_Bool m_bAbort; - sal_Bool m_bInBlockingWait; - sal_Bool m_bEnterBlockingWait; - remote_Connection *m_pConnection; - urp_BridgeImpl *m_pBridgeImpl; - uno_Environment *m_pEnvRemote; // this is held weak only - - ::osl::Mutex m_releaseCallMutex; - ::std::list< struct RemoteReleaseCall > m_lstReleaseCalls; - }; -} - diff --git a/bridges/unotypes/makefile.mk b/bridges/unotypes/makefile.mk index d775638ac4af..d5b3bc970e51 100644 --- a/bridges/unotypes/makefile.mk +++ b/bridges/unotypes/makefile.mk @@ -41,20 +41,7 @@ UNOUCRRDB=$(SOLARBINDIR)$/udkapi.rdb UNOUCROUT=$(OUT)$/inc UNOTYPES = \ - com.sun.star.bridge.XProtocolProperties \ - com.sun.star.corba.giop.MessageHeader_1_2 \ - com.sun.star.corba.giop.MsgType_1_1 \ - com.sun.star.corba.iop.ServiceContextList \ - com.sun.star.corba.iop.ProfileIdGroup \ - com.sun.star.corba.iiop.ProfileBody_1_1 \ - com.sun.star.corba.LogicalThreadID \ - com.sun.star.corba.iop.ServiceIdGroup \ - com.sun.star.corba.giop.ReplyHeader_1_2 \ - com.sun.star.corba.giop.RequestHeader_1_2 \ - com.sun.star.corba.TCKind \ - com.sun.star.corba.ObjectKey \ com.sun.star.uno.XInterface \ - com.sun.star.lang.DisposedException \ com.sun.star.uno.TypeClass # --- Targets ------------------------------------------------------ diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index e45fb3c3784d..c546cdadedfc 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -275,23 +275,14 @@ void createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.io.Connector") ), xSF, Reference< XRegistryKey >() ) ) ); - // iiop bridge - xSet->insert( makeAny( loadSharedLibComponentFactory( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "remotebridge.uno" SAL_DLLEXTENSION) ), - OUString(), - OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.remotebridges." - "Bridge.various") ), - xSF, Reference< XRegistryKey >() ) ) ); // bridge factory xSet->insert( makeAny( loadSharedLibComponentFactory( OUString( RTL_CONSTASCII_USTRINGPARAM( - "bridgefac.uno" SAL_DLLEXTENSION) ), + "binaryurp.uno" SAL_DLLEXTENSION) ), OUString(), - OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.remotebridges." - "BridgeFactory") ), + OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.bridge.BridgeFactory") ), xSF, Reference< XRegistryKey >() ) ) ); } s_bSet = sal_True; diff --git a/remotebridges/prj/build.lst b/remotebridges/prj/build.lst index a1f16dbd60d2..5f2a661dd5de 100644 --- a/remotebridges/prj/build.lst +++ b/remotebridges/prj/build.lst @@ -1,6 +1,2 @@ -rb remotebridges : LIBXSLT:libxslt bridges rdbmaker NULL -rb remotebridges usr1 - all rb_mkout NULL -rb remotebridges\source\bridge nmake - all rb_iiop NULL -rb remotebridges\source\factory nmake - all rb_factory NULL +rb remotebridges : LIBXSLT:libxslt cppu cppuhelper offuh rdbmaker sal NULL rb remotebridges\source\unourl_resolver nmake - all rb_urlresolv NULL -rb remotebridges\source\dynamicloader nmake - all rb_dynloader NULL diff --git a/remotebridges/prj/d.lst b/remotebridges/prj/d.lst old mode 100644 new mode 100755 index b304680e2d6e..b8b46ae7089c --- a/remotebridges/prj/d.lst +++ b/remotebridges/prj/d.lst @@ -1,20 +1,4 @@ -..\%__SRC%\bin\bridgefa*.dll %_DEST%\bin%_EXT%\bridgefa*.dll -..\%__SRC%\bin\remotebr*.dll %_DEST%\bin%_EXT%\remotebr*.dll -..\%__SRC%\bin\dynamicl*.dll %_DEST%\bin%_EXT%\dynamicl*.dll -..\%__SRC%\bin\uuresolv*.dll %_DEST%\bin%_EXT%\uuresolv*.dll -..\%__SRC%\bin\brdgfctr.rdb %_DEST%\rdb%_EXT%\brdgfctr.rdb -..\%__SRC%\bin\remotebridge.rdb %_DEST%\rdb%_EXT%\remotebridge.rdb -..\%__SRC%\bin\dynamicloader.rdb %_DEST%\rdb%_EXT%\dynamicloader.rdb -..\%__SRC%\bin\uuresolver.rdb %_DEST%\rdb%_EXT%\uuresolver.rdb -..\source\factory\brdgfctr.xml %_DEST%\xml%_EXT%\bridgefac.uno.xml -..\source\bridge\remotebridge.xml %_DEST%\xml%_EXT%\remotebridge.uno.xml -..\source\dynamicloader\dynamicloader.xml %_DEST%\xml%_EXT%\dynamicloader.uno.xml -..\source\unourl_resolver\uuresolver.xml %_DEST%\xml%_EXT%\uuresolver.uno.xml -..\%__SRC%\lib\bridgefac.uno.so %_DEST%\lib%_EXT%\bridgefac.uno.so -..\%__SRC%\lib\remotebridge.uno.so %_DEST%\lib%_EXT%\remotebridge.uno.so -..\%__SRC%\lib\dynamicloader.uno.so %_DEST%\lib%_EXT%\dynamicloader.uno.so +..\%__SRC%\bin\uuresolver.uno.dll %_DEST%\bin%_EXT%\uuresolver.uno.dll +..\%__SRC%\lib\uuresolver.uno.dylib %_DEST%\lib%_EXT%\uuresolver.uno.dylib ..\%__SRC%\lib\uuresolver.uno.so %_DEST%\lib%_EXT%\uuresolver.uno.so -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\* -..\%__SRC%\misc\bridgefac.component %_DEST%\xml%_EXT%\bridgefac.component -..\%__SRC%\misc\remotebridge.component %_DEST%\xml%_EXT%\remotebridge.component ..\%__SRC%\misc\uuresolver.component %_DEST%\xml%_EXT%\uuresolver.component diff --git a/remotebridges/source/bridge/bridge_connection.cxx b/remotebridges/source/bridge/bridge_connection.cxx deleted file mode 100644 index 063b30af14bf..000000000000 --- a/remotebridges/source/bridge/bridge_connection.cxx +++ /dev/null @@ -1,139 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "bridge_connection.hxx" -#include "remote_bridge.hxx" -#include -#include - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::connection; - -namespace remotebridges_bridge -{ - OConnectionWrapper::OConnectionWrapper( const Reference < XConnection > &r ) : - m_r( r ), - m_nRef( 0 ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - acquire = thisAcquire; - release = thisRelease; - read = thisRead; - write = thisWrite; - flush = thisFlush; - close = thisClose; - } - - OConnectionWrapper::~OConnectionWrapper() - { - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} - - void OConnectionWrapper::thisAcquire( remote_Connection *p) - { - OConnectionWrapper * m = ( OConnectionWrapper * ) p; - osl_incrementInterlockedCount( &(m->m_nRef ) ); - } - - void OConnectionWrapper::thisRelease( remote_Connection * p) - { - OConnectionWrapper * m = ( OConnectionWrapper * ) p; - if( ! osl_decrementInterlockedCount( &( m->m_nRef ) ) ) - { - delete m; - } - } - - sal_Int32 OConnectionWrapper::thisRead( remote_Connection *p , sal_Int8 *pDest , sal_Int32 nSize ) - { - // guard the C-Code - OConnectionWrapper * m = ( OConnectionWrapper * ) p; - try - { - // TODO possible optimization : give - Sequence seq = toUnoSequence( ::rtl::ByteSequence(nSize, ::rtl::BYTESEQ_NODEFAULT) ); - sal_Int32 nRead = m->m_r->read( seq , nSize ); - memcpy( pDest , seq.getConstArray() , nRead ); - return nRead; - } - catch ( Exception & ) - { - return 0; - } - catch (::std::bad_alloc &) - { - return 0; - } - } - - sal_Int32 OConnectionWrapper::thisWrite( remote_Connection *p , - const sal_Int8 *pSource , - sal_Int32 nSize ) - { - // guard the C-Code - OConnectionWrapper * m = ( OConnectionWrapper * ) p; - try - { - Sequence< sal_Int8 > seq( pSource , nSize ); - m->m_r->write( seq ); - return nSize; - } - catch ( Exception & ) - { - return 0; - } - } - - void OConnectionWrapper::thisFlush( remote_Connection *p ) - { - // guard the C-Code - try - { - OConnectionWrapper * m = ( OConnectionWrapper * ) p; - m->m_r->flush(); - } - catch ( Exception & ) - { - } - } - - void OConnectionWrapper::thisClose( remote_Connection * p) - { - // guard the C-Code - try - { - OConnectionWrapper * m = ( OConnectionWrapper * ) p; - m->m_r->close(); - } - catch( Exception & ) - { - - } - } -} - - - diff --git a/remotebridges/source/bridge/bridge_connection.hxx b/remotebridges/source/bridge/bridge_connection.hxx deleted file mode 100644 index f105fd8e32ee..000000000000 --- a/remotebridges/source/bridge/bridge_connection.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -#include - -#include - -namespace remotebridges_bridge -{ - - class OConnectionWrapper : - public remote_Connection - { - public: - OConnectionWrapper( const ::com::sun::star::uno::Reference < - ::com::sun::star::connection::XConnection > & ); - ~OConnectionWrapper(); - - static void SAL_CALL thisAcquire( remote_Connection *); - static void SAL_CALL thisRelease( remote_Connection *); - static sal_Int32 SAL_CALL thisRead( remote_Connection * , sal_Int8 *pDest , sal_Int32 nSize ); - static sal_Int32 SAL_CALL thisWrite( remote_Connection * , - const sal_Int8 *pSource , - sal_Int32 nSize ); - static void SAL_CALL thisFlush( remote_Connection * ); - static void SAL_CALL thisClose( remote_Connection * ); - - ::com::sun::star::uno::Reference < ::com::sun::star::connection::XConnection > m_r; - oslInterlockedCount m_nRef; - }; -} - diff --git a/remotebridges/source/bridge/bridge_provider.cxx b/remotebridges/source/bridge/bridge_provider.cxx deleted file mode 100644 index 1915df35ab31..000000000000 --- a/remotebridges/source/bridge/bridge_provider.cxx +++ /dev/null @@ -1,179 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include - -#include "remote_bridge.hxx" - -#include -#include - -#include -#include - -#include - -using namespace ::rtl; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::bridge; - -namespace remotebridges_bridge -{ - - OInstanceProviderWrapper::OInstanceProviderWrapper( - const Reference & rProvider, - ORemoteBridge * pBridgeCallback ) : - m_rProvider( rProvider ), - m_nRef( 0 ), - m_pBridgeCallback( pBridgeCallback ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - acquire = thisAcquire; - release = thisRelease; - getInstance = thisGetInstance; - } - - OInstanceProviderWrapper::~OInstanceProviderWrapper() - { - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); - } - - void OInstanceProviderWrapper::thisAcquire( remote_InstanceProvider *p ) - { - OInstanceProviderWrapper * m = (OInstanceProviderWrapper *) p; - osl_incrementInterlockedCount( &(m->m_nRef ) ); - } - - void OInstanceProviderWrapper::thisRelease( remote_InstanceProvider *p ) - { - OInstanceProviderWrapper * m = ( OInstanceProviderWrapper *) p; - if( ! osl_decrementInterlockedCount( &(m->m_nRef ) ) ) - { - delete m; - } - } - - static void convertToRemoteRuntimeException ( uno_Any **ppException, - const ::rtl::OUString &sMessage, - const Reference< XInterface > &rContext, - Mapping &map ) - { - - uno_type_any_construct( *ppException , - 0 , - getCppuType( (RuntimeException *)0 ).getTypeLibType() , - 0 ); - - typelib_CompoundTypeDescription * pCompType = 0 ; - getCppuType( (Exception*)0 ).getDescription( (typelib_TypeDescription **) &pCompType ); - if( ! ((typelib_TypeDescription *)pCompType)->bComplete ) - { - typelib_typedescription_complete( (typelib_TypeDescription**) &pCompType ); - } - - char *pValue = (char*) (*ppException)->pData; - rtl_uString_assign( (rtl_uString ** ) pValue , sMessage.pData ); - - *((remote_Interface**) pValue+pCompType->pMemberOffsets[1]) = - (remote_Interface*) map.mapInterface( - rContext.get(), getCppuType( &rContext) ); - - typelib_typedescription_release( (typelib_TypeDescription *) pCompType ); - } - - void OInstanceProviderWrapper::thisGetInstance( - remote_InstanceProvider * pProvider , - uno_Environment *pEnvRemote, - remote_Interface **ppRemoteI, - rtl_uString *pInstanceName, - typelib_InterfaceTypeDescription *pType, - uno_Any **ppException - ) - { - OInstanceProviderWrapper * m = (OInstanceProviderWrapper *)pProvider; - - OSL_ASSERT( ppRemoteI ); - if( *ppRemoteI ) - { - (*ppRemoteI)->release( *ppRemoteI ); - *ppRemoteI = 0; - } - - OUString sCppuName( RTL_CONSTASCII_USTRINGPARAM( CPPU_CURRENT_LANGUAGE_BINDING_NAME ) ); - - uno_Environment *pEnvThis = 0; - uno_getEnvironment( &pEnvThis , - sCppuName.pData , - 0 ); - Mapping map( pEnvThis , pEnvRemote ); - pEnvThis->release( pEnvThis ); - - if( OUString( pType->aBase.pTypeName ) == - getCppuType( (Reference*)0).getTypeName() ) - { - try - { - Reference< XInterface > r = m->m_rProvider->getInstance( - OUString( pInstanceName ) ); - - *ppRemoteI = (remote_Interface*) map.mapInterface ( - r.get(), - getCppuType( (Reference< XInterface > *) 0 ) - ); - - if( *ppRemoteI && m->m_pBridgeCallback ) - { - m->m_pBridgeCallback->objectMappedSuccesfully(); - m->m_pBridgeCallback = 0; - } - *ppException = 0; - } - catch( ::com::sun::star::container::NoSuchElementException &e ) - { - // NoSuchElementException not specified, so convert it to a runtime exception - convertToRemoteRuntimeException( - ppException , e.Message.pData , e.Context.get(), map ); - } - catch( ::com::sun::star::uno::RuntimeException &e ) - { - convertToRemoteRuntimeException( - ppException , e.Message.pData , e.Context.get(), map ); - } - - } - else - { - OUStringBuffer msg; - msg.appendAscii( - RTL_CONSTASCII_STRINGPARAM( - "getInstance expected XInterface but got ")); - msg.append(pType->aBase.pTypeName); - convertToRemoteRuntimeException( - ppException, msg.getStr(), Reference< XInterface >(), map); - } - } -} diff --git a/remotebridges/source/bridge/makefile.mk b/remotebridges/source/bridge/makefile.mk deleted file mode 100644 index 2a5ea130d744..000000000000 --- a/remotebridges/source/bridge/makefile.mk +++ /dev/null @@ -1,72 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=remotebridges -TARGET = remotebridge.uno -ENABLE_EXCEPTIONS=TRUE -COMP1TYPELIST = remotebridge - -# --- Settings ----------------------------------------------------- -.INCLUDE : settings.mk -.IF "$(L10N_framework)"=="" -DLLPRE = -# ------------------------------------------------------------------ - -SLOFILES= \ - $(SLO)$/remote_bridge.obj \ - $(SLO)$/bridge_connection.obj\ - $(SLO)$/bridge_provider.obj -SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map - -SHL1STDLIBS= \ - $(SALLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(RMCXTLIB) - -SHL1DEPN= -SHL1IMPLIB= i$(TARGET) -SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1RPATH= URELIB - -DEF1NAME= $(SHL1TARGET) -.ENDIF # L10N_framework - -# --- Targets ------------------------------------------------------ -.INCLUDE : target.mk - -ALLTAR : $(MISC)/remotebridge.component - -$(MISC)/remotebridge.component .ERRREMOVE : \ - $(SOLARENV)/bin/createcomponent.xslt remotebridge.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt remotebridge.component diff --git a/remotebridges/source/bridge/remote_bridge.cxx b/remotebridges/source/bridge/remote_bridge.cxx deleted file mode 100644 index 5f2c9ce3bc0e..000000000000 --- a/remotebridges/source/bridge/remote_bridge.cxx +++ /dev/null @@ -1,470 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -#include "remote_bridge.hxx" -#include "bridge_connection.hxx" -#include - -#include -#include - -#define IMPLEMENTATION_NAME "com.sun.star.comp.remotebridges.Bridge.various" - - -using namespace ::rtl; -using namespace ::cppu; -using namespace ::osl; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::bridge; -using namespace ::com::sun::star::registry; -using namespace ::com::sun::star::connection; - -namespace remotebridges_bridge -{ - rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - - ORemoteBridge::ORemoteBridge() : - OComponentHelper( m_mutex ), - m_pContext( 0 ), - m_pEnvRemote(0 ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - remote_DisposingListener::acquire = thisAcquire; - remote_DisposingListener::release = thisRelease; - remote_DisposingListener::disposing = thisDisposing; - } - - ORemoteBridge::~ORemoteBridge() - { - if( m_pContext ) - { - m_pContext->aBase.release( (uno_Context *) m_pContext ); - } - if( m_pEnvRemote ) - { - m_pEnvRemote->release( m_pEnvRemote ); - } - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); - } - - void ORemoteBridge::objectMappedSuccesfully() - { - MutexGuard guard( m_mutex ); - - if( m_pEnvRemote ) - { - m_pEnvRemote->release( m_pEnvRemote ); - m_pEnvRemote = 0; - } - } - - Any ORemoteBridge::queryInterface( const Type & aType ) throw(RuntimeException) - { - Any a = ::cppu::queryInterface( - aType , - SAL_STATIC_CAST( XInitialization * , this ) , - SAL_STATIC_CAST( XBridge * , this ), - SAL_STATIC_CAST( XTypeProvider * , this ) ); - if( a.hasValue() ) - { - return a; - } - - return OComponentHelper::queryInterface( aType ); - } - - - void ORemoteBridge::initialize( const Sequence< Any >& aArguments ) - throw( Exception, RuntimeException) - { - - MutexGuard guard( m_mutex ); - - if( 4 != aArguments.getLength() ) - { - throw IllegalArgumentException( rtl::OUString::createFromAscii("wrong number of arguments") , - Reference< XInterface >(), - 0 ); - } - - OUString swName; - OUString swProtocol; - Reference < XConnection > rConnection; - Reference < XInstanceProvider > rProvider; - - aArguments.getConstArray()[0] >>= swName; - aArguments.getConstArray()[1] >>= swProtocol; - aArguments.getConstArray()[2] >>= rConnection; - aArguments.getConstArray()[3] >>= rProvider; - - if( ! rConnection.is() ) - { - throw IllegalArgumentException( rtl::OUString::createFromAscii("connection is missing") , - Reference < XInterface > (), - 2 ); - } - - remote_Connection *pConnection = new OConnectionWrapper( rConnection ); - remote_InstanceProvider *pProvider = 0; - if( rProvider.is( )) - { - pProvider = new OInstanceProviderWrapper( rProvider , this ); - } - - OUString sName = swName; - m_sDescription = swProtocol; - m_sDescription += OUString( RTL_CONSTASCII_USTRINGPARAM(":")); - m_sDescription += rConnection->getDescription(); - - if( 0 == sName.getLength() ) - { - sName = m_sDescription; - } - else - { - m_sName = sName; - } - - m_pContext = remote_createContext( pConnection, - sName.pData, - m_sDescription.pData, - swProtocol.pData, - pProvider ); - if( ! m_pContext ) - { - throw BridgeExistsException(); - } - - m_pContext->addDisposingListener( m_pContext , - (remote_DisposingListener *) this ); - - // environment will be released by the first succesfull mapping - OUString sRemoteEnv; - if( swProtocol.indexOf( ',') == -1 ) - { - sRemoteEnv = swProtocol; - } - else - { - sRemoteEnv = swProtocol.copy( 0 , swProtocol.indexOf( ',' ) ); - } - m_sProtocol = sRemoteEnv; - uno_getEnvironment( &m_pEnvRemote , - sRemoteEnv.pData , - m_pContext ); - if( ! m_pEnvRemote ) - { - m_pContext->removeDisposingListener( m_pContext , - (remote_DisposingListener*) this ); - m_pContext->aBase.release( (uno_Context * ) m_pContext ); - m_pContext = 0; - - // forgotten exception when specifying the interface - throw RuntimeException( rtl::OUString::createFromAscii("couldn't create uno-remote-environment") , - Reference < XInterface > () ); - } - } - - Reference< XInterface > ORemoteBridge::getInstance( const ::rtl::OUString& sInstanceName ) - throw(::com::sun::star::uno::RuntimeException) - { - Reference < XInterface > rReturn; - - remote_Context *pContext = 0; - { - MutexGuard guard( m_mutex ); - if( m_pContext && m_pContext->getRemoteInstance ) - { - pContext = m_pContext; - pContext->aBase.acquire( (uno_Context*)pContext ); - } - } - if( pContext ) - { - // get the appropriate remote environment - uno_Environment *pEnvRemote = 0; - uno_getEnvironment( &pEnvRemote , m_sProtocol.pData , pContext ); - - if( ! pEnvRemote ) - { - pContext->aBase.release( (uno_Context*) pContext ); - throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "RemoteBridge: bridge already disposed" ) ), - Reference< XInterface > () ); - } - - Type type = getCppuType( (Reference < XInterface > * ) 0 ); - - remote_Interface *pRemoteI = 0; - uno_Any exception; - uno_Any *pException = &exception; - - pContext->getRemoteInstance( - pEnvRemote, - &pRemoteI, - sInstanceName.pData, - type.getTypeLibType(), - &pException ); - pContext->aBase.release( (uno_Context*) pContext ); - pContext = 0; - - uno_Environment *pEnvCpp =0; - OUString sCppuName( RTL_CONSTASCII_USTRINGPARAM( CPPU_CURRENT_LANGUAGE_BINDING_NAME ) ); - uno_getEnvironment( &pEnvCpp , - sCppuName.pData , - 0 ); - Mapping map( pEnvRemote , pEnvCpp ); - - pEnvCpp->release( pEnvCpp ); - pEnvRemote->release( pEnvRemote ); - - if( pException ) - { - typelib_CompoundTypeDescription * pCompType = 0 ; - getCppuType( (Exception*)0 ).getDescription( (typelib_TypeDescription **) &pCompType ); - - if( ! ((typelib_TypeDescription *)pCompType)->bComplete ) - { - typelib_typedescription_complete( (typelib_TypeDescription**) &pCompType ); - } - XInterface *pXInterface = (XInterface *) map.mapInterface( - *(remote_Interface**) ( ((char*)pException->pData)+pCompType->pMemberOffsets[1] ), - getCppuType( (Reference< XInterface > *)0 ) ); - RuntimeException myException( - *((rtl_uString **)pException->pData), - Reference< XInterface > ( pXInterface , SAL_NO_ACQUIRE) ); - uno_any_destruct( pException , 0 ); - - throw myException; - } - else if( pRemoteI ) - { - // got an interface ! - XInterface * pCppI = ( XInterface * ) map.mapInterface( pRemoteI, type ); - rReturn = Reference ( pCppI, SAL_NO_ACQUIRE ); - pRemoteI->release( pRemoteI ); - objectMappedSuccesfully(); - } - } - else - { - throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "RemoteBridge: bridge already disposed." ) ), - Reference< XInterface > () ); - } - - return rReturn; - } - - - ::rtl::OUString SAL_CALL ORemoteBridge::getName( ) - throw(::com::sun::star::uno::RuntimeException) - { - return m_sName; - } - - ::rtl::OUString SAL_CALL ORemoteBridge::getDescription( ) - throw(::com::sun::star::uno::RuntimeException) - { - return m_sDescription; - } - - // XTypeProvider - Sequence< Type > SAL_CALL ORemoteBridge::getTypes(void) throw( RuntimeException ) - { - static OTypeCollection *pCollection = 0; - if( ! pCollection ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pCollection ) - { - static OTypeCollection collection( - getCppuType( (Reference< XTypeProvider> * )0), - getCppuType( (Reference< XBridge > * ) 0 ), - getCppuType( (Reference< XInitialization > * ) 0 ), - OComponentHelper::getTypes() ); - pCollection = &collection; - } - } - - return (*pCollection).getTypes(); - } - - Sequence< sal_Int8 > SAL_CALL ORemoteBridge::getImplementationId( ) throw( RuntimeException) - { - static OImplementationId *pId = 0; - if( ! pId ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pId ) - { - static OImplementationId id( sal_False ); - pId = &id; - } - } - return (*pId).getImplementationId(); - } - - void ORemoteBridge::disposing() - { - MutexGuard guard( m_mutex ); - if( m_pContext ) - { - m_pContext->removeDisposingListener( m_pContext , ( remote_DisposingListener * )this); - if( ! m_pEnvRemote ) - { - if( m_pContext->m_pConnection ) - { - sal_Int32 nIndex = 0; - OUString sProtocol = OUString( m_pContext->m_pProtocol ).getToken( 0 , ',' , nIndex ); - uno_getEnvironment( &m_pEnvRemote , sProtocol.pData , m_pContext ); - OSL_ASSERT( m_pEnvRemote ); - } - else - { - // within disposing from the context, no further dispose necessary ! - } - } - - if( m_pEnvRemote ) - { - m_pEnvRemote->dispose( m_pEnvRemote ); - m_pEnvRemote->release( m_pEnvRemote ); - m_pEnvRemote = 0; - } - - m_pContext->aBase.release( (uno_Context*)m_pContext ); - m_pContext = 0; - } - } - - - //---------------------- - // static methods - //---------------------- - void ORemoteBridge::thisAcquire( remote_DisposingListener *p ) - { - ORemoteBridge *m = (ORemoteBridge * ) p; - m->acquire(); - } - - void ORemoteBridge::thisRelease( remote_DisposingListener *p ) - { - ORemoteBridge *m = (ORemoteBridge * ) p; - m->release(); - } - - void ORemoteBridge::thisDisposing( remote_DisposingListener * p, - rtl_uString * ) - { - ORemoteBridge *m = (ORemoteBridge * ) p; - m->dispose(); - } - - //--------------------------------- - // - //--------------------------------- - Reference< XInterface > SAL_CALL CreateInstance( const Reference< XComponentContext > &) - { - return Reference< XInterface > ( ( OWeakObject * ) new ORemoteBridge ); - } - - OUString getImplementationName() - { - static OUString *pImplName = 0; - if( ! pImplName ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pImplName ) - { - static OUString implName( - RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); - pImplName = &implName; - } - } - return *pImplName; - } - - Sequence< OUString > getSupportedServiceNames() - { - static Sequence < OUString > *pNames = 0; - if( ! pNames ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( !pNames ) - { - static Sequence< OUString > seqNames(3); - seqNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.bridge.Bridge" ); - seqNames.getArray()[1] = OUString::createFromAscii( "com.sun.star.bridge.IiopBridge" ); - seqNames.getArray()[2] = OUString::createFromAscii( "com.sun.star.bridge.UrpBridge" ); - - pNames = &seqNames; - } - } - return *pNames; - } -} - -using namespace remotebridges_bridge; - -static struct ImplementationEntry g_entries[] = -{ - { - remotebridges_bridge::CreateInstance, remotebridges_bridge::getImplementationName, - remotebridges_bridge::getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 - }, - { 0, 0, 0, 0, 0, 0 } -}; - -extern "C" -{ -sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) -{ - return g_moduleCount.canUnload( &g_moduleCount , pTime ); -} - -//================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( - const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) -{ - return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); -} -} - - - - - diff --git a/remotebridges/source/bridge/remote_bridge.hxx b/remotebridges/source/bridge/remote_bridge.hxx deleted file mode 100644 index 20b5e1a31034..000000000000 --- a/remotebridges/source/bridge/remote_bridge.hxx +++ /dev/null @@ -1,147 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - - -namespace remotebridges_bridge -{ - extern rtl_StandardModuleCount g_moduleCount; - - struct MyMutex - { - ::osl::Mutex m_mutex; - }; - - class ORemoteBridge : - public MyMutex, - public remote_DisposingListener, - public ::com::sun::star::lang::XInitialization, - public ::com::sun::star::bridge::XBridge, - public ::cppu::OComponentHelper - { - public: - ORemoteBridge(); - ~ORemoteBridge(); - - // XInterface - public: - ::com::sun::star::uno::Any SAL_CALL - queryInterface( const ::com::sun::star::uno::Type & aType ) throw(::com::sun::star::uno::RuntimeException); - - void SAL_CALL acquire() throw() - { OComponentHelper::acquire(); } - void SAL_CALL release() throw() - { OComponentHelper::release(); } - - public: - virtual void SAL_CALL disposing(); // called by OComponentHelper - - public: - // Methods - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Any >& aArguments ) - throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - - public: - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - getInstance( const ::rtl::OUString& sInstanceName ) - throw(::com::sun::star::uno::RuntimeException); - - virtual ::rtl::OUString SAL_CALL getName( ) - throw(::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getDescription( ) - throw(::com::sun::star::uno::RuntimeException); - - public: - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL - getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL - getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - public: - static void SAL_CALL thisAcquire( remote_DisposingListener * ); - static void SAL_CALL thisRelease( remote_DisposingListener * ); - static void SAL_CALL thisDisposing( remote_DisposingListener * , - rtl_uString * pBridgeName ); - - public: - void objectMappedSuccesfully(); - - public: - remote_Context *m_pContext; - uno_Environment *m_pEnvRemote; - ::rtl::OUString m_sName; - ::rtl::OUString m_sDescription; - ::rtl::OUString m_sProtocol; - }; - - class OInstanceProviderWrapper : - public remote_InstanceProvider - { - public: - OInstanceProviderWrapper( const ::com::sun::star::uno::Reference < - ::com::sun::star::bridge::XInstanceProvider > & rProvider , - ORemoteBridge * pBridgeCallback ); - - ~OInstanceProviderWrapper(); - public: - static void SAL_CALL thisAcquire( remote_InstanceProvider * ); - static void SAL_CALL thisRelease( remote_InstanceProvider * ); - static void SAL_CALL thisGetInstance( remote_InstanceProvider * pProvider , - uno_Environment *pEnvRemote, - remote_Interface **ppRemoteI, - rtl_uString *pInstanceName, - typelib_InterfaceTypeDescription *pType, - uno_Any **ppException ); - - private: - ::com::sun::star::uno::Reference < - ::com::sun::star::bridge::XInstanceProvider > m_rProvider; - oslInterlockedCount m_nRef; - ORemoteBridge *m_pBridgeCallback; - }; - -} - diff --git a/remotebridges/source/bridge/remotebridge.component b/remotebridges/source/bridge/remotebridge.component deleted file mode 100644 index bbc6bede1360..000000000000 --- a/remotebridges/source/bridge/remotebridge.component +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - diff --git a/remotebridges/source/bridge/remotebridge.xml b/remotebridges/source/bridge/remotebridge.xml deleted file mode 100644 index be5e60b59eef..000000000000 --- a/remotebridges/source/bridge/remotebridge.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - remotebridge.uno - - Joerg Budischewski - com.sun.star.comp.remotebridges.Bridge.various - - This component initializes the bridge between two processes - using either iiop or urp (UnoRemoteProtocol) protocol. - - com.sun.star.loader.SharedLibrary - c++ - - com.sun.star.bridge.Bridge - com.sun.star.bridge.IiopBridge - com.sun.star.bridge.UrpBridge - ... - com.sun.star.bridge.XBridgeFactory - com.sun.star.bridge.XInstanceProvider - com.sun.star.bridge.XBridge - com.sun.star.bridge.BridgeExistsException - com.sun.star.lang.DisposedException - com.sun.star.lang.XMultiServiceFactory - com.sun.star.lang.XSingleServiceFactory - com.sun.star.lang.XInitialization - com.sun.star.lang.XComponent - com.sun.star.lang.XServiceInfo - com.sun.star.lang.XTypeProvider - com.sun.star.lang.IllegalArgumentException - com.sun.star.lang.XInitialization - com.sun.star.registry.XRegistryKey - com.sun.star.lang.XSingleComponentFactory - com.sun.star.uno.XComponentContext - com.sun.star.uno.XWeak - com.sun.star.uno.TypeClass - com.sun.star.uno.XAggregation - - cppuhelper - cppu - sal - rmcxt - cppuhelper3 - cppu3 - sal3 - rmcxt3 - diff --git a/remotebridges/source/dynamicloader/dynamicloader.cxx b/remotebridges/source/dynamicloader/dynamicloader.cxx deleted file mode 100644 index d6c46531346e..000000000000 --- a/remotebridges/source/dynamicloader/dynamicloader.cxx +++ /dev/null @@ -1,403 +0,0 @@ - -#include - -#include - -#include -#include - - -#include - -#include -#include -#include -#include - - -using namespace ::com::sun::star::bridge; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::loader; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::registry; - - -using namespace ::cppu; -using namespace ::rtl; - -namespace dynamic_loader { - - class SingleServiceFactory : public WeakImplHelper2 { - Reference _xServiceManager; - OUString _serviceName; - OUString _link; - OUString _resolver; - - Reference getRemoteFactory() throw(Exception, RuntimeException); - - public: - - SingleServiceFactory(const Reference & xServiceManager, - const OUString & serviceName, - const OUString & link, - const OUString & resolver) - : _xServiceManager(xServiceManager), - _serviceName(serviceName), - _link(link), - _resolver(resolver) - {} - - // XSingleServiceFactory - Reference SAL_CALL createInstance() throw(Exception, RuntimeException); - Reference SAL_CALL createInstanceWithArguments(const Sequence& Arguments) - throw(::com::sun::star::uno::Exception, - ::com::sun::star::uno::RuntimeException); - - // XServiceInfo - OUString SAL_CALL getImplementationName() throw(RuntimeException); - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(RuntimeException); - Sequence SAL_CALL getSupportedServiceNames(void) throw(RuntimeException); - }; - - - Reference SingleServiceFactory::getRemoteFactory() throw(Exception, RuntimeException) { - Reference xResolver(_xServiceManager->createInstance(_resolver), UNO_QUERY); - if(!xResolver.is()) { - OUString message(RTL_CONSTASCII_USTRINGPARAM("dynamic_loader::singleServiceFactory.createInstance - couldn't create resolver: ")); - message += _resolver; - - throw Exception(message, Reference()); - } - - Reference remoteObject = xResolver->resolve(_link); - if(!remoteObject.is()) { - OUString message(RTL_CONSTASCII_USTRINGPARAM("dynamic_loader::singleServiceFactory.createInstance - couldn't resolve link: ")); - message += _link; - - throw Exception(message, Reference()); - } - - Reference remoteFactory(remoteObject, UNO_QUERY); - if(!remoteFactory.is()) { - OUString message(RTL_CONSTASCII_USTRINGPARAM("dynamic_loader::singleServiceFactory.createInstance - couldn't get XSingleServiceFactory from: ")); - message += _link; - - throw Exception(message, Reference()); - } - - return remoteFactory; - } - - // XSingleServiceFactory - Reference SAL_CALL SingleServiceFactory::createInstance() throw(Exception, RuntimeException) { - OSL_TRACE("dynamic_loader::singleServiceFactory::createInstance"); - - return getRemoteFactory()->createInstance(); - } - - Reference SAL_CALL SingleServiceFactory::createInstanceWithArguments(const Sequence& Arguments) - throw(Exception, RuntimeException) - { - OSL_TRACE("dynamic_loader::singleServiceFactory::createInstanceWithArguments"); - - return getRemoteFactory()->createInstanceWithArguments(Arguments); - } - - // XServiceInfo - OUString SAL_CALL SingleServiceFactory::getImplementationName() throw(RuntimeException) { - return _link; - } - - sal_Bool SAL_CALL SingleServiceFactory::supportsService(const OUString & ServiceName) throw(RuntimeException) { - return _serviceName.equals(ServiceName); - } - - Sequence SAL_CALL SingleServiceFactory::getSupportedServiceNames(void) throw(RuntimeException) { - return Sequence(&_serviceName, 1); - } - - - - class DynamicLoader : public WeakImplHelper2 { - Reference _xSMgr; - - protected: - DynamicLoader(const Reference & rXSMgr) throw(RuntimeException); - ~DynamicLoader() throw(); - - public: - static const OUString implname; - static const OUString servname; - - static Reference SAL_CALL createInstance(const Reference & rSMgr) throw(Exception); - static Sequence SAL_CALL getSupportedServiceNames_Static() throw(); - - static void parseUrl(const OUString & url, OUString * serviceName, OUString * link, OUString * resolver) throw(RuntimeException); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(RuntimeException); - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(RuntimeException); - virtual Sequence SAL_CALL getSupportedServiceNames() throw(RuntimeException); - - // XImplementationLoader - virtual Reference SAL_CALL activate(const OUString & implementationName, - const OUString & implementationLoaderUrl, - const OUString& locationUrl, - const Reference& xKey) throw(CannotActivateFactoryException, RuntimeException); - virtual sal_Bool SAL_CALL writeRegistryInfo(const Reference& xKey, - const OUString& implementationLoaderUrl, - const OUString& locationUrl) throw(CannotRegisterImplementationException, RuntimeException); - }; - - const OUString DynamicLoader::implname = OUString::createFromAscii("com.sun.star.comp.stoc.DynamicLoader"); - const OUString DynamicLoader::servname = OUString::createFromAscii("com.sun.star.loader.Dynamic"); - - Sequence SAL_CALL DynamicLoader::getSupportedServiceNames_Static() throw() { - return Sequence(&servname, 1); - } - - Reference SAL_CALL DynamicLoader::createInstance(const Reference & rSMgr) throw(Exception) { - Reference xRet; - - try { - XImplementationLoader *pXLoader = (XImplementationLoader *)new DynamicLoader(rSMgr); - - xRet = Reference::query(pXLoader); - } - catch(RuntimeException & runtimeException) { - OString message = OUStringToOString(runtimeException.Message, RTL_TEXTENCODING_ASCII_US); - osl_trace("dynamic loader - could not init cause of %s", message.getStr()); - } - - OSL_TRACE("DynamicLoader - createInstance: %d", xRet.is()); - - - return xRet; - } - - DynamicLoader::DynamicLoader(const Reference & xSMgr) throw(RuntimeException) - : _xSMgr(xSMgr) - { - } - - - DynamicLoader::~DynamicLoader() throw() { - } - - // XServiceInfo - OUString SAL_CALL DynamicLoader::getImplementationName() throw(RuntimeException) { - return implname; - } - - sal_Bool SAL_CALL DynamicLoader::supportsService(const OUString & ServiceName) throw(RuntimeException) { - sal_Bool bSupport = sal_False; - - Sequence aSNL = getSupportedServiceNames(); - const OUString * pArray = aSNL.getArray(); - for(sal_Int32 i = 0; i < aSNL.getLength() && !bSupport; ++ i) - bSupport = pArray[i] == ServiceName; - - return bSupport; - } - - Sequence SAL_CALL DynamicLoader::getSupportedServiceNames() throw(RuntimeException) { - return getSupportedServiceNames_Static(); - } - - - void DynamicLoader::parseUrl(const OUString & locationUrl, OUString * serviceName, OUString * link, OUString * resolver) throw(RuntimeException) { -#if OSL_DEBUG_LEVEL > 1 - OString tmp = OUStringToOString(locationUrl, RTL_TEXTENCODING_ASCII_US); - OSL_TRACE("DynamicLoader - locationUrl %s", tmp.getStr()); -#endif - - // This is the default resolver - *resolver = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")); - - const OUString bSlash(OUString(RTL_CONSTASCII_USTRINGPARAM("\\"))); - const OUString tuedle(OUString(RTL_CONSTASCII_USTRINGPARAM("\""))); - const OUString separator(OUString(RTL_CONSTASCII_USTRINGPARAM(","))); - const OUString emptyString(OUString(RTL_CONSTASCII_USTRINGPARAM(""))); - const OUString equalSign(OUString(RTL_CONSTASCII_USTRINGPARAM("="))); - - sal_Int32 index = 0; - sal_Bool left = sal_True; - sal_Bool quote = sal_False; - sal_Bool inString = sal_False; - - const sal_Unicode * raw_url = locationUrl.getStr(); - OUString token; - OUString attribute; - - while(index <= locationUrl.getLength()) { - if(index >= locationUrl.getLength() || (raw_url[index] == separator.getStr()[0] && !quote && !inString)) { // a separator or end? - OUString value; - - if(left) - attribute = token.trim(); - - else - value = token.trim(); - -#if OSL_DEBUG_LEVEL > 1 - OString attribute_tmp = OUStringToOString(attribute, RTL_TEXTENCODING_ASCII_US); - OSL_TRACE("DynamicLoader - attribute %s", attribute_tmp.getStr()); - OString value_tmp = OUStringToOString(value, RTL_TEXTENCODING_ASCII_US); - OSL_TRACE("DynamicLoader - value %s", value_tmp.getStr()); -#endif - - if(attribute.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("servicename")))) - *serviceName = value; - - else if(attribute.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("link")))) - *link = value; - - else if(attribute.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("resolver")))) - *resolver = value; - - else { - OUString message(RTL_CONSTASCII_USTRINGPARAM("help called")); - - if(!attribute.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("help")))) { - message = OUString(RTL_CONSTASCII_USTRINGPARAM("DynamicLoader - unknown attribute: ")); - message += attribute; - } - - fprintf(stdout, "DynamicLoader - help\n"); - fprintf(stdout, "attributes:\n"); - fprintf(stdout, "\tservicename: service name of dynamic component\n"); - fprintf(stdout, "\tlink: link to a single service factory for dynamic component\n"); - fprintf(stdout, "\tresolver: the service which resolves the link\n"); - fprintf(stdout, "\thelp: this help\n"); - - throw RuntimeException(message, Reference()); - } - - left = sal_True; // reset state to be left - token = emptyString; - } - else if(raw_url[index] == bSlash.getStr()[0] && !quote) // a back slash? - quote = sal_True; - - else if(raw_url[index] == equalSign.getStr()[0] && !quote && !inString) { // equalSign (switch from left to right)? - left = sal_False; - - attribute = token.trim(); - token = emptyString; - } - else if(raw_url[index] == tuedle.getStr()[0] && !quote) // begin or end of string? - inString = !inString; - - else { // no special handling - token += OUString(raw_url + index, 1); - quote = sal_False; - } - - ++ index; - } - - // enshure, that attributes are set properly - if(!(*serviceName).getLength()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM("dynamic_loader::DynamicLoader.parseUrl - missing or empty attribute: servicename")), - Reference()); - - if(!(*link).getLength()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM("dynamic_loader::DynamicLoader.parseUrl - missing or empty attribute: link")), - Reference()); - - if(!(*resolver).getLength()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM("dynamic_loader::DynamicLoader.parseUrl - missing or empty attribute: resolver")), - Reference()); - } - - - // XImplementationLoader - sal_Bool SAL_CALL DynamicLoader::writeRegistryInfo(const Reference & xKey, - const OUString & implementationLoaderUrl, - const OUString & locationUrl) - throw(CannotRegisterImplementationException, RuntimeException) - { - OSL_TRACE("DynamicLoader::writeRegistryInfo"); - - OUString serviceName; - OUString link; - OUString resolver; - - try { - parseUrl(locationUrl, &serviceName, &link, &resolver); - } - catch(RuntimeException & runtimeException) { - throw CannotRegisterImplementationException(runtimeException.Message, Reference()); - } - - // create the keys - OUString keyName = OUString::createFromAscii("/"); - keyName += implementationLoaderUrl; - keyName += OUString(RTL_CONSTASCII_USTRINGPARAM("_")); - keyName += serviceName; - keyName += OUString::createFromAscii("/UNO/SERVICES"); - - Reference xNewKey(xKey->createKey(keyName)); - xNewKey->createKey(serviceName); - - sal_Bool bSuccess = sal_True; - - return bSuccess; - } - - Reference SAL_CALL DynamicLoader::activate(const OUString &, - const OUString &, - const OUString & locationUrl, - const Reference &) - throw(CannotActivateFactoryException, RuntimeException) - { - OSL_TRACE("DynamicLoader::activate"); - - OUString serviceName; - OUString link; - OUString resolver; - - parseUrl(locationUrl, &serviceName, &link, &resolver); - - XSingleServiceFactory * xFactory = (XSingleServiceFactory *)new SingleServiceFactory(_xSMgr, - serviceName, - link, - resolver); - - Reference xReturn; - - if(xFactory) - xReturn = Reference::query(xFactory); - - return xReturn; - } -} - - - - -extern "C" { - void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment **) { - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - } - - void * SAL_CALL component_getFactory(const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, XRegistryKey *) { - void * pRet = 0; - - if (pServiceManager && OUString::createFromAscii(pImplName).equals(::dynamic_loader::DynamicLoader::implname)) { - Reference xFactory(createOneInstanceFactory(pServiceManager, - ::dynamic_loader::DynamicLoader::implname, - ::dynamic_loader::DynamicLoader::createInstance, - ::dynamic_loader::DynamicLoader::getSupportedServiceNames_Static())); - - if (xFactory.is()) { - xFactory->acquire(); - pRet = xFactory.get(); - } - } - else - OSL_TRACE("DynamicLoader - warning - given wrong implName: %s", pImplName); - - return pRet; - } -} diff --git a/remotebridges/source/dynamicloader/dynamicloader.xml b/remotebridges/source/dynamicloader/dynamicloader.xml deleted file mode 100644 index 9735629b8a09..000000000000 --- a/remotebridges/source/dynamicloader/dynamicloader.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - dynamicloader.uno - - Kay Ramme - com.sun.star.loader.Dynamic - - This service allows the delegation of the resolution - of a SingleServiceFactory for a service to be - delegated to a resolver (e.g. UnoUrlResolver). - - com.sun.star.loader.SharedLibrary - c++ - - com.sun.star.loader.Dynamic - com.sun.star.bridge.UnoUrlResolver - com.sun.star.bridge.XUnoUrlResolver - com.sun.star.lang.XMultiServiceFactory - com.sun.star.lang.XServiceInfo - com.sun.star.lang.XSingleServiceFactory - com.sun.star.lang.XTypeProvider - com.sun.star.lang.XSingleComponentFactory - com.sun.star.uno.XComponentContext - com.sun.star.loader.XImplementationLoader - com.sun.star.registry.XRegistryKey - com.sun.star.uno.XWeak - com.sun.star.uno.XAggregation - - cppuhelper - cppu - sal - cppuhelper3 - cppu3 - sal3 - diff --git a/remotebridges/source/dynamicloader/makefile.mk b/remotebridges/source/dynamicloader/makefile.mk deleted file mode 100755 index 9135d2fb26f3..000000000000 --- a/remotebridges/source/dynamicloader/makefile.mk +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=remotebridges -TARGET = dynamicloader.uno -ENABLE_EXCEPTIONS=TRUE -COMP1TYPELIST = dynamicloader - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.IF "$(L10N_framework)"=="" -DLLPRE = - -# ------------------------------------------------------------------ - -# use for types from COMP1TYPELIST -NO_OFFUH=TRUE -CPPUMAKERFLAGS += -C - -SLOFILES= \ - $(SLO)$/dynamicloader.obj - -SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = $(SOLARENV)$/src$/component.map - -SHL1STDLIBS=\ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1IMPLIB= i$(TARGET) -SHL1LIBS=$(SLB)$/$(TARGET).lib - -SHL1DEF=$(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) - -.ENDIF # L10N_framework - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/remotebridges/source/factory/brdgfctr.xml b/remotebridges/source/factory/brdgfctr.xml deleted file mode 100644 index 9e2abf8eef1e..000000000000 --- a/remotebridges/source/factory/brdgfctr.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - bridgefac.uno - - Joerg Budischewski - com.sun.star.comp.remotebridges.BridgeFactory - - This component allows - to establish a connection to another process. - - com.sun.star.loader.SharedLibrary - c++ - - com.sun.star.bridge.BridgeFactory - ... - com.sun.star.bridge.XBridgeFactory - com.sun.star.bridge.XInstanceProvider - com.sun.star.bridge.XBridge - com.sun.star.bridge.BridgeExistsException - com.sun.star.container.XContentEnumerationAccess - com.sun.star.lang.DisposedException - com.sun.star.lang.XMultiServiceFactory - com.sun.star.lang.XSingleServiceFactory - com.sun.star.lang.XInitialization - com.sun.star.lang.XComponent - com.sun.star.lang.XServiceInfo - com.sun.star.lang.XTypeProvider - com.sun.star.lang.IllegalArgumentException - com.sun.star.lang.XInitialization - com.sun.star.registry.XRegistryKey - com.sun.star.lang.XSingleComponentFactory - com.sun.star.uno.XComponentContext - com.sun.star.uno.XWeak - com.sun.star.uno.TypeClass - com.sun.star.uno.XAggregation - - cppuhelper - cppu - sal - cppuhelper3 - cppu3 - sal3 - diff --git a/remotebridges/source/factory/bridgefac.component b/remotebridges/source/factory/bridgefac.component deleted file mode 100644 index e20bc34250ca..000000000000 --- a/remotebridges/source/factory/bridgefac.component +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - diff --git a/remotebridges/source/factory/bridgefactory.cxx b/remotebridges/source/factory/bridgefactory.cxx deleted file mode 100644 index c5bfd9a46d79..000000000000 --- a/remotebridges/source/factory/bridgefactory.cxx +++ /dev/null @@ -1,493 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include "cppuhelper/unourl.hxx" -#include "rtl/malformeduriexception.hxx" - -#include -#include - -#include - -#include - -#include - - -#include "bridgeimpl.hxx" - -using namespace ::rtl; -using namespace ::osl; -using namespace ::cppu; -using namespace ::std; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::bridge; -using namespace ::com::sun::star::connection; -using namespace ::com::sun::star::registry; -using namespace ::com::sun::star::container; - -#define SERVICE_NAME "com.sun.star.bridge.BridgeFactory" -#define IMPLEMENTATION_NAME "com.sun.star.comp.remotebridges.BridgeFactory" - -namespace remotebridges_factory -{ - rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - - struct hashOUString - { - size_t operator()(const OUString & s) const - { return s.hashCode(); } - }; - - struct equalOUString - { - sal_Bool operator()(const OUString & s1 , const OUString &s2 ) const - { - return s1 == s2; - } - }; - - typedef ::std::hash_map - < - OUString, - WeakReference< XBridge >, - hashOUString, - equalOUString - > BridgeHashMap; - - - typedef ::std::hash_map - < - OUString, - OUString, - hashOUString, - equalOUString - > ServiceHashMap; - - class OBridgeFactory : - public MyMutex, - public OComponentHelper, - public XBridgeFactory, - public XServiceInfo - { - public: - OBridgeFactory( const Reference < XComponentContext > &rCtx ); - ~OBridgeFactory(); - - public: // XInterface - ::com::sun::star::uno::Any SAL_CALL - queryInterface( const ::com::sun::star::uno::Type & aType ) throw(RuntimeException); - - void SAL_CALL acquire() throw() - { OComponentHelper::acquire(); } - void SAL_CALL release() throw() - { OComponentHelper::release(); } - - public: - virtual ::com::sun::star::uno::Reference< ::com::sun::star::bridge::XBridge > SAL_CALL - createBridge( - const ::rtl::OUString& sName, - const ::rtl::OUString& sProtocol, - const ::com::sun::star::uno::Reference< ::com::sun::star::connection::XConnection >& aConnection, - const ::com::sun::star::uno::Reference< ::com::sun::star::bridge::XInstanceProvider >& anInstanceProvider ) - throw(::com::sun::star::bridge::BridgeExistsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::bridge::XBridge > SAL_CALL - getBridge( const ::rtl::OUString& sName ) - throw(::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::bridge::XBridge > > SAL_CALL - getExistingBridges( ) throw(::com::sun::star::uno::RuntimeException); - - public: //XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL - getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL - getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - public: //XServiceInfo - virtual OUString SAL_CALL getImplementationName( ) throw(RuntimeException); - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(RuntimeException); - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(RuntimeException); - - public: - static OUString getImplementationNameStatic( ) SAL_THROW( () ); - static Sequence< OUString > getSupportedServiceNamesStatic() SAL_THROW( () ); - - private: - void init(); - OUString getServiceNameForProtocol( const OUString &sProtocol ); - - private: - Reference < XMultiComponentFactory > m_rSMgr; - Reference < XComponentContext > m_rCtx; - BridgeHashMap m_mapBridge; - ServiceHashMap m_mapProtocolToService; - sal_Bool m_bInitialized; - ::osl::Mutex m_mutexInit; - }; - - OBridgeFactory::OBridgeFactory( const Reference < XComponentContext > &rCtx ) - : OComponentHelper( m_mutex ) - , m_rSMgr( rCtx->getServiceManager() ) - , m_rCtx( rCtx ) - , m_bInitialized( sal_False ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } - - OBridgeFactory::~OBridgeFactory() - { - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); - } - - void OBridgeFactory::init() - { - MutexGuard guard( m_mutexInit ); - if( ! m_bInitialized ) - { - Reference< XContentEnumerationAccess > rContent( m_rSMgr , UNO_QUERY ); - if( rContent.is() ) - { - OUString sMetaService = OUString( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.bridge.Bridge" ) ); - Reference < XEnumeration > rEnum = - rContent->createContentEnumeration( sMetaService ); - if ( rEnum.is() ) - while( rEnum->hasMoreElements() ) - { - Any a = rEnum->nextElement(); - Reference rInfo; - if( a >>= rInfo ) - { - Sequence< OUString > seq = rInfo->getSupportedServiceNames(); - sal_Int32 i; - for( i = 0 ; i < seq.getLength() ; i ++ ) - { - if( seq.getConstArray()[i] != sMetaService ) - { - sal_Int32 nIndex = seq.getConstArray()[i].lastIndexOf( '.' ); - OUString sSuffix = seq.getConstArray()[i].copy(nIndex+1); - if( sSuffix.getLength() > 6 && - 0 == sSuffix.copy( sSuffix.getLength() - 6 ).compareToAscii( "Bridge" ) ) - { - OUString sProtocol = sSuffix.copy(0 , sSuffix.getLength()-6 ).toAsciiLowerCase(); - m_mapProtocolToService[ sProtocol ] = seq.getConstArray()[i]; - } - } - } - } - } - } - m_bInitialized = sal_True; - } - } - - OUString OBridgeFactory::getServiceNameForProtocol( const OUString & sProtocol ) - { - init(); - OUString sService; - OUString sProtocolName; - try - { - sProtocolName = cppu::UnoUrlDescriptor(sProtocol).getName(); - } - catch (rtl::MalformedUriException &) - { - OSL_ENSURE(false, "MalformedUriException"); - } - ServiceHashMap::iterator ii = m_mapProtocolToService.find( sProtocolName ); - if( ii != m_mapProtocolToService.end() ) - { - sService = (*ii).second; - } - else - { - // fallback to the old solution, deprecated, should be removed ! - sService = OUString::createFromAscii( "com.sun.star.bridge.Bridge." ); - sService += sProtocolName; - } - return sService; - } - - Any OBridgeFactory::queryInterface( const Type &aType ) throw(RuntimeException) - { - Any a = ::cppu::queryInterface( - aType , - ( XBridgeFactory * ) this ); - if( a.hasValue() ) - { - return a; - } - - return OComponentHelper::queryInterface( aType ); - - } - - Reference< XBridge > OBridgeFactory::createBridge( - const OUString& sName, - const OUString& sProtocol, - const Reference< XConnection >& aConnection, - const Reference< XInstanceProvider >& anInstanceProvider ) - throw(::com::sun::star::bridge::BridgeExistsException, - ::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException) - { - OUString sService = getServiceNameForProtocol( sProtocol ); - - Reference < XInterface > rXInterface = - m_rSMgr->createInstanceWithContext(sService, m_rCtx ); - Reference < XInitialization > rInit(rXInterface, UNO_QUERY ); - Reference < XBridge > rBridge( rInit , UNO_QUERY ); - - if( rInit.is() && rBridge.is() ) - { - Sequence < Any > seqAny( 4 ); - seqAny.getArray()[0] <<= sName; - seqAny.getArray()[1] <<= sProtocol; - seqAny.getArray()[2] <<= aConnection; - seqAny.getArray()[3] <<= anInstanceProvider; - - // let the Exceptions fly .... - rInit->initialize( seqAny ); - } - else - { - throw IllegalArgumentException(); - } - - if( sName.getLength() ) - { - MutexGuard guard( m_mutex ); - // put the bridge into the hashmap - m_mapBridge[ sName ] = rBridge; - } - return rBridge; - } - - Reference< XBridge > OBridgeFactory::getBridge( const ::rtl::OUString& sName ) - throw(::com::sun::star::uno::RuntimeException ) - - { - MutexGuard guard( m_mutex ); - BridgeHashMap::iterator ii = m_mapBridge.find( sName ); - - Reference < XBridge > rBridge; - - if( ii != m_mapBridge.end() ) - { - rBridge = (*ii).second; - if( ! rBridge.is() ) - { - m_mapBridge.erase( ii ); - } - } - - if( ! rBridge.is() ) - { - // try to get it via the C-Context - remote_Context * pRemoteC = remote_getContext( sName.pData ); - - if( pRemoteC ) - { - rBridge = Reference < XBridge > ((XBridge *) new OBridge( pRemoteC ) ); - pRemoteC->aBase.release( (uno_Context * )pRemoteC ); - m_mapBridge[ sName ] = rBridge; - } - } - return rBridge; - } - - Sequence< Reference< XBridge > > OBridgeFactory::getExistingBridges( ) - throw(::com::sun::star::uno::RuntimeException) - { - MutexGuard guard( m_mutex ); - - sal_Int32 nCount; - - rtl_uString **ppName = remote_getContextList( - &nCount, - rtl_allocateMemory ); - - Sequence < Reference < XBridge > > seq( nCount ); - if( nCount ) - { - - for( sal_Int32 i = 0; - i < nCount ; - i ++ ) - { - seq.getArray()[i] = getBridge( OUString( ppName[i]) ); - rtl_uString_release( ppName[i] ); - } - rtl_freeMemory( ppName ); - } - - return seq; - } - - // XTypeProvider - Sequence< Type > SAL_CALL OBridgeFactory::getTypes(void) throw( RuntimeException ) - { - static OTypeCollection *pCollection = 0; - if( ! pCollection ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pCollection ) - { - static OTypeCollection collection( - getCppuType( (Reference< XBridgeFactory > * ) 0 ), - OComponentHelper::getTypes() ); - pCollection = &collection; - } - } - return (*pCollection).getTypes(); - } - - Sequence< sal_Int8 > SAL_CALL OBridgeFactory::getImplementationId( ) throw( RuntimeException) - { - static OImplementationId *pId = 0; - if( ! pId ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pId ) - { - static OImplementationId id( sal_False ); - pId = &id; - } - } - return (*pId).getImplementationId(); - } - - OUString OBridgeFactory::getImplementationNameStatic() - { - static OUString *pName = 0; - if( ! pName ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pName ) - { - static OUString name( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); - pName = &name; - } - } - return *pName; - } - - Sequence< OUString > OBridgeFactory::getSupportedServiceNamesStatic() - { - static Sequence < OUString > *pNames = 0; - if( ! pNames ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( !pNames ) - { - static Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = OUString::createFromAscii( SERVICE_NAME ); - pNames = &seqNames; - } - } - return *pNames; - } - - OUString OBridgeFactory::getImplementationName( ) throw(RuntimeException) - { - return getImplementationNameStatic(); - } - - sal_Bool SAL_CALL OBridgeFactory::supportsService( const OUString& ServiceName ) throw(RuntimeException) - { - Sequence< OUString > seq = getSupportedServiceNamesStatic(); - sal_Bool bReturn = sal_False; - for( sal_Int32 i = 0 ; i < seq.getLength() ; i ++ ) - { - if( seq.getConstArray()[i] == ServiceName ) - { - bReturn = sal_True; - break; - } - } - return bReturn; - } - - Sequence< OUString > SAL_CALL OBridgeFactory::getSupportedServiceNames( ) throw(RuntimeException) - { - return getSupportedServiceNamesStatic(); - } - - - Reference< XInterface > SAL_CALL CreateInstance(Reference< XComponentContext > const & xContext) - { - return Reference < XInterface > ( *new OBridgeFactory( xContext ) ); - } -} - -using namespace remotebridges_factory; -static ImplementationEntry g_entries[] = -{ - { CreateInstance, OBridgeFactory::getImplementationNameStatic, - OBridgeFactory::getSupportedServiceNamesStatic, createSingleComponentFactory , - &g_moduleCount.modCnt , 0 - }, - { 0, 0, 0, 0, 0, 0 } -}; - -extern "C" -{ -sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) -{ - return g_moduleCount.canUnload( &g_moduleCount , pTime ); -} - -//================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( - const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) -{ - return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); -} -} - - - - diff --git a/remotebridges/source/factory/bridgeimpl.cxx b/remotebridges/source/factory/bridgeimpl.cxx deleted file mode 100644 index 403b18b3fbc0..000000000000 --- a/remotebridges/source/factory/bridgeimpl.cxx +++ /dev/null @@ -1,270 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "bridgeimpl.hxx" - -using namespace ::rtl; -using namespace ::osl; -using namespace ::cppu; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::bridge; - -namespace remotebridges_factory { - - - OBridge::OBridge( remote_Context *pContext ) : - OComponentHelper( m_mutex ), - m_pContext( pContext ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - - remote_DisposingListener::acquire = thisAcquire; - remote_DisposingListener::release = thisRelease; - remote_DisposingListener::disposing = thisDisposing; - - m_pContext->aBase.acquire( (uno_Context*)m_pContext ); - m_pContext->addDisposingListener( m_pContext, ( remote_DisposingListener * ) this ); - } - - OBridge::~OBridge() - { - if( m_pContext ) - { - m_pContext->aBase.release( (uno_Context * ) m_pContext ); - } - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); - } - - ::com::sun::star::uno::Any OBridge::queryInterface( const ::com::sun::star::uno::Type & aType ) throw(RuntimeException) - { - Any a = ::cppu::queryInterface( - aType , - SAL_STATIC_CAST( XBridge * , this ), - SAL_STATIC_CAST( XTypeProvider * , this ) ); - if( a.hasValue() ) - { - return a; - } - - return OComponentHelper::queryInterface( aType ); - } - - void OBridge::disposing() - { - if( m_pContext ) - { - m_pContext->removeDisposingListener( m_pContext , ( remote_DisposingListener * )this); - - uno_Environment *pEnvRemote = 0; - if( m_pContext->m_pConnection ) - { - sal_Int32 nIndex = 0; - OUString sProtocol = OUString( m_pContext->m_pProtocol ).getToken( 0 , ',' , nIndex ); - uno_getEnvironment( &pEnvRemote , sProtocol.pData , m_pContext ); - OSL_ASSERT( pEnvRemote ); - } - else - { - // within disposing from the context, no further dispose necessary ! - } - - if( pEnvRemote ) - { - pEnvRemote->dispose( pEnvRemote ); - pEnvRemote->release( pEnvRemote ); - pEnvRemote = 0; - } - - m_pContext->aBase.release( (uno_Context*)m_pContext ); - m_pContext = 0; - } - } - - - Reference< XInterface > OBridge::getInstance( const ::rtl::OUString& sInstanceName ) - throw(::com::sun::star::uno::RuntimeException) - { - Reference < XInterface > rReturn; - - remote_Context *pContext = 0; - { - MutexGuard guard( m_mutex ); - if( m_pContext && m_pContext->getRemoteInstance ) - { - pContext = m_pContext; - pContext->aBase.acquire( (uno_Context*)pContext ); - } - } - if( pContext ) - { - sal_Int32 nIndex = 0; - OUString sProtocol = OUString( m_pContext->m_pProtocol ).getToken( 0 , ',' , nIndex ); - - // get the appropriate remote environment - uno_Environment *pEnvRemote = 0; - uno_getEnvironment( &pEnvRemote , sProtocol.pData , pContext ); - - if( ! pEnvRemote ) - { - pContext->aBase.release( (uno_Context*) pContext ); - throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "RemoteBridge: bridge already disposed" ) ), - Reference< XInterface > () ); - } - - Type type = getCppuType( (Reference < XInterface > * ) 0 ); - - remote_Interface *pRemoteI = 0; - uno_Any exception; - uno_Any *pException = &exception; - - pContext->getRemoteInstance( - pEnvRemote, - &pRemoteI, - sInstanceName.pData, - type.getTypeLibType(), - &pException ); - pContext->aBase.release( (uno_Context*) pContext ); - pContext = 0; - - uno_Environment *pEnvCpp =0; - OUString sCppuName( RTL_CONSTASCII_USTRINGPARAM( CPPU_CURRENT_LANGUAGE_BINDING_NAME ) ); - uno_getEnvironment( &pEnvCpp , - sCppuName.pData , - 0 ); - Mapping map( pEnvRemote , pEnvCpp ); - - pEnvCpp->release( pEnvCpp ); - pEnvRemote->release( pEnvRemote ); - - if( pException ) - { - typelib_CompoundTypeDescription * pCompType = 0 ; - getCppuType( (Exception*)0 ).getDescription( (typelib_TypeDescription **) &pCompType ); - - if( ! ((typelib_TypeDescription *)pCompType)->bComplete ) - { - typelib_typedescription_complete( (typelib_TypeDescription**) &pCompType ); - } - XInterface *pXInterface = (XInterface *) map.mapInterface( - *(remote_Interface**) ( ((char*)pException->pData)+pCompType->pMemberOffsets[1] ), - getCppuType( (Reference< XInterface > *)0 ) ); - RuntimeException myException( - *((rtl_uString **)pException->pData), - Reference< XInterface > ( pXInterface , SAL_NO_ACQUIRE) ); - uno_any_destruct( pException , 0 ); - - throw myException; - } - else if( pRemoteI ) - { - // got an interface ! - XInterface * pCppI = ( XInterface * ) map.mapInterface( pRemoteI, type ); - rReturn = Reference ( pCppI, SAL_NO_ACQUIRE ); - pRemoteI->release( pRemoteI ); - } - } - else - { - throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "RemoteBridge: bridge already disposed." ) ), - Reference< XInterface > () ); - } - - return rReturn; - } - - ::rtl::OUString SAL_CALL OBridge::getName( ) - throw(::com::sun::star::uno::RuntimeException) - - { - return OUString( m_pContext->m_pName ); - } - - ::rtl::OUString OBridge::getDescription( ) - throw(::com::sun::star::uno::RuntimeException) - { - return OUString( m_pContext->m_pDescription ); - } - - // XTypeProvider - Sequence< Type > SAL_CALL OBridge::getTypes(void) throw( RuntimeException ) - { - static OTypeCollection *pCollection = 0; - if( ! pCollection ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pCollection ) - { - static OTypeCollection collection( - getCppuType( (Reference< XTypeProvider> * )0), - getCppuType( (Reference< XBridge > * ) 0 ), - OComponentHelper::getTypes() ); - pCollection = &collection; - } - } - - return (*pCollection).getTypes(); - } - - Sequence< sal_Int8 > SAL_CALL OBridge::getImplementationId( ) throw( RuntimeException) - { - static OImplementationId *pId = 0; - if( ! pId ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pId ) - { - static OImplementationId id( sal_False ); - pId = &id; - } - } - return (*pId).getImplementationId(); - } - - //---------------------- - // static methods - //---------------------- - void OBridge::thisAcquire( remote_DisposingListener *p ) - { - OBridge *m = (OBridge * ) p; - m->acquire(); - } - - void OBridge::thisRelease( remote_DisposingListener *p ) - { - OBridge *m = (OBridge * ) p; - m->release(); - } - - void OBridge::thisDisposing( remote_DisposingListener * p, rtl_uString * ) - { - OBridge *m = (OBridge * ) p; - m->dispose(); - } -} diff --git a/remotebridges/source/factory/bridgeimpl.hxx b/remotebridges/source/factory/bridgeimpl.hxx deleted file mode 100644 index 1e483dd57180..000000000000 --- a/remotebridges/source/factory/bridgeimpl.hxx +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -namespace remotebridges_factory { - extern rtl_StandardModuleCount g_moduleCount; - - struct MyMutex - { - ::osl::Mutex m_mutex; - }; - - class OBridge : - public MyMutex, - public remote_DisposingListener, - public ::com::sun::star::bridge::XBridge, - public ::cppu::OComponentHelper - { - public: - OBridge( remote_Context *pContext ); - ~OBridge(); - - // XInterface - public: - ::com::sun::star::uno::Any SAL_CALL - queryInterface( const ::com::sun::star::uno::Type & aType ) throw(com::sun::star::uno::RuntimeException); - - void SAL_CALL acquire() throw() - { OComponentHelper::acquire(); } - void SAL_CALL release() throw() - { OComponentHelper::release(); } - - public: - virtual void SAL_CALL disposing(); // called by OComponentHelper - - public: - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - getInstance( const ::rtl::OUString& sInstanceName ) - throw(::com::sun::star::uno::RuntimeException); - - virtual ::rtl::OUString SAL_CALL getName( ) - throw(::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getDescription( ) - throw(::com::sun::star::uno::RuntimeException); - - public: - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL - getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL - getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - public: - static void SAL_CALL thisAcquire( remote_DisposingListener * ); - static void SAL_CALL thisRelease( remote_DisposingListener * ); - static void SAL_CALL thisDisposing( remote_DisposingListener * , - rtl_uString * pBridgeName ); - - public: - remote_Context *m_pContext; - ::rtl::OString m_sName; - ::rtl::OString m_sDescription; - }; -} - diff --git a/remotebridges/source/factory/makefile.mk b/remotebridges/source/factory/makefile.mk deleted file mode 100644 index b47207077fff..000000000000 --- a/remotebridges/source/factory/makefile.mk +++ /dev/null @@ -1,73 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -# 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). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=remotebridges -TARGET = bridgefac.uno -ENABLE_EXCEPTIONS=TRUE -COMP1TYPELIST = brdgfctr - -# --- Settings ----------------------------------------------------- -.INCLUDE : settings.mk -.IF "$(L10N_framework)"=="" -DLLPRE = -# ------------------------------------------------------------------ - -SLOFILES= \ - $(SLO)$/bridgefactory.obj\ - $(SLO)$/bridgeimpl.obj - -SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map - -SHL1STDLIBS= \ - $(SALLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(RMCXTLIB) - -#SHL1DEPN= -SHL1IMPLIB= i$(TARGET) -SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1RPATH= URELIB - -DEF1NAME= $(SHL1TARGET) -.ENDIF # L10N_framework - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/bridgefac.component - -$(MISC)/bridgefac.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - bridgefac.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt bridgefac.component diff --git a/ure/prj/build.lst b/ure/prj/build.lst index 1f9b694ed554..7618bf3299b7 100644 --- a/ure/prj/build.lst +++ b/ure/prj/build.lst @@ -1,2 +1,2 @@ -ur ure : LIBXSLT:libxslt cli_ure io javaunohelper remotebridges solenv stoc NULL +ur ure : LIBXSLT:libxslt binaryurp cli_ure io javaunohelper remotebridges solenv stoc NULL ur ure\source nmake - all ur_source NULL diff --git a/ure/source/README b/ure/source/README index 3bbdaa43d6a3..fdf1c7e85d9b 100644 --- a/ure/source/README +++ b/ure/source/README @@ -63,7 +63,6 @@ Linux x86, Solaris x86, and Solaris SPARC: /opt/openoffice.org/ure/bin/regcomp.bin [private] /opt/openoffice.org/ure/lib/unorc [private] /opt/openoffice.org/ure/lib/libreg.so.3 [private] -/opt/openoffice.org/ure/lib/librmcxt.so.3 [private] /opt/openoffice.org/ure/lib/libstore.so.3 [private] /opt/openoffice.org/ure/lib/libxmlreader.so [private] /opt/openoffice.org/ure/lib/libjvmaccessgcc3.so.3 [private; Linux x86 only] @@ -75,7 +74,6 @@ Linux x86, Solaris x86, and Solaris SPARC: /opt/openoffice.org/ure/lib/libgcc3_uno.so [private; Linux x86 only] /opt/openoffice.org/ure/lib/libsunpro5_uno.so [private; Solaris only] /opt/openoffice.org/ure/lib/libjava_uno.so [private] -/opt/openoffice.org/ure/lib/liburp_uno.so [private] /opt/openoffice.org/ure/lib/libunsafe_uno_uno.so [private] /opt/openoffice.org/ure/lib/libaffine_uno_uno.so [private] /opt/openoffice.org/ure/lib/liblog_uno_uno.so [private] @@ -83,8 +81,8 @@ Linux x86, Solaris x86, and Solaris SPARC: /opt/openoffice.org/ure/lib/libjuh.so [private] /opt/openoffice.org/ure/lib/libjuhx.so [private] /opt/openoffice.org/ure/lib/acceptor.uno.so [private] +/opt/openoffice.org/ure/lib/binaryurp.uno.so [private] /opt/openoffice.org/ure/lib/bootstrap.uno.so [private] -/opt/openoffice.org/ure/lib/bridgefac.uno.so [private] /opt/openoffice.org/ure/lib/connector.uno.so [private] /opt/openoffice.org/ure/lib/introspection.uno.so [private] /opt/openoffice.org/ure/lib/invocadapt.uno.so [private] @@ -94,7 +92,6 @@ Linux x86, Solaris x86, and Solaris SPARC: /opt/openoffice.org/ure/lib/namingservice.uno.so [private] /opt/openoffice.org/ure/lib/proxyfac.uno.so [private] /opt/openoffice.org/ure/lib/reflection.uno.so [private] -/opt/openoffice.org/ure/lib/remotebridge.uno.so [private] /opt/openoffice.org/ure/lib/streams.uno.so [private] /opt/openoffice.org/ure/lib/textinstream.uno.so [private] /opt/openoffice.org/ure/lib/textoutstream.uno.so [private] @@ -127,7 +124,6 @@ Program Files\URE\misc\services.rdb Program Files\URE\bin\libxml2.dll [external] Program Files\URE\bin\uno.ini [private] Program Files\URE\bin\reg3.dll [private] -Program Files\URE\bin\rmcxt3.dll [private] Program Files\URE\bin\store3.dll [private] Program Files\URE\bin\xmlreader.dll [private] Program Files\URE\bin\jvmaccess3MSC.dll [private] @@ -138,7 +134,6 @@ Program Files\URE\bin\jvmfwk3.ini [private] Program Files\URE\bin\msci_uno.dll [private] Program Files\URE\bin\java_uno.dll [private] Program Files\URE\bin\cli_uno.dll [private] -Program Files\URE\bin\urp_uno.dll [private] Program Files\URE\bin\unsafe_uno_uno.dll [private] Program Files\URE\bin\affine_uno_uno.dll [private] Program Files\URE\bin\log_uno_uno.dll [private] @@ -147,8 +142,8 @@ Program Files\URE\bin\jpipx.dll [private] Program Files\URE\bin\juh.dll [private] Program Files\URE\bin\juhx.dll [private] Program Files\URE\bin\acceptor.uno.dll [private] +Program Files\URE\bin\binaryurp.uno.dll [private] Program Files\URE\bin\bootstrap.uno.dll [private] -Program Files\URE\bin\bridgefac.uno.dll [private] Program Files\URE\bin\connector.uno.dll [private] Program Files\URE\bin\introspection.uno.dll [private] Program Files\URE\bin\invocadapt.uno.dll [private] @@ -158,7 +153,6 @@ Program Files\URE\bin\javavm.uno.dll [private] Program Files\URE\bin\namingservice.uno.dll [private] Program Files\URE\bin\proxyfac.uno.dll [private] Program Files\URE\bin\reflection.uno.dll [private] -Program Files\URE\bin\remotebridge.uno.dll [private] Program Files\URE\bin\streams.uno.dll [private] Program Files\URE\bin\textinstream.uno.dll [private] Program Files\URE\bin\textoutstream.uno.dll [private] diff --git a/ure/source/makefile.mk b/ure/source/makefile.mk index cd6fab21049d..bdd43656b32c 100644 --- a/ure/source/makefile.mk +++ b/ure/source/makefile.mk @@ -35,8 +35,8 @@ ZIP1LIST = uretest my_components = \ acceptor \ + binaryurp \ bootstrap \ - bridgefac \ connector \ introspection \ invocadapt \ @@ -47,7 +47,6 @@ my_components = \ namingservice \ proxyfac \ reflection \ - remotebridge \ stocservices \ streams \ textinstream \ -- cgit From 9770f801119ebf03ba8e01ee19edf6a00182ea28 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 26 Jan 2011 09:26:59 +0100 Subject: sb138: #i116038# fresh implementation of binary URP bridge --- scp2/source/ooo/ure.scp | 42 +++++++----------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp index 804f0edad0b2..2d6b8858eca1 100755 --- a/scp2/source/ooo/ure.scp +++ b/scp2/source/ooo/ure.scp @@ -296,14 +296,6 @@ File gid_File_Dl_Reg // CompID = "D5313B1F-D09F-401F-B180-891F70D489ED"; End -File gid_File_Dl_Rmcxt - TXT_FILE_BODY; - Dir = SCP2_URE_DL_DIR; - Name = SCP2_URE_DL_VER("rmcxt", "3"); - Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); - // CompID = "E0C091E3-7C18-4C32-B9CF-4D95AC243801"; -End - File gid_File_Dl_Store TXT_FILE_BODY; Dir = SCP2_URE_DL_DIR; @@ -390,14 +382,6 @@ Shortcut gid_Shortcut_Dl_JavaUno End #endif -File gid_File_Dl_UrpUno - TXT_FILE_BODY; - Dir = SCP2_URE_DL_DIR; - Name = SCP2_URE_DL_NORMAL("urp_uno"); - Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); - // CompID = "D9F647ED-8E6F-4F80-8D2B-A45372B6AB60"; -End - File gid_File_Dl_UnsafeUnoUno TXT_FILE_BODY; Dir = SCP2_URE_DL_DIR; @@ -678,20 +662,19 @@ File gid_File_Dl_Acceptor // CompID = "31183C51-C9A4-4D7A-A2F4-103252E1FEB0"; End -File gid_File_Dl_Bootstrap +File gid_File_Dl_Binaryurp TXT_FILE_BODY; Dir = SCP2_URE_DL_DIR; - Name = SCP2_URE_DL_BARE("bootstrap.uno"); - Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); - // CompID = "2620B307-25DB-498F-B2B8-46D928165331"; + Name = SCP2_URE_DL_BARE("binaryurp.uno"); + Styles = (PACKED); End -File gid_File_Dl_Bridgefac +File gid_File_Dl_Bootstrap TXT_FILE_BODY; Dir = SCP2_URE_DL_DIR; - Name = SCP2_URE_DL_BARE("bridgefac.uno"); + Name = SCP2_URE_DL_BARE("bootstrap.uno"); Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); - // CompID = "E025163F-FE1E-4E8C-B0E5-49C08924A646"; + // CompID = "2620B307-25DB-498F-B2B8-46D928165331"; End File gid_File_Dl_Connector @@ -779,14 +762,6 @@ File gid_File_Dl_Reflection // CompID = "601C7946-CFEB-4F56-9429-6D5963188DF3"; End -File gid_File_Dl_Remotebridge - TXT_FILE_BODY; - Dir = SCP2_URE_DL_DIR; - Name = SCP2_URE_DL_BARE("remotebridge.uno"); - Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); - // CompID = "B440B28E-B7AD-40C7-89E1-1508CA798347"; -End - File gid_File_Dl_Streams TXT_FILE_BODY; Dir = SCP2_URE_DL_DIR; @@ -1131,7 +1106,6 @@ Module gid_Module_Root_Ure_Hidden gid_File_Dl_Salhelper, gid_File_Dl_Profile_Uno, gid_File_Dl_Reg, - gid_File_Dl_Rmcxt, gid_File_Dl_Store, gid_File_Dl_Xmlreader, gid_File_Dl_Jvmaccess, @@ -1141,7 +1115,6 @@ Module gid_Module_Root_Ure_Hidden gid_File_Dl_Profile_Jvmfwk3rc, gid_File_Dl_ComnameUno, gid_File_Dl_JavaUno, - gid_File_Dl_UrpUno, gid_File_Dl_UnsafeUnoUno, gid_File_Dl_AffineUnoUno, gid_File_Dl_LogUnoUno, @@ -1150,8 +1123,8 @@ Module gid_Module_Root_Ure_Hidden gid_File_Dl_Juh, gid_File_Dl_Juhx, gid_File_Dl_Acceptor, + gid_File_Dl_Binaryurp, gid_File_Dl_Bootstrap, - gid_File_Dl_Bridgefac, gid_File_Dl_Connector, gid_File_Dl_Introspection, gid_File_Dl_Invocadapt, @@ -1161,7 +1134,6 @@ Module gid_Module_Root_Ure_Hidden gid_File_Dl_Namingservice, gid_File_Dl_Proxyfac, gid_File_Dl_Reflection, - gid_File_Dl_Remotebridge, gid_File_Dl_Stocservices, gid_File_Dl_Streams, gid_File_Dl_Textinstream, -- cgit From c1450f1ba30a1fb465b91d934fafda22e6bcd8f3 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 26 Jan 2011 09:26:59 +0100 Subject: sb138: #i116038# fresh implementation of binary URP bridge --- odk/util/check.pl | 12 ++++++------ odk/util/makefile.pmk | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/odk/util/check.pl b/odk/util/check.pl index 0ba7f05a6ed2..6bf3fdd62b2f 100644 --- a/odk/util/check.pl +++ b/odk/util/check.pl @@ -265,17 +265,17 @@ if (-d "$StartDir") { "_typelib_InterfaceMethodTypeDescription","store","RegistryKey", "_typelib_Union_Init","_sal_Sequence","_typelib_Parameter_Init", "_typelib_TypeDescription","_uno_Environment", - "_typelib_InterfaceAttributeTypeDescription","uno_Context", + "_typelib_InterfaceAttributeTypeDescription", "_rtl_ModuleCount","_uno_ExtEnvironment", - "_typelib_IndirectTypeDescription","remote_DisposingListener", - "remote_Interface","Registry_Api","_oslFileStatus", + "_typelib_IndirectTypeDescription", + "Registry_Api","_oslFileStatus", "_typelib_InterfaceMemberTypeDescription","RegistryValueList", "RegistryTypeWriter_Api","_rtl_TextEncodingInfo", - "namespace_anonymous_1","remote_Connection", + "namespace_anonymous_1", "_oslVolumeInfo","_uno_Interface", "_typelib_InterfaceTypeDescription","_uno_Mapping","Registry", - "RegistryTypeReader_Api","remote_Context","_typelib_Uik", - "remote_InstanceProvider","_typelib_ArrayTypeDescription", + "RegistryTypeReader_Api","_typelib_Uik", + "_typelib_ArrayTypeDescription", "RegistryKeyArray","RegistryTypeReader","RegistryKeyNames", "RTConstValueUnion","_typelib_UnionTypeDescription","_uno_Any", "RegistryTypeWriter","_rtl_Locale","_typelib_CompoundMember_Init", diff --git a/odk/util/makefile.pmk b/odk/util/makefile.pmk index aa0f10ed035e..deb4e6d62c5e 100644 --- a/odk/util/makefile.pmk +++ b/odk/util/makefile.pmk @@ -188,7 +188,6 @@ INCLUDETOPDIRLIST= \ $(INCOUT)/uno \ $(INCOUT)/cppu \ $(INCOUT)/cppuhelper \ - $(INCOUT)/bridges \ $(INCOUT)/registry \ $(INCOUT)/stl -- cgit From 4dd0bf051842c0231f9f5747039c6ade04101856 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Wed, 26 Jan 2011 14:16:22 +0100 Subject: chart52: #i28670# import of manual chart legend size from OOXML --- oox/inc/oox/drawingml/chart/converterbase.hxx | 5 ++-- oox/source/drawingml/chart/converterbase.cxx | 43 +++++++++++++++++++++------ oox/source/drawingml/chart/titleconverter.cxx | 20 ++++--------- oox/source/token/properties.txt | 1 + 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index aec646d4c610..12c6c2294b32 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -138,9 +138,10 @@ public: OOXML layout model. Returns true, if returned rectangle is valid. */ bool calcAbsRectangle( ::com::sun::star::awt::Rectangle& orRect ) const; - /** Tries to set the position from the contained OOXML layout model. - Returns true, if a manual position could be calculated. */ + /** Tries to set the position and size from the contained OOXML layout model. + Returns true, if a manual position and size could be calculated. */ bool convertFromModel( PropertySet& rPropSet ); + /** Tries to set the position from the contained OOXML layout model. Returns true, if a manual position could be calculated. */ bool convertFromModel( diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index df4d40e952ac..7e601ff016af 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -78,8 +79,7 @@ struct TitleLayoutInfo { typedef Reference< XShape > (*GetShapeFunc)( const Reference< cssc::XChartDocument >& ); - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > - mxTitle; /// The API title object. + Reference< XTitle > mxTitle; /// The API title object. ModelRef< LayoutModel > mxLayout; /// The layout model, if existing. GetShapeFunc mpGetShape; /// Helper function to receive the title shape. @@ -323,9 +323,9 @@ sal_Int32 lclCalcSize( sal_Int32 nPos, sal_Int32 nChartSize, double fSize, sal_I sal_Int32 nValue = getLimitedValue< sal_Int32, double >( nChartSize * fSize + 0.5, 0, nChartSize ); switch( nSizeMode ) { - case XML_factor: // size as factor of chart size + case XML_factor: // passed value is width/height return nValue; - case XML_edge: // absolute end position as factor of chart size + case XML_edge: // passed value is right/bottom position return nValue - nPos + 1; }; @@ -333,6 +333,23 @@ sal_Int32 lclCalcSize( sal_Int32 nPos, sal_Int32 nChartSize, double fSize, sal_I return -1; } +/** Returns a relative size value in the chart area. */ +double lclCalcRelSize( double fPos, double fSize, sal_Int32 nSizeMode ) +{ + switch( nSizeMode ) + { + case XML_factor: // passed value is width/height + break; + case XML_edge: // passed value is right/bottom position + fSize -= fPos; + break; + default: + OSL_ENSURE( false, "lclCalcRelSize - unknown size mode" ); + fSize = 0.0; + }; + return getLimitedValue< double, double >( fSize, 0.0, 1.0 - fPos ); +} + } // namespace // ---------------------------------------------------------------------------- @@ -369,12 +386,20 @@ bool LayoutConverter::convertFromModel( PropertySet& rPropSet ) (mrModel.mnXMode == XML_edge) && (mrModel.mfX >= 0.0) && (mrModel.mnYMode == XML_edge) && (mrModel.mfY >= 0.0) ) { - RelativePosition aPos; - aPos.Primary = getLimitedValue< double, double >( mrModel.mfX, 0.0, 1.0 ); - aPos.Secondary = getLimitedValue< double, double >( mrModel.mfY, 0.0, 1.0 ); - aPos.Anchor = ::com::sun::star::drawing::Alignment_TOP_LEFT; + RelativePosition aPos( + getLimitedValue< double, double >( mrModel.mfX, 0.0, 1.0 ), + getLimitedValue< double, double >( mrModel.mfY, 0.0, 1.0 ), + Alignment_TOP_LEFT ); rPropSet.setProperty( PROP_RelativePosition, aPos ); - return true; + + RelativeSize aSize( + lclCalcRelSize( aPos.Primary, mrModel.mfW, mrModel.mnWMode ), + lclCalcRelSize( aPos.Secondary, mrModel.mfH, mrModel.mnHMode ) ); + if( (aSize.Primary > 0.0) && (aSize.Secondary > 0.0) ) + { + rPropSet.setProperty( PROP_RelativeSize, aSize ); + return true; + } } return false; } diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index 8e8af46beba1..29054744b9f1 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -237,21 +237,13 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) break; } - // manual positioning - LayoutModel& rLayout = mrModel.mxLayout.getOrCreate(); - LayoutConverter aLayoutConv( *this, rLayout ); - aLayoutConv.convertFromModel( aPropSet ); - Rectangle aLegendRect; - if( aLayoutConv.calcAbsRectangle( aLegendRect ) ) + // manual positioning and size + if( mrModel.mxLayout.get() ) { - // #i71697# it is not possible to set the size directly, do some magic here - double fRatio = static_cast< double >( aLegendRect.Width ) / aLegendRect.Height; - if( fRatio > 1.5 ) - eLegendExpand = cssc::ChartLegendExpansion_WIDE; - else if( fRatio < 0.75 ) - eLegendExpand = cssc::ChartLegendExpansion_HIGH; - else - eLegendExpand = cssc::ChartLegendExpansion_BALANCED; + LayoutConverter aLayoutConv( *this, *mrModel.mxLayout ); + // manual size needs ChartLegendExpansion_CUSTOM + if( aLayoutConv.convertFromModel( aPropSet ) ) + eLegendExpand = cssc::ChartLegendExpansion_CUSTOM; } // set position and expansion properties diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 016ffc28bac5..b0726f86657e 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -348,6 +348,7 @@ RegularExpressions RelId RelativeHorizontalTabbarWidth RelativePosition +RelativeSize Repeat RepeatDelay Representation -- cgit From 838ec321b7b6a862649320a28f682c83bb794dcd Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 26 Jan 2011 14:39:03 +0100 Subject: gridsort: grid control related unit tests (first set, more to come) --- toolkit/qa/complex/toolkit/GridControl.java | 521 +++++++++++++++++++++ toolkit/qa/complex/toolkit/UnitConversion.java | 15 +- .../qa/complex/toolkit/awtgrid/DummyColumn.java | 180 +++++++ .../complex/toolkit/awtgrid/GridDataListener.java | 98 ++++ .../toolkit/awtgrid/TMutableGridDataModel.java | 269 +++++++++++ toolkit/qa/complex/toolkit/makefile.mk | 3 + .../controls/grid/defaultgridcolumnmodel.cxx | 25 +- toolkit/source/controls/grid/gridcolumn.cxx | 2 + toolkit/source/controls/grid/gridcontrol.cxx | 65 +-- 9 files changed, 1142 insertions(+), 36 deletions(-) create mode 100755 toolkit/qa/complex/toolkit/GridControl.java create mode 100755 toolkit/qa/complex/toolkit/awtgrid/DummyColumn.java create mode 100755 toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java create mode 100755 toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java diff --git a/toolkit/qa/complex/toolkit/GridControl.java b/toolkit/qa/complex/toolkit/GridControl.java new file mode 100755 index 000000000000..9cefa51aae30 --- /dev/null +++ b/toolkit/qa/complex/toolkit/GridControl.java @@ -0,0 +1,521 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2011 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + *************************************************************************/ + +package complex.toolkit; + +import com.sun.star.awt.grid.XGridColumn; +import com.sun.star.awt.grid.XGridColumnModel; +import com.sun.star.awt.grid.XGridDataModel; +import com.sun.star.awt.grid.XMutableGridDataModel; +import com.sun.star.awt.grid.XSortableMutableGridDataModel; +import com.sun.star.beans.XPropertySet; +import com.sun.star.container.ContainerEvent; +import com.sun.star.container.XContainerListener; +import com.sun.star.lang.EventObject; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XEventListener; +import com.sun.star.uno.Exception; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XComponentContext; +import com.sun.star.uno.XInterface; +import com.sun.star.util.XCloneable; +import complex.toolkit.awtgrid.DummyColumn; +import complex.toolkit.awtgrid.TMutableGridDataModel; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import static org.junit.Assert.*; +import org.openoffice.test.OfficeConnection; + +/** is a unit test for the grid control related implementations + * @author frank.schoenheit@sun.com + */ +public class GridControl +{ + // ----------------------------------------------------------------------------------------------------------------- + public GridControl() + { + m_context = m_connection.getComponentContext(); + } + + // ----------------------------------------------------------------------------------------------------------------- + private static void impl_dispose( final Object... i_components ) + { + for ( int i=0; iXMutableGridDataModel interface + */ + @Test + public void testMutableGridDataModel() throws Exception + { + impl_recreateGridModel(); + + TMutableGridDataModel test = new TMutableGridDataModel( m_dataModel ); + test.testAddRow(); + test.testAddRows(); + test.testRemoveRow(); + test.testRemoveAllRows(); + test.testUpdateCellData(); + test.testUpdateRowData(); + test.testUpdateRowHeading(); + test.cleanup(); + } + + // ----------------------------------------------------------------------------------------------------------------- + @Test + public void testGridColumnModel() throws Exception + { + impl_recreateGridModel(); + + ColumnModelListener listener = new ColumnModelListener(); + m_columnModel.addContainerListener( listener ); + + // insert default columns into the previously empty model, ensure we get the right notifications + final int defaultColumnsCount = 3; + m_columnModel.setDefaultColumns( defaultColumnsCount ); + impl_assertColumnModelConsistency(); + List< ContainerEvent > events = listener.assertExclusiveInsertionEvents(); + listener.reset(); + assertEquals( "wrong number of events fired by setDefaulColumns", defaultColumnsCount, events.size() ); + for ( int i=0; i removalEvents = listener.getRemovalEvents(); + final List< ContainerEvent > insertionEvents = listener.getInsertionEvents(); + listener.reset(); + + // for the removal events, check the indexes + assertEquals( "wrong number of columns removed (or notified) upon setting default columns", + defaultColumnsCount, removalEvents.size() ); + for ( int i=0; i assertExclusiveInsertionEvents() + { + assertFalse( m_insertionEvents.isEmpty() ); + assertTrue( m_removalEvents.isEmpty() ); + assertTrue( m_replacementEvents.isEmpty() ); + return m_insertionEvents; + } + + private List< ContainerEvent > assertExclusiveRemovalEvents() + { + assertTrue( m_insertionEvents.isEmpty() ); + assertFalse( m_removalEvents.isEmpty() ); + assertTrue( m_replacementEvents.isEmpty() ); + return m_removalEvents; + } + + private void reset() + { + m_insertionEvents = new ArrayList< ContainerEvent >(); + m_removalEvents = new ArrayList< ContainerEvent >(); + m_replacementEvents = new ArrayList< ContainerEvent >(); + } + + private List< ContainerEvent > getInsertionEvents() { return m_insertionEvents; } + private List< ContainerEvent > getRemovalEvents() { return m_removalEvents; } + + final boolean isDisposed() { return m_isDisposed; } + + private List< ContainerEvent > m_insertionEvents = new ArrayList< ContainerEvent >(); + private List< ContainerEvent > m_removalEvents = new ArrayList< ContainerEvent >(); + private List< ContainerEvent > m_replacementEvents = new ArrayList< ContainerEvent >(); + private boolean m_isDisposed = false; + }; + + // ----------------------------------------------------------------------------------------------------------------- + private static final OfficeConnection m_connection = new OfficeConnection(); + private final XComponentContext m_context; + + private XPropertySet m_gridControlModel; + private XGridColumnModel m_columnModel; + private XSortableMutableGridDataModel m_dataModel; +} diff --git a/toolkit/qa/complex/toolkit/UnitConversion.java b/toolkit/qa/complex/toolkit/UnitConversion.java index 6441a7ecb4ff..b4cf8a8e1490 100644 --- a/toolkit/qa/complex/toolkit/UnitConversion.java +++ b/toolkit/qa/complex/toolkit/UnitConversion.java @@ -223,11 +223,12 @@ public class UnitConversion xWindow.dispose(); } - - @BeforeClass - public static void setUpConnection() throws Exception { - System.out.println("setUpConnection()"); + public static void setUpConnection() throws Exception + { + System.out.println( "--------------------------------------------------------------------------------" ); + System.out.println( "starting class: " + UnitConversion.class.getName() ); + System.out.println( "connecting ..." ); connection.setUp(); } @@ -235,10 +236,12 @@ public class UnitConversion public static void tearDownConnection() throws InterruptedException, com.sun.star.uno.Exception { - System.out.println("tearDownConnection()"); + System.out.println(); + System.out.println( "tearing down connection" ); connection.tearDown(); + System.out.println( "finished class: " + UnitConversion.class.getName() ); + System.out.println( "--------------------------------------------------------------------------------" ); } private static final OfficeConnection connection = new OfficeConnection(); - } diff --git a/toolkit/qa/complex/toolkit/awtgrid/DummyColumn.java b/toolkit/qa/complex/toolkit/awtgrid/DummyColumn.java new file mode 100755 index 000000000000..11e4a4b19f80 --- /dev/null +++ b/toolkit/qa/complex/toolkit/awtgrid/DummyColumn.java @@ -0,0 +1,180 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + *************************************************************************/ + +package complex.toolkit.awtgrid; + +import com.sun.star.awt.grid.XGridColumn; +import com.sun.star.awt.grid.XGridColumnListener; +import com.sun.star.lang.IllegalArgumentException; +import com.sun.star.lang.XEventListener; +import com.sun.star.style.HorizontalAlignment; +import com.sun.star.util.XCloneable; + +/** + * a dummy implementation of css.awt.grid.XGridColumn + * @author frank.schoenheit@oracle.com + */ +public class DummyColumn implements XGridColumn +{ + public DummyColumn() + { + } + + public Object getIdentifier() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setIdentifier( Object o ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public int getColumnWidth() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setColumnWidth( int i ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public int getMinWidth() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setMinWidth( int i ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public int getMaxWidth() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setMaxWidth( int i ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public boolean getResizeable() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setResizeable( boolean bln ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public int getFlexibility() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setFlexibility( int i ) throws IllegalArgumentException + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public HorizontalAlignment getHorizontalAlign() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setHorizontalAlign( HorizontalAlignment ha ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public String getTitle() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setTitle( String string ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public String getHelpText() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setHelpText( String string ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public int getIndex() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public int getDataColumnIndex() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void setDataColumnIndex( int i ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void addGridColumnListener( XGridColumnListener xl ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void removeGridColumnListener( XGridColumnListener xl ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void dispose() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void addEventListener( XEventListener xl ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public void removeEventListener( XEventListener xl ) + { + throw new UnsupportedOperationException( "Not supported yet." ); + } + + public XCloneable createClone() + { + throw new UnsupportedOperationException( "Not supported yet." ); + } +} diff --git a/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java b/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java new file mode 100755 index 000000000000..c31f27796cf1 --- /dev/null +++ b/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java @@ -0,0 +1,98 @@ +package complex.toolkit.awtgrid; + +import com.sun.star.awt.grid.GridDataEvent; +import com.sun.star.awt.grid.XGridDataListener; +import com.sun.star.lang.EventObject; +import static org.junit.Assert.*; + +final public class GridDataListener implements XGridDataListener +{ + public GridDataListener() + { + } + + public void rowsInserted( GridDataEvent i_event ) + { + assertNull( m_rowInsertionEvent ); + m_rowInsertionEvent = i_event; + } + + public void rowsRemoved( GridDataEvent i_event ) + { + assertNull( m_rowRemovalEvent ); + m_rowRemovalEvent = i_event; + } + + public void dataChanged( GridDataEvent i_event ) + { + assertNull( m_dataChangeEvent ); + m_dataChangeEvent = i_event; + } + + public void rowHeadingChanged( GridDataEvent i_event ) + { + assertNull( m_rowHeadingChangeEvent ); + m_rowHeadingChangeEvent = i_event; + } + + public void disposing( EventObject eo ) + { + m_disposed = true; + } + + public final GridDataEvent assertSingleRowInsertionEvent() + { + assertNotNull( m_rowInsertionEvent ); + assertNull( m_rowRemovalEvent ); + assertNull( m_dataChangeEvent ); + assertNull( m_rowHeadingChangeEvent ); + assertFalse( m_disposed ); + return m_rowInsertionEvent; + } + + public final GridDataEvent assertSingleRowRemovalEvent() + { + assertNull( m_rowInsertionEvent ); + assertNotNull( m_rowRemovalEvent ); + assertNull( m_dataChangeEvent ); + assertNull( m_rowHeadingChangeEvent ); + assertFalse( m_disposed ); + return m_rowRemovalEvent; + } + + public final GridDataEvent assertSingleDataChangeEvent() + { + assertNull( m_rowInsertionEvent ); + assertNull( m_rowRemovalEvent ); + assertNotNull( m_dataChangeEvent ); + assertNull( m_rowHeadingChangeEvent ); + assertFalse( m_disposed ); + return m_dataChangeEvent; + } + + public final GridDataEvent assertSingleRowHeadingChangeEvent() + { + assertNull( m_rowInsertionEvent ); + assertNull( m_rowRemovalEvent ); + assertNull( m_dataChangeEvent ); + assertNotNull( m_rowHeadingChangeEvent ); + assertFalse( m_disposed ); + return m_rowHeadingChangeEvent; + } + + public final boolean isDisposed() + { + return m_disposed; + } + + public final void reset() + { + m_rowInsertionEvent = m_rowRemovalEvent = m_dataChangeEvent = m_rowHeadingChangeEvent = null; + // m_disposed is not reset intentionally + } + private GridDataEvent m_rowInsertionEvent = null; + private GridDataEvent m_rowRemovalEvent = null; + private GridDataEvent m_dataChangeEvent = null; + private GridDataEvent m_rowHeadingChangeEvent = null; + private boolean m_disposed = false; +} diff --git a/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java b/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java new file mode 100755 index 000000000000..4413118f4e80 --- /dev/null +++ b/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java @@ -0,0 +1,269 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + *************************************************************************/ + +package complex.toolkit.awtgrid; + +import com.sun.star.awt.grid.GridDataEvent; +import com.sun.star.awt.grid.XMutableGridDataModel; +import com.sun.star.lang.IllegalArgumentException; +import com.sun.star.lang.IndexOutOfBoundsException; +import static org.junit.Assert.*; + +/** test for the css.awt.grid.XMutableGridData interface + * + * @author frank.schoenheit@oracle.com + */ +public class TMutableGridDataModel +{ + public TMutableGridDataModel( final XMutableGridDataModel i_dataModel ) + { + m_dataModel = i_dataModel; + + m_listener = new GridDataListener(); + m_dataModel.addGridDataListener( m_listener ); + } + + /* + * tests the XMutableGridDataModel.addRow method + */ + public void testAddRow() + { + m_dataModel.addRow( 1, m_rowValues[0] ); + GridDataEvent event = m_listener.assertSingleRowInsertionEvent(); + assertEquals( "row insertion: wrong FirstRow (1)", 0, event.FirstRow ); + assertEquals( "row insertion: wrong LastRow (1)", 0, event.LastRow ); + m_listener.reset(); + + m_dataModel.addRow( 2, m_rowValues[1] ); + event = m_listener.assertSingleRowInsertionEvent(); + assertEquals( "row insertion: wrong FirstRow (2)", 1, event.FirstRow ); + assertEquals( "row insertion: wrong LastRow (2)", 1, event.LastRow ); + m_listener.reset(); + } + + /** + * tests the XMutableGridDataModel.addRows method + */ + public void testAddRows() throws IndexOutOfBoundsException, IllegalArgumentException + { + assertEquals( "precondition not met: call this directly after testAddRow, please!", 2, m_dataModel.getRowCount() ); + + m_dataModel.addRows( new Object[] { "3", 4.0, "5" }, new Object[][] { m_rowValues[2], m_rowValues[3], m_rowValues[4] } ); + GridDataEvent event = m_listener.assertSingleRowInsertionEvent(); + assertEquals( "row insertion: wrong FirstRow (1)", 2, event.FirstRow ); + assertEquals( "row insertion: wrong LastRow (1)", 4, event.LastRow ); + m_listener.reset(); + + assertEquals( "data model's row count is not adjusted when adding rows", m_rowValues.length, m_dataModel.getRowCount() ); + assertEquals( "data model's column count is not adjusted when adding rows", m_rowValues[0].length, m_dataModel.getColumnCount() ); + for ( int row=0; row xCloneable( *col, UNO_QUERY_THROW ); - aColumns.push_back( Reference< XGridColumn >( xCloneable->createClone(), UNO_QUERY_THROW ) ); + Reference< XCloneable > const xCloneable( *col, UNO_QUERY_THROW ); + Reference< XGridColumn > const xClone( xCloneable->createClone(), UNO_QUERY_THROW ); + + GridColumn* const pGridColumn = GridColumn::getImplementation( xClone ); + if ( pGridColumn == NULL ) + throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "invalid clone source implementation" ) ), *this ); + // that's indeed a RuntimeException, not an IllegalArgumentException or some such: + // a DefaultGridColumnModel implementation whose columns are not GridColumn implementations + // is borked. + pGridColumn->setIndex( col - i_copySource.m_aColumns.begin() ); + + aColumns.push_back( xClone ); } } catch( const Exception& ) @@ -181,6 +191,17 @@ namespace toolkit aGuard.clear(); m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvent ); + + // dispose the removed column + try + { + Reference< XComponent > const xColComp( xColumn, UNO_QUERY_THROW ); + xColComp->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 82f0ff083288..c1216d53f328 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -72,6 +72,8 @@ namespace toolkit ,m_nMinWidth( i_copySource.m_nMinWidth ) ,m_nFlexibility( i_copySource.m_nFlexibility ) ,m_bResizeable( i_copySource.m_bResizeable ) + ,m_sTitle( i_copySource.m_sTitle ) + ,m_sHelpText( i_copySource.m_sHelpText ) ,m_eHorizontalAlign( i_copySource.m_eHorizontalAlign ) { } diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index f054ca1ea05d..acda52753a60 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -118,36 +118,45 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun:: UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) :UnoControlModel( rModel ) { - // clone the data model - const Reference< XFastPropertySet > xCloneSource( &const_cast< UnoGridModel& >( rModel ) ); - bool success = false; - try + osl_incrementInterlockedCount( &m_refCount ); { - const Reference< XCloneable > xCloneable( xCloneSource->getFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL ), UNO_QUERY_THROW ); - setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL, makeAny( xCloneable->createClone() ) ); - success = true; - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - if ( !success ) - setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL, makeAny( lcl_getDefaultDataModel_throw( maContext ) ) ); - - // clone the column model - success = false; - try - { - const Reference< XCloneable > xCloneable( xCloneSource->getFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL ), UNO_QUERY_THROW ); - setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( xCloneable->createClone() ) ); - success = true; - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); + Reference< XGridDataModel > xDataModel; + // clone the data model + const Reference< XFastPropertySet > xCloneSource( &const_cast< UnoGridModel& >( rModel ) ); + try + { + const Reference< XCloneable > xCloneable( xCloneSource->getFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL ), UNO_QUERY_THROW ); + xDataModel.set( xCloneable->createClone(), UNO_QUERY_THROW ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + if ( !xDataModel.is() ) + xDataModel = lcl_getDefaultDataModel_throw( maContext ); + UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_DATAMODEL, makeAny( xDataModel ) ); + // do *not* use setFastPropertyValue here: The UnoControlModel ctor did a simple copy of all property values, + // so before this call here, we share our data model with the own of the clone source. setFastPropertyValue, + // then, disposes the old data model - which means the data model which in fact belongs to the clone source. + // so, call the UnoControlModel's impl-method for setting the value. + + // clone the column model + Reference< XGridColumnModel > xColumnModel; + try + { + const Reference< XCloneable > xCloneable( xCloneSource->getFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL ), UNO_QUERY_THROW ); + xColumnModel.set( xCloneable->createClone(), UNO_QUERY_THROW ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + if ( !xColumnModel.is() ) + xColumnModel = lcl_getDefaultColumnModel_throw( maContext ); + UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( xColumnModel ) ); + // same comment as above: do not use our own setPropertyValue here. } - if ( !success ) - setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( lcl_getDefaultColumnModel_throw( maContext ) ) ); + osl_decrementInterlockedCount( &m_refCount ); } //---------------------------------------------------------------------------------------------------------------------- -- cgit From c22f16b635e39db9203dbced0d594954e7939cb9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 26 Jan 2011 14:39:03 +0100 Subject: gridsort: grid control related unit tests (first set, more to come) --- offapi/com/sun/star/awt/grid/XGridColumnModel.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index 0d654f048970..257f597fc7d2 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -80,7 +80,7 @@ interface XGridColumnModel /** Adds a column to the model. -

          You should use the createColumn member to create a new column. This gives +

          You should use the createColumn member to create a new column. This gives implementations of the XGridColumnModel interface the possibility to provide own column implementations which extend the basic GridColumn type.

          -- cgit From 9e1ab4bf40c0ca6ade1c13ca3b57f21b6eda6232 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 26 Jan 2011 14:57:47 +0100 Subject: gridsort: added missing Java file to makefil --- toolkit/qa/complex/toolkit/makefile.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/toolkit/qa/complex/toolkit/makefile.mk b/toolkit/qa/complex/toolkit/makefile.mk index 3d90b5e343ec..aea14dbfc7f8 100755 --- a/toolkit/qa/complex/toolkit/makefile.mk +++ b/toolkit/qa/complex/toolkit/makefile.mk @@ -54,6 +54,7 @@ JAVAFILES = \ accessibility/_XAccessibleText.java \ awtgrid/GridDataListener.java \ awtgrid/TMutableGridDataModel.java \ + awtgrid/DummyColumn.java \ #----- create a jar from compiled files ---------------------------- -- cgit From a2d49e576d3ba693132fb2c75d1b73c1d802b8e8 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Wed, 26 Jan 2011 16:27:17 +0100 Subject: chart52: #28670# make the legend within charts resizeable - build warning --- chart2/source/view/main/VLegend.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 59444ad05894..046947c50e65 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -313,7 +313,7 @@ awt::Size lcl_placeLegendEntries( sal_Int32 nCurrentColumn=-1; sal_Int32 nColumnCount=0; sal_Int32 nMaxColumnCount=-1; - for( sal_Int32 nN=0; nN(aTextShapes.size()); nN++ ) { Reference< drawing::XShape > xShape( aTextShapes[nN] ); if( !xShape.is() ) -- cgit From a4a27812381ff4a25d28c58340a0ea67549b060e Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Wed, 26 Jan 2011 18:58:36 +0100 Subject: chart52: #i28670# import/export of manual chart legend size from/to XLS --- sc/source/filter/excel/xechart.cxx | 54 ++++++++++++++++++------- sc/source/filter/excel/xichart.cxx | 81 ++++++++++++++++++++++++-------------- sc/source/filter/inc/xechart.hxx | 2 + sc/source/filter/inc/xichart.hxx | 5 +++ sc/source/filter/inc/xlchart.hxx | 1 + sc/source/filter/inc/xlconst.hxx | 2 + 6 files changed, 100 insertions(+), 45 deletions(-) diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 2e2714afadf1..8b744a92aa9f 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -91,6 +92,7 @@ using ::com::sun::star::drawing::XShapes; using ::com::sun::star::chart2::IncrementData; using ::com::sun::star::chart2::RelativePosition; +using ::com::sun::star::chart2::RelativeSize; using ::com::sun::star::chart2::ScaleData; using ::com::sun::star::chart2::SubIncrement; using ::com::sun::star::chart2::XAxis; @@ -767,6 +769,12 @@ void XclExpChFrame::Convert( const ScfPropertySet& rPropSet ) ConvertFrameBase( GetChRoot(), rPropSet, meObjType ); } +void XclExpChFrame::SetAutoFlags( bool bAutoPos, bool bAutoSize ) +{ + ::set_flag( maData.mnFlags, EXC_CHFRAME_AUTOPOS, bAutoPos ); + ::set_flag( maData.mnFlags, EXC_CHFRAME_AUTOSIZE, bAutoSize ); +} + bool XclExpChFrame::IsDefault() const { return IsDefaultFrameBase( GetFormatInfo( meObjType ).meDefFrameType ); @@ -2234,33 +2242,52 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) mxText.reset( new XclExpChText( GetChRoot() ) ); mxText->ConvertLegend( rPropSet ); - // legend position - Any aRelPosAny; + // legend position and size + Any aRelPosAny, aRelSizeAny; rPropSet.GetAnyProperty( aRelPosAny, EXC_CHPROP_RELATIVEPOSITION ); - if( aRelPosAny.has< RelativePosition >() ) + rPropSet.GetAnyProperty( aRelSizeAny, EXC_CHPROP_RELATIVESIZE ); + cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_CUSTOM; + rPropSet.GetProperty( eApiExpand, EXC_CHPROP_EXPANSION ); + if( aRelPosAny.has< RelativePosition >() || ((eApiExpand == cssc::ChartLegendExpansion_CUSTOM) && aRelSizeAny.has< RelativeSize >()) ) { try { - /* The 'RelativePosition' property is used as indicator of manually - changed legend position, but due to the different anchor modes - used by this property (in the RelativePosition.Anchor member) - it cannot be used to calculate the position easily. For this, - the Chart1 API will be used instead. */ + /* The 'RelativePosition' or 'RelaiveSize' properties are used as + indicator of manually changed legend position/size, but due to + the different anchor modes used by this property (in the + RelativePosition.Anchor member) it cannot be used to calculate + the position easily. For this, the Chart1 API will be used + instead. */ Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW ); Reference< XShape > xChart1Legend( xChart1Doc->getLegend(), UNO_SET_THROW ); // coordinates in CHLEGEND record written but not used by Excel mxFramePos.reset( new XclExpChFramePos( EXC_CHFRAMEPOS_CHARTSIZE, EXC_CHFRAMEPOS_PARENT ) ); XclChFramePos& rFramePos = mxFramePos->GetFramePosData(); - rFramePos.maRect.mnX = maData.maRect.mnX = CalcChartXFromHmm( xChart1Legend->getPosition().X ); - rFramePos.maRect.mnY = maData.maRect.mnY = CalcChartYFromHmm( xChart1Legend->getPosition().Y ); + rFramePos.mnTLMode = EXC_CHFRAMEPOS_CHARTSIZE; + ::com::sun::star::awt::Point aLegendPos = xChart1Legend->getPosition(); + rFramePos.maRect.mnX = maData.maRect.mnX = CalcChartXFromHmm( aLegendPos.X ); + rFramePos.maRect.mnY = maData.maRect.mnY = CalcChartYFromHmm( aLegendPos.Y ); + // legend size, Excel expects points in CHFRAMEPOS record + rFramePos.mnBRMode = EXC_CHFRAMEPOS_ABSSIZE_POINTS; + ::com::sun::star::awt::Size aLegendSize = xChart1Legend->getSize(); + rFramePos.maRect.mnWidth = static_cast< sal_uInt16 >( aLegendSize.Width * EXC_POINTS_PER_HMM + 0.5 ); + rFramePos.maRect.mnHeight = static_cast< sal_uInt16 >( aLegendSize.Height * EXC_POINTS_PER_HMM + 0.5 ); + maData.maRect.mnWidth = CalcChartXFromHmm( aLegendSize.Width ); + maData.maRect.mnHeight = CalcChartYFromHmm( aLegendSize.Height ); + eApiExpand = cssc::ChartLegendExpansion_CUSTOM; // manual legend position implies manual plot area GetChartData().SetManualPlotArea(); maData.mnDockMode = EXC_CHLEGEND_NOTDOCKED; + // a CHFRAME record with cleared auto flags is needed + if( !mxFrame ) + mxFrame.reset( new XclExpChFrame( GetChRoot(), EXC_CHOBJTYPE_LEGEND ) ); + mxFrame->SetAutoFlags( false, false ); } catch( Exception& ) { OSL_ENSURE( false, "XclExpChLegend::Convert - cannot get legend shape" ); maData.mnDockMode = EXC_CHLEGEND_RIGHT; + eApiExpand = cssc::ChartLegendExpansion_HIGH; } } else @@ -2276,13 +2303,10 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) default: OSL_ENSURE( false, "XclExpChLegend::Convert - unrecognized legend position" ); maData.mnDockMode = EXC_CHLEGEND_RIGHT; + eApiExpand = cssc::ChartLegendExpansion_HIGH; } } - - // legend expansion - cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_BALANCED; - rPropSet.GetProperty( eApiExpand, EXC_CHPROP_EXPANSION ); - ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand != cssc::ChartLegendExpansion_WIDE ); + ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand == cssc::ChartLegendExpansion_HIGH ); // other flags ::set_flag( maData.mnFlags, EXC_CHLEGEND_AUTOSERIES ); diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 4eb91fc5ff09..5502b2671da6 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -107,6 +108,7 @@ using ::com::sun::star::drawing::XShape; using ::com::sun::star::chart2::IncrementData; using ::com::sun::star::chart2::RelativePosition; +using ::com::sun::star::chart2::RelativeSize; using ::com::sun::star::chart2::ScaleData; using ::com::sun::star::chart2::SubIncrement; using ::com::sun::star::chart2::XAxis; @@ -292,14 +294,24 @@ sal_Int32 XclImpChRoot::CalcHmmFromChartY( sal_Int32 nPosY ) const CalcHmmFromChartY( rRect.mnHeight ) ); } +double XclImpChRoot::CalcRelativeFromHmmX( sal_Int32 nPosX ) const +{ + return static_cast< double >( nPosX ) / mxChData->maChartRect.GetWidth(); +} + +double XclImpChRoot::CalcRelativeFromHmmY( sal_Int32 nPosY ) const +{ + return static_cast< double >( nPosY ) / mxChData->maChartRect.GetHeight(); +} + double XclImpChRoot::CalcRelativeFromChartX( sal_Int32 nPosX ) const { - return static_cast< double >( CalcHmmFromChartX( nPosX ) ) / mxChData->maChartRect.GetWidth(); + return CalcRelativeFromHmmX( CalcHmmFromChartX( nPosX ) ); } double XclImpChRoot::CalcRelativeFromChartY( sal_Int32 nPosY ) const { - return static_cast< double >( CalcHmmFromChartY( nPosY ) ) / mxChData->maChartRect.GetHeight(); + return CalcRelativeFromHmmY( CalcHmmFromChartY( nPosY ) ); } void XclImpChRoot::ConvertLineFormat( ScfPropertySet& rPropSet, @@ -2423,18 +2435,30 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const manual mode, if the legend is moved or resized). With manual plot areas, Excel ignores the value in maData.mnDockMode completely. */ cssc2::LegendPosition eApiPos = cssc2::LegendPosition_CUSTOM; - cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_BALANCED; + cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_CUSTOM; if( !GetChartData().IsManualPlotArea() ) switch( maData.mnDockMode ) { - case EXC_CHLEGEND_LEFT: eApiPos = cssc2::LegendPosition_LINE_START; eApiExpand = cssc::ChartLegendExpansion_HIGH; break; - case EXC_CHLEGEND_RIGHT: eApiPos = cssc2::LegendPosition_LINE_END; eApiExpand = cssc::ChartLegendExpansion_HIGH; break; - case EXC_CHLEGEND_TOP: eApiPos = cssc2::LegendPosition_PAGE_START; eApiExpand = cssc::ChartLegendExpansion_WIDE; break; - case EXC_CHLEGEND_BOTTOM: eApiPos = cssc2::LegendPosition_PAGE_END; eApiExpand = cssc::ChartLegendExpansion_WIDE; break; + case EXC_CHLEGEND_LEFT: + eApiPos = cssc2::LegendPosition_LINE_START; + eApiExpand = cssc::ChartLegendExpansion_HIGH; + break; + case EXC_CHLEGEND_RIGHT: // top-right not supported - case EXC_CHLEGEND_CORNER: eApiPos = cssc2::LegendPosition_LINE_END; eApiExpand = cssc::ChartLegendExpansion_HIGH; break; + case EXC_CHLEGEND_CORNER: + eApiPos = cssc2::LegendPosition_LINE_END; + eApiExpand = cssc::ChartLegendExpansion_HIGH; + break; + case EXC_CHLEGEND_TOP: + eApiPos = cssc2::LegendPosition_PAGE_START; + eApiExpand = cssc::ChartLegendExpansion_WIDE; + break; + case EXC_CHLEGEND_BOTTOM: + eApiPos = cssc2::LegendPosition_PAGE_END; + eApiExpand = cssc::ChartLegendExpansion_WIDE; + break; } - // no automatic position: try to find the correct position and size + // no automatic position/size: try to find the correct position and size if( eApiPos == cssc2::LegendPosition_CUSTOM ) { const XclChFramePos* pFramePos = mxFramePos.is() ? &mxFramePos->GetFramePosData() : 0; @@ -2444,38 +2468,35 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const ignored. */ if( pFramePos ) { - RelativePosition aRelPos; - aRelPos.Primary = CalcRelativeFromChartX( pFramePos->maRect.mnX ); - aRelPos.Secondary = CalcRelativeFromChartY( pFramePos->maRect.mnY ); - aRelPos.Anchor = ::com::sun::star::drawing::Alignment_TOP_LEFT; + RelativePosition aRelPos( + CalcRelativeFromChartX( pFramePos->maRect.mnX ), + CalcRelativeFromChartY( pFramePos->maRect.mnY ), + ::com::sun::star::drawing::Alignment_TOP_LEFT ); aLegendProp.SetProperty( EXC_CHPROP_RELATIVEPOSITION, aRelPos ); } else { - // no manual position found, just go for the default + // no manual position/size found, just go for the default eApiPos = cssc2::LegendPosition_LINE_END; } - - /* Legend size. #i71697# It is not possible to set the legend size - directly in the Chart, do some magic here. */ - if( !pFramePos || (pFramePos->mnBRMode != EXC_CHFRAMEPOS_ABSSIZE_POINTS) || - (pFramePos->maRect.mnWidth == 0) || (pFramePos->maRect.mnHeight == 0) ) + /* Legend size. The member mnBRMode specifies whether size is + automatic or changes manually. Manual size is given in points, + not in chart units. */ + if( pFramePos && (pFramePos->mnBRMode == EXC_CHFRAMEPOS_ABSSIZE_POINTS) && + (pFramePos->maRect.mnWidth > 0) && (pFramePos->maRect.mnHeight > 0) ) { - // automatic size: determine entry direction from flags - eApiExpand = ::get_flagvalue( maData.mnFlags, EXC_CHLEGEND_STACKED, - cssc::ChartLegendExpansion_HIGH, cssc::ChartLegendExpansion_WIDE ); + eApiExpand = cssc::ChartLegendExpansion_CUSTOM; + sal_Int32 nWidthHmm = static_cast< sal_Int32 >( pFramePos->maRect.mnWidth / EXC_POINTS_PER_HMM ); + sal_Int32 nHeightHmm = static_cast< sal_Int32 >( pFramePos->maRect.mnHeight / EXC_POINTS_PER_HMM ); + RelativeSize aRelSize( CalcRelativeFromHmmX( nWidthHmm ), CalcRelativeFromHmmY( nHeightHmm ) ); + aLegendProp.SetProperty( EXC_CHPROP_RELATIVESIZE, aRelSize ); } else { - // legend size is given in points, not in chart units - double fRatio = static_cast< double >( pFramePos->maRect.mnWidth ) / pFramePos->maRect.mnHeight; - if( fRatio > 1.5 ) - eApiExpand = cssc::ChartLegendExpansion_WIDE; - else if( fRatio < 0.75 ) - eApiExpand = cssc::ChartLegendExpansion_HIGH; - else - eApiExpand = cssc::ChartLegendExpansion_BALANCED; + // automatic size: determine entry direction from flags + eApiExpand = ::get_flagvalue( maData.mnFlags, EXC_CHLEGEND_STACKED, + cssc::ChartLegendExpansion_HIGH, cssc::ChartLegendExpansion_WIDE ); } } aLegendProp.SetProperty( EXC_CHPROP_ANCHORPOSITION, eApiPos ); diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index 5bb75e029210..c27e2dcd54b5 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -378,6 +378,8 @@ public: /** Converts frame formatting properties from the passed property set. */ void Convert( const ScfPropertySet& rPropSet ); + /** Sets the specified automatic flags. */ + void SetAutoFlags( bool bAutoPos, bool bAutoSize ); /** Returns true, if the frame object contains default formats. */ bool IsDefault() const; diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index d8289b3b671b..0d6ff799280e 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -134,6 +134,11 @@ public: /** Converts the passed rectangle from Excel chart units into 1/100 mm. */ ::com::sun::star::awt::Rectangle CalcHmmFromChartRect( const XclChRectangle& rRect ) const; + /** Converts the passed horizontal coordinate from 1/100 mm into a relative position. */ + double CalcRelativeFromHmmX( sal_Int32 nPosX ) const; + /** Converts the passed vertical coordinate from 1/100 mm into a relative position. */ + double CalcRelativeFromHmmY( sal_Int32 nPosY ) const; + /** Converts the passed horizontal coordinate from Excel chart units into a relative position. */ double CalcRelativeFromChartX( sal_Int32 nPosX ) const; /** Converts the passed vertical coordinate from Excel chart units into a relative position. */ diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 13eda8619cc0..260cb8ae3145 100755 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -125,6 +125,7 @@ class XclRoot; #define EXC_CHPROP_PERSPECTIVE CREATE_OUSTRING( "Perspective" ) #define EXC_CHPROP_POSITIVEERROR CREATE_OUSTRING( "PositiveError" ) #define EXC_CHPROP_RELATIVEPOSITION CREATE_OUSTRING( "RelativePosition" ) +#define EXC_CHPROP_RELATIVESIZE CREATE_OUSTRING( "RelativeSize" ) #define EXC_CHPROP_RIGHTANGLEDAXES CREATE_OUSTRING( "RightAngledAxes" ) #define EXC_CHPROP_ROLE CREATE_OUSTRING( "Role" ) #define EXC_CHPROP_ROTATIONHORIZONTAL CREATE_OUSTRING( "RotationHorizontal" ) diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx index 42160aae7529..ac0e42496b63 100644 --- a/sc/source/filter/inc/xlconst.hxx +++ b/sc/source/filter/inc/xlconst.hxx @@ -139,6 +139,8 @@ const sal_Int32 EXC_RK_INT100 = EXC_RK_100FLAG | EXC_RK_INTFLAG; const sal_Int32 EXC_POINTS_PER_INCH = 72; const sal_Int32 EXC_TWIPS_PER_INCH = EXC_POINTS_PER_INCH * 20; +const double EXC_POINTS_PER_HMM = static_cast< double >( EXC_POINTS_PER_INCH ) / 2540.0; + const sal_uInt8 EXC_ORIENT_NONE = 0; /// Text orientation: not rotated. const sal_uInt8 EXC_ORIENT_STACKED = 1; /// Text orientation: vertically stacked. const sal_uInt8 EXC_ORIENT_90CCW = 2; /// Text orientation: 90 deg counterclockwise. -- cgit From 2e0fdf80c30a1a0af490aab176b4bb7c097f58eb Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Wed, 26 Jan 2011 18:58:36 +0100 Subject: chart52: #i28670# import/export of manual chart legend size from/to XLS --- oox/source/drawingml/chart/titleconverter.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index 29054744b9f1..8163241e5a31 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -212,7 +212,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) // predefined legend position and expansion cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_CUSTOM; - cssc::ChartLegendExpansion eLegendExpand = cssc::ChartLegendExpansion_HIGH; + cssc::ChartLegendExpansion eLegendExpand = cssc::ChartLegendExpansion_CUSTOM; switch( mrModel.mnPosition ) { case XML_l: @@ -220,6 +220,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) eLegendExpand = cssc::ChartLegendExpansion_HIGH; break; case XML_r: + case XML_tr: // top-right not supported eLegendPos = cssc2::LegendPosition_LINE_END; eLegendExpand = cssc::ChartLegendExpansion_HIGH; break; @@ -231,10 +232,6 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) eLegendPos = cssc2::LegendPosition_PAGE_END; eLegendExpand = cssc::ChartLegendExpansion_WIDE; break; - case XML_tr: - eLegendPos = cssc2::LegendPosition_LINE_END; // top-right not supported - eLegendExpand = cssc::ChartLegendExpansion_HIGH; - break; } // manual positioning and size -- cgit From 23933ae6f6c74253a233761dfa42e488f6cabd13 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 26 Jan 2011 20:43:12 +0100 Subject: gridsort: let the sort indicator arrow point up when sorted ascending, and down otherwise. --- svtools/source/table/gridtablerenderer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 3015cadff817..26d023535198 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -103,7 +103,7 @@ namespace svt { namespace table DecorationView aDecoView( &aDevice ); aDecoView.DrawSymbol( Rectangle( aBitmapPos, aBitmapSize ), - i_sortAscending ? SYMBOL_SPIN_DOWN : SYMBOL_SPIN_UP, + i_sortAscending ? SYMBOL_SPIN_UP : SYMBOL_SPIN_DOWN, i_style.GetActiveColor() ); -- cgit From 75a441f652654465122bc686d8803bd887169f86 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 27 Jan 2011 08:17:57 +0100 Subject: gridsort: minor changes to the new API: - renamed XMutableGridDataModel::setRowHeading to updateRowHeading for consistency reasons - renamed XSortableGridDataModel to XSortableGridData - actually, this is not a full-fledged model in itself. --- svtools/source/uno/unocontroltablemodel.cxx | 10 +++++----- toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java | 4 ++-- toolkit/source/controls/grid/defaultgriddatamodel.cxx | 2 +- toolkit/source/controls/grid/defaultgriddatamodel.hxx | 2 +- toolkit/source/controls/grid/sortablegriddatamodel.cxx | 4 ++-- toolkit/source/controls/grid/sortablegriddatamodel.hxx | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index b6d4d0f1e451..933363115810 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include /** === end UNO includes === **/ #include @@ -74,7 +74,7 @@ namespace svt { namespace table using ::com::sun::star::style::VerticalAlignment; using ::com::sun::star::uno::WeakReference; using ::com::sun::star::awt::grid::GridDataEvent; - using ::com::sun::star::awt::grid::XSortableGridDataModel; + using ::com::sun::star::awt::grid::XSortableGridData; using ::com::sun::star::beans::Pair; /** === end UNO using === **/ @@ -748,7 +748,7 @@ namespace svt { namespace table { DBG_CHECK_ME(); - Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY ); + Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY ); if ( xSortAccess.is() ) return this; return NULL; @@ -761,7 +761,7 @@ namespace svt { namespace table try { - Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); + Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); xSortAccess->sortByColumn( i_column, i_sortDirection == ColumnSortAscending ); } catch( const Exception& ) @@ -778,7 +778,7 @@ namespace svt { namespace table ColumnSort currentSort; try { - Reference< XSortableGridDataModel > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); + Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW ); Pair< ::sal_Int32, ::sal_Bool > const aCurrentSortOrder( xSortAccess->getCurrentSortOrder() ); currentSort.nColumnPos = aCurrentSortOrder.First; currentSort.eSortDirection = aCurrentSortOrder.Second ? ColumnSortAscending : ColumnSortDescending; diff --git a/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java b/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java index 4413118f4e80..e55b2b1bb0ad 100755 --- a/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java +++ b/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java @@ -205,7 +205,7 @@ public class TMutableGridDataModel } /** - * tests the XMutableGridDataModel.setRowHeading method + * tests the XMutableGridDataModel.updateRowHeading method */ public void testUpdateRowHeading() throws IndexOutOfBoundsException { @@ -215,7 +215,7 @@ public class TMutableGridDataModel final int rowToUpdate = 2; final String valueToUpdate = "some text"; - m_dataModel.setRowHeading( rowToUpdate, valueToUpdate ); + m_dataModel.updateRowHeading( rowToUpdate, valueToUpdate ); final GridDataEvent event = m_listener.assertSingleRowHeadingChangeEvent(); assertEquals( "row heading update notification: FirstRow is invalid", rowToUpdate, event.FirstRow ); assertEquals( "row heading update notification: FirstRow is invalid", rowToUpdate, event.LastRow ); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 9ddb70c01760..4ef99d749ba1 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -340,7 +340,7 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL DefaultGridDataModel::setRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException) + void SAL_CALL DefaultGridDataModel::updateRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException) { ::comphelper::ComponentGuard aGuard( *this, rBHelper ); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx index 13a31277e533..bf4b6cc3355e 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx @@ -69,7 +69,7 @@ public: virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRowData( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index 31617c3b9a77..77a2ffa1637b 100755 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -670,7 +670,7 @@ namespace toolkit } //------------------------------------------------------------------------------------------------------------------ - void SAL_CALL SortableGridDataModel::setRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException) + void SAL_CALL SortableGridDataModel::updateRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException) { MethodGuard aGuard( *this, rBHelper ); DBG_CHECK_ME(); @@ -679,7 +679,7 @@ namespace toolkit Reference< XMutableGridDataModel > const delegator( m_delegator ); aGuard.clear(); - delegator->setRowHeading( rowIndex, i_heading ); + delegator->updateRowHeading( rowIndex, i_heading ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.hxx b/toolkit/source/controls/grid/sortablegriddatamodel.hxx index 26f0e63f9762..50f08d3a7113 100755 --- a/toolkit/source/controls/grid/sortablegriddatamodel.hxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.hxx @@ -77,7 +77,7 @@ namespace toolkit ~SortableGridDataModel(); public: - // XSortableGridDataModel + // XSortableGridData virtual void SAL_CALL sortByColumn( ::sal_Int32 ColumnIndex, ::sal_Bool SortAscending ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeColumnSort( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::beans::Pair< ::sal_Int32, ::sal_Bool > SAL_CALL getCurrentSortOrder( ) throw (::com::sun::star::uno::RuntimeException); @@ -89,7 +89,7 @@ namespace toolkit virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRowData( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); -- cgit From 6444bc43f24b8674a0d7059feb91537c2967e1fa Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 27 Jan 2011 08:17:57 +0100 Subject: gridsort: minor changes to the new API: - renamed XMutableGridDataModel::setRowHeading to updateRowHeading for consistency reasons - renamed XSortableGridDataModel to XSortableGridData - actually, this is not a full-fledged model in itself. --- .../sun/star/awt/grid/SortableGridDataModel.idl | 6 +- .../sun/star/awt/grid/XMutableGridDataModel.idl | 2 +- offapi/com/sun/star/awt/grid/XSortableGridData.idl | 77 ++++++++++++++++++++++ .../sun/star/awt/grid/XSortableGridDataModel.idl | 77 ---------------------- .../awt/grid/XSortableMutableGridDataModel.idl | 4 +- offapi/com/sun/star/awt/grid/makefile.mk | 2 +- 6 files changed, 84 insertions(+), 84 deletions(-) create mode 100755 offapi/com/sun/star/awt/grid/XSortableGridData.idl delete mode 100755 offapi/com/sun/star/awt/grid/XSortableGridDataModel.idl diff --git a/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl b/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl index b76913bf0707..2b7aca1ca9f9 100755 --- a/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl @@ -39,11 +39,11 @@ interface XMutableGridDataModel; //================================================================================================================== -/** provides a default implementation of a XSortableGridDataModel. +/** provides a default implementation of a XSortableGridData.

          This service must be created with a secondary grid data model, which all actual data requests are delegated to. But before providing this data to the service's own clients, it is sorted, according to the sort order defined - via the XSortableGridDataModel interface.

          + via the XSortableGridData interface.

          The service implementation is able to compare the default scalar types, plus strings.

          @@ -58,7 +58,7 @@ interface XMutableGridDataModel;

          Note that changing the data might result in the sort order being destroyed. If you want to ensure that the data represented by the model is still sorted after your modifications, you should call - XSortableGridDataModel::sortByColumn, again.

          + XSortableGridData::sortByColumn, again.

          */ service SortableGridDataModel : XSortableMutableGridDataModel { diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index 57409bbdedfd..5e10820ff9ef 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -116,7 +116,7 @@ interface XMutableGridDataModel : XGridDataModel if the given index does not denote a valid row. */ void - setRowHeading( [in] long RowIndex, [in] any Heading ) + updateRowHeading( [in] long RowIndex, [in] any Heading ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** updates the tooltip to be displayed for a given cell diff --git a/offapi/com/sun/star/awt/grid/XSortableGridData.idl b/offapi/com/sun/star/awt/grid/XSortableGridData.idl new file mode 100755 index 000000000000..9dcf9d95fb85 --- /dev/null +++ b/offapi/com/sun/star/awt/grid/XSortableGridData.idl @@ -0,0 +1,77 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_XSortableGridData_idl__ +#define __com_sun_star_awt_grid_XSortableGridData_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +//================================================================================================================== + +/** allows to sort the data represented by a XGridDataModel + */ +interface XSortableGridData +{ + /** sorts the rows represented by the model by a given column's data. + + @param ColumnIndex + the index of the column whose data should be used as sort key + @param SortAscending + is if the data should be sorted ascending, otherwise. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if ColumnIndex does not denote a valid column. + */ + void sortByColumn( [in] long ColumnIndex, [in] boolean SortAscending ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** removes any possibly present sorting of the grid data + */ + void removeColumnSort(); + + /** returns the current sort order. + + @return + a structure describing the current sort order. Pair::First + denotes the column by which the data is sorted, or -1 if the data is currently unsorted. + Pair::Second is if the data is sorted ascending, + otherwise. + */ + ::com::sun::star::beans::Pair< long, boolean > + getCurrentSortOrder(); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/XSortableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XSortableGridDataModel.idl deleted file mode 100755 index dc0b72a69e08..000000000000 --- a/offapi/com/sun/star/awt/grid/XSortableGridDataModel.idl +++ /dev/null @@ -1,77 +0,0 @@ -/************************************************************************* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __com_sun_star_awt_grid_XSortableGridData_idl__ -#define __com_sun_star_awt_grid_XSortableGridData_idl__ - -#include -#include - -//================================================================================================================== - -module com { module sun { module star { module awt { module grid { - -//================================================================================================================== - -/** allows to sort the data represented by a XGridDataModel - */ -interface XSortableGridDataModel -{ - /** sorts the rows represented by the model by a given column's data. - - @param ColumnIndex - the index of the column whose data should be used as sort key - @param SortAscending - is if the data should be sorted ascending, otherwise. - @throws ::com::sun::star::lang::IndexOutOfBoundsException - if ColumnIndex does not denote a valid column. - */ - void sortByColumn( [in] long ColumnIndex, [in] boolean SortAscending ) - raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); - - /** removes any possibly present sorting of the grid data - */ - void removeColumnSort(); - - /** returns the current sort order. - - @return - a structure describing the current sort order. Pair::First - denotes the column by which the data is sorted, or -1 if the data is currently unsorted. - Pair::Second is if the data is sorted ascending, - otherwise. - */ - ::com::sun::star::beans::Pair< long, boolean > - getCurrentSortOrder(); -}; - -//================================================================================================================== - -}; }; }; }; }; - -//================================================================================================================== - -#endif diff --git a/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl index dbe9cbc5f5cb..bbcd6bc29540 100755 --- a/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl @@ -28,7 +28,7 @@ #define __com_sun_star_awt_grid_XSortableMutableGridDataModel_idl__ #include -#include +#include //================================================================================================================== @@ -49,7 +49,7 @@ interface XSortableMutableGridDataModel

          If you set a new column sort order, the implementation will notify the registered XGridDataListeners via a call to its XGridDataListener::dataChanged method.

          */ - interface XSortableGridDataModel; + interface XSortableGridData; }; //================================================================================================================== diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index 27daa0c1a51d..8499dca27d82 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -56,7 +56,7 @@ IDLFILES=\ UnoControlGridModel.idl\ GridInvalidDataException.idl\ GridInvalidModelException.idl\ - XSortableGridDataModel.idl\ + XSortableGridData.idl\ SortableGridDataModel.idl\ XSortableMutableGridDataModel.idl\ -- cgit From 1e7279d41217038814470dce5de8c0ac3f01b16c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 27 Jan 2011 08:32:47 +0100 Subject: gridsort: tests for sortable grid data --- toolkit/qa/complex/toolkit/GridControl.java | 88 ++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 2 deletions(-) diff --git a/toolkit/qa/complex/toolkit/GridControl.java b/toolkit/qa/complex/toolkit/GridControl.java index 9cefa51aae30..31ac7b56e086 100755 --- a/toolkit/qa/complex/toolkit/GridControl.java +++ b/toolkit/qa/complex/toolkit/GridControl.java @@ -31,6 +31,7 @@ import com.sun.star.awt.grid.XGridColumnModel; import com.sun.star.awt.grid.XGridDataModel; import com.sun.star.awt.grid.XMutableGridDataModel; import com.sun.star.awt.grid.XSortableMutableGridDataModel; +import com.sun.star.beans.Pair; import com.sun.star.beans.XPropertySet; import com.sun.star.container.ContainerEvent; import com.sun.star.container.XContainerListener; @@ -273,7 +274,7 @@ public class GridControl while ( m_columnModel.getColumnCount() != 0 ) { final int columnCount = m_columnModel.getColumnCount(); - final int removeColumnIndex = (new Random()).nextInt( columnCount ); + final int removeColumnIndex = m_randomGenerator.nextInt( columnCount ); m_columnModel.removeColumn( removeColumnIndex ); events = listener.assertExclusiveRemovalEvents(); listener.reset(); @@ -308,6 +309,83 @@ public class GridControl assertEquals( insertionIndex, newColumn.getIndex() ); } + // ----------------------------------------------------------------------------------------------------------------- + @Test + public void testSortableDataModel() throws Exception + { + impl_recreateGridModel(); + + final int colCount = 3; + final int rowCount = 10; + // initialize with some data + final Object[][] data = new Object[][] { + new Object[] { 15, 17, 0 }, + new Object[] { 9, 8, 14 }, + new Object[] { 17, 2, 16 }, + new Object[] { 0, 7, 14 }, + new Object[] { 10, 16, 16 }, + new Object[] { 2, 8, 10 }, + new Object[] { 4, 8, 3 }, + new Object[] { 7, 9, 0 }, + new Object[] { 15, 6, 19 }, + new Object[] { 2, 14, 19 } + }; + final Object[] rowHeadings = new Object[] { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 + }; + // ensure consistency of the test data + assertEquals( rowHeadings.length, rowCount ); + assertEquals( data.length, rowCount ); + for ( Object[] rowData : data ) + assertEquals( rowData.length, colCount ); + + // add the test data + m_dataModel.addRows( rowHeadings, data ); + assertEquals( rowCount, m_dataModel.getRowCount() ); + assertEquals( colCount, m_dataModel.getColumnCount() ); + + // sort by each column + for ( int colIndex = 0; colIndex < colCount; ++colIndex ) + { + for ( boolean ascending : new boolean[] { true, false } ) + { + m_dataModel.sortByColumn( colIndex, ascending ); + Pair currentSortOrder = m_dataModel.getCurrentSortOrder(); + assertEquals( "invalid current sort column (column " + colIndex + ")", ((Integer)currentSortOrder.First).intValue(), colIndex ); + assertEquals( "invalid current sort direction", ((Boolean)currentSortOrder.Second).booleanValue(), ascending ); + + /*for ( int i=0; i= nextIntValue ); + + // ensure the data in the other columns, and the row headings, are sorted as well + final Object rowHeading = m_dataModel.getRowHeading( rowIndex ); + final int unsortedRowIndex = impl_assertInteger( rowHeading ); + for ( int innerColIndex = 0; innerColIndex < colCount; ++innerColIndex ) + { + assertEquals( "sorted row " + rowIndex + ", unsorted row " + unsortedRowIndex + ", col " + innerColIndex + + ": wrong data", + data[unsortedRowIndex][innerColIndex], m_dataModel.getCellData( innerColIndex, rowIndex ) ); + } + } + } + } + } + // ----------------------------------------------------------------------------------------------------------------- private int impl_assertInteger( final Object i_object ) { @@ -405,8 +483,13 @@ public class GridControl { System.out.println( "--------------------------------------------------------------------------------" ); System.out.println( "starting class: " + GridControl.class.getName() ); - System.out.println( "connecting ..." ); + System.out.print( "connecting ... " ); m_connection.setUp(); + System.out.println( "done."); + + final long seed = m_randomGenerator.nextLong(); + m_randomGenerator.setSeed( seed ); + System.out.println( "seeding random number generator with " + seed ); } // ----------------------------------------------------------------------------------------------------------------- @@ -513,6 +596,7 @@ public class GridControl // ----------------------------------------------------------------------------------------------------------------- private static final OfficeConnection m_connection = new OfficeConnection(); + private static Random m_randomGenerator = new Random(); private final XComponentContext m_context; private XPropertySet m_gridControlModel; -- cgit From b5707b50ee83894582e14793c23466926b570b28 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 27 Jan 2011 12:52:10 +0100 Subject: gridsort: more unit tests --- toolkit/qa/complex/toolkit/Assert.java | 234 +++++++++++++++++++++ toolkit/qa/complex/toolkit/GridControl.java | 82 ++++++++ .../toolkit/awtgrid/TMutableGridDataModel.java | 51 ++++- toolkit/qa/complex/toolkit/makefile.mk | 1 + 4 files changed, 365 insertions(+), 3 deletions(-) create mode 100755 toolkit/qa/complex/toolkit/Assert.java diff --git a/toolkit/qa/complex/toolkit/Assert.java b/toolkit/qa/complex/toolkit/Assert.java new file mode 100755 index 000000000000..93b1a2c490e1 --- /dev/null +++ b/toolkit/qa/complex/toolkit/Assert.java @@ -0,0 +1,234 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + *************************************************************************/ + +package complex.toolkit; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import com.sun.star.uno.UnoRuntime; +import static org.junit.Assert.*; + +/** + * provides assertion capabilities not found in {@link org.junit.Assert} + * @author frank.schoenheit@oracle.com + */ +public class Assert +{ + // -------------------------------------------------------------------------------------------------------- + /** invokes a given method on a given object, and assures a certain exception is caught + * @param i_message + * is the message to print when the check fails + * @param i_object + * is the object to invoke the method on + * @param i_methodName + * is the name of the method to invoke + * @param i_methodArgs + * are the arguments to pass to the method. + * @param i_argClasses + * are the classes to assume for the arguments of the methods + * @param i_expectedExceptionClass + * is the class of the exception to be caught. If this is null, + * it means that no exception must be throw by invoking the method. + */ + public static void assertException( final String i_message, final Object i_object, final String i_methodName, + final Class[] i_argClasses, final Object[] i_methodArgs, final Class i_expectedExceptionClass ) + { + Class objectClass = i_object.getClass(); + + boolean noExceptionAllowed = ( i_expectedExceptionClass == null ); + + boolean caughtExpected = noExceptionAllowed ? true : false; + try + { + Method method = impl_getMethod( objectClass, i_methodName, i_argClasses ); + method.invoke(i_object, i_methodArgs ); + } + catch ( NoSuchMethodException e ) + { + StringBuilder message = new StringBuilder(); + message.append( "no such method: " ).append( objectClass.getName() ).append( "." ).append( i_methodName ).append( "( " ); + for ( int i=0; ifoo( int ), {@link Class.getMethod} would not return this + * method when you pass Integer.class. impl_getMethod will recognize this, and + * properly retrieve the method. + * + * Note: impl_getMethod is limited in that it will not try all possible combinations of primitive + * and non-primitive types. That is, a method like foo( int, Integer, int ) is likely to not be + * found. + * + * @param i_obbjectClass + * @param i_methodName + * @param i_argClasses + * @return + */ + private static Method impl_getMethod( final Class i_objectClass, final String i_methodName, final Class[] i_argClasses ) throws NoSuchMethodException + { + try + { + return i_objectClass.getMethod( i_methodName, i_argClasses ); + } + catch ( NoSuchMethodException ex ) + { + } + + int substitutedTypes = 0; + int substitutedTypesLastRound = 0; + final Class[][] substitutionTable = new Class[][] { + new Class[] { Long.class, long.class }, + new Class[] { Integer.class, int.class }, + new Class[] { Short.class, short.class }, + new Class[] { Byte.class, byte.class }, + new Class[] { Double.class, double.class }, + new Class[] { Float.class, float.class }, + new Class[] { Character.class, char.class } + }; + do + { + substitutedTypes = 0; + final Class[] argClasses = new Class[ i_argClasses.length ]; + for ( int i=0; i < argClasses.length; ++i ) + { + argClasses[i] = i_argClasses[i]; + if ( substitutedTypes > substitutedTypesLastRound ) + continue; + + for ( int c=0; c 0 ); + throw new NoSuchMethodException(); + } + + /** invokes a given method on a given object, and assures a certain exception is caught + * @param i_message is the message to print when the check fails + * @param i_object is the object to invoke the method on + * @param i_methodName is the name of the method to invoke + * @param i_methodArgs are the arguments to pass to the method. Those implicitly define + * the classes of the arguments of the method which is called. + * @param i_expectedExceptionClass is the class of the exception to be caught. If this is null, + * it means that no exception must be throw by invoking the method. + */ + public static void assertException( final String i_message, final Object i_object, final String i_methodName, + final Object[] i_methodArgs, final Class i_expectedExceptionClass ) + { + Class[] argClasses = new Class[ i_methodArgs.length ]; + for ( int i=0; ino exception must be throw by invoking the method. + */ + public static void assertException( final Object i_object, final String i_methodName, final Object[] i_methodArgs, + final Class i_expectedExceptionClass ) + { + assertException( + "did not catch the expected exception (" + + ( ( i_expectedExceptionClass == null ) ? "none" : i_expectedExceptionClass.getName() ) + + ") while calling " + i_object.getClass().getName() + "." + i_methodName, + i_object, i_methodName, i_methodArgs, i_expectedExceptionClass ); + } + + /** invokes a given method on a given object, and assures a certain exception is caught + * @param i_object is the object to invoke the method on + * @param i_methodName is the name of the method to invoke + * @param i_methodArgs are the arguments to pass to the method + * @param i_argClasses are the classes to assume for the arguments of the methods + * @param i_expectedExceptionClass is the class of the exception to be caught. If this is null, + * it means that no exception must be throw by invoking the method. + */ + public static void assertException( final Object i_object, final String i_methodName, final Class[] i_argClasses, + final Object[] i_methodArgs, final Class i_expectedExceptionClass ) + { + assertException( + "did not catch the expected exception (" + + ( ( i_expectedExceptionClass == null ) ? "none" : i_expectedExceptionClass.getName() ) + + ") while calling " + i_object.getClass().getName() + "." + i_methodName, + i_object, i_methodName, i_argClasses, i_methodArgs, i_expectedExceptionClass ); + } + + // -------------------------------------------------------------------------------------------------------- + public static void assertException( Object i_object, Class _unoInterfaceClass, String i_methodName, Object[] i_methodArgs, + Class i_expectedExceptionClass ) + { + assertException( UnoRuntime.queryInterface( _unoInterfaceClass, i_object ), i_methodName, + i_methodArgs, i_expectedExceptionClass ); + } +} diff --git a/toolkit/qa/complex/toolkit/GridControl.java b/toolkit/qa/complex/toolkit/GridControl.java index 31ac7b56e086..a06a52342417 100755 --- a/toolkit/qa/complex/toolkit/GridControl.java +++ b/toolkit/qa/complex/toolkit/GridControl.java @@ -26,6 +26,11 @@ package complex.toolkit; +import com.sun.star.awt.XControl; +import com.sun.star.awt.XControlContainer; +import com.sun.star.awt.XControlModel; +import com.sun.star.awt.XToolkit; +import com.sun.star.awt.grid.DefaultGridDataModel; import com.sun.star.awt.grid.XGridColumn; import com.sun.star.awt.grid.XGridColumnModel; import com.sun.star.awt.grid.XGridDataModel; @@ -35,10 +40,12 @@ import com.sun.star.beans.Pair; import com.sun.star.beans.XPropertySet; import com.sun.star.container.ContainerEvent; import com.sun.star.container.XContainerListener; +import com.sun.star.container.XNameContainer; import com.sun.star.lang.EventObject; import com.sun.star.lang.IndexOutOfBoundsException; import com.sun.star.lang.XComponent; import com.sun.star.lang.XEventListener; +import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XComponentContext; @@ -204,6 +211,14 @@ public class GridControl test.testUpdateRowData(); test.testUpdateRowHeading(); test.cleanup(); + + // a somehwat less straight-forward test: the data model is expected to implicitly increase its column count + // when you add a row which has more columns than currently known + final XMutableGridDataModel dataModel = DefaultGridDataModel.create( m_context ); + dataModel.addRow( 0, new Object[] { 1 } ); + assertEquals( "unexpected column count after adding the most simple row", 1, dataModel.getColumnCount() ); + dataModel.addRow( 1, new Object[] { 1, 2 } ); + assertEquals( "implicit extension of the column count doesn't work", 2, dataModel.getColumnCount() ); } // ----------------------------------------------------------------------------------------------------------------- @@ -386,6 +401,67 @@ public class GridControl } } + // ----------------------------------------------------------------------------------------------------------------- + @Test + public void testModelViewInteraction() throws Exception + { + final List< Object > disposables = new ArrayList< Object >(); + try + { + // create a siple dialog model/control/peer trinity + final XControlModel dialogModel = createInstance( XControlModel.class, "com.sun.star.awt.UnoControlDialogModel" ); + disposables.add( dialogModel ); + final XPropertySet dialogProps = UnoRuntime.queryInterface( XPropertySet.class, dialogModel ); + dialogProps.setPropertyValue( "Width", 200 ); + dialogProps.setPropertyValue( "Height", 100 ); + dialogProps.setPropertyValue( "Title", "Grid Control Unit Test" ); + final XControl dialogControl = createInstance( XControl.class, "com.sun.star.awt.UnoControlDialog" ); + disposables.add( dialogControl ); + dialogControl.setModel( dialogModel ); + dialogControl.createPeer( createInstance( XToolkit.class, "com.sun.star.awt.Toolkit" ), null ); + + // insert a grid control model + final XMultiServiceFactory controlModelFactory = UnoRuntime.queryInterface( XMultiServiceFactory.class, + dialogModel ); + XPropertySet gridModelProps = UnoRuntime.queryInterface( XPropertySet.class, + controlModelFactory.createInstance( "com.sun.star.awt.grid.UnoControlGridModel" ) ); + disposables.add( gridModelProps ); + gridModelProps.setPropertyValue( "PositionX", 6 ); + gridModelProps.setPropertyValue( "PositionY", 6 ); + gridModelProps.setPropertyValue( "Width", 188 ); + gridModelProps.setPropertyValue( "Height", 88 ); + final XNameContainer modelContainer = UnoRuntime.queryInterface( XNameContainer.class, dialogModel ); + modelContainer.insertByName( "grid", gridModelProps ); + + // check the respective control has been created + final XControlContainer controlContainer = UnoRuntime.queryInterface( XControlContainer.class, dialogControl ); + final XControl gridControl = controlContainer.getControl( "grid" ); + assertNotNull( "no grid control created in the dialog", gridControl ); + + // in the current implementation (not sure this is a good idea at all), the control (more precise: the peer) + // ensures that if there are no columns in the column model, but in the data model, then the column model + // will implicitly have the needed columns added. + // To ensure that clients which rely on this do not break in the future, check this here. + final XMutableGridDataModel dataModel = UnoRuntime.queryInterface( XMutableGridDataModel.class, + gridModelProps.getPropertyValue( "GridDataModel" ) ); + assertNotNull( dataModel ); + assertEquals( 0, dataModel.getColumnCount() ); + + final XGridColumnModel columnModel = UnoRuntime.queryInterface( XGridColumnModel.class, + gridModelProps.getPropertyValue( "ColumnModel" ) ); + assertNotNull( columnModel ); + assertEquals( 0, columnModel.getColumnCount() ); + + dataModel.addRow( null, new Object[] { 1, 2, 3 } ); + assertEquals( 3, dataModel.getColumnCount() ); + assertEquals( 3, columnModel.getColumnCount() ); + } + finally + { + impl_dispose( disposables.toArray()); + } + } + // ----------------------------------------------------------------------------------------------------------------- private int impl_assertInteger( final Object i_object ) { @@ -504,6 +580,12 @@ public class GridControl System.out.println( "--------------------------------------------------------------------------------" ); } + // ----------------------------------------------------------------------------------------------------------------- + public T createInstance( Class i_interfaceClass, final String i_serviceIndentifer ) throws Exception + { + return UnoRuntime.queryInterface( i_interfaceClass, createInstance( i_serviceIndentifer ) ); + } + // ----------------------------------------------------------------------------------------------------------------- private Object createInstance( final String i_serviceName ) throws Exception { diff --git a/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java b/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java index e55b2b1bb0ad..c550dd9a047d 100755 --- a/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java +++ b/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java @@ -26,11 +26,13 @@ package complex.toolkit.awtgrid; +import java.lang.reflect.Method; import com.sun.star.awt.grid.GridDataEvent; import com.sun.star.awt.grid.XMutableGridDataModel; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.IndexOutOfBoundsException; import static org.junit.Assert.*; +import static complex.toolkit.Assert.*; /** test for the css.awt.grid.XMutableGridData interface * @@ -49,19 +51,21 @@ public class TMutableGridDataModel /* * tests the XMutableGridDataModel.addRow method */ - public void testAddRow() + public void testAddRow() throws IndexOutOfBoundsException { m_dataModel.addRow( 1, m_rowValues[0] ); GridDataEvent event = m_listener.assertSingleRowInsertionEvent(); + m_listener.reset(); assertEquals( "row insertion: wrong FirstRow (1)", 0, event.FirstRow ); assertEquals( "row insertion: wrong LastRow (1)", 0, event.LastRow ); - m_listener.reset(); + impl_assertRowData( 0 ); m_dataModel.addRow( 2, m_rowValues[1] ); event = m_listener.assertSingleRowInsertionEvent(); + m_listener.reset(); assertEquals( "row insertion: wrong FirstRow (2)", 1, event.FirstRow ); assertEquals( "row insertion: wrong LastRow (2)", 1, event.LastRow ); - m_listener.reset(); + impl_assertRowData( 1 ); } /** @@ -87,6 +91,9 @@ public class TMutableGridDataModel m_rowValues[row][col], m_dataModel.getCellData( col, row ) ); } } + + assertException( "addRows is expected to throw when invoked with different-sized arrays", + m_dataModel, "addRows", new Object[] { new Object[0], new Object[1][2] }, IllegalArgumentException.class ); } /** @@ -112,6 +119,11 @@ public class TMutableGridDataModel m_rowValues[row+1][col], m_dataModel.getCellData( col, row ) ); } } + + assertException( "removeRow silently ignores an invalid index (1)", + m_dataModel, "removeRow", new Object[] { -1 }, IndexOutOfBoundsException.class ); + assertException( "removeRow silently ignores an invalid index (2)", + m_dataModel, "removeRow", new Object[] { m_dataModel.getRowCount() }, IndexOutOfBoundsException.class ); } /** @@ -163,6 +175,16 @@ public class TMutableGridDataModel assertEquals( "data change at (" + col + ", " + row + ") not successful", value, m_dataModel.getCellData( col, row ) ); } + + assertException( "updateCellData silently ignores an invalid index (1)", + m_dataModel, "updateCellData", new Class[] { int.class, int.class, Object.class }, + new Object[] { -1, -1, "text" }, IndexOutOfBoundsException.class ); + assertException( "updateCellData silently ignores an invalid index (2)", + m_dataModel, "updateCellData", new Class[] { int.class, int.class, Object.class }, + new Object[] { 0, m_dataModel.getRowCount(), "text" }, IndexOutOfBoundsException.class ); + assertException( "updateCellData silently ignores an invalid index (3)", + m_dataModel, "updateCellData", new Class[] { int.class, int.class, Object.class }, + new Object[] { m_dataModel.getColumnCount(), 0, "text" }, IndexOutOfBoundsException.class ); } /** @@ -202,6 +224,17 @@ public class TMutableGridDataModel // ensure both the manually updated pre-update data and the post-update data are identical assertArrayEquals( preUpdateValues, postUpdateValues ); + + + assertException( "updateRowData silently ignores an invalid index (1)", + m_dataModel, "updateRowData", new Class[] { int[].class, int.class, Object[].class }, + new Object[] { new int[] { -1 }, 0, new Object[] { "text" } }, IndexOutOfBoundsException.class ); + assertException( "updateRowData silently ignores an invalid index (2)", + m_dataModel, "updateRowData", new Class[] { int[].class, int.class, Object[].class }, + new Object[] { new int[] { 0 }, -1, new Object[] { "" } }, IndexOutOfBoundsException.class ); + assertException( "updateRowData silently ignores different-sized arrays", + m_dataModel, "updateRowData", new Class[] { int[].class, int.class, Object[].class }, + new Object[] { new int[] { 0, 0 }, 0, new Object[] { "" } }, IllegalArgumentException.class ); } /** @@ -225,6 +258,10 @@ public class TMutableGridDataModel final Object[] postUpdateHeadings = impl_getCurrentRowHeadings(); assertArrayEquals( preUpdateHeadings, postUpdateHeadings ); + + assertException( "updateRowHeading silently ignores an invalid index", + m_dataModel, "updateRowHeading", new Class[] { int.class, Object.class }, + new Object[] { -1, "" }, IndexOutOfBoundsException.class ); } public void cleanup() @@ -256,6 +293,14 @@ public class TMutableGridDataModel return headings; } + private void impl_assertRowData( final int i_rowIndex ) throws IndexOutOfBoundsException + { + for ( int i=0; i Date: Thu, 27 Jan 2011 12:56:33 +0100 Subject: gridsort: element*: don't let non-runtime exceptions slip, this will crash on non-Windows platforms --- toolkit/source/controls/dialogcontrol.cxx | 45 +++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index f7e2094d01aa..bbe7a1fc9c83 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -1684,7 +1684,16 @@ void UnoDialogControl::elementInserted( const ContainerEvent& Event ) throw(Runt Event.Accessor >>= aName; Event.Element >>= xModel; - ImplInsertControl( xModel, aName ); + ENSURE_OR_RETURN_VOID( xModel.is(), "UnoDialogControl::elementInserted: illegal element!" ); + try + { + ImplInsertControl( xModel, aName ); + } + catch ( const RuntimeException& e ) { throw; } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } void UnoDialogControl::elementRemoved( const ContainerEvent& Event ) throw(RuntimeException) @@ -1693,8 +1702,16 @@ void UnoDialogControl::elementRemoved( const ContainerEvent& Event ) throw(Runti Reference< XControlModel > xModel; Event.Element >>= xModel; - if ( xModel.is() ) + ENSURE_OR_RETURN_VOID( xModel.is(), "UnoDialogControl::elementRemoved: illegal element!" ); + try + { ImplRemoveControl( xModel ); + } + catch ( const RuntimeException& e ) { throw; } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } void UnoDialogControl::elementReplaced( const ContainerEvent& Event ) throw(RuntimeException) @@ -1703,13 +1720,31 @@ void UnoDialogControl::elementReplaced( const ContainerEvent& Event ) throw(Runt Reference< XControlModel > xModel; Event.ReplacedElement >>= xModel; - if ( xModel.is() ) - ImplRemoveControl( xModel ); + try + { + OSL_ENSURE( xModel.is(), "UnoDialogControl::elementReplaced: invalid ReplacedElement!" ); + if ( xModel.is() ) + ImplRemoveControl( xModel ); + } + catch ( const RuntimeException& e ) { throw; } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } ::rtl::OUString aName; Event.Accessor >>= aName; Event.Element >>= xModel; - ImplInsertControl( xModel, aName ); + ENSURE_OR_RETURN_VOID( xModel.is(), "UnoDialogControl::elementReplaced: invalid new element!" ); + try + { + ImplInsertControl( xModel, aName ); + } + catch ( const RuntimeException& e ) { throw; } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } void UnoDialogControl::addTopWindowListener( const Reference< XTopWindowListener >& rxListener ) throw (RuntimeException) -- cgit From c97ccfc7989ec992f681e8a174a07a9a48433bdf Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 27 Jan 2011 12:59:46 +0100 Subject: gridsort: properly render the sort indicator for right-aligned columns --- svtools/source/table/gridtablerenderer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 26d023535198..b265b9824dea 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -300,7 +300,7 @@ namespace svt { namespace table { // text is right aligned => draw the sort indicator at the left hand side _rDevice.DrawBitmapEx( - Point( nSortIndicatorPaddingX, nSortIndicatorPaddingY ), + Point( _rArea.Left() + nSortIndicatorPaddingX, _rArea.Top() + nSortIndicatorPaddingY ), aIndicatorBitmap ); } -- cgit From 475f089296d926338b018ba08301ad30a1be35c1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 27 Jan 2011 13:06:51 +0100 Subject: gridsort: removed unused includes --- svtools/source/uno/svtxgridcontrol.cxx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index d61a983b309b..0e826ef6bff3 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -40,9 +40,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -56,9 +53,6 @@ using namespace ::com::sun::star::view; using namespace ::com::sun::star::style; using namespace ::com::sun::star::container; using namespace ::com::sun::star::accessibility; -using namespace ::com::sun::star::accessibility::AccessibleEventId; -using namespace ::com::sun::star::accessibility::AccessibleTableModelChangeType; -using ::com::sun::star::accessibility::AccessibleTableModelChange; SVTXGridControl::SVTXGridControl() -- cgit From aede73a350906eedae41e5971511c6c2f2c0e5f2 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 27 Jan 2011 13:25:09 +0100 Subject: csvexport: #i116636# option to leave out unnecessary quotes in CSV export --- sc/source/ui/dbgui/asciiopt.cxx | 6 ++++++ sc/source/ui/dbgui/imoptdlg.cxx | 35 +++++++++++++++++++++++++++---- sc/source/ui/dbgui/imoptdlg.hrc | 1 + sc/source/ui/dbgui/imoptdlg.src | 12 +++++++++-- sc/source/ui/dbgui/scuiasciiopt.cxx | 2 +- sc/source/ui/dbgui/scuiimoptdlg.cxx | 10 +++++++-- sc/source/ui/docshell/docsh.cxx | 41 +++++++++++++++++++++++++++++-------- sc/source/ui/inc/imoptdlg.hxx | 14 ++++++++----- sc/source/ui/inc/scuiimoptdlg.hxx | 3 ++- sc/source/ui/src/globstr.src | 2 +- 10 files changed, 102 insertions(+), 24 deletions(-) diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index a22953ade25b..87298da206e1 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -312,6 +312,10 @@ void ScAsciiOptions::ReadFromString( const String& rString ) aToken = rString.GetToken(7, ','); bDetectSpecialNumber = aToken.EqualsAscii("true") ? true : false; } + else + bDetectSpecialNumber = sal_True; // default of versions that didn't add the parameter + + // 9th token is used for "Save as shown" in export options } @@ -399,6 +403,8 @@ String ScAsciiOptions::WriteToString() const // Detect special nubmers. aOutStr += String::CreateFromAscii(bDetectSpecialNumber ? "true" : "false"); + // 9th token is used for "Save as shown" in export options + return aOutStr; } diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx index bd18008afd47..98d2da500d08 100644 --- a/sc/source/ui/dbgui/imoptdlg.cxx +++ b/sc/source/ui/dbgui/imoptdlg.cxx @@ -44,10 +44,20 @@ static const sal_Char pStrFix[] = "FIX"; ScImportOptions::ScImportOptions( const String& rStr ) { + // Use the same string format as ScAsciiOptions, + // because the import options string is passed here when a CSV file is loaded and saved again. + // The old format is still supported because it might be used in macros. + bFixedWidth = FALSE; nFieldSepCode = 0; - if ( rStr.GetTokenCount(',') >= 3 ) + nTextSepCode = 0; + eCharSet = RTL_TEXTENCODING_DONTKNOW; + bSaveAsShown = sal_True; // "true" if not in string (after CSV import) + bQuoteAllText = sal_False; + xub_StrLen nTokenCount = rStr.GetTokenCount(','); + if ( nTokenCount >= 3 ) { + // first 3 tokens: common String aToken( rStr.GetToken( 0, ',' ) ); if( aToken.EqualsIgnoreCaseAscii( pStrFix ) ) bFixedWidth = TRUE; @@ -56,7 +66,21 @@ ScImportOptions::ScImportOptions( const String& rStr ) nTextSepCode = (sal_Unicode) rStr.GetToken(1,',').ToInt32(); aStrFont = rStr.GetToken(2,','); eCharSet = ScGlobal::GetCharsetValue(aStrFont); - bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? TRUE : FALSE); + + if ( nTokenCount == 4 ) + { + // compatibility with old options string: "Save as shown" as 4th token, numeric + bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? sal_True : sal_False); + bQuoteAllText = sal_True; // use old default then + } + else + { + // look at the same positions as in ScAsciiOptions + if ( nTokenCount >= 7 ) + bQuoteAllText = rStr.GetToken(6, ',').EqualsAscii("true"); + if ( nTokenCount >= 9 ) + bSaveAsShown = rStr.GetToken(8, ',').EqualsAscii("true"); + } } } @@ -74,8 +98,11 @@ String ScImportOptions::BuildString() const aResult += String::CreateFromInt32(nTextSepCode); aResult += ','; aResult += aStrFont; - aResult += ','; - aResult += String::CreateFromInt32( bSaveAsShown ? 1 : 0 ); + // use the same string format as ScAsciiOptions: + aResult.AppendAscii( ",1,,0," ); // first row, no column info, default language + aResult.AppendAscii(bQuoteAllText ? "true" : "false"); // same as "quoted field as text" in ScAsciiOptions + aResult.AppendAscii( ",true," ); // "detect special numbers" + aResult.AppendAscii(bSaveAsShown ? "true" : "false"); // "save as shown": not in ScAsciiOptions return aResult; } diff --git a/sc/source/ui/dbgui/imoptdlg.hrc b/sc/source/ui/dbgui/imoptdlg.hrc index 5fd9256e8009..22136706de9d 100644 --- a/sc/source/ui/dbgui/imoptdlg.hrc +++ b/sc/source/ui/dbgui/imoptdlg.hrc @@ -41,4 +41,5 @@ #define FL_FIELDOPT 11 #define CB_FIXEDWIDTH 12 #define CB_SAVESHOWN 13 +#define CB_QUOTEALL 14 diff --git a/sc/source/ui/dbgui/imoptdlg.src b/sc/source/ui/dbgui/imoptdlg.src index e83f3a9c9dac..905308e9fecb 100644 --- a/sc/source/ui/dbgui/imoptdlg.src +++ b/sc/source/ui/dbgui/imoptdlg.src @@ -96,7 +96,7 @@ ModalDialog RID_SCDLG_IMPORTOPT CheckBox CB_FIXEDWIDTH { HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH"; - Pos = MAP_APPFONT( 12, 80 ); + Pos = MAP_APPFONT( 12, 92 ); Size = MAP_APPFONT( 172, 10 ); Hide = TRUE; Text [ en-US ] = "Fixed column ~width"; @@ -104,12 +104,20 @@ ModalDialog RID_SCDLG_IMPORTOPT CheckBox CB_SAVESHOWN { HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_SAVESHOWN"; - Pos = MAP_APPFONT( 12, 66 ); + Pos = MAP_APPFONT( 12, 78 ); Size = MAP_APPFONT( 172, 10 ); TabStop = TRUE; Hide = TRUE; Text [ en-US ] = "Save cell content as ~shown"; }; + CheckBox CB_QUOTEALL + { + HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_QUOTEALL"; + Pos = MAP_APPFONT( 20, 64 ); + Size = MAP_APPFONT( 164, 10 ); + Hide = TRUE; + Text [ en-US ] = "~Quote all text cells"; + }; OKButton BTN_OK { Pos = MAP_APPFONT ( 202 , 6 ) ; diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 42f2a2d86933..7b6d601c2bcd 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -273,7 +273,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, OUString sTextSeparators; bool bMergeDelimiters = false; bool bFixedWidth = false; - bool bQuotedFieldAsText = true; + bool bQuotedFieldAsText = false; bool bDetectSpecialNum = false; sal_Int32 nFromRow = 1; sal_Int32 nCharSet = -1; diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 5440f515c86a..6077609f80db 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -132,11 +132,12 @@ ScImportOptionsDlg::ScImportOptionsDlg( aEdFieldSep ( this, ScResId( ED_FIELDSEP ) ), aFtTextSep ( this, ScResId( FT_TEXTSEP ) ), aEdTextSep ( this, ScResId( ED_TEXTSEP ) ), + aCbQuoteAll ( this, ScResId( CB_QUOTEALL ) ), + aCbShown ( this, ScResId( CB_SAVESHOWN ) ), aCbFixed ( this, ScResId( CB_FIXEDWIDTH ) ), aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), - aBtnHelp ( this, ScResId( BTN_HELP ) ), - aCbShown ( this, ScResId( CB_SAVESHOWN ) ) + aBtnHelp ( this, ScResId( BTN_HELP ) ) { // im Ctor-Initializer nicht moeglich (MSC kann das nicht): pFieldSepTab = new ScDelimiterTable( String(ScResId(SCSTR_FIELDSEP)) ); @@ -214,6 +215,8 @@ ScImportOptionsDlg::ScImportOptionsDlg( aCbFixed.Check( FALSE ); aCbShown.Show(); aCbShown.Check( TRUE ); + aCbQuoteAll.Show(); + aCbQuoteAll.Check( sal_False ); } else { @@ -225,6 +228,7 @@ ScImportOptionsDlg::ScImportOptionsDlg( aEdTextSep.Hide(); aCbFixed.Hide(); aCbShown.Hide(); + aCbQuoteAll.Hide(); aLbFont.GrabFocus(); aLbFont.SetDoubleClickHdl( LINK( this, ScImportOptionsDlg, DoubleClickHdl ) ); } @@ -259,6 +263,7 @@ void ScImportOptionsDlg::GetImportOptions( ScImportOptions& rOptions ) const rOptions.nTextSepCode = GetCodeFromCombo( aEdTextSep ); rOptions.bFixedWidth = aCbFixed.IsChecked(); rOptions.bSaveAsShown = aCbShown.IsChecked(); + rOptions.bQuoteAllText = aCbQuoteAll.IsChecked(); } } @@ -302,6 +307,7 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox ) aFtTextSep.Enable( bEnable ); aEdTextSep.Enable( bEnable ); aCbShown.Enable( bEnable ); + aCbQuoteAll.Enable( bEnable ); } return 0; } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 901363785cc9..260548786275 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1650,6 +1650,8 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt USHORT nOldNumberFormatInt = rStream.GetNumberFormatInt(); ByteString aStrDelimEncoded; // only used if not Unicode UniString aStrDelimDecoded; // only used if context encoding + ByteString aDelimEncoded; + UniString aDelimDecoded; BOOL bContextOrNotAsciiEncoding; if ( eCharSet == RTL_TEXTENCODING_UNICODE ) { @@ -1659,6 +1661,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt else { aStrDelimEncoded = ByteString( cStrDelim, eCharSet ); + aDelimEncoded = ByteString( cDelim, eCharSet ); rtl_TextEncodingInfo aInfo; aInfo.StructSize = sizeof(aInfo); if ( rtl_getTextEncodingInfo( eCharSet, &aInfo ) ) @@ -1667,7 +1670,10 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt (((aInfo.Flags & RTL_TEXTENCODING_INFO_CONTEXT) != 0) || ((aInfo.Flags & RTL_TEXTENCODING_INFO_ASCII) == 0)); if ( bContextOrNotAsciiEncoding ) + { aStrDelimDecoded = String( aStrDelimEncoded, eCharSet ); + aDelimDecoded = String( aDelimEncoded, eCharSet ); + } } else bContextOrNotAsciiEncoding = FALSE; @@ -1895,14 +1901,21 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt if ( eCharSet == RTL_TEXTENCODING_UNICODE ) { xub_StrLen nPos = aString.Search( cStrDelim ); + // #i116636# quotes are needed if text delimiter (quote), field delimiter, or LF is in the cell text + bool bNeedQuotes = rAsciiOpt.bQuoteAllText || + ( nPos != STRING_NOTFOUND ) || + ( aString.Search( cDelim ) != STRING_NOTFOUND ) || + ( aString.Search( sal_Unicode(_LF) ) != STRING_NOTFOUND ); while ( nPos != STRING_NOTFOUND ) { aString.Insert( cStrDelim, nPos ); nPos = aString.Search( cStrDelim, nPos+2 ); } - rStream.WriteUniOrByteChar( cStrDelim, eCharSet ); + if ( bNeedQuotes ) + rStream.WriteUniOrByteChar( cStrDelim, eCharSet ); rStream.WriteUnicodeText( aString ); - rStream.WriteUniOrByteChar( cStrDelim, eCharSet ); + if ( bNeedQuotes ) + rStream.WriteUniOrByteChar( cStrDelim, eCharSet ); } else { @@ -1928,6 +1941,10 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt UniString aStrDec( aStrEnc, eCharSet ); // search on re-decoded string xub_StrLen nPos = aStrDec.Search( aStrDelimDecoded ); + bool bNeedQuotes = rAsciiOpt.bQuoteAllText || + ( nPos != STRING_NOTFOUND ) || + ( aStrDec.Search( aDelimDecoded ) != STRING_NOTFOUND ) || + ( aStrDec.Search( sal_Unicode(_LF) ) != STRING_NOTFOUND ); while ( nPos != STRING_NOTFOUND ) { aStrDec.Insert( aStrDelimDecoded, nPos ); @@ -1935,15 +1952,21 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt nPos+1+aStrDelimDecoded.Len() ); } // write byte re-encoded - rStream.WriteUniOrByteChar( cStrDelim, eCharSet ); + if ( bNeedQuotes ) + rStream.WriteUniOrByteChar( cStrDelim, eCharSet ); rStream.WriteUnicodeOrByteText( aStrDec, eCharSet ); - rStream.WriteUniOrByteChar( cStrDelim, eCharSet ); + if ( bNeedQuotes ) + rStream.WriteUniOrByteChar( cStrDelim, eCharSet ); } else { ByteString aStrEnc( aString, eCharSet ); // search on encoded string xub_StrLen nPos = aStrEnc.Search( aStrDelimEncoded ); + bool bNeedQuotes = rAsciiOpt.bQuoteAllText || + ( nPos != STRING_NOTFOUND ) || + ( aStrEnc.Search( aDelimEncoded ) != STRING_NOTFOUND ) || + ( aStrEnc.Search( sal_Char(_LF) ) != STRING_NOTFOUND ); while ( nPos != STRING_NOTFOUND ) { aStrEnc.Insert( aStrDelimEncoded, nPos ); @@ -1951,11 +1974,13 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt nPos+1+aStrDelimEncoded.Len() ); } // write byte encoded - rStream.Write( aStrDelimEncoded.GetBuffer(), - aStrDelimEncoded.Len() ); + if ( bNeedQuotes ) + rStream.Write( aStrDelimEncoded.GetBuffer(), + aStrDelimEncoded.Len() ); rStream.Write( aStrEnc.GetBuffer(), aStrEnc.Len() ); - rStream.Write( aStrDelimEncoded.GetBuffer(), - aStrDelimEncoded.Len() ); + if ( bNeedQuotes ) + rStream.Write( aStrDelimEncoded.GetBuffer(), + aStrDelimEncoded.Len() ); } } } diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx index d959069c46b6..bd01f60627d0 100644 --- a/sc/source/ui/inc/imoptdlg.hxx +++ b/sc/source/ui/inc/imoptdlg.hxx @@ -45,18 +45,18 @@ public: ScImportOptions() : nFieldSepCode(0), nTextSepCode(0), eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(FALSE), - bSaveAsShown(FALSE) + bSaveAsShown(FALSE), bQuoteAllText(sal_False) {} ScImportOptions( const String& rStr ); ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const String& rStr ) : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr), - bFixedWidth(FALSE), bSaveAsShown(FALSE) + bFixedWidth(FALSE), bSaveAsShown(FALSE), bQuoteAllText(sal_False) { eCharSet = ScGlobal::GetCharsetValue(aStrFont); } ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc ) : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), - bFixedWidth(FALSE), bSaveAsShown(FALSE) + bFixedWidth(FALSE), bSaveAsShown(FALSE), bQuoteAllText(sal_False) { SetTextEncoding( nEnc ); } ScImportOptions( const ScImportOptions& rCpy ) @@ -65,7 +65,8 @@ public: aStrFont (rCpy.aStrFont), eCharSet (rCpy.eCharSet), bFixedWidth (rCpy.bFixedWidth), - bSaveAsShown (rCpy.bSaveAsShown) + bSaveAsShown (rCpy.bSaveAsShown), + bQuoteAllText (rCpy.bQuoteAllText) {} ScImportOptions& operator=( const ScImportOptions& rCpy ) @@ -76,6 +77,7 @@ public: eCharSet = rCpy.eCharSet; bFixedWidth = rCpy.bFixedWidth; bSaveAsShown = rCpy.bSaveAsShown; + bQuoteAllText = rCpy.bQuoteAllText; return *this; } @@ -87,7 +89,8 @@ public: && eCharSet == rCmp.eCharSet && aStrFont == rCmp.aStrFont && bFixedWidth == rCmp.bFixedWidth - && bSaveAsShown == rCmp.bSaveAsShown; + && bSaveAsShown == rCmp.bSaveAsShown + && bQuoteAllText == rCmp.bQuoteAllText; } String BuildString() const; @@ -99,6 +102,7 @@ public: CharSet eCharSet; BOOL bFixedWidth; BOOL bSaveAsShown; + sal_Bool bQuoteAllText; }; diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx index 957d174a3deb..705b244233a9 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -58,11 +58,12 @@ private: ComboBox aEdFieldSep; FixedText aFtTextSep; ComboBox aEdTextSep; + CheckBox aCbQuoteAll; + CheckBox aCbShown; CheckBox aCbFixed; OKButton aBtnOk; CancelButton aBtnCancel; HelpButton aBtnHelp; - CheckBox aCbShown; ScDelimiterTable* pFieldSepTab; ScDelimiterTable* pTextSepTab; diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src index 6c15762bda6a..f8347ed42110 100644 --- a/sc/source/ui/src/globstr.src +++ b/sc/source/ui/src/globstr.src @@ -1037,7 +1037,7 @@ Resource RID_GLOBSTR }; String STR_EXPORT_ASCII { - Text [ en-US ] = "Export of text files" ; + Text [ en-US ] = "Export Text File" ; }; String STR_IMPORT_LOTUS { -- cgit From 94c058640c77e30244c930c33f761fff4190e61f Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 27 Jan 2011 13:25:09 +0100 Subject: csvexport: #i116636# option to leave out unnecessary quotes in CSV export --- officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 913902731f29..aeddefb763c2 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1039,7 +1039,7 @@ with no exception. - true + false -- cgit From c9f03dd680c2274d5cf387172d9c60615a8db0df Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 27 Jan 2011 13:33:02 +0100 Subject: gridsort: impl_ni_updateColumnWidts: after calculating effective widths, forward this to the column models --- svtools/source/table/tablecontrol_impl.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 885974a21489..edf2dbd01491 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -718,6 +718,7 @@ namespace svt { namespace table if ( !m_bUpdatingColWidths ) { impl_ni_updateColumnWidths( i_column ); + invalidate( TableAreaAll ); impl_ni_updateScrollbars(); } @@ -1031,6 +1032,11 @@ namespace svt { namespace table const long columnEnd = columnStart + colWidth; m_aColumnWidths.push_back( MutableColumnMetrics( columnStart, columnEnd ) ); accumulatedWidthPixel = columnEnd; + + // and don't forget to forward this to the column models + PColumnModel const pColumn = m_pModel->getColumnModel( col ); + ENSURE_OR_THROW( !!pColumn, "invalid column returned by the model!" ); + pColumn->setWidth( newWidths[col] ); } // if the column resizing happened to leave some space at the right, but there are columns -- cgit From 4d84cbefd2b88804e4a1ae7ed775d2d99d8a32a4 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 27 Jan 2011 13:48:12 +0100 Subject: sb138: #i116659# timely termination of OnLogRotateThread --- .../source/oooimprovement/onlogrotate_job.cxx | 44 +++++++++------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx index d83c43bfcfd8..e1f9cf717584 100644 --- a/extensions/source/oooimprovement/onlogrotate_job.cxx +++ b/extensions/source/oooimprovement/onlogrotate_job.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -108,49 +108,41 @@ namespace public: OnLogRotateThread(Reference sf); virtual void SAL_CALL run(); - OnLogRotateThread* disposing(); + void stop(); private: Reference m_ServiceFactory; - ::osl::Mutex m_ServiceFactoryMutex; + ::osl::Condition m_Stop; }; OnLogRotateThread::OnLogRotateThread(Reference sf) : m_ServiceFactory(sf) - { } + { + OSL_ASSERT(sf.is()); + } void SAL_CALL OnLogRotateThread::run() { + TimeValue wait_intervall = {30,0}; + if (m_Stop.wait(&wait_intervall) == ::osl::Condition::result_timeout) { - ::osl::Thread::yield(); - TimeValue wait_intervall = {30,0}; - osl_waitThread(&wait_intervall); - } - { - ::osl::Guard< ::osl::Mutex> service_factory_guard(m_ServiceFactoryMutex); try { - if(m_ServiceFactory.is()) + if(Config(m_ServiceFactory).getInvitationAccepted()) { - if(Config(m_ServiceFactory).getInvitationAccepted()) - { - packLogs(m_ServiceFactory); - uploadLogs(m_ServiceFactory); - } - else - LogStorage(m_ServiceFactory).clear(); + packLogs(m_ServiceFactory); + uploadLogs(m_ServiceFactory); } - m_ServiceFactory.clear(); + else + LogStorage(m_ServiceFactory).clear(); } catch(...) {} } } - OnLogRotateThread* OnLogRotateThread::disposing() + void OnLogRotateThread::stop() { - ::osl::Guard< ::osl::Mutex> service_factory_guard(m_ServiceFactoryMutex); - m_ServiceFactory.clear(); - return this; + m_Stop.set(); } class OnLogRotateThreadWatcher : public ::cppu::WeakImplHelper1 @@ -163,7 +155,7 @@ namespace } virtual ~OnLogRotateThreadWatcher() { - m_Thread->disposing()->terminate(); + m_Thread->stop(); m_Thread->join(); }; @@ -172,13 +164,13 @@ namespace { }; virtual void SAL_CALL notifyTermination(const EventObject&) throw(RuntimeException) { - m_Thread->disposing()->terminate(); + m_Thread->stop(); m_Thread->join(); }; // XEventListener virtual void SAL_CALL disposing(const EventObject&) throw(RuntimeException) { - m_Thread->disposing()->terminate(); + m_Thread->stop(); m_Thread->join(); }; private: -- cgit From c5f65c146368f79ddbda7a2e6987f6a043f9cf26 Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Thu, 27 Jan 2011 15:04:49 +0100 Subject: #i116658# update issue ids and remove obsolete ones --- .../optional/includes/CJK_FeatureSwitchTest_1.inc | 17 ++++-- .../framework/optional/includes/configuration.inc | 66 ++++------------------ .../optional/includes/options_loadsave_general.inc | 3 +- .../optional/includes/options_ooo_general.inc | 6 +- testautomation/math/optional/includes/m_101_.inc | 3 +- testautomation/math/optional/includes/m_105.inc | 6 +- testautomation/math/required/includes/m_001_.inc | 6 +- testautomation/math/required/includes/m_005_.inc | 3 +- testautomation/math/required/includes/m_007_.inc | 3 +- 9 files changed, 43 insertions(+), 70 deletions(-) mode change 100755 => 100644 testautomation/framework/optional/includes/configuration.inc mode change 100755 => 100644 testautomation/math/required/includes/m_007_.inc diff --git a/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc b/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc index 081b35f322ec..63f552df63bf 100755 --- a/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc +++ b/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc @@ -346,7 +346,8 @@ testcase tWriterUIChangesTest7 Kontext "RubyDialog" DialogClose.Click Sleep 2 - QAErrorlog "#i40913# Something wrong in menu format/Ruby when Asian Language support is off" + '#i40913# + warnlog "Something wrong in menu format/Ruby when Asian Language support is off" catch endcatch end if @@ -398,25 +399,29 @@ testcase tWriterUIChangesTest8 try FormatChangeCaseHalfWidth - QAErrorlog "#i43434# Something wrong in submenu format/change case -> Half width when Asian Language support is off" + '#i43434# + warnlog "Something wrong in submenu format/change case -> Half width when Asian Language support is off" catch endcatch try FormatChangeCaseFullWidth - QAErrorlog "#i43434# Something wrong in submenu format/change case -> Full width when Asian Language support is off" + '#i43434# + warnlog "Something wrong in submenu format/change case -> Full width when Asian Language support is off" catch endcatch try FormatChangeCaseHiragana - QAErrorlog "#i43434# Something wrong in submenu format/change case -> Hiragana when Asian Language support is off" + '#i43434# + warnlog "Something wrong in submenu format/change case -> Hiragana when Asian Language support is off" catch endcatch try FormatChangeCaseKatagana - QAErrorlog "#i43434# Something wrong in submenu format/change case -> Katagana when Asian Language support is off" + '#i43434# + warnlog "Something wrong in submenu format/change case -> Katagana when Asian Language support is off" catch endcatch end if @@ -740,4 +745,4 @@ function hSystemHasAsianLocale() as boolean case else : hSystemHasAsianLocale() = false end select -end function \ No newline at end of file +end function diff --git a/testautomation/framework/optional/includes/configuration.inc b/testautomation/framework/optional/includes/configuration.inc old mode 100755 new mode 100644 index 0fce11bddd1b..9e63a4a9ad7e --- a/testautomation/framework/optional/includes/configuration.inc +++ b/testautomation/framework/optional/includes/configuration.inc @@ -44,7 +44,8 @@ sub sToolsCustomizeKeyboardFunction for i = 0 to a if ( i = 7 and gtSysName = "Solaris x86" ) then - qaerrorlog( "#i62423# Solaris: Crash when opening new database" ) + '#i62423# + warnlog( "Solaris: Crash when opening new database" ) else gApplication = aApplication(i) tToolsCustomizeKeyboardFunction(lList()) @@ -87,6 +88,7 @@ testcase tToolsCustomizeKeyboardFunction(lList()) dim i92080 as string dim i96322 as string dim i100037 as string + dim i115370 as string i60617 = ".uno:ContinueNumbering" i43969 = ".uno:MacroOrganizer" @@ -94,12 +96,13 @@ testcase tToolsCustomizeKeyboardFunction(lList()) i80850 = ".uno:ToggleFormula.uno:AssignMacro" i84982 = ".uno:FontDialogForParagraph" i84983 = ".uno:DBNewReportWithPreSelection" - i87950 = ".uno:DBMigrateScripts" - i87951 = ".uno:DeleteAllNotes.uno:DeleteAuthor.uno:DeleteNote.uno:HideAllNotes.uno:HideAuthor.uno:HideNote" - i87952 = ".uno:InsertApplet" - i92080 = ".uno:SaveGraphic" - i96322 = ".uno:ActivateStyleApply" - i100037 = ".uno:AcceptTracedChange, .uno:DeleteComment, .uno:RejectTracedChange, .uno:ReplyNote, .uno:TaskPaneInsertPage, .uno:ValidityReference" + i87950 = ".uno:DBMigrateScripts" + i87951 = ".uno:DeleteAllNotes.uno:DeleteAuthor.uno:DeleteNote.uno:HideAllNotes.uno:HideAuthor.uno:HideNote" + i87952 = ".uno:InsertApplet" + i92080 = ".uno:SaveGraphic" + i96322 = ".uno:ActivateStyleApply" + i100037 = ".uno:AcceptTracedChange, .uno:DeleteComment, .uno:RejectTracedChange, .uno:ReplyNote, .uno:TaskPaneInsertPage, .uno:ValidityReference" + i115370 = ".uno:TaskPaneInsertPage" Call hNewDocument sleep 2 @@ -130,53 +133,8 @@ testcase tToolsCustomizeKeyboardFunction(lList()) if (((mid(sTemp2,d+1,1)<>" ")AND(abs(asc(mid(sTemp2,d+1,1)))<128)) AND (abs(asc(mid(sTemp2,d-1,1)))<128))then listAppend(lList(),sTemp2) bErrorFound = false - if (inStr(i60617,sTemp2)>0) then - WarnLog "#i60617# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(sTemp2,i64346)>0) then - WarnLog "#i64346# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i43969,sTemp2)>0) then - WarnLog "#i41265# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i80850,sTemp2)>0) then - WarnLog "#i80850# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i84982,sTemp2)>0) then - WarnLog "#i84982# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i84983,sTemp2)>0) then - WarnLog "#i84983# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i87950,sTemp2)>0) then - WarnLog "#i87950# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i87951,sTemp2)>0) then - WarnLog "#i87951# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i87952,sTemp2)>0) then - warnLog "#i87952# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i92080,sTemp2)>0) then - WarnLog "#i92080# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - if (inStr(i96322,sTemp2)>0) then - WarnLog "#i96322# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" - bErrorFound = true - endif - - if (inStr(i100037,sTemp2)>0) then - WarnLog "#i100037# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" + if (inStr(i115370,sTemp2)>0) then + qaerrorlog "#i115370# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'" bErrorFound = true endif if ( not bErrorFound ) then diff --git a/testautomation/framework/optional/includes/options_loadsave_general.inc b/testautomation/framework/optional/includes/options_loadsave_general.inc index d320fb6a6d72..69e08f7bef20 100644 --- a/testautomation/framework/optional/includes/options_loadsave_general.inc +++ b/testautomation/framework/optional/includes/options_loadsave_general.inc @@ -176,7 +176,8 @@ testcase tLoadSaveGeneral printlog( "Doctype: " & Dokumenttyp.getSelText() & " has filter: " & Filter.getSelText() ) if Filter.GetSelIndex <> 3 then - warnlog( "#i79150# some options in Tools/Options->Load/Save->General are not saved" ) + '#i79150# + warnlog( "Some options in Tools/Options->Load/Save->General are not saved" ) endif next i diff --git a/testautomation/framework/optional/includes/options_ooo_general.inc b/testautomation/framework/optional/includes/options_ooo_general.inc index 311f5bf8543d..343cac659971 100644 --- a/testautomation/framework/optional/includes/options_ooo_general.inc +++ b/testautomation/framework/optional/includes/options_ooo_general.inc @@ -85,7 +85,8 @@ testcase tOOoGeneral hToolsOptions ( "StarOffice", "General" ) if Zweistellig.GetText <> "1950" then - Warnlog "#i29810# - Year ( 2 digits ) => changes not saved: " + Zweistellig.GetText + '#i29810# + Warnlog "Year ( 2 digits ) => changes not saved: " + Zweistellig.GetText endif if not Aktivieren.IsChecked then @@ -116,7 +117,8 @@ testcase tOOoGeneral hToolsOptions ( "StarOffice", "General" ) if ( Zweistellig.GetText <> "1800" ) then - Warnlog( "#i29810# - Year ( 2 digits ) => changes not saved : " & Zweistellig.GetText() ) + '#i29810# + Warnlog( "Year ( 2 digits ) => changes not saved : " & Zweistellig.GetText() ) endif If DruckenStatus.IsChecked then diff --git a/testautomation/math/optional/includes/m_101_.inc b/testautomation/math/optional/includes/m_101_.inc index 58582452dc63..26a1d87ad6eb 100644 --- a/testautomation/math/optional/includes/m_101_.inc +++ b/testautomation/math/optional/includes/m_101_.inc @@ -281,7 +281,8 @@ testcase tFilePassword if Passwort.isEnabled then if NOT((instr(sTemp,gMathFilter) = 1)OR(instr(sTemp," (.sxm)") > 1)) then if (4=i) then - warnlog "#i112895# (" + i + "/" + x +"): '"+sTemp+"' Password Checkbox: Enabled" + '#i112895# + warnlog "(" + i + "/" + x +"): '"+sTemp+"' Password Checkbox: Enabled" else warnlog "(" + i + "/" + x +"): '"+sTemp+"' Password Checkbox: Enabled" endif diff --git a/testautomation/math/optional/includes/m_105.inc b/testautomation/math/optional/includes/m_105.inc index 0caad76e7ec5..2f16f4247854 100644 --- a/testautomation/math/optional/includes/m_105.inc +++ b/testautomation/math/optional/includes/m_105.inc @@ -408,7 +408,8 @@ testcase tToolsCatalog SymboleMath.close catch if ((2=i)AND(11=j))then - warnlog "#i42011# Expected: Timeout on closing Tools->Catalog with this character. (" + i + "/" + iSymbolSets + ")(" + j + "/" + x(i) + ")" + '#i42011# + warnlog "Expected: Timeout on closing Tools->Catalog with this character. (" + i + "/" + iSymbolSets + ")(" + j + "/" + x(i) + ")" else warnlog "Not Expected! Timeout on closing Tools->Catalog with this character. (" + i + "/" + iSymbolSets + ")(" + j + "/" + x(i) + ")" endif @@ -570,7 +571,8 @@ testcase tToolsCatalogNew try SymbolSet.select "TBOnewSymbolSet" catch - qaerrorlog "#i64504# Symbol set name is not saved on exiting OOo" + 'i64504 + qaerrorlog "Symbol set name is not saved on exiting OOo" SymbolSet.select "" endcatch SymbolSet.setText "TBOnewSymbolSet" diff --git a/testautomation/math/required/includes/m_001_.inc b/testautomation/math/required/includes/m_001_.inc index 7ddffee84d29..85546a0e222a 100755 --- a/testautomation/math/required/includes/m_001_.inc +++ b/testautomation/math/required/includes/m_001_.inc @@ -205,7 +205,8 @@ testcase tmFilePassword if ( SpeichernDlg.exists( 2 ) ) then Dateiname.SetText Datei$ if (Passwort.IsChecked <> TRUE) then - Warnlog "#i36015# Password has to be checked! :-(" + '#i36015# + Warnlog "Password has to be checked! :-(" Passwort.Check printlog "will be forced checked no!" endif @@ -255,7 +256,8 @@ testcase tmFilePassword Kontext "SpeichernDlg" Dateiname.SetText Datei$ if (Passwort.IsChecked <> TRUE) then - Warnlog "#i36015# Password has to be checked! :-(" + '#i36015# + Warnlog "Password has to be checked! :-(" Passwort.Check printlog "will be forced checked no!" endif diff --git a/testautomation/math/required/includes/m_005_.inc b/testautomation/math/required/includes/m_005_.inc index f2c2a5d0ca60..a7884f29f8a2 100644 --- a/testautomation/math/required/includes/m_005_.inc +++ b/testautomation/math/required/includes/m_005_.inc @@ -298,7 +298,8 @@ testcase tToolsExtensionManager ExtensionSoftwareLicenseAgreement.CANCEL kontext if active.exists(5) then - qaerrorlog "#i73307# Alzheimer feature extension licensing '" + active.getText + "'" + '#i73307# + warnlog "Alzheimer feature extension licensing '" + active.getText + "'" active.ok endif endif diff --git a/testautomation/math/required/includes/m_007_.inc b/testautomation/math/required/includes/m_007_.inc old mode 100755 new mode 100644 index fc8269c05c21..0b4c7c759ed3 --- a/testautomation/math/required/includes/m_007_.inc +++ b/testautomation/math/required/includes/m_007_.inc @@ -121,7 +121,8 @@ testcase tmHelpContents Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'" catch Index.Click - qaErrorLog "#i55563# Used Index Button" + '#i55563# + warnlog "Used Index Button" Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'" endcatch try -- cgit From 9d54d880b52b4ef1c69ca96867e65ee6cd00fb9f Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 27 Jan 2011 20:09:53 +0100 Subject: locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by --- i18npool/inc/i18npool/lang.h | 1 + i18npool/source/isolang/isolang.cxx | 3 +- i18npool/source/localedata/data/ht_HT.xml | 358 +++++++++++++++++++++ .../source/localedata/data/localedata_others.map | 17 + i18npool/source/localedata/data/makefile.mk | 1 + i18npool/source/localedata/localedata.cxx | 3 +- svtools/source/misc/langtab.src | 1 + 7 files changed, 382 insertions(+), 2 deletions(-) create mode 100644 i18npool/source/localedata/data/ht_HT.xml diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index 91da0e3ec78f..5d9c3cee878c 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -519,6 +519,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_LIMBU 0x0657 #define LANGUAGE_USER_LOJBAN 0x0658 /* no locale */ #define LANGUAGE_USER_KABYLE 0x0659 +#define LANGUAGE_USER_HAITIAN 0x065A #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index f174ad431a57..78a66c1cc79e 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -292,7 +292,6 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = // { LANGUAGE_USER_CATALAN_VALENCIAN, "ca", "ES" }, // In case MS format files escaped into the wild, map them back. { LANGUAGE_FRENCH_CAMEROON, "fr", "CM" }, { LANGUAGE_FRENCH_COTE_D_IVOIRE, "fr", "CI" }, - { LANGUAGE_FRENCH_HAITI, "fr", "HT" }, { LANGUAGE_FRENCH_MALI, "fr", "ML" }, { LANGUAGE_FRENCH_SENEGAL, "fr", "SN" }, { LANGUAGE_FRENCH_ZAIRE, "fr", "CD" }, // Democratic Republic Of Congo @@ -465,6 +464,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_LIMBU, "lif", "NP" }, { LANGUAGE_USER_LOJBAN, "jbo", "" }, { LANGUAGE_USER_KABYLE, "kab", "DZ" }, + { LANGUAGE_USER_HAITIAN, "ht", "HT" }, + { LANGUAGE_FRENCH_HAITI, "fr", "HT" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW, "", "" } // marks end of table }; diff --git a/i18npool/source/localedata/data/ht_HT.xml b/i18npool/source/localedata/data/ht_HT.xml new file mode 100644 index 000000000000..99109c72a909 --- /dev/null +++ b/i18npool/source/localedata/data/ht_HT.xml @@ -0,0 +1,358 @@ + + + + + + ht + Haitian Creole + + + HT + Haiti + + + + + / + , + . + : + . + ; + , + , + + + + + + + + + + AM + PM + metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+00 + + + 0.00E+000 + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;-[CURRENCY]#,##0.00 + + + [CURRENCY]#,##0;[RED]-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00 + + + CCC#,##0.00 + + + [CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.-- + + + D/MM/YY + + + NNNNDD, MMMM YYYY + + + DD/MM/YY + + + DD/MM/YYYY + + + D, MMM YY + + + D, MMM YYYY + + + D, MMM YYYY + + + D, MMMM YYYY + + + D, MMMM YY + + + NN, DD/MMM/YY + + + NN, D, MMM YY + + + NN, D, MMMM YYYY + + + NNNND, MMMM YYYY + + + MM/DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + MM/YY + + + MMM/DD + + + MMMM + + + QQ YY + + + WW + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + DD/MM/YY HH:MM + + + DD/MM/YYYY HH:MM:SS AM/PM + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + A-Z + 0 + 1 + s + pl + + + + + + sun + Dim + Dimanch + + + mon + Len + Lendi + + + tue + Mad + Madi + + + wed + Mèk + Mèkredi + + + thu + Jed + Jedi + + + fri + Van + Vandredi + + + sat + Sam + Samdi + + + + + jan + Jan + Janvye + + + feb + Fev + Fevriye + + + mar + Mas + Mas + + + apr + Avr + Avril + + + may + Me + Me + + + jun + Jen + Jen + + + jul + Jiy + Jiyè + + + aug + Dao + Daout + + + sep + Sep + Septanm + + + oct + Okt + Oktòb + + + nov + Nov + Novanm + + + dec + Des + Desanm + + + + + bc + AJ + Avan Jezikri + + + ad + AP + Apre Jezikri + + + + sun + + 1 + + + + + HTG + G + HTG + Goud + 2 + + + + + + + + + + Vre + Fo + Trimès 1 + Trimès 2 + Trimès 3 + Trimès 4 + Anwo + Anba + Trimès 1 + Trimès 2 + Trimès 3 + Trimès 4 + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index d644fa1607cd..73188b45d749 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -26,6 +26,7 @@ getAllCalendars_haw_US; getAllCalendars_he_IL; getAllCalendars_hi_IN; getAllCalendars_hil_PH; +getAllCalendars_ht_HT; getAllCalendars_hu_HU; getAllCalendars_hy_AM; getAllCalendars_ia; @@ -108,6 +109,7 @@ getAllCurrencies_haw_US; getAllCurrencies_he_IL; getAllCurrencies_hi_IN; getAllCurrencies_hil_PH; +getAllCurrencies_ht_HT; getAllCurrencies_hu_HU; getAllCurrencies_hy_AM; getAllCurrencies_ia; @@ -190,6 +192,7 @@ getAllFormats0_haw_US; getAllFormats0_he_IL; getAllFormats0_hi_IN; getAllFormats0_hil_PH; +getAllFormats0_ht_HT; getAllFormats0_hu_HU; getAllFormats0_hy_AM; getAllFormats0_ia; @@ -272,6 +275,7 @@ getBreakIteratorRules_haw_US; getBreakIteratorRules_he_IL; getBreakIteratorRules_hi_IN; getBreakIteratorRules_hil_PH; +getBreakIteratorRules_ht_HT; getBreakIteratorRules_hu_HU; getBreakIteratorRules_hy_AM; getBreakIteratorRules_ia; @@ -354,6 +358,7 @@ getCollationOptions_haw_US; getCollationOptions_he_IL; getCollationOptions_hi_IN; getCollationOptions_hil_PH; +getCollationOptions_ht_HT; getCollationOptions_hu_HU; getCollationOptions_hy_AM; getCollationOptions_ia; @@ -436,6 +441,7 @@ getCollatorImplementation_haw_US; getCollatorImplementation_he_IL; getCollatorImplementation_hi_IN; getCollatorImplementation_hil_PH; +getCollatorImplementation_ht_HT; getCollatorImplementation_hu_HU; getCollatorImplementation_hy_AM; getCollatorImplementation_ia; @@ -518,6 +524,7 @@ getContinuousNumberingLevels_haw_US; getContinuousNumberingLevels_he_IL; getContinuousNumberingLevels_hi_IN; getContinuousNumberingLevels_hil_PH; +getContinuousNumberingLevels_ht_HT; getContinuousNumberingLevels_hu_HU; getContinuousNumberingLevels_hy_AM; getContinuousNumberingLevels_ia; @@ -600,6 +607,7 @@ getFollowPageWords_haw_US; getFollowPageWords_he_IL; getFollowPageWords_hi_IN; getFollowPageWords_hil_PH; +getFollowPageWords_ht_HT; getFollowPageWords_hu_HU; getFollowPageWords_hy_AM; getFollowPageWords_ia; @@ -682,6 +690,7 @@ getForbiddenCharacters_haw_US; getForbiddenCharacters_he_IL; getForbiddenCharacters_hi_IN; getForbiddenCharacters_hil_PH; +getForbiddenCharacters_ht_HT; getForbiddenCharacters_hu_HU; getForbiddenCharacters_hy_AM; getForbiddenCharacters_ia; @@ -764,6 +773,7 @@ getIndexAlgorithm_haw_US; getIndexAlgorithm_he_IL; getIndexAlgorithm_hi_IN; getIndexAlgorithm_hil_PH; +getIndexAlgorithm_ht_HT; getIndexAlgorithm_hu_HU; getIndexAlgorithm_hy_AM; getIndexAlgorithm_ia; @@ -846,6 +856,7 @@ getLCInfo_haw_US; getLCInfo_he_IL; getLCInfo_hi_IN; getLCInfo_hil_PH; +getLCInfo_ht_HT; getLCInfo_hu_HU; getLCInfo_hy_AM; getLCInfo_ia; @@ -928,6 +939,7 @@ getLocaleItem_haw_US; getLocaleItem_he_IL; getLocaleItem_hi_IN; getLocaleItem_hil_PH; +getLocaleItem_ht_HT; getLocaleItem_hu_HU; getLocaleItem_hy_AM; getLocaleItem_ia; @@ -1010,6 +1022,7 @@ getOutlineNumberingLevels_haw_US; getOutlineNumberingLevels_he_IL; getOutlineNumberingLevels_hi_IN; getOutlineNumberingLevels_hil_PH; +getOutlineNumberingLevels_ht_HT; getOutlineNumberingLevels_hu_HU; getOutlineNumberingLevels_hy_AM; getOutlineNumberingLevels_ia; @@ -1092,6 +1105,7 @@ getReservedWords_haw_US; getReservedWords_he_IL; getReservedWords_hi_IN; getReservedWords_hil_PH; +getReservedWords_ht_HT; getReservedWords_hu_HU; getReservedWords_hy_AM; getReservedWords_ia; @@ -1174,6 +1188,7 @@ getSearchOptions_haw_US; getSearchOptions_he_IL; getSearchOptions_hi_IN; getSearchOptions_hil_PH; +getSearchOptions_ht_HT; getSearchOptions_hu_HU; getSearchOptions_hy_AM; getSearchOptions_ia; @@ -1256,6 +1271,7 @@ getTransliterations_haw_US; getTransliterations_he_IL; getTransliterations_hi_IN; getTransliterations_hil_PH; +getTransliterations_ht_HT; getTransliterations_hu_HU; getTransliterations_hy_AM; getTransliterations_ia; @@ -1338,6 +1354,7 @@ getUnicodeScripts_haw_US; getUnicodeScripts_he_IL; getUnicodeScripts_hi_IN; getUnicodeScripts_hil_PH; +getUnicodeScripts_ht_HT; getUnicodeScripts_hu_HU; getUnicodeScripts_hy_AM; getUnicodeScripts_ia; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index b1c324695a27..0d9e186990d7 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -266,6 +266,7 @@ SHL4OBJS= \ $(SLO)$/localedata_he_IL.obj \ $(SLO)$/localedata_hi_IN.obj \ $(SLO)$/localedata_hil_PH.obj \ + $(SLO)$/localedata_ht_HT.obj \ $(SLO)$/localedata_hu_HU.obj \ $(SLO)$/localedata_hy_AM.obj \ $(SLO)$/localedata_ia.obj \ diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 9af043b5457b..8e393c1c4624 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -255,7 +255,8 @@ static const struct { { "yi_US", lcl_DATA_OTHERS }, { "haw_US", lcl_DATA_OTHERS }, { "lif_NP", lcl_DATA_OTHERS }, - { "ur_PK", lcl_DATA_OTHERS } + { "ur_PK", lcl_DATA_OTHERS }, + { "ht_HT", lcl_DATA_OTHERS } }; static const sal_Unicode under = sal_Unicode('_'); diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index effe6506cb1f..bb5fa2dfd363 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -328,6 +328,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Limbu" ; LANGUAGE_USER_LIMBU ; > ; < "Lojban" ; LANGUAGE_USER_LOJBAN ; > ; < "Kabyle" ; LANGUAGE_USER_KABYLE ; > ; + < "Haitian" ; LANGUAGE_USER_HAITIAN ; > ; }; }; -- cgit From f57ab0e27d014b4078b36988dd4965c48a10e87c Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 27 Jan 2011 20:09:53 +0100 Subject: locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by --- solenv/bin/modules/installer/globals.pm | 3 ++- solenv/inc/postset.mk | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 144cf4c88a4b..eb8aa29b61ca 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -87,7 +87,8 @@ BEGIN "oc", "ml", "as", - "ast" + "ast", + "ht" ); @items_at_modules = ("Files", "Dirs", "Unixlinks"); @asianlanguages = ("ja", "ko", "zh-CN", "zh-TW"); diff --git a/solenv/inc/postset.mk b/solenv/inc/postset.mk index 888098fde3df..cddb77d0043d 100644 --- a/solenv/inc/postset.mk +++ b/solenv/inc/postset.mk @@ -73,6 +73,7 @@ he \ hi \ hi-IN \ hr \ +ht \ hu \ is \ it \ -- cgit From b3dd5569495612b6a3710dbf062245c8362b9671 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 27 Jan 2011 20:09:53 +0100 Subject: locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by --- setup_native/source/win32/msi-encodinglist.txt | 27 +++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/setup_native/source/win32/msi-encodinglist.txt b/setup_native/source/win32/msi-encodinglist.txt index 5185a9ea642e..ebfe9371f59f 100644 --- a/setup_native/source/win32/msi-encodinglist.txt +++ b/setup_native/source/win32/msi-encodinglist.txt @@ -3,19 +3,20 @@ af 1252 1078 # Afrikaans ar 1256 1025 ar-SA 1256 1025 -as-IN 0 1101 # Assamese as 0 1101 # Assamese +as-IN 0 1101 # Assamese ast 1252 1610 be-BY 1251 1059 # Belarusian bg 1251 1026 # Bulgarian bn 0 2117 # Bengali bn-BD 0 2117 # Bengali Bangladesh bn-IN 0 1093 # Bengali India +bo 0 2121 br 1252 1150 # Breton brx 0 1603 # Bodo (India) bs 0 5146 # bosnian -bo 0 2121 ca 1252 1027 # Catalan +ca-XV 1252 32771 # Catalan Valencian cs 1250 1029 # Czech cy 1252 1106 # Welsh da 1252 1030 @@ -38,11 +39,12 @@ fr-CA 1252 3084 ga 0 2108 # Irish gd 0 1084 # Gaelic (Scotland) gl 1252 1110 # Galician -gu 0 1095 # Gujarati +gu 0 1095 # Gujarati gu-IN 0 1095 # Gujarati he 1255 1037 hi 0 1081 hr 1250 1050 # Croatian +ht 1252 1626 # Haitian hu 1250 1038 hy 0 1067 # Armenian id 1252 1057 # Indonesian @@ -50,6 +52,8 @@ is 1252 1039 # Icelandic it 1252 1040 ja 932 1041 ka 0 1079 # Georgian +kid 1252 1033 # key id pseudo language +kk 0 1087 km 0 1107 # Khmer kn 0 1099 # Kannada kn-IN 0 1099 # Kannada @@ -57,15 +61,14 @@ ko 949 1042 kok 0 1111 # Konkani ks 0 1120 # Kashmiri ku 0 1574 -kid 1252 1033 # key id pseudo language ky 0 2100 lo 0 1108 # Lao lt 1257 1063 # Lithuanian lv 1257 1062 # Latvian mai 0 1605 # Maithili (India) mk 1251 1071 # Macedonian -ml-IN 0 1100 ml 0 1100 +ml-IN 0 1100 mn 0 1104 # Mongolian mni 0 1112 # Manipuri mn-TR 0 2128 # Mongolian Classical/traditional @@ -81,18 +84,17 @@ nn 1252 2068 no 1252 1044 nr 0 1580 # Ndebele South ns 0 1132 # Northern Sotho (Sepedi) -or 0 1096 # Oriya oc 1252 1154 # Occitan-lengadocian +om 0 2162 +or 0 1096 # Oriya or-IN 0 1096 pa-IN 0 1094 # Punjabi pap 0 2171 -om 0 2162 pl 1250 1045 +ps 0 2171 pt 1252 2070 pt-BR 1252 1046 pt-PT 1252 2070 -ps 0 2171 -ca-XV 1252 32771 # Catalan Valencian rm 0 1047 # Raeto-Romance ro 1250 1048 # Romanian ru 1251 1049 @@ -103,6 +105,7 @@ sb 0 1070 # Sorbian sc 0 3047 sd 0 1113 # Sindhi sh 1250 2074 # Serbian Latin +si 0 2133 sk 1250 1051 # Slovak sl 1250 1060 # Slovenian sq 1250 1052 # Albanian @@ -113,11 +116,10 @@ st 0 1072 # Southern Sotho, Sutu sv 1252 1053 sw 1252 1089 # Swahili sw-TZ 1252 1089 # Swahili -si 0 2133 ta 0 1097 # Tamil ta-IN 0 1097 # Tamil -te-IN 0 1098 te 0 1098 +te-IN 0 1098 tg 0 1064 # Tajik th 874 1054 ti-ER 0 1139 @@ -125,11 +127,11 @@ tn 0 1074 # Setsuana tr 1254 1055 # Turkish ts 0 1073 # Tsonga tt 1251 1092 # Tatar +ug 0 2200 uk 1251 1058 # Ukrainian ur 1256 1056 # Urdu ur-IN 0 2080 uz 0 1091 # Uzbek (Latin) -ug 0 2200 ve 0 1075 # Venda vi 1258 1066 # Vietnamese xh 0 1076 # Xhosa @@ -137,4 +139,3 @@ yi 0 1085 # Yiddish zh-CN 936 2052 zh-TW 950 1028 zu 0 1077 # Zulu -kk 0 1087 -- cgit From d6f9cfd061e34b2354b2f2fa09f833a0dcf1cefe Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Thu, 27 Jan 2011 20:57:37 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 3 --- .../controller/dialogs/res_LegendPosition.cxx | 69 +++++---- .../itemsetwrapper/LegendItemConverter.cxx | 131 ++++++---------- chart2/source/inc/chartview/ChartSfxItemIds.hxx | 3 +- chart2/source/model/main/Legend.cxx | 1 - chart2/source/view/main/ChartItemPool.cxx | 6 +- chart2/source/view/main/VLegend.cxx | 167 ++++++++++++++++----- 6 files changed, 216 insertions(+), 161 deletions(-) diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index 4d6c7509052c..361019825539 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -45,9 +45,8 @@ //itemset stuff #include "chartview/ChartSfxItemIds.hxx" -#include -// header for class SfxItemPool -#include +#include +#include //............................................................................. namespace chart @@ -197,51 +196,51 @@ IMPL_LINK( LegendPositionResources, PositionEnableHdl, void*, EMPTYARG ) void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs ) { - SvxChartLegendPos ePos = CHLEGEND_NONE; - const SfxPoolItem* pPoolItem = NULL; - if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, - TRUE, &pPoolItem ) != SFX_ITEM_SET ) - pPoolItem = &(rInAttrs.GetPool()->GetDefaultItem( SCHATTR_LEGEND_POS )); - - if( pPoolItem ) - ePos = ((const SvxChartLegendPosItem*)pPoolItem)->GetValue(); + if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + { + sal_Int32 nLegendPosition = ((const SfxInt32Item*)pPoolItem)->GetValue(); + switch( nLegendPosition ) + { + case chart2::LegendPosition_LINE_START: + m_aRbtLeft.Check(TRUE); + break; + case chart2::LegendPosition_PAGE_START: + m_aRbtTop.Check(TRUE); + break; + case chart2::LegendPosition_LINE_END: + m_aRbtRight.Check(TRUE); + break; + case chart2::LegendPosition_PAGE_END: + m_aRbtBottom.Check(TRUE); + break; + default: + break; + } + } - switch( ePos ) + if( rInAttrs.GetItemState( SCHATTR_LEGEND_SHOW, TRUE, &pPoolItem ) == SFX_ITEM_SET ) { - case CHLEGEND_LEFT: - m_aRbtLeft.Check(TRUE); - break; - case CHLEGEND_TOP: - m_aRbtTop.Check(TRUE); - break; - case CHLEGEND_RIGHT: - m_aRbtRight.Check(TRUE); - break; - case CHLEGEND_BOTTOM: - m_aRbtBottom.Check(TRUE); - break; - default: - break; + bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + m_aCbxShow.Check(bShow); } + } void LegendPositionResources::writeToItemSet( SfxItemSet& rOutAttrs ) const { - SvxChartLegendPos ePos; - + sal_Int32 nLegendPosition = chart2::LegendPosition_CUSTOM; if( m_aRbtLeft.IsChecked() ) - ePos = CHLEGEND_LEFT; + nLegendPosition = chart2::LegendPosition_LINE_START; else if( m_aRbtTop.IsChecked() ) - ePos = CHLEGEND_TOP; + nLegendPosition = chart2::LegendPosition_PAGE_START; else if( m_aRbtRight.IsChecked() ) - ePos = CHLEGEND_RIGHT; + nLegendPosition = chart2::LegendPosition_LINE_END; else if( m_aRbtBottom.IsChecked() ) - ePos = CHLEGEND_BOTTOM; - else - ePos = CHLEGEND_NONE; + nLegendPosition = chart2::LegendPosition_PAGE_END; + rOutAttrs.Put(SfxInt32Item(SCHATTR_LEGEND_POS, nLegendPosition )); - rOutAttrs.Put(SvxChartLegendPosItem( ePos, SCHATTR_LEGEND_POS )); + rOutAttrs.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, m_aCbxShow.IsChecked()) ); } IMPL_LINK( LegendPositionResources, PositionChangeHdl, RadioButton*, pRadio ) diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx index c02df4aa4bfc..c93505181c0d 100644 --- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx @@ -33,11 +33,13 @@ #include "ItemPropertyMap.hxx" #include "GraphicPropertyItemConverter.hxx" #include "CharacterPropertyItemConverter.hxx" -#include #include #include #include +#include +#include + #include #include @@ -104,52 +106,19 @@ bool LegendItemConverter::GetItemProperty( tWhichIdType /*nWhichId*/, tPropertyN } -bool LegendItemConverter::ApplySpecialItem( - USHORT nWhichId, const SfxItemSet & rItemSet ) +bool LegendItemConverter::ApplySpecialItem( USHORT nWhichId, const SfxItemSet& rInItemSet ) throw( uno::Exception ) { bool bChanged = false; switch( nWhichId ) { - case SCHATTR_LEGEND_POS: + case SCHATTR_LEGEND_SHOW: { - chart2::LegendPosition eNewPos = chart2::LegendPosition_LINE_END; - chart2::LegendPosition eOldPos; - bool bIsWide = false; - sal_Bool bShow = sal_True; - - SvxChartLegendPos eItemPos = - static_cast< const SvxChartLegendPosItem & >( - rItemSet.Get( nWhichId )).GetValue(); - switch( eItemPos ) - { - case CHLEGEND_LEFT: - eNewPos = chart2::LegendPosition_LINE_START; - break; - case CHLEGEND_RIGHT: - eNewPos = chart2::LegendPosition_LINE_END; - break; - case CHLEGEND_TOP: - eNewPos = chart2::LegendPosition_PAGE_START; - bIsWide = true; - break; - case CHLEGEND_BOTTOM: - eNewPos = chart2::LegendPosition_PAGE_END; - bIsWide = true; - break; - - case CHLEGEND_NONE: - case CHLEGEND_NONE_LEFT: - case CHLEGEND_NONE_RIGHT: - case CHLEGEND_NONE_TOP: - case CHLEGEND_NONE_BOTTOM: - bShow = sal_False; - break; - } - - try + const SfxPoolItem* pPoolItem = NULL; + if( rInItemSet.GetItemState( SCHATTR_LEGEND_SHOW, TRUE, &pPoolItem ) == SFX_ITEM_SET ) { + sal_Bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); sal_Bool bWasShown = sal_True; if( ! (GetPropertySet()->getPropertyValue( C2U("Show")) >>= bWasShown) || ( bWasShown != bShow )) @@ -157,25 +126,48 @@ bool LegendItemConverter::ApplySpecialItem( GetPropertySet()->setPropertyValue( C2U("Show"), uno::makeAny( bShow )); bChanged = true; } + } + + } + break; + case SCHATTR_LEGEND_POS: + { + const SfxPoolItem* pPoolItem = NULL; + if( rInItemSet.GetItemState( SCHATTR_LEGEND_POS, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + { + chart2::LegendPosition eNewPos = static_cast(((const SfxInt32Item*)pPoolItem)->GetValue()); - if( bShow ) + ::com::sun::star::chart::ChartLegendExpansion eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH; + switch( eNewPos ) { + case chart2::LegendPosition_LINE_START: + case chart2::LegendPosition_LINE_END: + eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH; + break; + case chart2::LegendPosition_PAGE_START: + case chart2::LegendPosition_PAGE_END: + eExpansion = ::com::sun::star::chart::ChartLegendExpansion_WIDE; + break; + default: + break; + } + + try + { + chart2::LegendPosition eOldPos; if( ! ( GetPropertySet()->getPropertyValue( C2U( "AnchorPosition" )) >>= eOldPos ) || ( eOldPos != eNewPos )) { GetPropertySet()->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny( eNewPos )); - ::com::sun::star::chart::ChartLegendExpansion eExp = bIsWide - ? ::com::sun::star::chart::ChartLegendExpansion_WIDE - : ::com::sun::star::chart::ChartLegendExpansion_HIGH; - GetPropertySet()->setPropertyValue( C2U( "Expansion" ), uno::makeAny( eExp )); + GetPropertySet()->setPropertyValue( C2U( "Expansion" ), uno::makeAny( eExpansion )); GetPropertySet()->setPropertyValue( C2U( "RelativePosition" ), uno::Any()); bChanged = true; } } - } - catch( uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); + catch( uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + } } } break; @@ -190,43 +182,18 @@ void LegendItemConverter::FillSpecialItem( { switch( nWhichId ) { - case SCHATTR_LEGEND_POS: + case SCHATTR_LEGEND_SHOW: { - SvxChartLegendPos eItemPos( CHLEGEND_RIGHT ); - chart2::LegendPosition ePos; - sal_Bool bShow = sal_True; GetPropertySet()->getPropertyValue( C2U( "Show" )) >>= bShow; - - if( ! bShow ) - { - eItemPos = CHLEGEND_NONE; - } - else if( GetPropertySet()->getPropertyValue( C2U( "AnchorPosition" )) >>= ePos ) - { - switch( ePos ) - { - case chart2::LegendPosition_LINE_START: - eItemPos = CHLEGEND_LEFT; - break; - case chart2::LegendPosition_LINE_END: - eItemPos = CHLEGEND_RIGHT; - break; - case chart2::LegendPosition_PAGE_START: - eItemPos = CHLEGEND_TOP; - break; - case chart2::LegendPosition_PAGE_END: - eItemPos = CHLEGEND_BOTTOM; - break; - - case chart2::LegendPosition_CUSTOM: - default: - eItemPos = CHLEGEND_RIGHT; - break; - } - } - - rOutItemSet.Put( SvxChartLegendPosItem( eItemPos, SCHATTR_LEGEND_POS ) ); + rOutItemSet.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, bShow) ); + } + break; + case SCHATTR_LEGEND_POS: + { + chart2::LegendPosition eLegendPos( chart2::LegendPosition_LINE_END ); + GetPropertySet()->getPropertyValue( C2U( "AnchorPosition" )) >>= eLegendPos; + rOutItemSet.Put( SfxInt32Item(SCHATTR_LEGEND_POS, eLegendPos ) ); } break; } diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx index fbcce70bd1d6..980509fc5890 100644 --- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx +++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx @@ -53,7 +53,8 @@ #define SCHATTR_LEGEND_START (SCHATTR_DATADESCR_END + 1) #define SCHATTR_LEGEND_POS SCHATTR_LEGEND_START -#define SCHATTR_LEGEND_END SCHATTR_LEGEND_POS +#define SCHATTR_LEGEND_SHOW (SCHATTR_LEGEND_START + 1) +#define SCHATTR_LEGEND_END SCHATTR_LEGEND_SHOW #define SCHATTR_TEXT_START (SCHATTR_LEGEND_END + 1) // #define SCHATTR_TEXT_ORIENT SCHATTR_TEXT_START diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index 86ee1180e372..64fb39f91b65 100755 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -108,7 +108,6 @@ void lcl_AddPropertiesToVector( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); - rOutProperties.push_back( Property( C2U( "RelativeSize" ), PROP_LEGEND_REL_SIZE, diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index c997f9ee483d..b58ac633e392 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -44,6 +44,8 @@ #include #include +#include + namespace chart { @@ -66,7 +68,9 @@ ChartItemPool::ChartItemPool(): ppPoolDefaults[SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS,aTmp); ppPoolDefaults[SCHATTR_DATADESCR_NO_PERCENTVALUE - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_NO_PERCENTVALUE); - ppPoolDefaults[SCHATTR_LEGEND_POS - SCHATTR_START] = new SvxChartLegendPosItem( CHLEGEND_RIGHT, SCHATTR_LEGEND_POS ); + ppPoolDefaults[SCHATTR_LEGEND_POS - SCHATTR_START] = new SfxInt32Item(SCHATTR_LEGEND_POS, ::com::sun::star::chart2::LegendPosition_LINE_END ); + ppPoolDefaults[SCHATTR_LEGEND_SHOW - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_SHOW, TRUE); + // ppPoolDefaults[SCHATTR_TEXT_ORIENT - SCHATTR_START] = new SvxChartTextOrientItem; ppPoolDefaults[SCHATTR_TEXT_STACKED - SCHATTR_START] = new SfxBoolItem(SCHATTR_TEXT_STACKED,FALSE); ppPoolDefaults[SCHATTR_TEXT_ORDER - SCHATTR_START] = new SvxChartTextOrderItem(CHTXTORDER_SIDEBYSIDE, SCHATTR_TEXT_ORDER); diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 046947c50e65..ef6be843694e 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -266,8 +267,8 @@ awt::Size lcl_placeLegendEntries( double fXOffset = 0.15; double fYOffset = 0.15; - const sal_Int32 nXPadding = static_cast< sal_Int32 >( fViewFontSize * fXPadding ); - const sal_Int32 nYPadding = static_cast< sal_Int32 >( fViewFontSize * fYPadding ); + sal_Int32 nXPadding = static_cast< sal_Int32 >( fViewFontSize * fXPadding ); + sal_Int32 nYPadding = static_cast< sal_Int32 >( fViewFontSize * fYPadding ); const sal_Int32 nXOffset = static_cast< sal_Int32 >( fViewFontSize * fXOffset ); const sal_Int32 nYOffset = static_cast< sal_Int32 >( fViewFontSize * fYOffset ); @@ -294,15 +295,10 @@ awt::Size lcl_placeLegendEntries( awt::Size aMaxEntryExtent = lcl_createTextShapes( rEntries, xShapeFactory, xTarget, aTextShapes, rTextProperties ); OSL_ASSERT( aTextShapes.size() == rEntries.size()); - sal_Int32 nCurrentXPos = nXPadding; - sal_Int32 nCurrentYPos = nYPadding; sal_Int32 nMaxEntryWidth = 2 * nXOffset + aMaxSymbolExtent.Width + aMaxEntryExtent.Width; sal_Int32 nMaxEntryHeight = nYOffset + aMaxEntryExtent.Height; sal_Int32 nNumberOfEntries = rEntries.size(); - if( !bSymbolsLeftSide ) - nCurrentXPos = -nXPadding; - sal_Int32 nNumberOfColumns = 0, nNumberOfRows = 0; std::vector< sal_Int32 > aColumnWidths; @@ -376,6 +372,18 @@ awt::Size lcl_placeLegendEntries( } nNumberOfColumns = aColumnWidths.size(); nNumberOfRows = nCurrentRow+1; + + //check if some space is left an should be spread equally over all entries + sal_Int32 nSumWidth = 0; + for( sal_Int32 nC=0; nC0 ) + { + nXPadding += nRemainingSpace; + for( sal_Int32 nC=0; nC nMaxHeights( nNumberOfRows ); + // calculate maximum height for each row + // and collect column widths + std::vector< sal_Int32 > aRowHeights( nNumberOfRows ); sal_Int32 nRow = 0; sal_Int32 nColumn = 0; for( ; nRow < nNumberOfRows; ++nRow ) { - sal_Int32 nMaxHeight = 0; + sal_Int32 nCurrentRowHeight = 0; for( nColumn = 0; nColumn < nNumberOfColumns; ++nColumn ) { sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns); if( nEntry < nNumberOfEntries ) { awt::Size aTextSize( aTextShapes[ nEntry ]->getSize() ); - nMaxHeight = ::std::max( - nMaxHeight, nYOffset + aTextSize.Height ); + nCurrentRowHeight = ::std::max( nCurrentRowHeight, nYOffset + aTextSize.Height ); + + //collect column widths if( eExpansion != ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) { sal_Int32 nWidth = nXOffset + aMaxSymbolExtent.Width + aTextSize.Width; @@ -456,54 +466,129 @@ awt::Size lcl_placeLegendEntries( } } } - nMaxHeights[ nRow ] = nMaxHeight; + aRowHeights[ nRow ] = nCurrentRowHeight; } - // place entries ordered in optimal-width columns + const sal_Int32 nFontHeight = static_cast< sal_Int32 >( fViewFontSize ); + sal_Int32 nTextLineHeight = nFontHeight; + for( sal_Int32 nR=0; nR have real text height + break; + } + } + + //check if there is some remaining space that should be spread equally over all rows or whether some rows must be limited + bool bSetMaximumFrameHeight = false; + OUString aPropNameTextMaximumFrameHeight( C2U("TextMaximumFrameHeight") ); + if( eExpansion == ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) + { + sal_Int32 nSumHeight = 0; + for( sal_Int32 nR=0; nR0 ) + { + nYPadding += nRemainingSpace; + for( sal_Int32 nR=0; nR= nNumberOfEntries ) break; + bool bRemove = false; + // text shape + Reference< drawing::XShape > xTextShape( aTextShapes[nEntry] ); + if( xTextShape.is() ) + { + awt::Size aTextSize( xTextShape->getSize() ); + sal_Int32 nTextXPos = nCurrentXPos + aMaxSymbolExtent.Width; + if( !bSymbolsLeftSide ) + nTextXPos = nCurrentXPos - aMaxSymbolExtent.Width - aTextSize.Width; + xTextShape->setPosition( awt::Point( nTextXPos, nCurrentYPos )); + + if( bSetMaximumFrameHeight ) + { + sal_Int32 nRemainingSpace = rAvailableSpace.Height - (nCurrentYPos + aTextSize.Height); + if( nRemainingSpace < 0 ) + { + Reference< beans::XPropertySet > xTextProp( xTextShape, uno::UNO_QUERY ); + if( xTextProp.is() ) + { + sal_Int32 nLimit = rAvailableSpace.Height - nCurrentYPos; + xTextShape->setSize( awt::Size( aTextSize.Width, nLimit ) ); + static bool bTest = false; + if( bTest ) + { + //todo + xTextProp->setPropertyValue( aPropNameTextMaximumFrameHeight, uno::makeAny(nLimit) ); + xTextProp->setPropertyValue( C2U("TextAutoGrowHeight"), uno::makeAny(sal_False) ); + } + } + bRemove = true; + } + } + } + // symbol Reference< drawing::XShape > xSymbol( rEntries[ nEntry ].aSymbol ); - if( xSymbol.is() ) { - // Note: aspect ratio should always be 3:2 - - // set symbol size to 75% of maximum space - awt::Size aSymbolSize( - aMaxSymbolExtent.Width * 75 / 100, - aMaxSymbolExtent.Height * 75 / 100 ); - xSymbol->setSize( aSymbolSize ); - sal_Int32 nSymbolXPos = nCurrentXPos + ((aMaxSymbolExtent.Width - aSymbolSize.Width) / 2); - if( !bSymbolsLeftSide ) - nSymbolXPos = nSymbolXPos - aMaxSymbolExtent.Width; - - // #i109336# Improve auto positioning in chart - sal_Int32 nTextHeight = nMaxHeights[ nRow ] - nYOffset; - sal_Int32 nFontSize = static_cast< sal_Int32 >( fViewFontSize ); - sal_Int32 nMaxRowHeight = ( ( ( nTextHeight / nFontSize ) <= 1 ) ? nTextHeight : nFontSize ); - sal_Int32 nSymbolYPos = nCurrentYPos + ( ( nMaxRowHeight - aSymbolSize.Height ) / 2 ); - xSymbol->setPosition( awt::Point( nSymbolXPos, nSymbolYPos ) ); + if( bRemove ) + { + uno::Reference< container::XChild > xChild( xSymbol, uno::UNO_QUERY ); + if( xChild.is() ) + { + uno::Reference xShapes( xChild->getParent(), uno::UNO_QUERY ); + if( xShapes.is() ) + { + xShapes->remove(xSymbol); + } + } + } + else + { + // Note: aspect ratio should always be 3:2 + // set symbol size to 75% of maximum space + awt::Size aSymbolSize( + aMaxSymbolExtent.Width * 75 / 100, + aMaxSymbolExtent.Height * 75 / 100 ); + xSymbol->setSize( aSymbolSize ); + sal_Int32 nSymbolXPos = nCurrentXPos + ((aMaxSymbolExtent.Width - aSymbolSize.Width) / 2); + if( !bSymbolsLeftSide ) + nSymbolXPos = nSymbolXPos - aMaxSymbolExtent.Width; + + sal_Int32 nSymbolYPos = nCurrentYPos + ( ( nTextLineHeight - aSymbolSize.Height ) / 2 ); + xSymbol->setPosition( awt::Point( nSymbolXPos, nSymbolYPos ) ); + } } - // position text shape - awt::Size aTextSize( aTextShapes[ nEntry ]->getSize()); - sal_Int32 nTextXPos = nCurrentXPos + aMaxSymbolExtent.Width; - if( !bSymbolsLeftSide ) - nTextXPos = nCurrentXPos - aMaxSymbolExtent.Width - aTextSize.Width; - aTextShapes[ nEntry ]->setPosition( awt::Point( nTextXPos, nCurrentYPos )); + if( bRemove ) + break; //-> next column - nCurrentYPos += nMaxHeights[ nRow ]; + nCurrentYPos += aRowHeights[ nRow ]; nMaxYPos = ::std::max( nMaxYPos, nCurrentYPos ); } if( bSymbolsLeftSide ) -- cgit From 9073d77706b0b8c32f63a5ebd2954e1d4c0a3ce9 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Thu, 27 Jan 2011 20:57:37 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 3 --- svx/inc/svx/chrtitem.hxx | 34 ---------------------------------- svx/source/items/chrtitem.cxx | 34 ---------------------------------- 2 files changed, 68 deletions(-) diff --git a/svx/inc/svx/chrtitem.hxx b/svx/inc/svx/chrtitem.hxx index 1cb9c2068f01..fdd65cb7d3c3 100644 --- a/svx/inc/svx/chrtitem.hxx +++ b/svx/inc/svx/chrtitem.hxx @@ -114,21 +114,6 @@ enum SvxChartDataDescr #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1) -enum SvxChartLegendPos -{ - CHLEGEND_NONE, - CHLEGEND_LEFT, - CHLEGEND_TOP, - CHLEGEND_RIGHT, - CHLEGEND_BOTTOM, - CHLEGEND_NONE_TOP, - CHLEGEND_NONE_LEFT, - CHLEGEND_NONE_RIGHT, - CHLEGEND_NONE_BOTTOM -}; - -#define CHLEGEND_COUNT (CHLEGEND_BOTTOM + 1) - enum SvxChartTextOrder { CHTXTORDER_SIDEBYSIDE, @@ -243,25 +228,6 @@ public: //------------------------------------------------------------------ -class SVX_DLLPUBLIC SvxChartLegendPosItem : public SfxEnumItem -{ -public: - TYPEINFO(); - SvxChartLegendPosItem(SvxChartLegendPos eLegendPos /*= CHLEGEND_NONE*/, - USHORT nId ); - SvxChartLegendPosItem(SvStream& rIn, - USHORT nId ); - - virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; - virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; - - USHORT GetValueCount() const { return CHLEGEND_COUNT; } - SvxChartLegendPos GetValue() const - { return (SvxChartLegendPos)SfxEnumItem::GetValue(); } -}; - -//------------------------------------------------------------------ - class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem { public: diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx index 474bf19f7bd6..bb6e9e0097b2 100644 --- a/svx/source/items/chrtitem.cxx +++ b/svx/source/items/chrtitem.cxx @@ -52,7 +52,6 @@ using namespace ::com::sun::star; TYPEINIT1_FACTORY(SvxChartStyleItem, SfxEnumItem, new SvxChartStyleItem(CHSTYLE_2D_LINE, 0)); TYPEINIT1(SvxChartDataDescrItem, SfxEnumItem); -TYPEINIT1(SvxChartLegendPosItem, SfxEnumItem); TYPEINIT1(SvxChartTextOrderItem, SfxEnumItem); TYPEINIT1(SvxChartTextOrientItem, SfxEnumItem); TYPEINIT1(SvxChartIndicateItem, SfxEnumItem); @@ -125,39 +124,6 @@ SfxPoolItem* SvxChartDataDescrItem::Create(SvStream& rIn, USHORT /*nVer*/) const return new SvxChartDataDescrItem(rIn, Which()); } -/************************************************************************* -|* -|* SvxChartLegendPosItem -|* -*************************************************************************/ - -SvxChartLegendPosItem::SvxChartLegendPosItem(SvxChartLegendPos eLegendPos, - USHORT nId) : - SfxEnumItem(nId, (USHORT)eLegendPos) -{ -} - -// ----------------------------------------------------------------------- - -SvxChartLegendPosItem::SvxChartLegendPosItem(SvStream& rIn, USHORT nId) : - SfxEnumItem(nId, rIn) -{ -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SvxChartLegendPosItem::Clone(SfxItemPool* /*pPool*/) const -{ - return new SvxChartLegendPosItem(*this); -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SvxChartLegendPosItem::Create(SvStream& rIn, USHORT /*nVer*/) const -{ - return new SvxChartLegendPosItem(rIn, Which()); -} - /************************************************************************* |* |* SvxChartTextOrderItem -- cgit From dde8d3a906269768a38194447a0b72c17e410196 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 27 Jan 2011 23:56:24 +0100 Subject: locales34: #i112240# for system icu >=4.4 add Close_Parenthesis to $CL Close_Punctuation; patch from --- i18npool/source/breakiterator/makefile.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/i18npool/source/breakiterator/makefile.mk b/i18npool/source/breakiterator/makefile.mk index f3088125ecf1..fc6561c3e0aa 100644 --- a/i18npool/source/breakiterator/makefile.mk +++ b/i18npool/source/breakiterator/makefile.mk @@ -79,7 +79,17 @@ GENBRK:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/genbrk GENCCODE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/genccode .ENDIF -$(MISC)$/%.brk : data/%.txt +.INCLUDE .IGNORE : icuversion.mk + +$(MISC)$/%.txt : data/%.txt +# fdo#31271 ")" reclassified in more recent ICU/Unicode Standards +.IF "$(ICU_MAJOR)" >= "5" || ("$(ICU_MAJOR)" == "4" && "$(ICU_MINOR)" >= "4") + $(SED) "s#\[:LineBreak = Close_Punctuation:\]#\[\[:LineBreak = Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@ +.ELSE + $(COPY) $< $@ +.ENDIF + +$(MISC)$/%.brk : $(MISC)/%.txt $(WRAPCMD) $(GENBRK) -r $< -o $(MISC)$/$*.brk $(MISC)$/%_brk.c : $(MISC)$/%.brk -- cgit From a11f234834a52457cfdcf58ee3240d33fb7e6bd5 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 27 Jan 2011 23:56:24 +0100 Subject: locales34: #i112240# for system icu >=4.4 add Close_Parenthesis to $CL Close_Punctuation; patch from --- configure | 29830 ++++++++++++++++++++++++++++++--------------------------- configure.in | 26 +- set_soenv.in | 3 + 3 files changed, 15656 insertions(+), 14203 deletions(-) diff --git a/configure b/configure index 8ba6c16ca713..8ff21ad160a3 100755 --- a/configure +++ b/configure @@ -1,26 +1,83 @@ #! /bin/sh # From configure.in Revision: 1.290 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.63. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -30,33 +87,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -64,157 +148,391 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -223,7 +541,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -232,39 +571,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -275,46 +602,716 @@ PACKAGE_BUGREPORT= # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG TARFILE_LOCATION DO_FETCH_TARBALLS WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS ENABLE_VBA VBA_EXTENSION PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS JAVAIFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM RPM PKGFORMAT GPERF BUILD_STAX MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD CPPUNIT_CFLAGS CPPUNIT_LIBS SYSTEM_CPPUNIT FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR ENABLE_MYSQLC MYSQLCONFIG SYSTEM_MYSQL MYSQL_INC MYSQL_LIB MYSQL_DEFINES LIBMYSQL_PATH SYSTEM_MYSQL_CPPCONN SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_MDDS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN SYSTEM_ICU GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB MYTHES_CFLAGS MYTHES_LIBS SYSTEM_MYTHES SYSTEM_LPSOLVE SYSTEM_LIBTEXTCAT SYSTEM_LIBTEXTCAT_DATA HAVE_GETOPT HAVE_READDIR_R SYSTEM_LIBC PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK GSTREAMER_CFLAGS GSTREAMER_LIBS ENABLE_GSTREAMER CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_PRESENTER_EXTRA_UI ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK ANT ANT_HOME ANT_LIB OOO_JUNIT_JAR WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE nodep LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' +ac_subst_vars='LTLIBOBJS +LIBOBJS +BUILD_TYPE +LOCAL_SOLVER +nodep +VERBOSE +ENABLE_LAYOUT +ENABLE_STATIC_GTK +UNIXWRAPPERNAME +OOO_VENDOR +ABOUT_BITMAPS +INTRO_BITMAPS +WITH_DICT +WITH_POOR_HELP_LOCALIZATIONS +WITH_LANG +OOO_JUNIT_JAR +ANT_LIB +ANT_HOME +ANT +XINERAMA_LINK +USE_XINERAMA +SCPDEFS +WITHOUT_AFMS +WITHOUT_PPDS +WITH_FONTS +ENABLE_KAB +ENABLE_EVOAB2 +GOBJECT_LIBS +GOBJECT_CFLAGS +ENABLE_LOCKDOWN +KDE4_LIBS +KDE4_CFLAGS +MOC4 +KDE_LIBS +KDE_CFLAGS +MOC +COMMONS_LOGGING_JAR +COMMONS_HTTPCLIENT_JAR +COMMONS_LANG_JAR +COMMONS_CODEC_JAR +SYSTEM_APACHE_COMMONS +LIBSERIALIZER_JAR +LIBFONTS_JAR +LIBREPOSITORY_JAR +LIBFORMULA_JAR +LIBLOADER_JAR +LIBLAYOUT_JAR +LIBBASE_JAR +JFREEREPORT_JAR +FLUTE_JAR +LIBXML_JAR +SAC_JAR +SYSTEM_JFREEREPORT +ENABLE_REPORTBUILDER +SERVLETAPI_JAR +SYSTEM_SERVLETAPI +ENABLE_MEDIAWIKI +SYSTEM_POPPLER +ENABLE_PDFIMPORT +POPPLER_LIBS +POPPLER_CFLAGS +ENABLE_PRESENTER_SCREEN +ENABLE_MINIMIZER +ENABLE_PRESENTER_EXTRA_UI +ENABLE_OPENGL +SYSTEM_CAIRO +BUILD_PIXMAN +ENABLE_CAIRO +CAIRO_LIBS +CAIRO_CFLAGS +ENABLE_GSTREAMER +GSTREAMER_LIBS +GSTREAMER_CFLAGS +ENABLE_SYSTRAY_GTK +ENABLE_DBUS +ENABLE_GIO +GIO_LIBS +GIO_CFLAGS +DBUS_LIBS +DBUS_CFLAGS +GTK_LIBS +GTK_CFLAGS +ENABLE_GNOMEVFS +GNOMEVFS_LIBS +GNOMEVFS_CFLAGS +ENABLE_GCONF +GCONF_LIBS +GCONF_CFLAGS +ENABLE_KDE4 +ENABLE_KDE +ENABLE_GTK +ZIP_HOME +UNZIP +ZIP +ASM_HOME +ML_EXE +CYGWIN_PATH +GNUPATCH +GNUCP +PATCH +FLEX +BISON +NSIS_PATH +DIRECTXSDK_LIB +DIRECTXSDK_HOME +WINDOWS_VISTA_PSDK +PSDK_HOME +SYSTEM_LIBC +HAVE_READDIR_R +HAVE_GETOPT +SYSTEM_LIBTEXTCAT_DATA +SYSTEM_LIBTEXTCAT +SYSTEM_LPSOLVE +SYSTEM_MYTHES +MYTHES_LIBS +MYTHES_CFLAGS +HYPHEN_LIB +SYSTEM_HYPH +SYSTEM_HUNSPELL +HUNSPELL_LIBS +HUNSPELL_CFLAGS +SYSTEM_REDLAND +REDLAND_LIBS +REDLAND_CFLAGS +AGG_VERSION +SYSTEM_AGG +AGG_LIBS +AGG_CFLAGS +ENABLE_AGG +SYSTEM_OPENSSL +OPENSSL_LIBS +OPENSSL_CFLAGS +NEON_VERSION +SYSTEM_NEON +NEON_LIBS +NEON_CFLAGS +DISABLE_NEON +ENABLE_RANDR +XRANDR_DLOPEN +XRANDR_LIBS +XRANDR_CFLAGS +XRENDER_LINK +SYSTEM_XRENDER_HEADERS +DISABLE_XAW +XAU_LIBS +XLIB +XINC +X_EXTRA_LIBS +X_LIBS +X_PRE_LIBS +X_CFLAGS +XMKMF +SYSTEM_GRAPHITE +ENABLE_GRAPHITE +GRAPHITE_LIBS +GRAPHITE_CFLAGS +ICU_MICRO +ICU_MINOR +ICU_MAJOR +SYSTEM_ICU +ICUCONFIG +SYSTEM_GENCMN +SYSTEM_GENCCODE +SYSTEM_GENBRK +SYSTEM_SANE_HEADER +MOZ_LDAP_CFLAGS +MOZ_LIB_XPCOM +MOZ_LIB +MOZ_INC +MOZ_FLAVOUR +SYSTEM_MOZILLA +MOZILLABUILD +ENABLE_NSS_MODULE +BUILD_MOZAB +MOZLIBREQ_LIBS +MOZLIBREQ_CFLAGS +MOZGTK2_LIBS +MOZGTK2_CFLAGS +MOZILLA_TOOLKIT +MOZILLA_VERSION +MOZILLAXPCOM_LIBS +MOZILLAXPCOM_CFLAGS +NSPR_LIB +MOZ_NSPR_LIBS +MOZ_NSPR_CFLAGS +NSS_LIB +MOZ_NSS_LIBS +MOZ_NSS_CFLAGS +WITH_OPENLDAP +WITH_LDAP +WITH_MOZILLA +SYSTEM_ODBC_HEADERS +SYSTEM_VIGRA +SYSTEM_BOOST +SYSTEM_MDDS +CURL_LIBS +CURL_CFLAGS +SYSTEM_CURL +CURLCONFIG +SAXON_JAR +SYSTEM_SAXON +SERIALIZER_JAR +BSH_JAR +SYSTEM_BSH +HSQLDB_JAR +SYSTEM_HSQLDB +SYSTEM_MYSQL_CPPCONN +LIBMYSQL_PATH +MYSQL_DEFINES +MYSQL_LIB +MYSQL_INC +SYSTEM_MYSQL +MYSQLCONFIG +ENABLE_MYSQLC +LUCENE_ANALYZERS_JAR +LUCENE_CORE_JAR +SYSTEM_LUCENE +DB_JAR +DB_INCLUDES +DB_VERSION +SYSTEM_DB +HOME +PYTHON_LIBS +PYTHON_CFLAGS +SYSTEM_PYTHON +BZIP2 +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_PLATFORM +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_VERSION +PYTHON +SYSTEM_LIBXML +LIBXML_LIBS +LIBXML_CFLAGS +SYSTEM_LIBXSLT +XSLTPROC +LIBXSLT_LIBS +LIBXSLT_CFLAGS +USE_FT_EMBOLDEN +FREETYPE_LIBS +FREETYPE_CFLAGS +SYSTEM_CPPUNIT +CPPUNIT_LIBS +CPPUNIT_CFLAGS +SYSTEM_LIBWPD +LIBWPD_LIBS +LIBWPD_CFLAGS +PKG_CONFIG +SYSTEM_EXPAT +SYSTEM_JPEG +SYSTEM_ZLIB +SYSTEM_STDLIBS +BUILD_UNOWINREG +MINGWSTRIP +MINGWCXX +BUILD_STAX +GPERF +PKGFORMAT +RPM +BUILD_EPM +PKGMK +DPKG +EPM +BUILD_DMAKE +DMAKE +JAVAIFLAGS +JAVAFLAGS +JDK +JAVA_HOME +JAVAAOTCOMPILER +AWTLIB +JAVADOC +JAVACISGCJ +JAVACOMPILER +JAVAINTERPRETER +SOLAR_JAVA +BUILD_VER_STRING +ALLOC +HAVE_GCC_VISIBILITY_FEATURE +CCACHE +USE_CCACHE +USE_SYSTEM_STL +STLPORT_VER +STLPORT4 +EXCEPTIONS +MINGW_GXXDLL +MINGW_GCCDLL +MINGW_SHARED_GXXLIB +MINGW_GCCLIB_EH +MINGW_SHARED_GCCLIB +MINGW_CLIB_DIR +MINGW_BACKWARD_INCLUDE_PATH +MINGW_LIB_INCLUDE_PATH +GXX_INCLUDE_PATH +CRYPT_LINK +PAM_LINK +NEW_SHADOW_API +PAM +VBA_EXTENSION +ENABLE_VBA +LFS_CFLAGS +WORDS_BIGENDIAN +SIZEOF_LONG +CXXCPP +ac_ct_CXX +CXXFLAGS +CXX +CPP +FRAME_HOME +CSC_PATH +MIDL_PATH +USE_MINGW +COMEX +MSPDB_PATH +PERL +HAVE_LD_HASH_STYLE +_cc +GNUMAKE +ENABLE_PCH +HAVE_LD_BSYMBOLIC_FUNCTIONS +GCCVER +COMPATH +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +GCC_HOME +SHELLPATH +WITH_MINGWIN +THES_SYSTEM_DIR +HYPH_SYSTEM_DIR +DICT_SYSTEM_DIR +SYSTEM_DICTS +WITH_MYSPELL_DICTS +ENABLE_RPATH +DISABLE_ATL +DISABLE_ACTIVEX +ENABLE_DIRECTX +WITH_BINFILTER +DO_FETCH_TARBALLS +TARFILE_LOCATION +ENABLE_FONTCONFIG +ENABLE_CUPS +DISABLE_STRIP +ENABLE_SYMBOLS +PROEXT +PROFULLSWITCH +PRODUCT +ENABLE_DEBUG +ENABLE_WERROR +VC_STANDARD +ENABLE_CRASHDUMP +PTHREAD_LIBS +PTHREAD_CFLAGS +OSVERSION +GNUTAR +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +SOURCEVERSION +UPD +_solenv +LOCAL_SOLENV +SED +AWK +EGREP +GREP +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_gnu_patch +with_agg +with_gnu_cp +enable_graphite +with_system_graphite +enable_ldap +enable_fetch_external +with_external_tar +with_openldap +enable_lockdown +enable_vba +with_vba_package_format +enable_pch +enable_mozilla +with_fonts +with_ppds +with_afms +enable_epm +with_epm +with_package_format +enable_odk +enable_mathmldtd +enable_evolution2 +with_system_stdlibs +enable_cups +enable_fontconfig +enable_directx +enable_activex +enable_atl +enable_symbols +enable_strip_solver +enable_werror +enable_debug +enable_dbgutil +enable_crashdump +enable_cl_standard +enable_gtk +enable_gstreamer +enable_systray +enable_cairo +with_system_cairo +enable_opengl +enable_dbus +enable_gconf +enable_gnome_vfs +enable_gio +enable_static_gtk +enable_layout +enable_build_mozilla +with_mozilla_version +with_mozilla_toolkit +enable_nss_module +enable_kde +enable_kdeab +enable_kde4 +enable_binfilter +enable_rpath +enable_pam +enable_pam_link +enable_crypt_link +enable_xrender_link +enable_randr +enable_randr_link +with_myspell_dicts +with_system_dicts +with_external_dict_dir +with_external_hyph_dir +with_external_thes_dir +with_system_libs +with_system_headers +with_system_jars +with_system_zlib +with_system_openssl +with_system_jpeg +with_system_expat +with_system_libwpd +with_system_libxml +with_system_python +with_system_icu +with_system_poppler +with_system_db +with_system_lucene +with_lucene_core_jar +with_lucene_analyzers_jar +enable_mysql_connector +with_system_mysql +with_libmysql_path +with_system_mysql_cppconn +with_system_hsqldb +with_hsqldb_jar +with_system_beanshell +with_beanshell_jar +enable_presenter_extra_ui +enable_minimizer +enable_presenter_console +enable_pdfimport +enable_wiki_publisher +with_commons_codec_jar +with_commons_lang_jar +with_commons_httpclient_jar +with_commons_logging_jar +with_servlet_api_jar +enable_report_builder +with_system_jfreereport +with_sac_jar +with_libxml_jar +with_flute_jar +with_jfreereport_jar +with_liblayout_jar +with_libloader_jar +with_libformula_jar +with_librepository_jar +with_libfonts_jar +with_libserializer_jar +with_libbase_jar +with_system_saxon +with_saxon_jar +with_system_libxslt +with_system_odbc +with_system_sane +with_system_xrender +with_system_curl +with_system_boost +with_system_mdds +with_system_vigra +enable_neon +enable_Xaw +with_system_neon +with_system_agg +with_system_hunspell +with_system_mythes +with_system_altlinuxhyph +with_system_lpsolve +with_system_libtextcat +with_external_libtextcat_data +with_system_cppunit +with_system_redland +with_system_mozilla +with_stlport +with_jdk_home +with_gxx_include_path +with_java +enable_gcjaot +with_ant_home +with_junit +with_perl_home +with_cl_home +with_mspdb_path +with_midl_path +with_csc_path +with_nsis_path +with_frame_home +with_psdk_home +with_directx_home +with_mozilla_build +with_local_solenv +with_local_solver +enable_check_only +enable_ccache_skip +with_lang +with_poor_help_localizations +with_dict +with_intro_bitmaps +with_about_bitmaps +with_vendor +with_unix_wrapper +with_asm_home +with_os_version +with_unzip_home +with_zip_home +with_mingwin +with_build_version +with_alloc +enable_verbose +enable_dependency_tracking +enable_largefile +with_x +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +PKG_CONFIG +LIBWPD_CFLAGS +LIBWPD_LIBS +CPPUNIT_CFLAGS +CPPUNIT_LIBS +FREETYPE_CFLAGS +FREETYPE_LIBS +LIBXSLT_CFLAGS +LIBXSLT_LIBS +LIBXML_CFLAGS +LIBXML_LIBS +MOZ_NSS_CFLAGS +MOZ_NSS_LIBS +MOZ_NSPR_CFLAGS +MOZ_NSPR_LIBS +MOZILLAXPCOM_CFLAGS +MOZILLAXPCOM_LIBS +MOZGTK2_CFLAGS +MOZGTK2_LIBS +MOZLIBREQ_CFLAGS +MOZLIBREQ_LIBS +GRAPHITE_CFLAGS +GRAPHITE_LIBS +XMKMF +XRANDR_CFLAGS +XRANDR_LIBS +NEON_CFLAGS +NEON_LIBS +OPENSSL_CFLAGS +OPENSSL_LIBS +AGG_CFLAGS +AGG_LIBS +REDLAND_CFLAGS +REDLAND_LIBS +HUNSPELL_CFLAGS +HUNSPELL_LIBS +MYTHES_CFLAGS +MYTHES_LIBS +GCONF_CFLAGS +GCONF_LIBS +GNOMEVFS_CFLAGS +GNOMEVFS_LIBS +GTK_CFLAGS +GTK_LIBS +DBUS_CFLAGS +DBUS_LIBS +GIO_CFLAGS +GIO_LIBS +GSTREAMER_CFLAGS +GSTREAMER_LIBS +CAIRO_CFLAGS +CAIRO_LIBS +POPPLER_CFLAGS +POPPLER_LIBS +GOBJECT_CFLAGS +GOBJECT_LIBS' + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -337,34 +1334,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -386,33 +1397,61 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -439,6 +1478,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -463,13 +1508,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -534,6 +1582,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -584,26 +1642,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -623,7 +1693,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -632,17 +1702,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -651,31 +1720,39 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -689,7 +1766,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -702,86 +1779,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -# Find the source files, if location was not specified. -if test -z "$srcdir"; then +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } - fi + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP -ac_env_CXX_set=${CXX+set} -ac_env_CXX_value=$CXX -ac_cv_env_CXX_set=${CXX+set} -ac_cv_env_CXX_value=$CXX -ac_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_env_CXXFLAGS_value=$CXXFLAGS -ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_cv_env_CXXFLAGS_value=$CXXFLAGS -ac_env_CXXCPP_set=${CXXCPP+set} -ac_env_CXXCPP_value=$CXXCPP -ac_cv_env_CXXCPP_set=${CXXCPP+set} -ac_cv_env_CXXCPP_value=$CXXCPP +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -810,14 +1877,11 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -827,18 +1891,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -859,6 +1930,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-graphite Enables the compilation of Graphite smart font rendering @@ -1460,129 +2532,194 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor + PKG_CONFIG path to pkg-config utility + LIBWPD_CFLAGS + C compiler flags for LIBWPD, overriding pkg-config + LIBWPD_LIBS linker flags for LIBWPD, overriding pkg-config + CPPUNIT_CFLAGS + C compiler flags for CPPUNIT, overriding pkg-config + CPPUNIT_LIBS + linker flags for CPPUNIT, overriding pkg-config + FREETYPE_CFLAGS + C compiler flags for FREETYPE, overriding pkg-config + FREETYPE_LIBS + linker flags for FREETYPE, overriding pkg-config + LIBXSLT_CFLAGS + C compiler flags for LIBXSLT, overriding pkg-config + LIBXSLT_LIBS + linker flags for LIBXSLT, overriding pkg-config + LIBXML_CFLAGS + C compiler flags for LIBXML, overriding pkg-config + LIBXML_LIBS linker flags for LIBXML, overriding pkg-config + MOZ_NSS_CFLAGS + C compiler flags for MOZ_NSS, overriding pkg-config + MOZ_NSS_LIBS + linker flags for MOZ_NSS, overriding pkg-config + MOZ_NSPR_CFLAGS + C compiler flags for MOZ_NSPR, overriding pkg-config + MOZ_NSPR_LIBS + linker flags for MOZ_NSPR, overriding pkg-config + MOZILLAXPCOM_CFLAGS + C compiler flags for MOZILLAXPCOM, overriding pkg-config + MOZILLAXPCOM_LIBS + linker flags for MOZILLAXPCOM, overriding pkg-config + MOZGTK2_CFLAGS + C compiler flags for MOZGTK2, overriding pkg-config + MOZGTK2_LIBS + linker flags for MOZGTK2, overriding pkg-config + MOZLIBREQ_CFLAGS + C compiler flags for MOZLIBREQ, overriding pkg-config + MOZLIBREQ_LIBS + linker flags for MOZLIBREQ, overriding pkg-config + GRAPHITE_CFLAGS + C compiler flags for GRAPHITE, overriding pkg-config + GRAPHITE_LIBS + linker flags for GRAPHITE, overriding pkg-config + XMKMF Path to xmkmf, Makefile generator for X Window System + XRANDR_CFLAGS + C compiler flags for XRANDR, overriding pkg-config + XRANDR_LIBS linker flags for XRANDR, overriding pkg-config + NEON_CFLAGS C compiler flags for NEON, overriding pkg-config + NEON_LIBS linker flags for NEON, overriding pkg-config + OPENSSL_CFLAGS + C compiler flags for OPENSSL, overriding pkg-config + OPENSSL_LIBS + linker flags for OPENSSL, overriding pkg-config + AGG_CFLAGS C compiler flags for AGG, overriding pkg-config + AGG_LIBS linker flags for AGG, overriding pkg-config + REDLAND_CFLAGS + C compiler flags for REDLAND, overriding pkg-config + REDLAND_LIBS + linker flags for REDLAND, overriding pkg-config + HUNSPELL_CFLAGS + C compiler flags for HUNSPELL, overriding pkg-config + HUNSPELL_LIBS + linker flags for HUNSPELL, overriding pkg-config + MYTHES_CFLAGS + C compiler flags for MYTHES, overriding pkg-config + MYTHES_LIBS linker flags for MYTHES, overriding pkg-config + GCONF_CFLAGS + C compiler flags for GCONF, overriding pkg-config + GCONF_LIBS linker flags for GCONF, overriding pkg-config + GNOMEVFS_CFLAGS + C compiler flags for GNOMEVFS, overriding pkg-config + GNOMEVFS_LIBS + linker flags for GNOMEVFS, overriding pkg-config + GTK_CFLAGS C compiler flags for GTK, overriding pkg-config + GTK_LIBS linker flags for GTK, overriding pkg-config + DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config + DBUS_LIBS linker flags for DBUS, overriding pkg-config + GIO_CFLAGS C compiler flags for GIO, overriding pkg-config + GIO_LIBS linker flags for GIO, overriding pkg-config + GSTREAMER_CFLAGS + C compiler flags for GSTREAMER, overriding pkg-config + GSTREAMER_LIBS + linker flags for GSTREAMER, overriding pkg-config + CAIRO_CFLAGS + C compiler flags for CAIRO, overriding pkg-config + CAIRO_LIBS linker flags for CAIRO, overriding pkg-config + POPPLER_CFLAGS + C compiler flags for POPPLER, overriding pkg-config + POPPLER_LIBS + linker flags for POPPLER, overriding pkg-config + GOBJECT_CFLAGS + C compiler flags for GOBJECT, overriding pkg-config + GOBJECT_LIBS + linker flags for GOBJECT, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.63 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1601,7 +2738,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1613,8 +2750,9 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1636,7 +2774,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1647,8 +2784,8 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1669,9 +2806,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1682,8 +2817,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1696,20 +2831,35 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1720,22 +2870,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1747,26 +2903,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1796,18 +2950,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1817,54 +2977,61 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1874,19 +3041,15 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1903,1089 +3066,1094 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$@" >config.parms -# Check whether --with-gnu-patch or --without-gnu-patch was given. +# Check whether --with-gnu-patch was given. if test "${with_gnu_patch+set}" = set; then - withval="$with_gnu_patch" + withval=$with_gnu_patch; +fi -fi; -# Check whether --with-agg or --without-agg was given. +# Check whether --with-agg was given. if test "${with_agg+set}" = set; then - withval="$with_agg" - + withval=$with_agg; else with_agg=yes -fi; +fi + -# Check whether --with-gnu-cp or --without-gnu-cp was given. +# Check whether --with-gnu-cp was given. if test "${with_gnu_cp+set}" = set; then - withval="$with_gnu_cp" + withval=$with_gnu_cp; +fi -fi; -# Check whether --enable-graphite or --disable-graphite was given. +# Check whether --enable-graphite was given. if test "${enable_graphite+set}" = set; then - enableval="$enable_graphite" + enableval=$enable_graphite; +fi -fi; -# Check whether --with-system-graphite or --without-system-graphite was given. +# Check whether --with-system-graphite was given. if test "${with_system_graphite+set}" = set; then - withval="$with_system_graphite" + withval=$with_system_graphite; +fi -fi; -# Check whether --enable-ldap or --disable-ldap was given. +# Check whether --enable-ldap was given. if test "${enable_ldap+set}" = set; then - enableval="$enable_ldap" + enableval=$enable_ldap; +fi -fi; -# Check whether --enable-fetch-external or --disable-fetch-external was given. +# Check whether --enable-fetch-external was given. if test "${enable_fetch_external+set}" = set; then - enableval="$enable_fetch_external" + enableval=$enable_fetch_external; +fi -fi; -# Check whether --with-external-tar or --without-external-tar was given. +# Check whether --with-external-tar was given. if test "${with_external_tar+set}" = set; then - withval="$with_external_tar" - TARFILE_LOCATION="$withval" + withval=$with_external_tar; TARFILE_LOCATION="$withval" + +fi -fi; -# Check whether --with-openldap or --without-openldap was given. +# Check whether --with-openldap was given. if test "${with_openldap+set}" = set; then - withval="$with_openldap" + withval=$with_openldap; +fi -fi; -# Check whether --enable-lockdown or --disable-lockdown was given. +# Check whether --enable-lockdown was given. if test "${enable_lockdown+set}" = set; then - enableval="$enable_lockdown" + enableval=$enable_lockdown; +fi -fi; -# Check whether --enable-vba or --disable-vba was given. +# Check whether --enable-vba was given. if test "${enable_vba+set}" = set; then - enableval="$enable_vba" + enableval=$enable_vba; +fi -fi; -# Check whether --with-vba-package-format or --without-vba-package-format was given. +# Check whether --with-vba-package-format was given. if test "${with_vba_package_format+set}" = set; then - withval="$with_vba_package_format" + withval=$with_vba_package_format; +fi -fi; -# Check whether --enable-pch or --disable-pch was given. +# Check whether --enable-pch was given. if test "${enable_pch+set}" = set; then - enableval="$enable_pch" + enableval=$enable_pch; +fi -fi; -# Check whether --enable-mozilla or --disable-mozilla was given. +# Check whether --enable-mozilla was given. if test "${enable_mozilla+set}" = set; then - enableval="$enable_mozilla" - + enableval=$enable_mozilla; else enable_mozilla="yes" -fi; +fi -# Check whether --with-fonts or --without-fonts was given. + +# Check whether --with-fonts was given. if test "${with_fonts+set}" = set; then - withval="$with_fonts" + withval=$with_fonts; +fi -fi; -# Check whether --with-ppds or --without-ppds was given. +# Check whether --with-ppds was given. if test "${with_ppds+set}" = set; then - withval="$with_ppds" + withval=$with_ppds; +fi -fi; -# Check whether --with-afms or --without-afms was given. +# Check whether --with-afms was given. if test "${with_afms+set}" = set; then - withval="$with_afms" + withval=$with_afms; +fi -fi; -# Check whether --enable-epm or --disable-epm was given. +# Check whether --enable-epm was given. if test "${enable_epm+set}" = set; then - enableval="$enable_epm" - + enableval=$enable_epm; else enable_epm="yes" -fi; +fi -# Check whether --with-epm or --without-epm was given. + +# Check whether --with-epm was given. if test "${with_epm+set}" = set; then - withval="$with_epm" + withval=$with_epm; +fi -fi; -# Check whether --with-package-format or --without-package-format was given. +# Check whether --with-package-format was given. if test "${with_package_format+set}" = set; then - withval="$with_package_format" + withval=$with_package_format; +fi -fi; -# Check whether --enable-odk or --disable-odk was given. +# Check whether --enable-odk was given. if test "${enable_odk+set}" = set; then - enableval="$enable_odk" - + enableval=$enable_odk; else enable_odk="yes" -fi; -# Check whether --enable-mathmldtd or --disable-mathmldtd was given. -if test "${enable_mathmldtd+set}" = set; then - enableval="$enable_mathmldtd" +fi +# Check whether --enable-mathmldtd was given. +if test "${enable_mathmldtd+set}" = set; then + enableval=$enable_mathmldtd; else enable_mathmldtd="yes" -fi; -# Check whether --enable-evolution2 or --disable-evolution2 was given. +fi + +# Check whether --enable-evolution2 was given. if test "${enable_evolution2+set}" = set; then - enableval="$enable_evolution2" + enableval=$enable_evolution2; +fi -fi; -# Check whether --with-system-stdlibs or --without-system-stdlibs was given. +# Check whether --with-system-stdlibs was given. if test "${with_system_stdlibs+set}" = set; then - withval="$with_system_stdlibs" + withval=$with_system_stdlibs; +fi -fi; -# Check whether --enable-cups or --disable-cups was given. +# Check whether --enable-cups was given. if test "${enable_cups+set}" = set; then - enableval="$enable_cups" - + enableval=$enable_cups; else enable_cups=yes -fi; -# Check whether --enable-fontconfig or --disable-fontconfig was given. -if test "${enable_fontconfig+set}" = set; then - enableval="$enable_fontconfig" +fi +# Check whether --enable-fontconfig was given. +if test "${enable_fontconfig+set}" = set; then + enableval=$enable_fontconfig; else enable_fontconfig=yes -fi; -# Check whether --enable-directx or --disable-directx was given. -if test "${enable_directx+set}" = set; then - enableval="$enable_directx" +fi +# Check whether --enable-directx was given. +if test "${enable_directx+set}" = set; then + enableval=$enable_directx; else enable_directx=yes -fi; -# Check whether --enable-activex or --disable-activex was given. +fi + +# Check whether --enable-activex was given. if test "${enable_activex+set}" = set; then - enableval="$enable_activex" + enableval=$enable_activex; +fi -fi; -# Check whether --enable-atl or --disable-atl was given. +# Check whether --enable-atl was given. if test "${enable_atl+set}" = set; then - enableval="$enable_atl" + enableval=$enable_atl; +fi -fi; -# Check whether --enable-symbols or --disable-symbols was given. +# Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" + enableval=$enable_symbols; +fi -fi; -# Check whether --enable-strip-solver or --disable-strip-solver was given. +# Check whether --enable-strip-solver was given. if test "${enable_strip_solver+set}" = set; then - enableval="$enable_strip_solver" + enableval=$enable_strip_solver; +fi -fi; -# Check whether --enable-werror or --disable-werror was given. +# Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then - enableval="$enable_werror" + enableval=$enable_werror; +fi -fi; -# Check whether --enable-debug or --disable-debug was given. +# Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then - enableval="$enable_debug" + enableval=$enable_debug; +fi -fi; -# Check whether --enable-dbgutil or --disable-dbgutil was given. +# Check whether --enable-dbgutil was given. if test "${enable_dbgutil+set}" = set; then - enableval="$enable_dbgutil" + enableval=$enable_dbgutil; +fi -fi; -# Check whether --enable-crashdump or --disable-crashdump was given. +# Check whether --enable-crashdump was given. if test "${enable_crashdump+set}" = set; then - enableval="$enable_crashdump" + enableval=$enable_crashdump; +fi -fi; -# Check whether --enable-cl-standard or --disable-cl-standard was given. +# Check whether --enable-cl-standard was given. if test "${enable_cl_standard+set}" = set; then - enableval="$enable_cl_standard" + enableval=$enable_cl_standard; +fi -fi; -# Check whether --enable-gtk or --disable-gtk was given. +# Check whether --enable-gtk was given. if test "${enable_gtk+set}" = set; then - enableval="$enable_gtk" - + enableval=$enable_gtk; else enable_gtk=yes -fi; -# Check whether --enable-gstreamer or --disable-gstreamer was given. -if test "${enable_gstreamer+set}" = set; then - enableval="$enable_gstreamer" +fi +# Check whether --enable-gstreamer was given. +if test "${enable_gstreamer+set}" = set; then + enableval=$enable_gstreamer; else enable_gstreamer=yes -fi; -# Check whether --enable-systray or --disable-systray was given. -if test "${enable_systray+set}" = set; then - enableval="$enable_systray" +fi +# Check whether --enable-systray was given. +if test "${enable_systray+set}" = set; then + enableval=$enable_systray; else enable_systray=yes -fi; -# Check whether --enable-cairo or --disable-cairo was given. -if test "${enable_cairo+set}" = set; then - enableval="$enable_cairo" +fi +# Check whether --enable-cairo was given. +if test "${enable_cairo+set}" = set; then + enableval=$enable_cairo; else enable_cairo=no -fi; +fi -# Check whether --with-system-cairo or --without-system-cairo was given. + +# Check whether --with-system-cairo was given. if test "${with_system_cairo+set}" = set; then - withval="$with_system_cairo" + withval=$with_system_cairo; +fi -fi; -# Check whether --enable-opengl or --disable-opengl was given. +# Check whether --enable-opengl was given. if test "${enable_opengl+set}" = set; then - enableval="$enable_opengl" - + enableval=$enable_opengl; else enable_opengl=no -fi; -# Check whether --enable-dbus or --disable-dbus was given. -if test "${enable_dbus+set}" = set; then - enableval="$enable_dbus" +fi +# Check whether --enable-dbus was given. +if test "${enable_dbus+set}" = set; then + enableval=$enable_dbus; else enable_dbus=no -fi; -# Check whether --enable-gconf or --disable-gconf was given. -if test "${enable_gconf+set}" = set; then - enableval="$enable_gconf" +fi +# Check whether --enable-gconf was given. +if test "${enable_gconf+set}" = set; then + enableval=$enable_gconf; else enable_gconf=yes -fi; -# Check whether --enable-gnome-vfs or --disable-gnome-vfs was given. -if test "${enable_gnome_vfs+set}" = set; then - enableval="$enable_gnome_vfs" +fi +# Check whether --enable-gnome-vfs was given. +if test "${enable_gnome_vfs+set}" = set; then + enableval=$enable_gnome_vfs; else enable_gnome_vfs=yes -fi; -# Check whether --enable-gio or --disable-gio was given. -if test "${enable_gio+set}" = set; then - enableval="$enable_gio" +fi +# Check whether --enable-gio was given. +if test "${enable_gio+set}" = set; then + enableval=$enable_gio; else enable_gio=no -fi; -# Check whether --enable-static-gtk or --disable-static-gtk was given. +fi + +# Check whether --enable-static-gtk was given. if test "${enable_static_gtk+set}" = set; then - enableval="$enable_static_gtk" + enableval=$enable_static_gtk; +fi -fi; -# Check whether --enable-layout or --disable-layout was given. +# Check whether --enable-layout was given. if test "${enable_layout+set}" = set; then - enableval="$enable_layout" + enableval=$enable_layout; +fi -fi; -# Check whether --enable-build-mozilla or --disable-build-mozilla was given. +# Check whether --enable-build-mozilla was given. if test "${enable_build_mozilla+set}" = set; then - enableval="$enable_build_mozilla" + enableval=$enable_build_mozilla; +fi -fi; -# Check whether --with-mozilla-version or --without-mozilla-version was given. +# Check whether --with-mozilla-version was given. if test "${with_mozilla_version+set}" = set; then - withval="$with_mozilla_version" + withval=$with_mozilla_version; +fi -fi; -# Check whether --with-mozilla-toolkit or --without-mozilla-toolkit was given. +# Check whether --with-mozilla-toolkit was given. if test "${with_mozilla_toolkit+set}" = set; then - withval="$with_mozilla_toolkit" + withval=$with_mozilla_toolkit; +fi -fi; -# Check whether --enable-nss_module or --disable-nss_module was given. +# Check whether --enable-nss_module was given. if test "${enable_nss_module+set}" = set; then - enableval="$enable_nss_module" - + enableval=$enable_nss_module; else enable_nss_module=yes -fi; -# Check whether --enable-kde or --disable-kde was given. +fi + +# Check whether --enable-kde was given. if test "${enable_kde+set}" = set; then - enableval="$enable_kde" + enableval=$enable_kde; +fi -fi; -# Check whether --enable-kdeab or --disable-kdeab was given. +# Check whether --enable-kdeab was given. if test "${enable_kdeab+set}" = set; then - enableval="$enable_kdeab" - + enableval=$enable_kdeab; else if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi -fi; -# Check whether --enable-kde4 or --disable-kde4 was given. +fi + +# Check whether --enable-kde4 was given. if test "${enable_kde4+set}" = set; then - enableval="$enable_kde4" + enableval=$enable_kde4; +fi -fi; -# Check whether --enable-binfilter or --disable-binfilter was given. +# Check whether --enable-binfilter was given. if test "${enable_binfilter+set}" = set; then - enableval="$enable_binfilter" - + enableval=$enable_binfilter; else if ! test -d ./binfilter; then enable_binfilter=no; fi -fi; -# Check whether --enable-rpath or --disable-rpath was given. +fi + +# Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" + enableval=$enable_rpath; +fi -fi; -# Check whether --enable-pam or --disable-pam was given. +# Check whether --enable-pam was given. if test "${enable_pam+set}" = set; then - enableval="$enable_pam" + enableval=$enable_pam; +fi -fi; -# Check whether --enable-pam-link or --disable-pam-link was given. +# Check whether --enable-pam-link was given. if test "${enable_pam_link+set}" = set; then - enableval="$enable_pam_link" + enableval=$enable_pam_link; +fi -fi; -# Check whether --enable-crypt-link or --disable-crypt-link was given. +# Check whether --enable-crypt-link was given. if test "${enable_crypt_link+set}" = set; then - enableval="$enable_crypt_link" - + enableval=$enable_crypt_link; else enable_crypt_link=yes -fi; -# Check whether --enable-xrender-link or --disable-xrender-link was given. +fi + +# Check whether --enable-xrender-link was given. if test "${enable_xrender_link+set}" = set; then - enableval="$enable_xrender_link" + enableval=$enable_xrender_link; +fi -fi; -# Check whether --enable-randr or --disable-randr was given. +# Check whether --enable-randr was given. if test "${enable_randr+set}" = set; then - enableval="$enable_randr" - + enableval=$enable_randr; else enable_randr=yes -fi; -# Check whether --enable-randr-link or --disable-randr-link was given. -if test "${enable_randr_link+set}" = set; then - enableval="$enable_randr_link" +fi +# Check whether --enable-randr-link was given. +if test "${enable_randr_link+set}" = set; then + enableval=$enable_randr_link; else enable_randr_link=yes -fi; +fi + -# Check whether --with-myspell-dicts or --without-myspell-dicts was given. +# Check whether --with-myspell-dicts was given. if test "${with_myspell_dicts+set}" = set; then - withval="$with_myspell_dicts" + withval=$with_myspell_dicts; +fi -fi; -# Check whether --with-system-dicts or --without-system-dicts was given. +# Check whether --with-system-dicts was given. if test "${with_system_dicts+set}" = set; then - withval="$with_system_dicts" + withval=$with_system_dicts; +fi -fi; -# Check whether --with-external-dict-dir or --without-external-dict-dir was given. +# Check whether --with-external-dict-dir was given. if test "${with_external_dict_dir+set}" = set; then - withval="$with_external_dict_dir" + withval=$with_external_dict_dir; +fi -fi; -# Check whether --with-external-hyph-dir or --without-external-hyph-dir was given. +# Check whether --with-external-hyph-dir was given. if test "${with_external_hyph_dir+set}" = set; then - withval="$with_external_hyph_dir" + withval=$with_external_hyph_dir; +fi -fi; -# Check whether --with-external-thes-dir or --without-external-thes-dir was given. +# Check whether --with-external-thes-dir was given. if test "${with_external_thes_dir+set}" = set; then - withval="$with_external_thes_dir" + withval=$with_external_thes_dir; +fi -fi; -# Check whether --with-system-libs or --without-system-libs was given. +# Check whether --with-system-libs was given. if test "${with_system_libs+set}" = set; then - withval="$with_system_libs" + withval=$with_system_libs; +fi -fi; -# Check whether --with-system-headers or --without-system-headers was given. +# Check whether --with-system-headers was given. if test "${with_system_headers+set}" = set; then - withval="$with_system_headers" + withval=$with_system_headers; +fi -fi; -# Check whether --with-system-jars or --without-system-jars was given. +# Check whether --with-system-jars was given. if test "${with_system_jars+set}" = set; then - withval="$with_system_jars" + withval=$with_system_jars; +fi -fi; -# Check whether --with-system-zlib or --without-system-zlib was given. +# Check whether --with-system-zlib was given. if test "${with_system_zlib+set}" = set; then - withval="$with_system_zlib" + withval=$with_system_zlib; +fi -fi; -# Check whether --with-system-openssl or --without-system-openssl was given. +# Check whether --with-system-openssl was given. if test "${with_system_openssl+set}" = set; then - withval="$with_system_openssl" + withval=$with_system_openssl; +fi -fi; -# Check whether --with-system-jpeg or --without-system-jpeg was given. +# Check whether --with-system-jpeg was given. if test "${with_system_jpeg+set}" = set; then - withval="$with_system_jpeg" + withval=$with_system_jpeg; +fi -fi; -# Check whether --with-system-expat or --without-system-expat was given. +# Check whether --with-system-expat was given. if test "${with_system_expat+set}" = set; then - withval="$with_system_expat" + withval=$with_system_expat; +fi -fi; -# Check whether --with-system-libwpd or --without-system-libwpd was given. +# Check whether --with-system-libwpd was given. if test "${with_system_libwpd+set}" = set; then - withval="$with_system_libwpd" + withval=$with_system_libwpd; +fi -fi; -# Check whether --with-system-libxml or --without-system-libxml was given. +# Check whether --with-system-libxml was given. if test "${with_system_libxml+set}" = set; then - withval="$with_system_libxml" + withval=$with_system_libxml; +fi -fi; -# Check whether --with-system-python or --without-system-python was given. +# Check whether --with-system-python was given. if test "${with_system_python+set}" = set; then - withval="$with_system_python" + withval=$with_system_python; +fi -fi; -# Check whether --with-system-icu or --without-system-icu was given. +# Check whether --with-system-icu was given. if test "${with_system_icu+set}" = set; then - withval="$with_system_icu" + withval=$with_system_icu; +fi -fi; -# Check whether --with-system-poppler or --without-system-poppler was given. +# Check whether --with-system-poppler was given. if test "${with_system_poppler+set}" = set; then - withval="$with_system_poppler" + withval=$with_system_poppler; +fi -fi; -# Check whether --with-system-db or --without-system-db was given. +# Check whether --with-system-db was given. if test "${with_system_db+set}" = set; then - withval="$with_system_db" + withval=$with_system_db; +fi -fi; -# Check whether --with-system-lucene or --without-system-lucene was given. +# Check whether --with-system-lucene was given. if test "${with_system_lucene+set}" = set; then - withval="$with_system_lucene" + withval=$with_system_lucene; +fi -fi; -# Check whether --with-lucene-core-jar or --without-lucene-core-jar was given. +# Check whether --with-lucene-core-jar was given. if test "${with_lucene_core_jar+set}" = set; then - withval="$with_lucene_core_jar" - LUCENE_CORE_JAR="$withval" + withval=$with_lucene_core_jar; LUCENE_CORE_JAR="$withval" + +fi -fi; -# Check whether --with-lucene-analyzers-jar or --without-lucene-analyzers-jar was given. +# Check whether --with-lucene-analyzers-jar was given. if test "${with_lucene_analyzers_jar+set}" = set; then - withval="$with_lucene_analyzers_jar" - LUCENE_ANALYZERS_JAR="$withval" + withval=$with_lucene_analyzers_jar; LUCENE_ANALYZERS_JAR="$withval" + +fi -fi; -# Check whether --enable-mysql-connector or --disable-mysql-connector was given. +# Check whether --enable-mysql-connector was given. if test "${enable_mysql_connector+set}" = set; then - enableval="$enable_mysql_connector" + enableval=$enable_mysql_connector; +fi -fi; -# Check whether --with-system-mysql or --without-system-mysql was given. +# Check whether --with-system-mysql was given. if test "${with_system_mysql+set}" = set; then - withval="$with_system_mysql" + withval=$with_system_mysql; +fi -fi; -# Check whether --with-libmysql-path or --without-libmysql-path was given. +# Check whether --with-libmysql-path was given. if test "${with_libmysql_path+set}" = set; then - withval="$with_libmysql_path" + withval=$with_libmysql_path; +fi -fi; -# Check whether --with-system-mysql-cppconn or --without-system-mysql-cppconn was given. +# Check whether --with-system-mysql-cppconn was given. if test "${with_system_mysql_cppconn+set}" = set; then - withval="$with_system_mysql_cppconn" + withval=$with_system_mysql_cppconn; +fi -fi; -# Check whether --with-system-hsqldb or --without-system-hsqldb was given. +# Check whether --with-system-hsqldb was given. if test "${with_system_hsqldb+set}" = set; then - withval="$with_system_hsqldb" + withval=$with_system_hsqldb; +fi -fi; -# Check whether --with-hsqldb-jar or --without-hsqldb-jar was given. +# Check whether --with-hsqldb-jar was given. if test "${with_hsqldb_jar+set}" = set; then - withval="$with_hsqldb_jar" - HSQLDB_JAR="$withval" + withval=$with_hsqldb_jar; HSQLDB_JAR="$withval" + +fi -fi; -# Check whether --with-system-beanshell or --without-system-beanshell was given. +# Check whether --with-system-beanshell was given. if test "${with_system_beanshell+set}" = set; then - withval="$with_system_beanshell" + withval=$with_system_beanshell; +fi -fi; -# Check whether --with-beanshell-jar or --without-beanshell-jar was given. +# Check whether --with-beanshell-jar was given. if test "${with_beanshell_jar+set}" = set; then - withval="$with_beanshell_jar" - BSH_JAR="$withval" + withval=$with_beanshell_jar; BSH_JAR="$withval" -fi; -# Check whether --enable-presenter-extra-ui or --disable-presenter-extra-ui was given. -if test "${enable_presenter_extra_ui+set}" = set; then - enableval="$enable_presenter_extra_ui" +fi +# Check whether --enable-presenter-extra-ui was given. +if test "${enable_presenter_extra_ui+set}" = set; then + enableval=$enable_presenter_extra_ui; else enable_presenter_extra_ui=no -fi; -# Check whether --enable-minimizer or --disable-minimizer was given. +fi + +# Check whether --enable-minimizer was given. if test "${enable_minimizer+set}" = set; then - enableval="$enable_minimizer" + enableval=$enable_minimizer; +fi -fi; -# Check whether --enable-presenter-console or --disable-presenter-console was given. +# Check whether --enable-presenter-console was given. if test "${enable_presenter_console+set}" = set; then - enableval="$enable_presenter_console" + enableval=$enable_presenter_console; +fi -fi; -# Check whether --enable-pdfimport or --disable-pdfimport was given. +# Check whether --enable-pdfimport was given. if test "${enable_pdfimport+set}" = set; then - enableval="$enable_pdfimport" + enableval=$enable_pdfimport; +fi -fi; -# Check whether --enable-wiki-publisher or --disable-wiki-publisher was given. +# Check whether --enable-wiki-publisher was given. if test "${enable_wiki_publisher+set}" = set; then - enableval="$enable_wiki_publisher" + enableval=$enable_wiki_publisher; +fi -fi; -# Check whether --with-commons-codec-jar or --without-commons-codec-jar was given. +# Check whether --with-commons-codec-jar was given. if test "${with_commons_codec_jar+set}" = set; then - withval="$with_commons_codec_jar" - COMMONS_CODEC_JAR="$withval" + withval=$with_commons_codec_jar; COMMONS_CODEC_JAR="$withval" + +fi -fi; -# Check whether --with-commons-lang-jar or --without-commons-lang-jar was given. +# Check whether --with-commons-lang-jar was given. if test "${with_commons_lang_jar+set}" = set; then - withval="$with_commons_lang_jar" - COMMONS_LANG_JAR="$withval" + withval=$with_commons_lang_jar; COMMONS_LANG_JAR="$withval" + +fi -fi; -# Check whether --with-commons-httpclient-jar or --without-commons-httpclient-jar was given. +# Check whether --with-commons-httpclient-jar was given. if test "${with_commons_httpclient_jar+set}" = set; then - withval="$with_commons_httpclient_jar" - COMMONS_HTTPCLIENT_JAR="$withval" + withval=$with_commons_httpclient_jar; COMMONS_HTTPCLIENT_JAR="$withval" + +fi -fi; -# Check whether --with-commons-logging-jar or --without-commons-logging-jar was given. +# Check whether --with-commons-logging-jar was given. if test "${with_commons_logging_jar+set}" = set; then - withval="$with_commons_logging_jar" - COMMONS_LOGGING_JAR="$withval" + withval=$with_commons_logging_jar; COMMONS_LOGGING_JAR="$withval" + +fi -fi; -# Check whether --with-servlet-api-jar or --without-servlet-api-jar was given. +# Check whether --with-servlet-api-jar was given. if test "${with_servlet_api_jar+set}" = set; then - withval="$with_servlet_api_jar" - SERVLETAPI_JAR="$withval" + withval=$with_servlet_api_jar; SERVLETAPI_JAR="$withval" + +fi -fi; -# Check whether --enable-report-builder or --disable-report-builder was given. +# Check whether --enable-report-builder was given. if test "${enable_report_builder+set}" = set; then - enableval="$enable_report_builder" + enableval=$enable_report_builder; +fi -fi; -# Check whether --with-system-jfreereport or --without-system-jfreereport was given. +# Check whether --with-system-jfreereport was given. if test "${with_system_jfreereport+set}" = set; then - withval="$with_system_jfreereport" + withval=$with_system_jfreereport; +fi -fi; -# Check whether --with-sac-jar or --without-sac-jar was given. +# Check whether --with-sac-jar was given. if test "${with_sac_jar+set}" = set; then - withval="$with_sac_jar" - SAC_JAR="$withval" + withval=$with_sac_jar; SAC_JAR="$withval" + +fi -fi; -# Check whether --with-libxml-jar or --without-libxml-jar was given. +# Check whether --with-libxml-jar was given. if test "${with_libxml_jar+set}" = set; then - withval="$with_libxml_jar" - LIBXML_JAR="$withval" + withval=$with_libxml_jar; LIBXML_JAR="$withval" + +fi -fi; -# Check whether --with-flute-jar or --without-flute-jar was given. +# Check whether --with-flute-jar was given. if test "${with_flute_jar+set}" = set; then - withval="$with_flute_jar" - FLUTE_JAR="$withval" + withval=$with_flute_jar; FLUTE_JAR="$withval" + +fi -fi; -# Check whether --with-jfreereport-jar or --without-jfreereport-jar was given. +# Check whether --with-jfreereport-jar was given. if test "${with_jfreereport_jar+set}" = set; then - withval="$with_jfreereport_jar" - JFREEREPORT_JAR="$withval" + withval=$with_jfreereport_jar; JFREEREPORT_JAR="$withval" + +fi -fi; -# Check whether --with-liblayout-jar or --without-liblayout-jar was given. +# Check whether --with-liblayout-jar was given. if test "${with_liblayout_jar+set}" = set; then - withval="$with_liblayout_jar" - LIBLAYOUT_JAR="$withval" + withval=$with_liblayout_jar; LIBLAYOUT_JAR="$withval" + +fi -fi; -# Check whether --with-libloader-jar or --without-libloader-jar was given. +# Check whether --with-libloader-jar was given. if test "${with_libloader_jar+set}" = set; then - withval="$with_libloader_jar" - LIBLOADER_JAR="$withval" + withval=$with_libloader_jar; LIBLOADER_JAR="$withval" + +fi -fi; -# Check whether --with-libloader-jar or --without-libloader-jar was given. +# Check whether --with-libloader-jar was given. if test "${with_libloader_jar+set}" = set; then - withval="$with_libloader_jar" - LIBLOADER_JAR="$withval" + withval=$with_libloader_jar; LIBLOADER_JAR="$withval" + +fi -fi; -# Check whether --with-libformula-jar or --without-libformula-jar was given. +# Check whether --with-libformula-jar was given. if test "${with_libformula_jar+set}" = set; then - withval="$with_libformula_jar" - LIBFORMULA_JAR="$withval" + withval=$with_libformula_jar; LIBFORMULA_JAR="$withval" + +fi -fi; -# Check whether --with-librepository-jar or --without-librepository-jar was given. +# Check whether --with-librepository-jar was given. if test "${with_librepository_jar+set}" = set; then - withval="$with_librepository_jar" - LIBREPOSITORY_JAR="$withval" + withval=$with_librepository_jar; LIBREPOSITORY_JAR="$withval" + +fi -fi; -# Check whether --with-libfonts-jar or --without-libfonts-jar was given. +# Check whether --with-libfonts-jar was given. if test "${with_libfonts_jar+set}" = set; then - withval="$with_libfonts_jar" - LIBFONTS_JAR="$withval" + withval=$with_libfonts_jar; LIBFONTS_JAR="$withval" + +fi -fi; -# Check whether --with-libserializer-jar or --without-libserializer-jar was given. +# Check whether --with-libserializer-jar was given. if test "${with_libserializer_jar+set}" = set; then - withval="$with_libserializer_jar" - LIBSERIALIZER_JAR="$withval" + withval=$with_libserializer_jar; LIBSERIALIZER_JAR="$withval" + +fi -fi; -# Check whether --with-libbase-jar or --without-libbase-jar was given. +# Check whether --with-libbase-jar was given. if test "${with_libbase_jar+set}" = set; then - withval="$with_libbase_jar" - LIBBASE_JAR="$withval" + withval=$with_libbase_jar; LIBBASE_JAR="$withval" + +fi -fi; -# Check whether --with-system-saxon or --without-system-saxon was given. +# Check whether --with-system-saxon was given. if test "${with_system_saxon+set}" = set; then - withval="$with_system_saxon" + withval=$with_system_saxon; +fi -fi; -# Check whether --with-saxon-jar or --without-saxon-jar was given. +# Check whether --with-saxon-jar was given. if test "${with_saxon_jar+set}" = set; then - withval="$with_saxon_jar" - SAXON_JAR="$withval" + withval=$with_saxon_jar; SAXON_JAR="$withval" -fi; +fi -# Check whether --with-system-libxslt or --without-system-libxslt was given. + +# Check whether --with-system-libxslt was given. if test "${with_system_libxslt+set}" = set; then - withval="$with_system_libxslt" + withval=$with_system_libxslt; +fi -fi; -# Check whether --with-system-odbc or --without-system-odbc was given. +# Check whether --with-system-odbc was given. if test "${with_system_odbc+set}" = set; then - withval="$with_system_odbc" + withval=$with_system_odbc; +fi -fi; -# Check whether --with-system-sane or --without-system-sane was given. +# Check whether --with-system-sane was given. if test "${with_system_sane+set}" = set; then - withval="$with_system_sane" + withval=$with_system_sane; +fi -fi; -# Check whether --with-system-xrender or --without-system-xrender was given. +# Check whether --with-system-xrender was given. if test "${with_system_xrender+set}" = set; then - withval="$with_system_xrender" + withval=$with_system_xrender; +fi -fi; -# Check whether --with-system-curl or --without-system-curl was given. +# Check whether --with-system-curl was given. if test "${with_system_curl+set}" = set; then - withval="$with_system_curl" + withval=$with_system_curl; +fi -fi; -# Check whether --with-system-boost or --without-system-boost was given. +# Check whether --with-system-boost was given. if test "${with_system_boost+set}" = set; then - withval="$with_system_boost" + withval=$with_system_boost; +fi -fi; -# Check whether --with-system-mdds or --without-system-mdds was given. +# Check whether --with-system-mdds was given. if test "${with_system_mdds+set}" = set; then - withval="$with_system_mdds" + withval=$with_system_mdds; +fi -fi; -# Check whether --with-system-vigra or --without-system-vigra was given. +# Check whether --with-system-vigra was given. if test "${with_system_vigra+set}" = set; then - withval="$with_system_vigra" + withval=$with_system_vigra; +fi -fi; -# Check whether --enable-neon or --disable-neon was given. +# Check whether --enable-neon was given. if test "${enable_neon+set}" = set; then - enableval="$enable_neon" + enableval=$enable_neon; +fi -fi; -# Check whether --enable-Xaw or --disable-Xaw was given. +# Check whether --enable-Xaw was given. if test "${enable_Xaw+set}" = set; then - enableval="$enable_Xaw" + enableval=$enable_Xaw; +fi -fi; -# Check whether --with-system-neon or --without-system-neon was given. +# Check whether --with-system-neon was given. if test "${with_system_neon+set}" = set; then - withval="$with_system_neon" + withval=$with_system_neon; +fi -fi; -# Check whether --with-system-agg or --without-system-agg was given. +# Check whether --with-system-agg was given. if test "${with_system_agg+set}" = set; then - withval="$with_system_agg" + withval=$with_system_agg; +fi -fi; -# Check whether --with-system-hunspell or --without-system-hunspell was given. +# Check whether --with-system-hunspell was given. if test "${with_system_hunspell+set}" = set; then - withval="$with_system_hunspell" + withval=$with_system_hunspell; +fi -fi; -# Check whether --with-system-mythes or --without-system-mythes was given. +# Check whether --with-system-mythes was given. if test "${with_system_mythes+set}" = set; then - withval="$with_system_mythes" + withval=$with_system_mythes; +fi -fi; -# Check whether --with-system-altlinuxhyph or --without-system-altlinuxhyph was given. +# Check whether --with-system-altlinuxhyph was given. if test "${with_system_altlinuxhyph+set}" = set; then - withval="$with_system_altlinuxhyph" + withval=$with_system_altlinuxhyph; +fi -fi; -# Check whether --with-system-lpsolve or --without-system-lpsolve was given. +# Check whether --with-system-lpsolve was given. if test "${with_system_lpsolve+set}" = set; then - withval="$with_system_lpsolve" + withval=$with_system_lpsolve; +fi -fi; -# Check whether --with-system-libtextcat or --without-system-libtextcat was given. +# Check whether --with-system-libtextcat was given. if test "${with_system_libtextcat+set}" = set; then - withval="$with_system_libtextcat" + withval=$with_system_libtextcat; +fi -fi; -# Check whether --with-external-libtextcat-data or --without-external-libtextcat-data was given. +# Check whether --with-external-libtextcat-data was given. if test "${with_external_libtextcat_data+set}" = set; then - withval="$with_external_libtextcat_data" + withval=$with_external_libtextcat_data; +fi -fi; -# Check whether --with-system-cppunit or --without-system-cppunit was given. +# Check whether --with-system-cppunit was given. if test "${with_system_cppunit+set}" = set; then - withval="$with_system_cppunit" + withval=$with_system_cppunit; +fi -fi; -# Check whether --with-system-redland or --without-system-redland was given. +# Check whether --with-system-redland was given. if test "${with_system_redland+set}" = set; then - withval="$with_system_redland" + withval=$with_system_redland; +fi -fi; -# Check whether --with-system-mozilla or --without-system-mozilla was given. +# Check whether --with-system-mozilla was given. if test "${with_system_mozilla+set}" = set; then - withval="$with_system_mozilla" - WITH_SYSTEM_MOZILLA=$withval + withval=$with_system_mozilla; WITH_SYSTEM_MOZILLA=$withval else WITH_SYSTEM_MOZILLA=no -fi; +fi -# Check whether --with-stlport or --without-stlport was given. + +# Check whether --with-stlport was given. if test "${with_stlport+set}" = set; then - withval="$with_stlport" - WITH_STLPORT=$withval + withval=$with_stlport; WITH_STLPORT=$withval else WITH_STLPORT=auto -fi; +fi -# Check whether --with-jdk-home or --without-jdk-home was given. + +# Check whether --with-jdk-home was given. if test "${with_jdk_home+set}" = set; then - withval="$with_jdk_home" + withval=$with_jdk_home; +fi -fi; -# Check whether --with-gxx_include_path or --without-gxx_include_path was given. +# Check whether --with-gxx_include_path was given. if test "${with_gxx_include_path+set}" = set; then - withval="$with_gxx_include_path" + withval=$with_gxx_include_path; +fi -fi; -# Check whether --with-java or --without-java was given. +# Check whether --with-java was given. if test "${with_java+set}" = set; then - withval="$with_java" - if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi + withval=$with_java; if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi else WITH_JAVA=java -fi; -# Check whether --enable-gcjaot or --disable-gcjaot was given. +fi + +# Check whether --enable-gcjaot was given. if test "${enable_gcjaot+set}" = set; then - enableval="$enable_gcjaot" + enableval=$enable_gcjaot; +fi -fi; -# Check whether --with-ant-home or --without-ant-home was given. +# Check whether --with-ant-home was given. if test "${with_ant_home+set}" = set; then - withval="$with_ant_home" + withval=$with_ant_home; +fi -fi; -# Check whether --with-junit or --without-junit was given. +# Check whether --with-junit was given. if test "${with_junit+set}" = set; then - withval="$with_junit" - + withval=$with_junit; else with_junit=yes -fi; +fi + -# Check whether --with-perl-home or --without-perl-home was given. +# Check whether --with-perl-home was given. if test "${with_perl_home+set}" = set; then - withval="$with_perl_home" + withval=$with_perl_home; +fi -fi; -# Check whether --with-cl-home or --without-cl-home was given. +# Check whether --with-cl-home was given. if test "${with_cl_home+set}" = set; then - withval="$with_cl_home" + withval=$with_cl_home; +fi -fi; -# Check whether --with-mspdb-path or --without-mspdb-path was given. +# Check whether --with-mspdb-path was given. if test "${with_mspdb_path+set}" = set; then - withval="$with_mspdb_path" + withval=$with_mspdb_path; +fi -fi; -# Check whether --with-midl-path or --without-midl-path was given. +# Check whether --with-midl-path was given. if test "${with_midl_path+set}" = set; then - withval="$with_midl_path" + withval=$with_midl_path; +fi -fi; -# Check whether --with-csc-path or --without-csc-path was given. +# Check whether --with-csc-path was given. if test "${with_csc_path+set}" = set; then - withval="$with_csc_path" + withval=$with_csc_path; +fi -fi; -# Check whether --with-nsis-path or --without-nsis-path was given. +# Check whether --with-nsis-path was given. if test "${with_nsis_path+set}" = set; then - withval="$with_nsis_path" + withval=$with_nsis_path; +fi -fi; -# Check whether --with-frame-home or --without-frame-home was given. +# Check whether --with-frame-home was given. if test "${with_frame_home+set}" = set; then - withval="$with_frame_home" + withval=$with_frame_home; +fi -fi; -# Check whether --with-psdk-home or --without-psdk-home was given. +# Check whether --with-psdk-home was given. if test "${with_psdk_home+set}" = set; then - withval="$with_psdk_home" + withval=$with_psdk_home; +fi -fi; -# Check whether --with-directx-home or --without-directx-home was given. +# Check whether --with-directx-home was given. if test "${with_directx_home+set}" = set; then - withval="$with_directx_home" + withval=$with_directx_home; +fi -fi; -# Check whether --with-mozilla-build or --without-mozilla-build was given. +# Check whether --with-mozilla-build was given. if test "${with_mozilla_build+set}" = set; then - withval="$with_mozilla_build" - MOZILLABUILD=$withval -fi; + withval=$with_mozilla_build; MOZILLABUILD=$withval +fi -# Check whether --with-local-solenv or --without-local-solenv was given. + +# Check whether --with-local-solenv was given. if test "${with_local_solenv+set}" = set; then - withval="$with_local_solenv" + withval=$with_local_solenv; +fi -fi; -# Check whether --with-local-solver or --without-local-solver was given. +# Check whether --with-local-solver was given. if test "${with_local_solver+set}" = set; then - withval="$with_local_solver" + withval=$with_local_solver; +fi -fi; -# Check whether --enable-check-only or --disable-check-only was given. +# Check whether --enable-check-only was given. if test "${enable_check_only+set}" = set; then - enableval="$enable_check_only" + enableval=$enable_check_only; +fi -fi; -# Check whether --enable-ccache-skip or --disable-ccache-skip was given. +# Check whether --enable-ccache-skip was given. if test "${enable_ccache_skip+set}" = set; then - enableval="$enable_ccache_skip" - + enableval=$enable_ccache_skip; else enable_ccache_skip=auto -fi; +fi -# Check whether --with-lang or --without-lang was given. + +# Check whether --with-lang was given. if test "${with_lang+set}" = set; then - withval="$with_lang" + withval=$with_lang; +fi -fi; -# Check whether --with-poor-help-localizations or --without-poor-help-localizations was given. +# Check whether --with-poor-help-localizations was given. if test "${with_poor_help_localizations+set}" = set; then - withval="$with_poor_help_localizations" + withval=$with_poor_help_localizations; +fi -fi; -# Check whether --with-dict or --without-dict was given. +# Check whether --with-dict was given. if test "${with_dict+set}" = set; then - withval="$with_dict" + withval=$with_dict; +fi -fi; -# Check whether --with-intro-bitmaps or --without-intro-bitmaps was given. +# Check whether --with-intro-bitmaps was given. if test "${with_intro_bitmaps+set}" = set; then - withval="$with_intro_bitmaps" + withval=$with_intro_bitmaps; +fi -fi; -# Check whether --with-about-bitmaps or --without-about-bitmaps was given. +# Check whether --with-about-bitmaps was given. if test "${with_about_bitmaps+set}" = set; then - withval="$with_about_bitmaps" + withval=$with_about_bitmaps; +fi -fi; -# Check whether --with-vendor or --without-vendor was given. +# Check whether --with-vendor was given. if test "${with_vendor+set}" = set; then - withval="$with_vendor" + withval=$with_vendor; +fi -fi; -# Check whether --with-unix-wrapper or --without-unix-wrapper was given. +# Check whether --with-unix-wrapper was given. if test "${with_unix_wrapper+set}" = set; then - withval="$with_unix_wrapper" + withval=$with_unix_wrapper; +fi -fi; -# Check whether --with-asm-home or --without-asm-home was given. +# Check whether --with-asm-home was given. if test "${with_asm_home+set}" = set; then - withval="$with_asm_home" + withval=$with_asm_home; +fi -fi; -# Check whether --with-os-version or --without-os-version was given. +# Check whether --with-os-version was given. if test "${with_os_version+set}" = set; then - withval="$with_os_version" + withval=$with_os_version; +fi -fi; -# Check whether --with-unzip-home or --without-unzip-home was given. +# Check whether --with-unzip-home was given. if test "${with_unzip_home+set}" = set; then - withval="$with_unzip_home" + withval=$with_unzip_home; +fi -fi; -# Check whether --with-zip-home or --without-zip-home was given. +# Check whether --with-zip-home was given. if test "${with_zip_home+set}" = set; then - withval="$with_zip_home" + withval=$with_zip_home; +fi -fi; -# Check whether --with-mingwin or --without-mingwin was given. +# Check whether --with-mingwin was given. if test "${with_mingwin+set}" = set; then - withval="$with_mingwin" - WITH_MINGWIN=$withval + withval=$with_mingwin; WITH_MINGWIN=$withval else WITH_MINGWIN=0 -fi; +fi + -# Check whether --with-build-version or --without-build-version was given. +# Check whether --with-build-version was given. if test "${with_build_version+set}" = set; then - withval="$with_build_version" - with_build_version=$withval -fi; + withval=$with_build_version; with_build_version=$withval +fi + -# Check whether --with-alloc or --without-alloc was given. +# Check whether --with-alloc was given. if test "${with_alloc+set}" = set; then - withval="$with_alloc" + withval=$with_alloc; +fi -fi; -# Check whether --enable-verbose or --disable-verbose was given. +# Check whether --enable-verbose was given. if test "${enable_verbose+set}" = set; then - enableval="$enable_verbose" + enableval=$enable_verbose; +fi -fi; -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +# Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" + enableval=$enable_dependency_tracking; +fi -fi; BUILD_TYPE="OOo" @@ -3012,29 +4180,148 @@ echo "* *" echo "********************************************************************" echo "" cat /dev/null > warn -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -3045,34 +4332,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$AWK" && break done # Extract the first word of "$AWK", so it can be a program name with args. set dummy $AWK; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $AWK in [\\/]* | ?:[\\/]*) @@ -3085,30 +4374,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi AWK=$ac_cv_path_AWK - if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$AWK"; then - { { echo "$as_me:$LINENO: error: install awk to run this script" >&5 -echo "$as_me: error: install awk to run this script" >&2;} + { { $as_echo "$as_me:$LINENO: error: install awk to run this script" >&5 +$as_echo "$as_me: error: install awk to run this script" >&2;} { (exit 1); exit 1; }; } fi @@ -3116,10 +4406,10 @@ for ac_prog in sed do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $SED in [\\/]* | ?:[\\/]*) @@ -3132,46 +4422,47 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi SED=$ac_cv_path_SED - if test -n "$SED"; then - echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 + { $as_echo "$as_me:$LINENO: result: $SED" >&5 +$as_echo "$SED" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$SED" && break done if test -z "$SED"; then - { { echo "$as_me:$LINENO: error: install sed to run this script" >&5 -echo "$as_me: error: install sed to run this script" >&2;} + { { $as_echo "$as_me:$LINENO: error: install sed to run this script" >&5 +$as_echo "$as_me: error: install sed to run this script" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for solenv environment" >&5 -echo $ECHO_N "checking for solenv environment... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for solenv environment" >&5 +$as_echo_n "checking for solenv environment... " >&6; } if test -z "$with_local_solenv"; then LOCAL_SOLENV="DEFAULT" - echo "$as_me:$LINENO: result: default" >&5 -echo "${ECHO_T}default" >&6 + { $as_echo "$as_me:$LINENO: result: default" >&5 +$as_echo "default" >&6; } else LOCAL_SOLENV=$with_local_solenv - echo "$as_me:$LINENO: result: $with_local_solenv" >&5 -echo "${ECHO_T}$with_local_solenv" >&6 + { $as_echo "$as_me:$LINENO: result: $with_local_solenv" >&5 +$as_echo "$with_local_solenv" >&6; } fi @@ -3189,110 +4480,160 @@ if test -e $_solenv/inc/minor.mk; then SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" else - { { echo "$as_me:$LINENO: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&5 -echo "$as_me: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&2;} + { { $as_echo "$as_me:$LINENO: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&5 +$as_echo "$as_me: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&2;} { (exit 1); exit 1; }; } fi ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +$as_echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. @@ -3303,20 +4644,20 @@ test -n "$target_alias" && program_prefix=${target_alias}- if test "$build" != "$host" -o "$build" != "$target" \ -o "$host" != "$target"; then - { echo "$as_me:$LINENO: WARNING: cross-compiling by any means is not supported (yet)!" >&5 -echo "$as_me: WARNING: cross-compiling by any means is not supported (yet)!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cross-compiling by any means is not supported (yet)!" >&5 +$as_echo "$as_me: WARNING: cross-compiling by any means is not supported (yet)!" >&2;} echo "cross-compiling by any means is not supported (yet)!" >> warn fi if echo "$build_os" | grep cygwin; then - echo "$as_me:$LINENO: checking Cygwin version" >&5 -echo $ECHO_N "checking Cygwin version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking Cygwin version" >&5 +$as_echo_n "checking Cygwin version... " >&6; } CygwinVer=`uname -r` - echo "$as_me:$LINENO: result: $CygwinVer" >&5 -echo "${ECHO_T}$CygwinVer" >&6 + { $as_echo "$as_me:$LINENO: result: $CygwinVer" >&5 +$as_echo "$CygwinVer" >&6; } if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then - { { echo "$as_me:$LINENO: error: You need at least Cygwin V1.5.x" >&5 -echo "$as_me: error: You need at least Cygwin V1.5.x" >&2;} + { { $as_echo "$as_me:$LINENO: error: You need at least Cygwin V1.5.x" >&5 +$as_echo "$as_me: error: You need at least Cygwin V1.5.x" >&2;} { (exit 1); exit 1; }; } fi else @@ -3335,10 +4676,10 @@ case "$build_os" in _os=SunOS # Extract the first word of "gtar", so it can be a program name with args. set dummy gtar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GNUTAR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $GNUTAR in [\\/]* | ?:[\\/]*) @@ -3352,54 +4693,55 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GNUTAR="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi GNUTAR=$ac_cv_path_GNUTAR - if test -n "$GNUTAR"; then - echo "$as_me:$LINENO: result: $GNUTAR" >&5 -echo "${ECHO_T}$GNUTAR" >&6 + { $as_echo "$as_me:$LINENO: result: $GNUTAR" >&5 +$as_echo "$GNUTAR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$GNUTAR"; then - { { echo "$as_me:$LINENO: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&5 -echo "$as_me: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&2;} + { { $as_echo "$as_me:$LINENO: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&5 +$as_echo "$as_me: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking the Solaris operating system release" >&5 -echo $ECHO_N "checking the Solaris operating system release... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the Solaris operating system release" >&5 +$as_echo_n "checking the Solaris operating system release... " >&6; } _os_release=`echo $build_os | $SED -e s/solaris2\.//` if test "$_os_release" -lt "6"; then - { { echo "$as_me:$LINENO: error: use solaris >= 6 to build OpenOffice.org" >&5 -echo "$as_me: error: use solaris >= 6 to build OpenOffice.org" >&2;} + { { $as_echo "$as_me:$LINENO: error: use solaris >= 6 to build OpenOffice.org" >&5 +$as_echo "$as_me: error: use solaris >= 6 to build OpenOffice.org" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: ok ($_os_release)" >&5 -echo "${ECHO_T}ok ($_os_release)" >&6 + { $as_echo "$as_me:$LINENO: result: ok ($_os_release)" >&5 +$as_echo "ok ($_os_release)" >&6; } fi - echo "$as_me:$LINENO: checking the processor type" >&5 -echo $ECHO_N "checking the processor type... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the processor type" >&5 +$as_echo_n "checking the processor type... " >&6; } if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then - echo "$as_me:$LINENO: result: ok ($build_cpu)" >&5 -echo "${ECHO_T}ok ($build_cpu)" >&6 + { $as_echo "$as_me:$LINENO: result: ok ($build_cpu)" >&5 +$as_echo "ok ($build_cpu)" >&6; } else - { { echo "$as_me:$LINENO: error: only sparc and i386 processors are supported" >&5 -echo "$as_me: error: only sparc and i386 processors are supported" >&2;} + { { $as_echo "$as_me:$LINENO: error: only sparc and i386 processors are supported" >&5 +$as_echo "$as_me: error: only sparc and i386 processors are supported" >&2;} { (exit 1); exit 1; }; } fi ;; @@ -3434,8 +4776,8 @@ echo "$as_me: error: only sparc and i386 processors are supported" >&2;} test_gstreamer=no _os=Darwin if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then - { echo "$as_me:$LINENO: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&5 -echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&5 +$as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&2;} echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn enable_systray=no fi @@ -3458,17 +4800,17 @@ echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use -- test_randr=yes test_freetype=yes test_gstreamer=yes - echo "$as_me:$LINENO: checking the FreeBSD operating system release" >&5 -echo $ECHO_N "checking the FreeBSD operating system release... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the FreeBSD operating system release" >&5 +$as_echo_n "checking the FreeBSD operating system release... " >&6; } if test -n "$with_os_version"; then OSVERSION="$with_os_version" else OSVERSION=`/sbin/sysctl -n kern.osreldate` fi - echo "$as_me:$LINENO: result: found OSVERSION=$OSVERSION" >&5 -echo "${ECHO_T}found OSVERSION=$OSVERSION" >&6 - echo "$as_me:$LINENO: checking which thread library to use" >&5 -echo $ECHO_N "checking which thread library to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: found OSVERSION=$OSVERSION" >&5 +$as_echo "found OSVERSION=$OSVERSION" >&6; } + { $as_echo "$as_me:$LINENO: checking which thread library to use" >&5 +$as_echo_n "checking which thread library to use... " >&6; } if test "$OSVERSION" -lt "500016"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-pthread" @@ -3479,8 +4821,8 @@ echo $ECHO_N "checking which thread library to use... $ECHO_C" >&6 PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" fi - echo "$as_me:$LINENO: result: $PTHREAD_LIBS" >&5 -echo "${ECHO_T}$PTHREAD_LIBS" >&6 + { $as_echo "$as_me:$LINENO: result: $PTHREAD_LIBS" >&5 +$as_echo "$PTHREAD_LIBS" >&6; } _os=FreeBSD ;; osf) @@ -3511,8 +4853,8 @@ echo "${ECHO_T}$PTHREAD_LIBS" >&6 _os=AIX ;; *) - { { echo "$as_me:$LINENO: error: $_os operating system is not suitable to build OpenOffice.org!" >&5 -echo "$as_me: error: $_os operating system is not suitable to build OpenOffice.org!" >&2;} + { { $as_echo "$as_me:$LINENO: error: $_os operating system is not suitable to build OpenOffice.org!" >&5 +$as_echo "$as_me: error: $_os operating system is not suitable to build OpenOffice.org!" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -3521,17 +4863,17 @@ esac -echo "$as_me:$LINENO: checking whether to enable crashdump feature" >&5 -echo $ECHO_N "checking whether to enable crashdump feature... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable crashdump feature" >&5 +$as_echo_n "checking whether to enable crashdump feature... " >&6; } if test "$enable_crashdump" = "yes"; then ENABLE_CRASHDUMP="TRUE" BUILD_TYPE="$BUILD_TYPE CRASHREP" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_CRASHDUMP="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3540,89 +4882,89 @@ if test "$_os" = "WINNT"; then fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking whether to use the standard non-optimizing compiler" >&5 -echo $ECHO_N "checking whether to use the standard non-optimizing compiler... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use the standard non-optimizing compiler" >&5 +$as_echo_n "checking whether to use the standard non-optimizing compiler... " >&6; } if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then VC_STANDARD="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else VC_STANDARD="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi fi -echo "$as_me:$LINENO: checking whether to turn warnings to errors" >&5 -echo $ECHO_N "checking whether to turn warnings to errors... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to turn warnings to errors" >&5 +$as_echo_n "checking whether to turn warnings to errors... " >&6; } if test -n "$enable_werror" && test "$enable_werror" != "no"; then ENABLE_WERROR="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - { echo "$as_me:$LINENO: WARNING: Turning warnings to errors has no effect in modules or" >&5 -echo "$as_me: WARNING: Turning warnings to errors has no effect in modules or" >&2;} - { echo "$as_me:$LINENO: WARNING: on platforms where it has been disabled explicitely" >&5 -echo "$as_me: WARNING: on platforms where it has been disabled explicitely" >&2;} + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: WARNING: Turning warnings to errors has no effect in modules or" >&5 +$as_echo "$as_me: WARNING: Turning warnings to errors has no effect in modules or" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: on platforms where it has been disabled explicitely" >&5 +$as_echo "$as_me: WARNING: on platforms where it has been disabled explicitely" >&2;} echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn else ENABLE_WERROR="FALSE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to do a debug build" >&5 -echo $ECHO_N "checking whether to do a debug build... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to do a debug build" >&5 +$as_echo_n "checking whether to do a debug build... " >&6; } if test -n "$enable_debug" && test "$enable_debug" != "no"; then ENABLE_DEBUG="TRUE" if test -z "$enable_symbols"; then enable_symbols="yes" fi - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_DEBUG="FALSE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to build with additional debug utilities" >&5 -echo $ECHO_N "checking whether to build with additional debug utilities... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build with additional debug utilities" >&5 +$as_echo_n "checking whether to build with additional debug utilities... " >&6; } if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then PROEXT="" PRODUCT="" PROFULLSWITCH="" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else PRODUCT="full" PROFULLSWITCH="product=full" PROEXT=".pro" - echo "$as_me:$LINENO: result: no, full product build" >&5 -echo "${ECHO_T}no, full product build" >&6 + { $as_echo "$as_me:$LINENO: result: no, full product build" >&5 +$as_echo "no, full product build" >&6; } fi -echo "$as_me:$LINENO: checking whether to include symbols into final build" >&5 -echo $ECHO_N "checking whether to include symbols into final build... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to include symbols into final build" >&5 +$as_echo_n "checking whether to include symbols into final build... " >&6; } if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then ENABLE_SYMBOLS="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then ENABLE_SYMBOLS="SMALL" - echo "$as_me:$LINENO: result: yes, small ones" >&5 -echo "${ECHO_T}yes, small ones" >&6 + { $as_echo "$as_me:$LINENO: result: yes, small ones" >&5 +$as_echo "yes, small ones" >&6; } else if test "$enable_symbols" != "no" ; then echo enable symbols is: $enable_symbols - { { echo "$as_me:$LINENO: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&5 -echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&2;} + { { $as_echo "$as_me:$LINENO: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&5 +$as_echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&2;} { (exit 1); exit 1; }; } else ENABLE_SYMBOLS= @@ -3631,21 +4973,21 @@ echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as paramet fi else ENABLE_SYMBOLS= - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to strip the solver or not." >&5 -echo $ECHO_N "checking whether to strip the solver or not.... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to strip the solver or not." >&5 +$as_echo_n "checking whether to strip the solver or not.... " >&6; } if test -n "$enable_strip_solver"; then if test "$enable_strip_solver" = "yes"; then DISABLE_STRIP= else if test "$enable_strip_solver" = "no"; then DISABLE_STRIP="TRUE" else - { { echo "$as_me:$LINENO: error: --disable-strip-solver only accepts yes or no as parameter." >&5 -echo "$as_me: error: --disable-strip-solver only accepts yes or no as parameter." >&2;} + { { $as_echo "$as_me:$LINENO: error: --disable-strip-solver only accepts yes or no as parameter." >&5 +$as_echo "$as_me: error: --disable-strip-solver only accepts yes or no as parameter." >&2;} { (exit 1); exit 1; }; } fi fi @@ -3658,29 +5000,29 @@ else fi -echo "$as_me:$LINENO: checking whether to enable native CUPS support" >&5 -echo $ECHO_N "checking whether to enable native CUPS support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable native CUPS support" >&5 +$as_echo_n "checking whether to enable native CUPS support... " >&6; } if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then ENABLE_CUPS="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_CUPS="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to enable fontconfig support" >&5 -echo $ECHO_N "checking whether to enable fontconfig support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable fontconfig support" >&5 +$as_echo_n "checking whether to enable fontconfig support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then ENABLE_FONTCONFIG="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_FONTCONFIG="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3695,124 +5037,124 @@ if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \ fi -echo "$as_me:$LINENO: checking whether to enable filters for legacy binary file formats (StarOffice 5.2)" >&5 -echo $ECHO_N "checking whether to enable filters for legacy binary file formats (StarOffice 5.2)... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable filters for legacy binary file formats (StarOffice 5.2)" >&5 +$as_echo_n "checking whether to enable filters for legacy binary file formats (StarOffice 5.2)... " >&6; } if test "$enable_binfilter" = "no"; then WITH_BINFILTER="NO" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else WITH_BINFILTER="YES" BUILD_TYPE="$BUILD_TYPE BINFILTER" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking whether to use DirectX" >&5 -echo $ECHO_N "checking whether to use DirectX... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use DirectX" >&5 +$as_echo_n "checking whether to use DirectX... " >&6; } if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then ENABLE_DIRECTX="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_DIRECTX="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking whether to use ActiveX" >&5 -echo $ECHO_N "checking whether to use ActiveX... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use ActiveX" >&5 +$as_echo_n "checking whether to use ActiveX... " >&6; } if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then DISABLE_ACTIVEX="" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else DISABLE_ACTIVEX="TRUE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking whether to use ATL" >&5 -echo $ECHO_N "checking whether to use ATL... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use ATL" >&5 +$as_echo_n "checking whether to use ATL... " >&6; } if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then DISABLE_ATL="" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else DISABLE_ATL="TRUE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi -echo "$as_me:$LINENO: checking whether to use RPATH in shared libraries" >&5 -echo $ECHO_N "checking whether to use RPATH in shared libraries... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to use RPATH in shared libraries" >&5 +$as_echo_n "checking whether to use RPATH in shared libraries... " >&6; } if test "$enable_rpath" = "no"; then ENABLE_RPATH="no" else ENABLE_RPATH="yes" fi -echo "$as_me:$LINENO: result: $ENABLE_RPATH" >&5 -echo "${ECHO_T}$ENABLE_RPATH" >&6 +{ $as_echo "$as_me:$LINENO: result: $ENABLE_RPATH" >&5 +$as_echo "$ENABLE_RPATH" >&6; } -echo "$as_me:$LINENO: checking whether to include MySpell dictionaries" >&5 -echo $ECHO_N "checking whether to include MySpell dictionaries... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to include MySpell dictionaries" >&5 +$as_echo_n "checking whether to include MySpell dictionaries... " >&6; } if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } WITH_MYSPELL_DICTS=YES BUILD_TYPE="$BUILD_TYPE DICTIONARIES" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } WITH_MYSPELL_DICTS=NO fi if test "$WITH_MYSPELL_DICTS" = "NO"; then - echo "$as_me:$LINENO: checking whether to use dicts from external paths" >&5 -echo $ECHO_N "checking whether to use dicts from external paths... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use dicts from external paths" >&5 +$as_echo_n "checking whether to use dicts from external paths... " >&6; } if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SYSTEM_DICTS=YES - echo "$as_me:$LINENO: checking for spelling dictionary directory" >&5 -echo $ECHO_N "checking for spelling dictionary directory... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for spelling dictionary directory" >&5 +$as_echo_n "checking for spelling dictionary directory... " >&6; } if test -n "$with_external_dict_dir"; then DICT_SYSTEM_DIR=file://$with_external_dict_dir else DICT_SYSTEM_DIR=file:///usr/share/hunspell fi - echo "$as_me:$LINENO: result: $DICT_SYSTEM_DIR" >&5 -echo "${ECHO_T}$DICT_SYSTEM_DIR" >&6 - echo "$as_me:$LINENO: checking for hyphenation patterns directory" >&5 -echo $ECHO_N "checking for hyphenation patterns directory... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: $DICT_SYSTEM_DIR" >&5 +$as_echo "$DICT_SYSTEM_DIR" >&6; } + { $as_echo "$as_me:$LINENO: checking for hyphenation patterns directory" >&5 +$as_echo_n "checking for hyphenation patterns directory... " >&6; } if test -n "$with_external_hyph_dir"; then HYPH_SYSTEM_DIR=file://$with_external_hyph_dir else HYPH_SYSTEM_DIR=file:///usr/share/hyphen fi - echo "$as_me:$LINENO: result: $HYPH_SYSTEM_DIR" >&5 -echo "${ECHO_T}$HYPH_SYSTEM_DIR" >&6 - echo "$as_me:$LINENO: checking for thesaurus directory" >&5 -echo $ECHO_N "checking for thesaurus directory... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: $HYPH_SYSTEM_DIR" >&5 +$as_echo "$HYPH_SYSTEM_DIR" >&6; } + { $as_echo "$as_me:$LINENO: checking for thesaurus directory" >&5 +$as_echo_n "checking for thesaurus directory... " >&6; } if test -n "$with_external_thes_dir"; then THES_SYSTEM_DIR=file://$with_external_thes_dir else THES_SYSTEM_DIR=file:///usr/share/mythes fi - echo "$as_me:$LINENO: result: $THES_SYSTEM_DIR" >&5 -echo "${ECHO_T}$THES_SYSTEM_DIR" >&6 + { $as_echo "$as_me:$LINENO: result: $THES_SYSTEM_DIR" >&5 +$as_echo "$THES_SYSTEM_DIR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SYSTEM_DICTS=NO fi fi @@ -3822,13 +5164,13 @@ fi if test $_os = "WINNT"; then - echo "$as_me:$LINENO: checking Windows build environment sanity" >&5 -echo $ECHO_N "checking Windows build environment sanity... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking Windows build environment sanity" >&5 +$as_echo_n "checking Windows build environment sanity... " >&6; } if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then - { { echo "$as_me:$LINENO: error: $AWK, awk, tar or gunzip is a cygwin symlink! + { { $as_echo "$as_me:$LINENO: error: $AWK, awk, tar or gunzip is a cygwin symlink! Native windows programs cannot use cygwin symlinks. Remove the symbolic link, and copy the program to the name of the link." >&5 -echo "$as_me: error: $AWK, awk, tar or gunzip is a cygwin symlink! +$as_echo "$as_me: error: $AWK, awk, tar or gunzip is a cygwin symlink! Native windows programs cannot use cygwin symlinks. Remove the symbolic link, and copy the program to the name of the link." >&2;} { (exit 1); exit 1; }; } @@ -3846,20 +5188,20 @@ link, and copy the program to the name of the link." >&2;} CXX="g++ -mno-cygwin" fi fi - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } fi if test "$_os" = "WINNT" ; then - echo "$as_me:$LINENO: checking for cygwin gcc/g++" >&5 -echo $ECHO_N "checking for cygwin gcc/g++... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for cygwin gcc/g++" >&5 +$as_echo_n "checking for cygwin gcc/g++... " >&6; } if which gcc > /dev/null && which g++ > /dev/null ; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: cygwin gcc and g++ are needed, please install them." >&5 -echo "$as_me: error: cygwin gcc and g++ are needed, please install them." >&2;} + { { $as_echo "$as_me:$LINENO: error: cygwin gcc and g++ are needed, please install them." >&5 +$as_echo "$as_me: error: cygwin gcc and g++ are needed, please install them." >&2;} { (exit 1); exit 1; }; } fi fi @@ -3867,10 +5209,10 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SHELLPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $SHELLPATH in [\\/]* | ?:[\\/]*) @@ -3883,45 +5225,46 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SHELLPATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi SHELLPATH=$ac_cv_path_SHELLPATH - if test -n "$SHELLPATH"; then - echo "$as_me:$LINENO: result: $SHELLPATH" >&5 -echo "${ECHO_T}$SHELLPATH" >&6 + { $as_echo "$as_me:$LINENO: result: $SHELLPATH" >&5 +$as_echo "$SHELLPATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$SHELLPATH"; then - { { echo "$as_me:$LINENO: error: bash not found in \$PATH" >&5 -echo "$as_me: error: bash not found in \$PATH" >&2;} + { { $as_echo "$as_me:$LINENO: error: bash not found in \$PATH" >&5 +$as_echo "$as_me: error: bash not found in \$PATH" >&2;} { (exit 1); exit 1; }; } else SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"` fi -echo "$as_me:$LINENO: checking gcc home" >&5 -echo $ECHO_N "checking gcc home... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking gcc home" >&5 +$as_echo_n "checking gcc home... " >&6; } if test -z "$with_gcc_home"; then GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` else GCC_HOME="$with_gcc_home" fi -echo "$as_me:$LINENO: result: $GCC_HOME" >&5 -echo "${ECHO_T}$GCC_HOME" >&6 +{ $as_echo "$as_me:$LINENO: result: $GCC_HOME" >&5 +$as_echo "$GCC_HOME" >&6; } save_CC=$CC @@ -3942,10 +5285,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3956,34 +5299,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3994,38 +5339,49 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4036,76 +5392,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4117,17 +5433,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -4145,24 +5462,25 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4173,38 +5491,40 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -4215,58 +5535,90 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -4285,111 +5637,150 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "$as_me: failed program was:" >&5 + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables +$as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. +$as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -4398,32 +5789,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4441,39 +5833,48 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4494,50 +5895,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4553,311 +5958,252 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; + +int +main () { - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; + + ; + return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; int main () { -exit (42); +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h +rm -f conftest.$ac_ext +CC=$ac_save_CC + fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4872,10 +6218,10 @@ if test "$COMPATH" = "." ; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_COMPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $COMPATH in [\\/]* | ?:[\\/]*) @@ -4888,27 +6234,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_COMPATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi COMPATH=$ac_cv_path_COMPATH - if test -n "$COMPATH"; then - echo "$as_me:$LINENO: result: $COMPATH" >&5 -echo "${ECHO_T}$COMPATH" >&6 + { $as_echo "$as_me:$LINENO: result: $COMPATH" >&5 +$as_echo "$COMPATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$COMPATH" && break done @@ -4918,21 +6265,21 @@ COMPATH=`echo $COMPATH | $SED "s@/[Bb][Ii][Nn]\\\$@@"`; GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking the GNU gcc compiler version" >&5 -echo $ECHO_N "checking the GNU gcc compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the GNU gcc compiler version" >&5 +$as_echo_n "checking the GNU gcc compiler version... " >&6; } _gcc_version=`$CC -dumpversion` _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_gcc_major" -lt "3"; then - { { echo "$as_me:$LINENO: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&5 -echo "$as_me: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&2;} + { { $as_echo "$as_me:$LINENO: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&5 +$as_echo "$as_me: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&2;} { (exit 1); exit 1; }; } else if test "$GCCVER" -eq "030203"; then if test "$ENABLE_SYMBOLS" = "SMALL"; then - { { echo "$as_me:$LINENO: error: version \"$_gcc_version\" gives internal error with small." >&5 -echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." >&2;} + { { $as_echo "$as_me:$LINENO: error: version \"$_gcc_version\" gives internal error with small." >&5 +$as_echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." >&2;} { (exit 1); exit 1; }; } fi fi @@ -4946,35 +6293,35 @@ echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." fi fi if test "$GCCVER" -ge "040100" ; then - { { echo "$as_me:$LINENO: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&5 -echo "$as_me: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&2;} + { { $as_echo "$as_me:$LINENO: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&5 +$as_echo "$as_me: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: implicitly using CC=$CC" >&5 -echo "${ECHO_T}implicitly using CC=$CC" >&6 + { $as_echo "$as_me:$LINENO: result: implicitly using CC=$CC" >&5 +$as_echo "implicitly using CC=$CC" >&6; } fi else - echo "$as_me:$LINENO: result: checked (gcc $_gcc_version)" >&5 -echo "${ECHO_T}checked (gcc $_gcc_version)" >&6 + { $as_echo "$as_me:$LINENO: result: checked (gcc $_gcc_version)" >&5 +$as_echo "checked (gcc $_gcc_version)" >&6; } fi if test "$_os" = "SunOS"; then - echo "$as_me:$LINENO: checking gcc linker" >&5 -echo $ECHO_N "checking gcc linker... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking gcc linker" >&5 +$as_echo_n "checking gcc linker... " >&6; } if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then - { { echo "$as_me:$LINENO: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&5 -echo "$as_me: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&2;} + { { $as_echo "$as_me:$LINENO: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&5 +$as_echo "$as_me: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: result: ok (GNU ld)" >&5 -echo "${ECHO_T}ok (GNU ld)" >&6 + { $as_echo "$as_me:$LINENO: result: ok (GNU ld)" >&5 +$as_echo "ok (GNU ld)" >&6; } fi fi HAVE_LD_BSYMBOLIC_FUNCTIONS= if test "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking for -Bsymbolic-functions linker support " >&5 -echo $ECHO_N "checking for -Bsymbolic-functions linker support ... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for -Bsymbolic-functions linker support " >&5 +$as_echo_n "checking for -Bsymbolic-functions linker support ... " >&6; } bsymbolic_functions_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" @@ -4998,71 +6345,73 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then - echo "$as_me:$LINENO: result: found " >&5 -echo "${ECHO_T}found " >&6 + { $as_echo "$as_me:$LINENO: result: found " >&5 +$as_echo "found " >&6; } else - echo "$as_me:$LINENO: result: not found " >&5 -echo "${ECHO_T}not found " >&6 + { $as_echo "$as_me:$LINENO: result: not found " >&5 +$as_echo "not found " >&6; } fi LDFLAGS=$bsymbolic_functions_ldflags_save fi -echo "$as_me:$LINENO: checking whether to enable pch feature" >&5 -echo $ECHO_N "checking whether to enable pch feature... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable pch feature" >&5 +$as_echo_n "checking whether to enable pch feature... " >&6; } if test -n "$enable_pch" && test "$enable_pch" != "no"; then if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then ENABLE_PCH="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then ENABLE_PCH="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_PCH="" - { echo "$as_me:$LINENO: WARNING: Precompiled header not yet supported for your platform/compiler" >&5 -echo "$as_me: WARNING: Precompiled header not yet supported for your platform/compiler" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Precompiled header not yet supported for your platform/compiler" >&5 +$as_echo "$as_me: WARNING: Precompiled header not yet supported for your platform/compiler" >&2;} fi else ENABLE_PCH="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking for GNU make" >&5 -echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for GNU make" >&5 +$as_echo_n "checking for GNU make... " >&6; } for a in "$MAKE" $GNUMAKE make gmake gnumake; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null if test $? -eq 0; then @@ -5070,30 +6419,30 @@ for a in "$MAKE" $GNUMAKE make gmake gnumake; do break fi done -echo "$as_me:$LINENO: result: $GNUMAKE" >&5 -echo "${ECHO_T}$GNUMAKE" >&6 +{ $as_echo "$as_me:$LINENO: result: $GNUMAKE" >&5 +$as_echo "$GNUMAKE" >&6; } if test -z "$GNUMAKE"; then - { { echo "$as_me:$LINENO: error: not found. install GNU make." >&5 -echo "$as_me: error: not found. install GNU make." >&2;} + { { $as_echo "$as_me:$LINENO: error: not found. install GNU make." >&5 +$as_echo "$as_me: error: not found. install GNU make." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking the GNU make version" >&5 -echo $ECHO_N "checking the GNU make version... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking the GNU make version" >&5 +$as_echo_n "checking the GNU make version... " >&6; } _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_make_longver" -ge "038100" ; then - echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5 -echo "${ECHO_T}$GNUMAKE $_make_version" >&6 + { $as_echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5 +$as_echo "$GNUMAKE $_make_version" >&6; } else - { { echo "$as_me:$LINENO: error: failed ($GNUMAKE version >= 3.81 needed" >&5 -echo "$as_me: error: failed ($GNUMAKE version >= 3.81 needed" >&2;} + { { $as_echo "$as_me:$LINENO: error: failed ($GNUMAKE version >= 3.81 needed" >&5 +$as_echo "$as_me: error: failed ($GNUMAKE version >= 3.81 needed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for GNU tar" >&5 -echo $ECHO_N "checking for GNU tar... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for GNU tar" >&5 +$as_echo_n "checking for GNU tar... " >&6; } for a in $GNUTAR gtar gnutar tar; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null if test $? -eq 0; then @@ -5101,11 +6450,11 @@ for a in $GNUTAR gtar gnutar tar; do break fi done -echo "$as_me:$LINENO: result: $GNUTAR" >&5 -echo "${ECHO_T}$GNUTAR" >&6 +{ $as_echo "$as_me:$LINENO: result: $GNUTAR" >&5 +$as_echo "$GNUTAR" >&6; } if test -z "$GNUTAR"; then - { { echo "$as_me:$LINENO: error: not found. install GNU tar." >&5 -echo "$as_me: error: not found. install GNU tar." >&2;} + { { $as_echo "$as_me:$LINENO: error: not found. install GNU tar." >&5 +$as_echo "$as_me: error: not found. install GNU tar." >&2;} { (exit 1); exit 1; }; } fi @@ -5117,10 +6466,10 @@ if test "$_os" = "SunOS"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path__cc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $_cc in [\\/]* | ?:[\\/]*) @@ -5133,57 +6482,58 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi _cc=$ac_cv_path__cc - if test -n "$_cc"; then - echo "$as_me:$LINENO: result: $_cc" >&5 -echo "${ECHO_T}$_cc" >&6 + { $as_echo "$as_me:$LINENO: result: $_cc" >&5 +$as_echo "$_cc" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$_cc" && break done COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` - echo "$as_me:$LINENO: checking the SunStudio C/C++ compiler version" >&5 -echo $ECHO_N "checking the SunStudio C/C++ compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the SunStudio C/C++ compiler version" >&5 +$as_echo_n "checking the SunStudio C/C++ compiler version... " >&6; } _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'` _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` if test "$_sunstudio_major" != "5"; then - { { echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 -echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} + { { $as_echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 +$as_echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} { (exit 1); exit 1; }; } else _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'` if test "$_sunstudio_minor" = "false"; then - { { echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 -echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} + { { $as_echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 +$as_echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } fi fi fi fi if test "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking for --hash-style=both linker support " >&5 -echo $ECHO_N "checking for --hash-style=both linker support ... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for --hash-style=both linker support " >&5 +$as_echo_n "checking for --hash-style=both linker support ... " >&6; } hash_style_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,--hash-style=both" cat >conftest.$ac_ext <<_ACEOF @@ -5206,42 +6556,43 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then HAVE_LD_HASH_STYLE=TRUE else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -HAVE_LD_HASH_STYLE=FALSE + HAVE_LD_HASH_STYLE=FALSE fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then - echo "$as_me:$LINENO: result: found " >&5 -echo "${ECHO_T}found " >&6 + { $as_echo "$as_me:$LINENO: result: found " >&5 +$as_echo "found " >&6; } else - echo "$as_me:$LINENO: result: not found " >&5 -echo "${ECHO_T}not found " >&6 + { $as_echo "$as_me:$LINENO: result: not found " >&5 +$as_echo "not found " >&6; } fi LDFLAGS=$hash_style_ldflags_save fi @@ -5253,10 +6604,10 @@ if test "$_os" = "OSF1"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path__cc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $_cc in [\\/]* | ?:[\\/]*) @@ -5269,44 +6620,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi _cc=$ac_cv_path__cc - if test -n "$_cc"; then - echo "$as_me:$LINENO: result: $_cc" >&5 -echo "${ECHO_T}$_cc" >&6 + { $as_echo "$as_me:$LINENO: result: $_cc" >&5 +$as_echo "$_cc" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$_cc" && break done COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` - { echo "$as_me:$LINENO: WARNING: ******* $_cc , $COMPATH" >&5 -echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;} - echo "$as_me:$LINENO: checking the Compaq C compiler version" >&5 -echo $ECHO_N "checking the Compaq C compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: WARNING: ******* $_cc , $COMPATH" >&5 +$as_echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;} + { $as_echo "$as_me:$LINENO: checking the Compaq C compiler version" >&5 +$as_echo_n "checking the Compaq C compiler version... " >&6; } _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'` _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` if test "$_compaqc_major" != "T6"; then - { { echo "$as_me:$LINENO: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&5 -echo "$as_me: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&2;} + { { $as_echo "$as_me:$LINENO: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&5 +$as_echo "$as_me: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } fi fi fi @@ -5314,10 +6666,10 @@ fi if test -z "$with_perl_home"; then # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) @@ -5330,27 +6682,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL - if test -n "$PERL"; then - echo "$as_me:$LINENO: result: $PERL" >&5 -echo "${ECHO_T}$PERL" >&6 + { $as_echo "$as_me:$LINENO: result: $PERL" >&5 +$as_echo "$PERL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + else if test "$_os" = "WINNT"; then with_perl_home=`cygpath -u "$with_perl_home"` @@ -5359,46 +6712,46 @@ else if test -x "$_perl_path"; then PERL=$_perl_path else - { { echo "$as_me:$LINENO: error: $_perl_path not found" >&5 -echo "$as_me: error: $_perl_path not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: $_perl_path not found" >&5 +$as_echo "$as_me: error: $_perl_path not found" >&2;} { (exit 1); exit 1; }; } fi fi if test "$PERL"; then - echo "$as_me:$LINENO: checking the Perl version" >&5 -echo $ECHO_N "checking the Perl version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the Perl version" >&5 +$as_echo_n "checking the Perl version... " >&6; } ${PERL} -e "exit($]);" _perl_version=$? if test "$_perl_version" -lt 5; then - { { echo "$as_me:$LINENO: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&5 -echo "$as_me: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&2;} + { { $as_echo "$as_me:$LINENO: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&5 +$as_echo "$as_me: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: result: checked (perl $_perl_version)" >&5 -echo "${ECHO_T}checked (perl $_perl_version)" >&6 + { $as_echo "$as_me:$LINENO: result: checked (perl $_perl_version)" >&5 +$as_echo "checked (perl $_perl_version)" >&6; } else - { { echo "$as_me:$LINENO: error: Perl not found, install version 5 of Perl" >&5 -echo "$as_me: error: Perl not found, install version 5 of Perl" >&2;} + { { $as_echo "$as_me:$LINENO: error: Perl not found, install version 5 of Perl" >&5 +$as_echo "$as_me: error: Perl not found, install version 5 of Perl" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for required Perl modules" >&5 -echo $ECHO_N "checking for required Perl modules... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for required Perl modules" >&5 +$as_echo_n "checking for required Perl modules... " >&6; } if `$PERL -e 'use Archive::Zip;'`; then - echo "$as_me:$LINENO: result: all modules found" >&5 -echo "${ECHO_T}all modules found" >&6 + { $as_echo "$as_me:$LINENO: result: all modules found" >&5 +$as_echo "all modules found" >&6; } else - { { echo "$as_me:$LINENO: error: Failed to find some modules" >&5 -echo "$as_me: error: Failed to find some modules" >&2;} + { { $as_echo "$as_me:$LINENO: error: Failed to find some modules" >&5 +$as_echo "$as_me: error: Failed to find some modules" >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" != "yes"; then - echo "$as_me:$LINENO: checking for friendly registry keys" >&5 -echo $ECHO_N "checking for friendly registry keys... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for friendly registry keys" >&5 +$as_echo_n "checking for friendly registry keys... " >&6; } # VS.Net 2003, VS.Net 2005 if test -z "$with_cl_home"; then vctest=`./oowintool --msvc-productdir`; @@ -5408,8 +6761,8 @@ echo $ECHO_N "checking for friendly registry keys... $ECHO_C" >&6 else with_cl_home=`cygpath -u "$with_cl_home"` fi - echo "$as_me:$LINENO: result: done" >&5 -echo "${ECHO_T}done" >&6 + { $as_echo "$as_me:$LINENO: result: done" >&5 +$as_echo "done" >&6; } if test -n "$with_mspdb_path";then with_mspdb_path=`cygpath -u "$with_mspdb_path"` @@ -5430,10 +6783,10 @@ echo "${ECHO_T}done" >&6 if test -z "$MSPDB_PATH";then # Extract the first word of "mspdb80.dll", so it can be a program name with args. set dummy mspdb80.dll; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSPDB_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MSPDB_PATH in [\\/]* | ?:[\\/]*) @@ -5446,33 +6799,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH - if test -n "$MSPDB_PATH"; then - echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 -echo "${ECHO_T}$MSPDB_PATH" >&6 + { $as_echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 +$as_echo "$MSPDB_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + # Extract the first word of "mspdb71.dll", so it can be a program name with args. set dummy mspdb71.dll; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSPDB_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MSPDB_PATH in [\\/]* | ?:[\\/]*) @@ -5485,50 +6839,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH - if test -n "$MSPDB_PATH"; then - echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 -echo "${ECHO_T}$MSPDB_PATH" >&6 + { $as_echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 +$as_echo "$MSPDB_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + MSPDB_PATH=`dirname "$MSPDB_PATH"` fi if test -z "$MSPDB_PATH"; then - { { echo "$as_me:$LINENO: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&5 -echo "$as_me: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&2;} + { { $as_echo "$as_me:$LINENO: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&5 +$as_echo "$as_me: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&2;} { (exit 1); exit 1; }; } fi MSPDB_PATH=`cygpath -d "$MSPDB_PATH"` MSPDB_PATH=`cygpath -u "$MSPDB_PATH"` PATH="$MSPDB_PATH:$PATH" - echo "$as_me:$LINENO: checking the Microsoft C/C++ Compiler" >&5 -echo $ECHO_N "checking the Microsoft C/C++ Compiler... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the Microsoft C/C++ Compiler" >&5 +$as_echo_n "checking the Microsoft C/C++ Compiler... " >&6; } if test -x "$with_cl_home/bin/cl.exe"; then CC="$with_cl_home/bin/cl.exe" else # Extract the first word of "cl.exe", so it can be a program name with args. set dummy cl.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CC in [\\/]* | ?:[\\/]*) @@ -5541,39 +6896,40 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi CC=$ac_cv_path_CC - if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -e "$CC"; then # This gives us a posix path with 8.3 filename restrictions CC=`cygpath -d "$CC"` CC=`cygpath -u "$CC"` # Remove /cl.exe from CC case insensitive - echo "$as_me:$LINENO: result: found ($CC)" >&5 -echo "${ECHO_T}found ($CC)" >&6 + { $as_echo "$as_me:$LINENO: result: found ($CC)" >&5 +$as_echo "found ($CC)" >&6; } COMPATH=`echo $CC | $SED 's@\/[Bb][Ii][Nn]\/[cC][lL]\.[eE][xX][eE]@@'` export INCLUDE=`cygpath -d "$COMPATH/Include"` - echo "$as_me:$LINENO: checking the Version of Microsoft C/C++ Compiler" >&5 -echo $ECHO_N "checking the Version of Microsoft C/C++ Compiler... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the Version of Microsoft C/C++ Compiler" >&5 +$as_echo_n "checking the Version of Microsoft C/C++ Compiler... " >&6; } CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ { x = match( \\\$0, /..\\...\\...../ ) CCversion = substr( \\\$0, RSTART, RLENGTH) @@ -5582,47 +6938,47 @@ echo $ECHO_N "checking the Version of Microsoft C/C++ Compiler... $ECHO_C" >&6 printf (\"%04d\",vertoken[i] ) } }"` - echo "$as_me:$LINENO: result: found Compiler version $CCNUMVER." >&5 -echo "${ECHO_T}found Compiler version $CCNUMVER." >&6 + { $as_echo "$as_me:$LINENO: result: found Compiler version $CCNUMVER." >&5 +$as_echo "found Compiler version $CCNUMVER." >&6; } if test "$CCNUMVER" -ge "001500000000"; then COMEX=12 MSVSVER=2008 - echo "$as_me:$LINENO: result: found .NET 2008 / VS 9.0." >&5 -echo "${ECHO_T}found .NET 2008 / VS 9.0." >&6 + { $as_echo "$as_me:$LINENO: result: found .NET 2008 / VS 9.0." >&5 +$as_echo "found .NET 2008 / VS 9.0." >&6; } elif test "$CCNUMVER" -ge "001400000000"; then COMEX=11 MSVSVER=2005 - echo "$as_me:$LINENO: result: found .NET 2005." >&5 -echo "${ECHO_T}found .NET 2005." >&6 + { $as_echo "$as_me:$LINENO: result: found .NET 2005." >&5 +$as_echo "found .NET 2005." >&6; } elif test "$CCNUMVER" -ge "001300102240"; then COMEX=10 MSVSVER=2003 - echo "$as_me:$LINENO: result: found .NET 2003." >&5 -echo "${ECHO_T}found .NET 2003." >&6 + { $as_echo "$as_me:$LINENO: result: found .NET 2003." >&5 +$as_echo "found .NET 2003." >&6; } else - { { echo "$as_me:$LINENO: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&5 -echo "$as_me: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&2;} + { { $as_echo "$as_me:$LINENO: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&5 +$as_echo "$as_me: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&2;} { (exit 1); exit 1; }; } fi else - { { echo "$as_me:$LINENO: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&5 -echo "$as_me: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&2;} + { { $as_echo "$as_me:$LINENO: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&5 +$as_echo "$as_me: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: checking the Mingwin32 C++ Compiler" >&5 -echo $ECHO_N "checking the Mingwin32 C++ Compiler... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the Mingwin32 C++ Compiler" >&5 +$as_echo_n "checking the Mingwin32 C++ Compiler... " >&6; } if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then - echo "$as_me:$LINENO: result: found." >&5 -echo "${ECHO_T}found." >&6 + { $as_echo "$as_me:$LINENO: result: found." >&5 +$as_echo "found." >&6; } if $CC -dumpspecs | grep -q "mno-cygwin"; then USE_MINGW="cygwin" else USE_MINGW="pure-mingw" fi else - { { echo "$as_me:$LINENO: error: Mingwin32 C++ Compiler not found." >&5 -echo "$as_me: error: Mingwin32 C++ Compiler not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Mingwin32 C++ Compiler not found." >&5 +$as_echo "$as_me: error: Mingwin32 C++ Compiler not found." >&2;} { (exit 1); exit 1; }; } fi fi @@ -5635,10 +6991,10 @@ if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then # Extract the first word of "midl.exe", so it can be a program name with args. set dummy midl.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MIDL_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MIDL_PATH in [\\/]* | ?:[\\/]*) @@ -5651,27 +7007,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MIDL_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi MIDL_PATH=$ac_cv_path_MIDL_PATH - if test -n "$MIDL_PATH"; then - echo "$as_me:$LINENO: result: $MIDL_PATH" >&5 -echo "${ECHO_T}$MIDL_PATH" >&6 + { $as_echo "$as_me:$LINENO: result: $MIDL_PATH" >&5 +$as_echo "$MIDL_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -n "$MIDL_PATH";then MIDL_PATH=`dirname "$MIDL_PATH"` fi @@ -5697,8 +7054,8 @@ fi fi fi if test ! -x "$MIDL_PATH/midl.exe"; then - { { echo "$as_me:$LINENO: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&5 -echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&2;} + { { $as_echo "$as_me:$LINENO: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&5 +$as_echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&2;} { (exit 1); exit 1; }; } fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) @@ -5707,10 +7064,10 @@ echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --wit # Extract the first word of "csc.exe", so it can be a program name with args. set dummy csc.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CSC_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CSC_PATH in [\\/]* | ?:[\\/]*) @@ -5723,27 +7080,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CSC_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi CSC_PATH=$ac_cv_path_CSC_PATH - if test -n "$CSC_PATH"; then - echo "$as_me:$LINENO: result: $CSC_PATH" >&5 -echo "${ECHO_T}$CSC_PATH" >&6 + { $as_echo "$as_me:$LINENO: result: $CSC_PATH" >&5 +$as_echo "$CSC_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -n "$CSC_PATH";then CSC_PATH=`dirname "$CSC_PATH"` fi @@ -5759,16 +7117,16 @@ fi fi fi if test ! -x "$CSC_PATH/csc.exe"; then - { { echo "$as_me:$LINENO: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&5 -echo "$as_me: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&2;} + { { $as_echo "$as_me:$LINENO: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&5 +$as_echo "$as_me: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&2;} { (exit 1); exit 1; }; } fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) CSC_PATH=`cygpath -d "$CSC_PATH"` CSC_PATH=`cygpath -u "$CSC_PATH"` - echo "$as_me:$LINENO: checking .NET Framework" >&5 -echo $ECHO_N "checking .NET Framework... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking .NET Framework" >&5 +$as_echo_n "checking .NET Framework... " >&6; } if test -n "$with_frame_home"; then with_frame_home=`cygpath -u "$with_frame_home"` fi @@ -5790,12 +7148,12 @@ echo $ECHO_N "checking .NET Framework... $ECHO_C" >&6 fi fi if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then - { { echo "$as_me:$LINENO: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&5 -echo "$as_me: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&2;} + { { $as_echo "$as_me:$LINENO: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&5 +$as_echo "$as_me: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } # Convert to posix path with 8.3 filename restrictions ( No spaces ) FRAME_HOME=`cygpath -d "$FRAME_HOME"` FRAME_HOME=`cygpath -u "$FRAME_HOME"` @@ -5811,15 +7169,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -5846,35 +7204,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5884,34 +7242,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -5929,8 +7287,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -5953,35 +7311,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5991,34 +7349,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -6027,11 +7385,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -6041,10 +7401,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6066,35 +7426,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -6150,6 +7507,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -6169,36 +7527,50 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -6210,20 +7582,24 @@ fi fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -6234,38 +7610,40 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -6276,57 +7654,87 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CXX" && break done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi fi - + fi +fi # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6347,50 +7755,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 -GXX=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6406,175 +7818,152 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cxx_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" @@ -6601,35 +7990,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6639,34 +8028,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -6684,8 +8073,8 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6 +{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do @@ -6708,35 +8097,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6746,34 +8135,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -6782,11 +8171,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -6804,15 +8195,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -6839,35 +8230,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6877,34 +8268,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -6922,8 +8313,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -6946,35 +8337,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6984,34 +8375,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -7020,11 +8411,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -7049,11 +8442,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7066,41 +8459,42 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7108,73 +8502,15 @@ fi done -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 -if test "${ac_cv_type_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((long *) 0) - return 0; -if (sizeof (long)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_long=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 - -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } if test "${ac_cv_sizeof_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - if test "$ac_cv_type_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -7187,7 +8523,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; test_array [0] = 0 ; @@ -7195,27 +8531,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -7228,7 +8560,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7236,46 +8568,43 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7285,7 +8614,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; test_array [0] = 0 ; @@ -7293,27 +8622,23 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -7326,7 +8651,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7334,50 +8659,49 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -7391,7 +8715,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7399,51 +8723,47 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +'') if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +$as_echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long=0 + fi ;; esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7452,8 +8772,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } +static long int longval () { return (long int) (sizeof (long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long)); } #include #include int @@ -7462,61 +8782,80 @@ main () FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) + return 1; + if (((long int) (sizeof (long))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%ld\n", i); + long int i = longval (); + if (i != ((long int) (sizeof (long)))) + return 1; + fprintf (f, "%ld", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%lu\n", i); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (long)))) + return 1; + fprintf (f, "%lu", i); } - exit (ferror (f) || fclose (f) != 0); + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +$as_echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long=0 + fi fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_long=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF @@ -7524,257 +8863,433 @@ _ACEOF SIZEOF_LONG=$ac_cv_sizeof_long -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include + #include int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include + #include int main () { #if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif + not big endian + #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. -if test "$cross_compiling" = yes; then - # try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - cat >conftest.$ac_ext <<_ACEOF + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +#include + int main () { - _ascii (); _ebcdic (); +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat >conftest.$ac_ext <<_ACEOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include + int main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=no + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_c_bigendian=yes -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_c_bigendian=no fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -case $ac_cv_c_bigendian in - yes) - -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; -esac - -WORDS_BIGENDIAN=$ac_cv_c_bigendian +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --enable-largefile or --disable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval="$enable_largefile" -fi; -if test "$enable_largefile" != no; then +fi - echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_largefile_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF +;; #( + no) + ;; #( + universal) + +cat >>confdefs.h <<\_ACEOF +#define AC_APPLE_UNIVERSAL_BUILD 1 +_ACEOF + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +WORDS_BIGENDIAN=$ac_cv_c_bigendian + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7798,84 +9313,79 @@ main () return 0; } _ACEOF - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_sys_largefile_CC=' -n32'; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi -echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else while :; do - ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7900,34 +9410,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7953,54 +9461,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_sys_file_offset_bits=64; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown break done fi -echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 -if test "$ac_cv_sys_file_offset_bits" != no; then - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF - -fi -rm -f conftest* - echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if test "${ac_cv_sys_large_files+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else while :; do - ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8025,34 +9533,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8078,47 +9584,48 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_sys_large_files=1; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown break done fi -echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6 -if test "$ac_cv_sys_large_files" != no; then - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF - -fi -rm -f conftest* +;; +esac +rm -rf conftest* + fi fi if test -n "$ac_cv_sys_file_offset_bits"; then @@ -8129,44 +9636,44 @@ if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; th fi -echo "$as_me:$LINENO: checking whether to disable vba feature" >&5 -echo $ECHO_N "checking whether to disable vba feature... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to disable vba feature" >&5 +$as_echo_n "checking whether to disable vba feature... " >&6; } if test -n "$enable_vba" && test "$enable_vba" = "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_VBA=NO else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_VBA=YES fi if test "$ENABLE_VBA" = "YES"; then - echo "$as_me:$LINENO: checking how to package the vba compatibility api" >&5 -echo $ECHO_N "checking how to package the vba compatibility api... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking how to package the vba compatibility api" >&5 +$as_echo_n "checking how to package the vba compatibility api... " >&6; } if test -n "$with_vba_package_format"; then if test "$with_vba_package_format" = "extn"; then VBA_EXTENSION=YES - echo "$as_me:$LINENO: result: uno extension" >&5 -echo "${ECHO_T}uno extension" >&6 - { echo "$as_me:$LINENO: WARNING: --with-vba-package-format=extn can cause problems" >&5 -echo "$as_me: WARNING: --with-vba-package-format=extn can cause problems" >&2;} + { $as_echo "$as_me:$LINENO: result: uno extension" >&5 +$as_echo "uno extension" >&6; } + { $as_echo "$as_me:$LINENO: WARNING: --with-vba-package-format=extn can cause problems" >&5 +$as_echo "$as_me: WARNING: --with-vba-package-format=extn can cause problems" >&2;} else if test "$with_vba_package_format" = "builtin"; then VBA_EXTENSION=NO - echo "$as_me:$LINENO: result: build into installset" >&5 -echo "${ECHO_T}build into installset" >&6 + { $as_echo "$as_me:$LINENO: result: build into installset" >&5 +$as_echo "build into installset" >&6; } else - { { echo "$as_me:$LINENO: error: unknown packaging method" >&5 -echo "$as_me: error: unknown packaging method" >&2;} + { { $as_echo "$as_me:$LINENO: error: unknown packaging method" >&5 +$as_echo "$as_me: error: unknown packaging method" >&2;} { (exit 1); exit 1; }; } fi fi else VBA_EXTENSION=NO - echo "$as_me:$LINENO: result: defaulting to build into installset" >&5 -echo "${ECHO_T}defaulting to build into installset" >&6 + { $as_echo "$as_me:$LINENO: result: defaulting to build into installset" >&5 +$as_echo "defaulting to build into installset" >&6; } fi else VBA_EXTENSION=NO @@ -8177,17 +9684,17 @@ fi if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then if test "${ac_cv_header_cups_cups_h+set}" = set; then - echo "$as_me:$LINENO: checking for cups/cups.h" >&5 -echo $ECHO_N "checking for cups/cups.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for cups/cups.h" >&5 +$as_echo_n "checking for cups/cups.h... " >&6; } if test "${ac_cv_header_cups_cups_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 -echo "${ECHO_T}$ac_cv_header_cups_cups_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 +$as_echo "$ac_cv_header_cups_cups_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking cups/cups.h usability" >&5 -echo $ECHO_N "checking cups/cups.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking cups/cups.h usability" >&5 +$as_echo_n "checking cups/cups.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8198,41 +9705,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking cups/cups.h presence" >&5 -echo $ECHO_N "checking cups/cups.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking cups/cups.h presence" >&5 +$as_echo_n "checking cups/cups.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8241,83 +9745,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: cups/cups.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: cups/cups.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: cups/cups.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: cups/cups.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: cups/cups.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: cups/cups.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: cups/cups.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: cups/cups.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: cups/cups.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: cups/cups.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: cups/cups.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for cups/cups.h" >&5 -echo $ECHO_N "checking for cups/cups.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for cups/cups.h" >&5 +$as_echo_n "checking for cups/cups.h... " >&6; } if test "${ac_cv_header_cups_cups_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_cups_cups_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 -echo "${ECHO_T}$ac_cv_header_cups_cups_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 +$as_echo "$ac_cv_header_cups_cups_h" >&6; } fi -if test $ac_cv_header_cups_cups_h = yes; then +if test "x$ac_cv_header_cups_cups_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&5 -echo "$as_me: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&2;} + { { $as_echo "$as_me:$LINENO: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&5 +$as_echo "$as_me: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&2;} { (exit 1); exit 1; }; } fi @@ -8325,24 +9822,24 @@ fi fi if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then - echo "$as_me:$LINENO: checking whether to enable pam support" >&5 -echo $ECHO_N "checking whether to enable pam support... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to enable pam support" >&5 +$as_echo_n "checking whether to enable pam support... " >&6; } if test -z "$enable_pam" || test "$enable_pam" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } PAM=YES if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 +$as_echo_n "checking for security/pam_appl.h... " >&6; } if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 +$as_echo "$ac_cv_header_security_pam_appl_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 -echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 +$as_echo_n "checking security/pam_appl.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8353,41 +9850,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5 -echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5 +$as_echo_n "checking security/pam_appl.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8396,98 +9890,91 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 +$as_echo_n "checking for security/pam_appl.h... " >&6; } if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_security_pam_appl_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 +$as_echo "$ac_cv_header_security_pam_appl_h" >&6; } fi -if test $ac_cv_header_security_pam_appl_h = yes; then +if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&5 -echo "$as_me: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&2;} + { { $as_echo "$as_me:$LINENO: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&5 +$as_echo "$as_me: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking whether to link to libpam" >&5 -echo $ECHO_N "checking whether to link to libpam... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to link to libpam" >&5 +$as_echo_n "checking whether to link to libpam... " >&6; } if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } PAM_LINK=YES -echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 -echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 +$as_echo_n "checking for pam_start in -lpam... " >&6; } if test "${ac_cv_lib_pam_pam_start+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpam $LIBS" @@ -8498,57 +9985,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pam_start (); int main () { -pam_start (); +return pam_start (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_pam_pam_start=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pam_pam_start=no + ac_cv_lib_pam_pam_start=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 -echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6 -if test $ac_cv_lib_pam_pam_start = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 +$as_echo "$ac_cv_lib_pam_pam_start" >&6; } +if test "x$ac_cv_lib_pam_pam_start" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPAM 1 _ACEOF @@ -8556,19 +10044,19 @@ _ACEOF LIBS="-lpam $LIBS" else - { { echo "$as_me:$LINENO: error: libpam not found or functional" >&5 -echo "$as_me: error: libpam not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: libpam not found or functional" >&5 +$as_echo "$as_me: error: libpam not found or functional" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -echo "${ECHO_T}no, dynamically open it" >&6 + { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 +$as_echo "no, dynamically open it" >&6; } PAM_LINK=NO fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } PAM=NO PAM_LINK=NO @@ -8579,11 +10067,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - echo "$as_me:$LINENO: checking how many arguments getspnam_r() takes" >&5 -echo $ECHO_N "checking how many arguments getspnam_r() takes... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking how many arguments getspnam_r() takes" >&5 +$as_echo_n "checking how many arguments getspnam_r() takes... " >&6; } if test "${ac_cv_func_which_getspnam_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else @@ -8622,34 +10110,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_func_which_getspnam_r=no else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # # FIVE ARGUMENTS @@ -8681,34 +10167,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_func_which_getspnam_r=five else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -8742,34 +10226,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_func_which_getspnam_r=four else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -8780,29 +10262,29 @@ fi case "$ac_cv_func_which_getspnam_r" in five) - echo "$as_me:$LINENO: result: five" >&5 -echo "${ECHO_T}five" >&6 + { $as_echo "$as_me:$LINENO: result: five" >&5 +$as_echo "five" >&6; } NEW_SHADOW_API=YES ;; four) - echo "$as_me:$LINENO: result: four" >&5 -echo "${ECHO_T}four" >&6 + { $as_echo "$as_me:$LINENO: result: four" >&5 +$as_echo "four" >&6; } ;; no) - echo "$as_me:$LINENO: result: cannot find function declaration in shadow.h" >&5 -echo "${ECHO_T}cannot find function declaration in shadow.h" >&6 + { $as_echo "$as_me:$LINENO: result: cannot find function declaration in shadow.h" >&5 +$as_echo "cannot find function declaration in shadow.h" >&6; } ;; unknown) - echo "$as_me:$LINENO: result: can't tell" >&5 -echo "${ECHO_T}can't tell" >&6 + { $as_echo "$as_me:$LINENO: result: can't tell" >&5 +$as_echo "can't tell" >&6; } ;; *) - { { echo "$as_me:$LINENO: error: internal error" >&5 -echo "$as_me: error: internal error" >&2;} + { { $as_echo "$as_me:$LINENO: error: internal error" >&5 +$as_echo "$as_me: error: internal error" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -8822,17 +10304,17 @@ fi if test "$_os" = "Linux"; then - echo "$as_me:$LINENO: checking whether to link to libcrypt" >&5 -echo $ECHO_N "checking whether to link to libcrypt... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to link to libcrypt" >&5 +$as_echo_n "checking whether to link to libcrypt... " >&6; } if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } CRYPT_LINK=YES -echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 -echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 +$as_echo_n "checking for crypt in -lcrypt... " >&6; } if test "${ac_cv_lib_crypt_crypt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" @@ -8843,57 +10325,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char crypt (); int main () { -crypt (); +return crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_crypt_crypt=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_crypt_crypt=no + ac_cv_lib_crypt_crypt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 -echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 -if test $ac_cv_lib_crypt_crypt = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 +$as_echo "$ac_cv_lib_crypt_crypt" >&6; } +if test "x$ac_cv_lib_crypt_crypt" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF @@ -8901,14 +10384,14 @@ _ACEOF LIBS="-lcrypt $LIBS" else - { { echo "$as_me:$LINENO: error: libcrypt not found or functional" >&5 -echo "$as_me: error: libcrypt not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: libcrypt not found or functional" >&5 +$as_echo "$as_me: error: libcrypt not found or functional" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -echo "${ECHO_T}no, dynamically open it" >&6 + { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 +$as_echo "no, dynamically open it" >&6; } CRYPT_LINK=NO fi fi @@ -8927,20 +10410,24 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -8951,38 +10438,40 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -8993,57 +10482,87 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CXX" && break done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi fi - + fi +fi # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9064,50 +10583,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 -GXX=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9123,159 +10646,136 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cxx_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9285,8 +10785,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "$GXX" = "yes"; then - echo "$as_me:$LINENO: checking the GNU C++ compiler version" >&5 -echo $ECHO_N "checking the GNU C++ compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the GNU C++ compiler version" >&5 +$as_echo_n "checking the GNU C++ compiler version... " >&6; } _gpp_version=`$CXX -dumpversion` _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` @@ -9300,27 +10800,29 @@ echo $ECHO_N "checking the GNU C++ compiler version... $ECHO_C" >&6 fi fi if test "$_gpp_majmin" -ge "401" ; then - { { echo "$as_me:$LINENO: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&5 -echo "$as_me: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&2;} + { { $as_echo "$as_me:$LINENO: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&5 +$as_echo "$as_me: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: implicitly using CXX=$CXX" >&5 -echo "${ECHO_T}implicitly using CXX=$CXX" >&6 + { $as_echo "$as_me:$LINENO: result: implicitly using CXX=$CXX" >&5 +$as_echo "implicitly using CXX=$CXX" >&6; } fi else - echo "$as_me:$LINENO: result: checked (g++ $_gpp_version)" >&5 -echo "${ECHO_T}checked (g++ $_gpp_version)" >&6 + { $as_echo "$as_me:$LINENO: result: checked (g++ $_gpp_version)" >&5 +$as_echo "checked (g++ $_gpp_version)" >&6; } fi if test "$_gpp_majmin" = "304"; then - echo "$as_me:$LINENO: checking whether $CXX has the enum bug" >&5 -echo $ECHO_N "checking whether $CXX has the enum bug... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether $CXX has the enum bug" >&5 +$as_echo_n "checking whether $CXX has the enum bug... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9352,38 +10854,52 @@ main (void) _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { { echo "$as_me:$LINENO: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&5 -echo "$as_me: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&2;} + { { $as_echo "$as_me:$LINENO: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&5 +$as_echo "$as_me: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&2;} { (exit 1); exit 1; }; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +{ $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path # often contains an i386 which is expanded as a macro. Solved in stlport. if test "$GXX" = "yes"; then - echo "$as_me:$LINENO: checking for g++ include path" >&5 -echo $ECHO_N "checking for g++ include path... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for g++ include path" >&5 +$as_echo_n "checking for g++ include path... " >&6; } if test -z "$with_gxx_include_path"; then with_gxx_include_path=`echo "#include " | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then @@ -9401,18 +10917,18 @@ echo $ECHO_N "checking for g++ include path... $ECHO_C" >&6 fi if test -z "$with_gxx_include_path"; then with_gxx_include_path="NO_GXX_INCLUDE" - echo "$as_me:$LINENO: result: no g++ includes" >&5 -echo "${ECHO_T}no g++ includes" >&6 + { $as_echo "$as_me:$LINENO: result: no g++ includes" >&5 +$as_echo "no g++ includes" >&6; } else - echo "$as_me:$LINENO: result: $with_gxx_include_path" >&5 -echo "${ECHO_T}$with_gxx_include_path" >&6 + { $as_echo "$as_me:$LINENO: result: $with_gxx_include_path" >&5 +$as_echo "$with_gxx_include_path" >&6; } fi GXX_INCLUDE_PATH="$with_gxx_include_path" if test "$WITH_MINGWIN" = "yes"; then - echo "$as_me:$LINENO: checking for mingwin runtime include path" >&5 -echo $ECHO_N "checking for mingwin runtime include path... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mingwin runtime include path" >&5 +$as_echo_n "checking for mingwin runtime include path... " >&6; } cat >conftest.$ac_ext <<_ACEOF #include #include @@ -9430,16 +10946,16 @@ _ACEOF fi if test -z "$_mingw_lib_include_path"; then _mingw_lib_include_path="NO_LIB_INCLUDE" - echo "$as_me:$LINENO: result: no mingwin runtime includes" >&5 -echo "${ECHO_T}no mingwin runtime includes" >&6 + { $as_echo "$as_me:$LINENO: result: no mingwin runtime includes" >&5 +$as_echo "no mingwin runtime includes" >&6; } else - echo "$as_me:$LINENO: result: $_mingw_lib_include_path" >&5 -echo "${ECHO_T}$_mingw_lib_include_path" >&6 + { $as_echo "$as_me:$LINENO: result: $_mingw_lib_include_path" >&5 +$as_echo "$_mingw_lib_include_path" >&6; } fi MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" - echo "$as_me:$LINENO: checking for mingwin c++ backward include path" >&5 -echo $ECHO_N "checking for mingwin c++ backward include path... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mingwin c++ backward include path" >&5 +$as_echo_n "checking for mingwin c++ backward include path... " >&6; } cat >conftest.$ac_ext <<_ACEOF #include _ACEOF @@ -9448,57 +10964,57 @@ _ACEOF if test -n "$_mingw_backward_include_path"; then _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` - echo "$as_me:$LINENO: result: $_mingw_backward_include_path" >&5 -echo "${ECHO_T}$_mingw_backward_include_path" >&6 + { $as_echo "$as_me:$LINENO: result: $_mingw_backward_include_path" >&5 +$as_echo "$_mingw_backward_include_path" >&6; } else _mingw_backward_include_path="NO_BACKWARD_INCLUDE" - echo "$as_me:$LINENO: result: no mingwin c++ backward includes" >&5 -echo "${ECHO_T}no mingwin c++ backward includes" >&6 + { $as_echo "$as_me:$LINENO: result: no mingwin c++ backward includes" >&5 +$as_echo "no mingwin c++ backward includes" >&6; } fi MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" mingw_crtbegin=`$CC -print-file-name=crtbegin.o` MINGW_CLIB_DIR=`dirname $mingw_crtbegin` - echo "$as_me:$LINENO: checking whether to use dynamic libgcc" >&5 -echo $ECHO_N "checking whether to use dynamic libgcc... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use dynamic libgcc" >&5 +$as_echo_n "checking whether to use dynamic libgcc... " >&6; } if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then - echo "$as_me:$LINENO: checking dynamic libgcc name" >&5 -echo $ECHO_N "checking dynamic libgcc name... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking dynamic libgcc name" >&5 +$as_echo_n "checking dynamic libgcc name... " >&6; } MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` if test -n "$MINGW_GCCDLL"; then MINGW_SHARED_GCCLIB=YES - echo "$as_me:$LINENO: result: use $MINGW_GCCDLL" >&5 -echo "${ECHO_T}use $MINGW_GCCDLL" >&6 + { $as_echo "$as_me:$LINENO: result: use $MINGW_GCCDLL" >&5 +$as_echo "use $MINGW_GCCDLL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then MINGW_GCCLIB_EH=YES fi - echo "$as_me:$LINENO: checking whether to use dynamic libstdc++" >&5 -echo $ECHO_N "checking whether to use dynamic libstdc++... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use dynamic libstdc++" >&5 +$as_echo_n "checking whether to use dynamic libstdc++... " >&6; } if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then - echo "$as_me:$LINENO: checking dynamic libstdc++ name" >&5 -echo $ECHO_N "checking dynamic libstdc++ name... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking dynamic libstdc++ name" >&5 +$as_echo_n "checking dynamic libstdc++ name... " >&6; } MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/libstdc++_s.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` if test -n "$MINGW_GXXDLL"; then MINGW_SHARED_GXXLIB=YES - echo "$as_me:$LINENO: result: use $MINGW_GXXDLL" >&5 -echo "${ECHO_T}use $MINGW_GXXDLL" >&6 + { $as_echo "$as_me:$LINENO: result: use $MINGW_GXXDLL" >&5 +$as_echo "use $MINGW_GXXDLL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` @@ -9511,36 +11027,36 @@ fi if test "$_os" = "SunOS"; then if test "$CC" = "cc"; then - echo "$as_me:$LINENO: checking SunStudio C++ Compiler" >&5 -echo $ECHO_N "checking SunStudio C++ Compiler... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking SunStudio C++ Compiler" >&5 +$as_echo_n "checking SunStudio C++ Compiler... " >&6; } if test "$CXX" != "CC"; then - { echo "$as_me:$LINENO: WARNING: SunStudio C++ was not found" >&5 -echo "$as_me: WARNING: SunStudio C++ was not found" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: SunStudio C++ was not found" >&5 +$as_echo "$as_me: WARNING: SunStudio C++ was not found" >&2;} echo "SunStudio C++ was not found" >> warn else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } fi fi fi if test "$_os" = "OSF1"; then - echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5 -echo $ECHO_N "checking Compaq C++ compiler version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5 +$as_echo_n "checking Compaq C++ compiler version... " >&6; } _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'` if test "$_compaqcxx_major" != "V6"; then - { echo "$as_me:$LINENO: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&5 -echo "$as_me: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&5 +$as_echo "$as_me: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&2;} echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } fi fi -echo "$as_me:$LINENO: checking exception type" >&5 -echo $ECHO_N "checking exception type... $ECHO_C" >&6 -ac_ext=cc +{ $as_echo "$as_me:$LINENO: checking exception type" >&5 +$as_echo_n "checking exception type... " >&6; } +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -9568,41 +11084,42 @@ _Unwind_SjLj_RaiseException() } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then exceptions_type="sjlj" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -exceptions_type="dwarf2" + exceptions_type="dwarf2" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $exceptions_type" >&5 -echo "${ECHO_T}$exceptions_type" >&6 +{ $as_echo "$as_me:$LINENO: result: $exceptions_type" >&5 +$as_echo "$exceptions_type" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9615,8 +11132,8 @@ EXCEPTIONS="$exceptions_type" if test "$_os" = "SunOS"; then _temp=`showrev -p | $AWK -F" " '{ print $2 }'` if test "$_os_release" = "7"; then - echo "$as_me:$LINENO: checking for patch 106327-06 or greater" >&5 -echo $ECHO_N "checking for patch 106327-06 or greater... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for patch 106327-06 or greater" >&5 +$as_echo_n "checking for patch 106327-06 or greater... " >&6; } _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'` _patch="false" for i in $_temp @@ -9630,15 +11147,15 @@ echo $ECHO_N "checking for patch 106327-06 or greater... $ECHO_C" >&6 fi done if test "$_patch" = "found"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { echo "$as_me:$LINENO: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&5 -echo "$as_me: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&5 +$as_echo "$as_me: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&2;} echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn fi - echo "$as_me:$LINENO: checking for patch 106950-11 or greater" >&5 -echo $ECHO_N "checking for patch 106950-11 or greater... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for patch 106950-11 or greater" >&5 +$as_echo_n "checking for patch 106950-11 or greater... " >&6; } _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'` _patch="false" for i in $_temp @@ -9652,17 +11169,17 @@ echo $ECHO_N "checking for patch 106950-11 or greater... $ECHO_C" >&6 fi done if test "$_patch" = "found"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { echo "$as_me:$LINENO: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&5 -echo "$as_me: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&5 +$as_echo "$as_me: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&2;} echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn fi else if test "$_os_release" = "6"; then - echo "$as_me:$LINENO: checking for patch 105591-09 or greater" >&5 -echo $ECHO_N "checking for patch 105591-09 or greater... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for patch 105591-09 or greater" >&5 +$as_echo_n "checking for patch 105591-09 or greater... " >&6; } _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'` _patch="false" for i in $_temp @@ -9676,15 +11193,15 @@ echo $ECHO_N "checking for patch 105591-09 or greater... $ECHO_C" >&6 fi done if test "$_patch" = "found"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { echo "$as_me:$LINENO: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&5 -echo "$as_me: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&5 +$as_echo "$as_me: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&2;} echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn fi - echo "$as_me:$LINENO: checking for patch 107733-08 or greater" >&5 -echo $ECHO_N "checking for patch 107733-08 or greater... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for patch 107733-08 or greater" >&5 +$as_echo_n "checking for patch 107733-08 or greater... " >&6; } _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'` _patch="false" for i in $_temp @@ -9698,19 +11215,19 @@ echo $ECHO_N "checking for patch 107733-08 or greater... $ECHO_C" >&6 fi done if test "$_patch" = "found"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { echo "$as_me:$LINENO: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&5 -echo "$as_me: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&5 +$as_echo "$as_me: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&2;} echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn fi fi fi fi - echo "$as_me:$LINENO: checking what the default STL should be" >&5 -echo $ECHO_N "checking what the default STL should be... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking what the default STL should be" >&5 +$as_echo_n "checking what the default STL should be... " >&6; } DEFAULT_TO_STLPORT="no" if test "$_os" = "Linux"; then case "$build_cpu" in @@ -9737,35 +11254,35 @@ echo $ECHO_N "checking what the default STL should be... $ECHO_C" >&6 DEFAULT_TO_STLPORT="yes" fi if test "$DEFAULT_TO_STLPORT" = "yes"; then - echo "$as_me:$LINENO: result: stlport" >&5 -echo "${ECHO_T}stlport" >&6 + { $as_echo "$as_me:$LINENO: result: stlport" >&5 +$as_echo "stlport" >&6; } else - echo "$as_me:$LINENO: result: system" >&5 -echo "${ECHO_T}system" >&6 + { $as_echo "$as_me:$LINENO: result: system" >&5 +$as_echo "system" >&6; } fi if test "$WITH_STLPORT" = "auto"; then WITH_STLPORT=$DEFAULT_TO_STLPORT fi - echo "$as_me:$LINENO: checking for STL providing headers" >&5 -echo $ECHO_N "checking for STL providing headers... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for STL providing headers" >&5 +$as_echo_n "checking for STL providing headers... " >&6; } STLPORT4="" USE_SYSTEM_STL="" if test "$WITH_STLPORT" = "yes"; then - echo "$as_me:$LINENO: result: using internal stlport." >&5 -echo "${ECHO_T}using internal stlport." >&6 + { $as_echo "$as_me:$LINENO: result: using internal stlport." >&5 +$as_echo "using internal stlport." >&6; } if test "$DEFAULT_TO_STLPORT" != "yes"; then - { echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 -echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 +$as_echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi elif test "$WITH_STLPORT" = "no"; then - echo "$as_me:$LINENO: result: using system STL" >&5 -echo "${ECHO_T}using system STL" >&6 + { $as_echo "$as_me:$LINENO: result: using system STL" >&5 +$as_echo "using system STL" >&6; } USE_SYSTEM_STL="YES" if test "$DEFAULT_TO_STLPORT" != "no"; then - { echo "$as_me:$LINENO: WARNING: using system STL. Warning, breaks your ABI compatability!" >&5 -echo "$as_me: WARNING: using system STL. Warning, breaks your ABI compatability!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: using system STL. Warning, breaks your ABI compatability!" >&5 +$as_echo "$as_me: WARNING: using system STL. Warning, breaks your ABI compatability!" >&2;} echo "using system STL. Warning, breaks your ABI compatability!" >>warn fi else @@ -9779,92 +11296,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $STLPORT4/stlport/hash_map _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - echo "$as_me:$LINENO: result: checked." >&5 -echo "${ECHO_T}checked." >&6 -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + { $as_echo "$as_me:$LINENO: result: checked." >&5 +$as_echo "checked." >&6; } +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: STLport headers not found." >&5 -echo "$as_me: error: STLport headers not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: STLport headers not found." >&5 +$as_echo "$as_me: error: STLport headers not found." >&2;} { (exit 1); exit 1; }; } fi + rm -f conftest.err conftest.$ac_ext else if test -f "$STLPORT4/stlport/hash_map"; then - echo "$as_me:$LINENO: result: checked." >&5 -echo "${ECHO_T}checked." >&6 + { $as_echo "$as_me:$LINENO: result: checked." >&5 +$as_echo "checked." >&6; } else - { { echo "$as_me:$LINENO: error: STLport headers not found." >&5 -echo "$as_me: error: STLport headers not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: STLport headers not found." >&5 +$as_echo "$as_me: error: STLport headers not found." >&2;} { (exit 1); exit 1; }; } fi fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - echo "$as_me:$LINENO: checking for STLport libraries" >&5 -echo $ECHO_N "checking for STLport libraries... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for STLport libraries" >&5 +$as_echo_n "checking for STLport libraries... " >&6; } if test "$_os" = "SunOS"; then if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } STLPORT_VER=500 else - { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -echo "$as_me: error: STLport libraries not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 +$as_echo "$as_me: error: STLport libraries not found" >&2;} { (exit 1); exit 1; }; } fi elif test "$_os" = "Darwin"; then if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.dylib"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } STLPORT_VER=500 else - { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -echo "$as_me: error: STLport libraries not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 +$as_echo "$as_me: error: STLport libraries not found" >&2;} { (exit 1); exit 1; }; } fi else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 + { $as_echo "$as_me:$LINENO: result: checked" >&5 +$as_echo "checked" >&6; } STLPORT_VER=500 else - { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -echo "$as_me: error: STLport libraries not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 +$as_echo "$as_me: error: STLport libraries not found" >&2;} { (exit 1); exit 1; }; } fi fi fi if test "$DEFAULT_TO_STLPORT" != "yes"; then - { echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 -echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 +$as_echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi fi @@ -9880,8 +11397,8 @@ fi if test "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking whether $CC supports -fvisibility=hidden" >&5 -echo $ECHO_N "checking whether $CC supports -fvisibility=hidden... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether $CC supports -fvisibility=hidden" >&5 +$as_echo_n "checking whether $CC supports -fvisibility=hidden... " >&6; } save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -fvisibility=hidden" cat >conftest.$ac_ext <<_ACEOF @@ -9900,71 +11417,73 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then HAVE_GCC_VISIBILITY_FEATURE=TRUE else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$save_CFLAGS if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi # =================================================================== # use --ccache-skip? # =================================================================== -echo "$as_me:$LINENO: checking whether we are allowed and able to use --ccache-skip" >&5 -echo $ECHO_N "checking whether we are allowed and able to use --ccache-skip... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether we are allowed and able to use --ccache-skip" >&5 +$as_echo_n "checking whether we are allowed and able to use --ccache-skip... " >&6; } if test "$_os" != "Darwin" ; then - echo "$as_me:$LINENO: result: only used on Mac currently, skipping" >&5 -echo "${ECHO_T}only used on Mac currently, skipping" >&6 + { $as_echo "$as_me:$LINENO: result: only used on Mac currently, skipping" >&5 +$as_echo "only used on Mac currently, skipping" >&6; } elif test "$enable_ccache_skip" = "no" ; then - echo "$as_me:$LINENO: result: no - diabled explicitly" >&5 -echo "${ECHO_T}no - diabled explicitly" >&6 + { $as_echo "$as_me:$LINENO: result: no - diabled explicitly" >&5 +$as_echo "no - diabled explicitly" >&6; } elif test "$enable_ccache_skip" = "yes" ; then - echo "$as_me:$LINENO: result: yes - enabled explicitly, skipping checks" >&5 -echo "${ECHO_T}yes - enabled explicitly, skipping checks" >&6 + { $as_echo "$as_me:$LINENO: result: yes - enabled explicitly, skipping checks" >&5 +$as_echo "yes - enabled explicitly, skipping checks" >&6; } USE_CCACHE=YES elif test "$enable_ccache_skip" = "auto" ; then # checking for ccache presence/version - echo "$as_me:$LINENO: result: probing..." >&5 -echo "${ECHO_T}probing..." >&6 + { $as_echo "$as_me:$LINENO: result: probing..." >&5 +$as_echo "probing..." >&6; } # Extract the first word of "ccache", so it can be a program name with args. set dummy ccache; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CCACHE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CCACHE in [\\/]* | ?:[\\/]*) @@ -9977,42 +11496,43 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_CCACHE" && ac_cv_path_CCACHE="not_found" ;; esac fi CCACHE=$ac_cv_path_CCACHE - if test -n "$CCACHE"; then - echo "$as_me:$LINENO: result: $CCACHE" >&5 -echo "${ECHO_T}$CCACHE" >&6 + { $as_echo "$as_me:$LINENO: result: $CCACHE" >&5 +$as_echo "$CCACHE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$CCACHE" = "not_found" ; then - { echo "$as_me:$LINENO: not enabling --ccache-skip (ccache not found)" >&5 -echo "$as_me: not enabling --ccache-skip (ccache not found)" >&6;} + { $as_echo "$as_me:$LINENO: not enabling --ccache-skip (ccache not found)" >&5 +$as_echo "$as_me: not enabling --ccache-skip (ccache not found)" >&6;} else # check ccache version - echo "$as_me:$LINENO: checking whether version of ccache is suitable" >&5 -echo $ECHO_N "checking whether version of ccache is suitable... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether version of ccache is suitable" >&5 +$as_echo_n "checking whether version of ccache is suitable... " >&6; } CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` if test "$CCACHE_VERSION" = "2.4_OOo"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking whether ccache is actually used for the build" >&5 -echo $ECHO_N "checking whether ccache is actually used for the build... $ECHO_C" >&6 - ac_ext=cc + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: checking whether ccache is actually used for the build" >&5 +$as_echo_n "checking whether ccache is actually used for the build... " >&6; } + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -10036,43 +11556,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then use_ccache=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -use_ccache=no + use_ccache=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $use_ccache = yes ; then - echo "$as_me:$LINENO: result: yes, will enable --ccache-skip" >&5 -echo "${ECHO_T}yes, will enable --ccache-skip" >&6 + { $as_echo "$as_me:$LINENO: result: yes, will enable --ccache-skip" >&5 +$as_echo "yes, will enable --ccache-skip" >&6; } USE_CCACHE=YES else - echo "$as_me:$LINENO: result: no, will not enable --ccache-skip" >&5 -echo "${ECHO_T}no, will not enable --ccache-skip" >&6 + { $as_echo "$as_me:$LINENO: result: no, will not enable --ccache-skip" >&5 +$as_echo "no, will not enable --ccache-skip" >&6; } fi CXXFLAGS=$save_CXXFLAGS ac_ext=c @@ -10082,22 +11599,22 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { echo "$as_me:$LINENO: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&5 -echo "$as_me: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&6;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&5 +$as_echo "$as_me: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&6;} fi fi else - { { echo "$as_me:$LINENO: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&5 -echo "$as_me: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&2;} + { { $as_echo "$as_me:$LINENO: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&5 +$as_echo "$as_me: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&2;} { (exit 1); exit 1; }; } fi if test "$USE_SYSTEM_STL" = "YES"; then - echo "$as_me:$LINENO: checking if hash_map will be in __gnu_cxx namespace" >&5 -echo $ECHO_N "checking if hash_map will be in __gnu_cxx namespace... $ECHO_C" >&6 - ac_ext=cc + { $as_echo "$as_me:$LINENO: checking if hash_map will be in __gnu_cxx namespace" >&5 +$as_echo_n "checking if hash_map will be in __gnu_cxx namespace... " >&6; } + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -10122,48 +11639,45 @@ hash_map t; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_cxx_have_ext_hash_map=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_cxx_have_ext_hash_map=no + ac_cv_cxx_have_ext_hash_map=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then - { { echo "$as_me:$LINENO: error: Can't find hash_map. Try with --with-stlport" >&5 -echo "$as_me: error: Can't find hash_map. Try with --with-stlport" >&2;} + { { $as_echo "$as_me:$LINENO: error: Can't find hash_map. Try with --with-stlport" >&5 +$as_echo "$as_me: error: Can't find hash_map. Try with --with-stlport" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_map" >&5 -echo "${ECHO_T}$ac_cv_cxx_have_ext_hash_map" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_map" >&5 +$as_echo "$ac_cv_cxx_have_ext_hash_map" >&6; } fi if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - echo "$as_me:$LINENO: checking if STL headers are visibility safe" >&5 -echo $ECHO_N "checking if STL headers are visibility safe... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if STL headers are visibility safe" >&5 +$as_echo_n "checking if STL headers are visibility safe... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10182,11 +11696,11 @@ else fi rm -f conftest* - echo "$as_me:$LINENO: result: $stlvisok" >&5 -echo "${ECHO_T}$stlvisok" >&6 + { $as_echo "$as_me:$LINENO: result: $stlvisok" >&5 +$as_echo "$stlvisok" >&6; } if test "$stlvisok" = "no"; then - { echo "$as_me:$LINENO: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&5 -echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&5 +$as_echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&2;} echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -10196,8 +11710,8 @@ echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabling v sharedlink_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" - echo "$as_me:$LINENO: checking if gcc is -fvisibility-inlines-hidden safe with STL headers" >&5 -echo $ECHO_N "checking if gcc is -fvisibility-inlines-hidden safe with STL headers... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if gcc is -fvisibility-inlines-hidden safe with STL headers" >&5 +$as_echo_n "checking if gcc is -fvisibility-inlines-hidden safe with STL headers... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -10216,42 +11730,43 @@ istringstream strm( "test" ); return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then $EGREP -q unresolvable conftest.err; if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gccvisok=no + gccvisok=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - echo "$as_me:$LINENO: result: $gccvisok" >&5 -echo "${ECHO_T}$gccvisok" >&6 + { $as_echo "$as_me:$LINENO: result: $gccvisok" >&5 +$as_echo "$gccvisok" >&6; } if test "$gccvisok" = "no"; then - { echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&5 -echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&5 +$as_echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&2;} echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -10260,8 +11775,8 @@ echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabli fi if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - echo "$as_me:$LINENO: checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)" >&5 -echo $ECHO_N "checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)" >&5 +$as_echo_n "checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)... " >&6; } cat >visibility.cxx <<_ACEOF #pragma GCC visibility push(hidden) struct __attribute__ ((visibility ("default"))) TestStruct { @@ -10289,11 +11804,11 @@ _ACEOF fi rm -f visibility.s - echo "$as_me:$LINENO: result: $gccvisbroken" >&5 -echo "${ECHO_T}$gccvisbroken" >&6 + { $as_echo "$as_me:$LINENO: result: $gccvisbroken" >&5 +$as_echo "$gccvisbroken" >&6; } if test "$gccvisbroken" = "yes"; then - { echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&5 -echo "$as_me: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&5 +$as_echo "$as_me: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&2;} echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -10309,11 +11824,11 @@ fi -echo "$as_me:$LINENO: checking which memory allocator to use" >&5 -echo $ECHO_N "checking which memory allocator to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which memory allocator to use" >&5 +$as_echo_n "checking which memory allocator to use... " >&6; } if test "$with_alloc" = "system"; then - echo "$as_me:$LINENO: result: system" >&5 -echo "${ECHO_T}system" >&6 + { $as_echo "$as_me:$LINENO: result: system" >&5 +$as_echo "system" >&6; } ALLOC="SYS_ALLOC"; @@ -10321,11 +11836,11 @@ echo "${ECHO_T}system" >&6 for ac_func in malloc realloc calloc free do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10350,71 +11865,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -10422,18 +11936,18 @@ done fi if test "$with_alloc" = "tcmalloc"; then - echo "$as_me:$LINENO: result: tcmalloc" >&5 -echo "${ECHO_T}tcmalloc" >&6 + { $as_echo "$as_me:$LINENO: result: tcmalloc" >&5 +$as_echo "tcmalloc" >&6; } if ! echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then - { { echo "$as_me:$LINENO: error: tcmalloc only available/usable on ix86" >&5 -echo "$as_me: error: tcmalloc only available/usable on ix86" >&2;} + { { $as_echo "$as_me:$LINENO: error: tcmalloc only available/usable on ix86" >&5 +$as_echo "$as_me: error: tcmalloc only available/usable on ix86" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for malloc in -ltcmalloc" >&5 -echo $ECHO_N "checking for malloc in -ltcmalloc... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for malloc in -ltcmalloc" >&5 +$as_echo_n "checking for malloc in -ltcmalloc... " >&6; } if test "${ac_cv_lib_tcmalloc_malloc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltcmalloc $LIBS" @@ -10444,57 +11958,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char malloc (); int main () { -malloc (); +return malloc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_tcmalloc_malloc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_tcmalloc_malloc=no + ac_cv_lib_tcmalloc_malloc=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_tcmalloc_malloc" >&5 -echo "${ECHO_T}$ac_cv_lib_tcmalloc_malloc" >&6 -if test $ac_cv_lib_tcmalloc_malloc = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_tcmalloc_malloc" >&5 +$as_echo "$ac_cv_lib_tcmalloc_malloc" >&6; } +if test "x$ac_cv_lib_tcmalloc_malloc" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTCMALLOC 1 _ACEOF @@ -10502,8 +12017,8 @@ _ACEOF LIBS="-ltcmalloc $LIBS" else - { { echo "$as_me:$LINENO: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&5 -echo "$as_me: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&2;} + { { $as_echo "$as_me:$LINENO: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&5 +$as_echo "$as_me: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&2;} { (exit 1); exit 1; }; } fi @@ -10511,15 +12026,15 @@ fi fi if test "$with_alloc" = "jemalloc"; then if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then - echo "$as_me:$LINENO: result: jemalloc" >&5 -echo "${ECHO_T}jemalloc" >&6 + { $as_echo "$as_me:$LINENO: result: jemalloc" >&5 +$as_echo "jemalloc" >&6; } save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pthread" -echo "$as_me:$LINENO: checking for malloc in -ljemalloc" >&5 -echo $ECHO_N "checking for malloc in -ljemalloc... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for malloc in -ljemalloc" >&5 +$as_echo_n "checking for malloc in -ljemalloc... " >&6; } if test "${ac_cv_lib_jemalloc_malloc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljemalloc $LIBS" @@ -10530,57 +12045,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char malloc (); int main () { -malloc (); +return malloc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_jemalloc_malloc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_jemalloc_malloc=no + ac_cv_lib_jemalloc_malloc=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_jemalloc_malloc" >&5 -echo "${ECHO_T}$ac_cv_lib_jemalloc_malloc" >&6 -if test $ac_cv_lib_jemalloc_malloc = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jemalloc_malloc" >&5 +$as_echo "$ac_cv_lib_jemalloc_malloc" >&6; } +if test "x$ac_cv_lib_jemalloc_malloc" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBJEMALLOC 1 _ACEOF @@ -10588,16 +12104,16 @@ _ACEOF LIBS="-ljemalloc $LIBS" else - { { echo "$as_me:$LINENO: error: jemalloc not found or functional. Install the jemalloc allocator." >&5 -echo "$as_me: error: jemalloc not found or functional. Install the jemalloc allocator." >&2;} + { { $as_echo "$as_me:$LINENO: error: jemalloc not found or functional. Install the jemalloc allocator." >&5 +$as_echo "$as_me: error: jemalloc not found or functional. Install the jemalloc allocator." >&2;} { (exit 1); exit 1; }; } fi ALLOC="JEMALLOC"; CFLAGS=$save_CFLAGS else - echo "$as_me:$LINENO: result: system" >&5 -echo "${ECHO_T}system" >&6 + { $as_echo "$as_me:$LINENO: result: system" >&5 +$as_echo "system" >&6; } ALLOC="SYS_ALLOC"; @@ -10605,11 +12121,11 @@ echo "${ECHO_T}system" >&6 for ac_func in malloc realloc calloc free do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10634,71 +12150,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -10707,38 +12222,38 @@ done fi fi if test "$with_alloc" = "internal" -o -z "$with_alloc"; then - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } fi -echo "$as_me:$LINENO: checking whether to add custom build version" >&5 -echo $ECHO_N "checking whether to add custom build version... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to add custom build version" >&5 +$as_echo_n "checking whether to add custom build version... " >&6; } if test "z$with_build_version" != "z"; then BUILD_VER_STRING=$with_build_version - echo "$as_me:$LINENO: result: yes, $BUILD_VER_STRING" >&5 -echo "${ECHO_T}yes, $BUILD_VER_STRING" >&6 + { $as_echo "$as_me:$LINENO: result: yes, $BUILD_VER_STRING" >&5 +$as_echo "yes, $BUILD_VER_STRING" >&6; } else BUILD_VER_STRING= - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to build with Java support" >&5 -echo $ECHO_N "checking whether to build with Java support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build with Java support" >&5 +$as_echo_n "checking whether to build with Java support... " >&6; } if test "$WITH_JAVA" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SOLAR_JAVA="TRUE" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SOLAR_JAVA="" - { echo "$as_me:$LINENO: WARNING: building without java will mean some features will not be available" >&5 -echo "$as_me: WARNING: building without java will mean some features will not be available" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: building without java will mean some features will not be available" >&5 +$as_echo "$as_me: WARNING: building without java will mean some features will not be available" >&2;} echo "building without java will mean some features will not be available" >>warn fi @@ -10765,10 +12280,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "$WITH_JAVA", so it can be a program name with args. set dummy $WITH_JAVA; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_JAVAINTERPRETER+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $JAVAINTERPRETER in [\\/]* | ?:[\\/]*) @@ -10781,34 +12296,35 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAINTERPRETER="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi JAVAINTERPRETER=$ac_cv_path_JAVAINTERPRETER - if test -n "$JAVAINTERPRETER"; then - echo "$as_me:$LINENO: result: $JAVAINTERPRETER" >&5 -echo "${ECHO_T}$JAVAINTERPRETER" >&6 + { $as_echo "$as_me:$LINENO: result: $JAVAINTERPRETER" >&5 +$as_echo "$JAVAINTERPRETER" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + else _java_path="$with_jdk_home/bin/$WITH_JAVA" if test -x "$_java_path"; then JAVAINTERPRETER=$_java_path else - { { echo "$as_me:$LINENO: error: $_java_path not found set with_jdk_home" >&5 -echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} + { { $as_echo "$as_me:$LINENO: error: $_java_path not found set with_jdk_home" >&5 +$as_echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} { (exit 1); exit 1; }; } fi fi @@ -10819,27 +12335,27 @@ echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` elif test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking whether to pass -d32 to Java interpreter" >&5 -echo $ECHO_N "checking whether to pass -d32 to Java interpreter... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to pass -d32 to Java interpreter" >&5 +$as_echo_n "checking whether to pass -d32 to Java interpreter... " >&6; } if "$JAVAINTERPRETER" -d32 >&5 2>&5; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } JAVAIFLAGS=-d32 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi fi if test "$SOLAR_JAVA" != ""; then _gij_longver=0 - echo "$as_me:$LINENO: checking the installed JDK" >&5 -echo $ECHO_N "checking the installed JDK... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the installed JDK" >&5 +$as_echo_n "checking the installed JDK... " >&6; } if test -n "$JAVAINTERPRETER"; then if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then - { { echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 -echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} + { { $as_echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 +$as_echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} { (exit 1); exit 1; }; } # dnl Kaffe specific tests # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` @@ -10860,14 +12376,14 @@ echo "$as_me: error: No valid check available. Please check the block for your d # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then JDK=gcj - echo "$as_me:$LINENO: result: checked (gcj)" >&5 -echo "${ECHO_T}checked (gcj)" >&6 + { $as_echo "$as_me:$LINENO: result: checked (gcj)" >&5 +$as_echo "checked (gcj)" >&6; } _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then - { { echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 -echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} + { { $as_echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 +$as_echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} { (exit 1); exit 1; }; } # JDK=bea # @@ -10898,18 +12414,18 @@ echo "$as_me: error: No valid check available. Please check the block for your d _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - { { echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.5" >&5 -echo "$as_me: error: IBM JDK is too old, you need at least 1.5" >&2;} + { { $as_echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.5" >&5 +$as_echo "$as_me: error: IBM JDK is too old, you need at least 1.5" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: result: checked (IBM JDK $_jdk)" >&5 -echo "${ECHO_T}checked (IBM JDK $_jdk)" >&6 + { $as_echo "$as_me:$LINENO: result: checked (IBM JDK $_jdk)" >&5 +$as_echo "checked (IBM JDK $_jdk)" >&6; } if test "$with_jdk_home" = ""; then - { { echo "$as_me:$LINENO: error: In order to successfully build OpenOffice.org using the IBM JDK, + { { $as_echo "$as_me:$LINENO: error: In order to successfully build OpenOffice.org using the IBM JDK, you must use the \"--with-jdk-home\" configure option explicitly" >&5 -echo "$as_me: error: In order to successfully build OpenOffice.org using the IBM JDK, +$as_echo "$as_me: error: In order to successfully build OpenOffice.org using the IBM JDK, you must use the \"--with-jdk-home\" configure option explicitly" >&2;} { (exit 1); exit 1; }; } fi @@ -10923,12 +12439,12 @@ you must use the \"--with-jdk-home\" configure option explicitly" >&2;} _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - { { echo "$as_me:$LINENO: error: JDK is too old, you need at least 1.5" >&5 -echo "$as_me: error: JDK is too old, you need at least 1.5" >&2;} + { { $as_echo "$as_me:$LINENO: error: JDK is too old, you need at least 1.5" >&5 +$as_echo "$as_me: error: JDK is too old, you need at least 1.5" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: result: checked (JDK $_jdk)" >&5 -echo "${ECHO_T}checked (JDK $_jdk)" >&6 + { $as_echo "$as_me:$LINENO: result: checked (JDK $_jdk)" >&5 +$as_echo "checked (JDK $_jdk)" >&6; } JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` if test "$_os" = "WINNT"; then JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[eE][xX][eE]$,,"` @@ -10938,8 +12454,8 @@ echo "${ECHO_T}checked (JDK $_jdk)" >&6 fi fi else - { { echo "$as_me:$LINENO: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&5 -echo "$as_me: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&2;} + { { $as_echo "$as_me:$LINENO: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&5 +$as_echo "$as_me: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&2;} { (exit 1); exit 1; }; } fi else @@ -10960,10 +12476,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "$javacompiler", so it can be a program name with args. set dummy $javacompiler; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_JAVACOMPILER+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $JAVACOMPILER in [\\/]* | ?:[\\/]*) @@ -10976,27 +12492,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVACOMPILER="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi JAVACOMPILER=$ac_cv_path_JAVACOMPILER - if test -n "$JAVACOMPILER"; then - echo "$as_me:$LINENO: result: $JAVACOMPILER" >&5 -echo "${ECHO_T}$JAVACOMPILER" >&6 + { $as_echo "$as_me:$LINENO: result: $JAVACOMPILER" >&5 +$as_echo "$JAVACOMPILER" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + else _javac_path="$with_jdk_home/bin/$javacompiler" if test -x "$_javac_path"; then @@ -11004,8 +12521,8 @@ fi fi fi if test -z "$JAVACOMPILER"; then - { { echo "$as_me:$LINENO: error: $javacompiler not found set with_jdk_home" >&5 -echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} + { { $as_echo "$as_me:$LINENO: error: $javacompiler not found set with_jdk_home" >&5 +$as_echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then @@ -11022,11 +12539,11 @@ echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} fi if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then - echo "$as_me:$LINENO: checking re-checking JDK" >&5 -echo $ECHO_N "checking re-checking JDK... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking re-checking JDK" >&5 +$as_echo_n "checking re-checking JDK... " >&6; } JDK=gcj - echo "$as_me:$LINENO: result: checked (ecj)" >&5 -echo "${ECHO_T}checked (ecj)" >&6 + { $as_echo "$as_me:$LINENO: result: checked (ecj)" >&5 +$as_echo "checked (ecj)" >&6; } #TODO: what's to do here? some switch to do 1.5 compiling? JAVAFLAGS="-source 1.5 -target 1.5" _gij_longver="40200" @@ -11045,10 +12562,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "javadoc", so it can be a program name with args. set dummy javadoc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_JAVADOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $JAVADOC in [\\/]* | ?:[\\/]*) @@ -11061,27 +12578,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi JAVADOC=$ac_cv_path_JAVADOC - if test -n "$JAVADOC"; then - echo "$as_me:$LINENO: result: $JAVADOC" >&5 -echo "${ECHO_T}$JAVADOC" >&6 + { $as_echo "$as_me:$LINENO: result: $JAVADOC" >&5 +$as_echo "$JAVADOC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + else _javadoc_path="$with_jdk_home/bin/javadoc" if test "$_os" = "OS2"; then @@ -11094,10 +12612,10 @@ fi else # Extract the first word of "javadoc", so it can be a program name with args. set dummy javadoc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_JAVADOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $JAVADOC in [\\/]* | ?:[\\/]*) @@ -11110,32 +12628,33 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi JAVADOC=$ac_cv_path_JAVADOC - if test -n "$JAVADOC"; then - echo "$as_me:$LINENO: result: $JAVADOC" >&5 -echo "${ECHO_T}$JAVADOC" >&6 + { $as_echo "$as_me:$LINENO: result: $JAVADOC" >&5 +$as_echo "$JAVADOC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi fi if test -z "$JAVADOC"; then - { { echo "$as_me:$LINENO: error: $_javadoc_path not found set with_jdk_home" >&5 -echo "$as_me: error: $_javadoc_path not found set with_jdk_home" >&2;} + { { $as_echo "$as_me:$LINENO: error: $_javadoc_path not found set with_jdk_home" >&5 +$as_echo "$as_me: error: $_javadoc_path not found set with_jdk_home" >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then @@ -11168,36 +12687,36 @@ class findhome } } _ACEOF - echo "$as_me:$LINENO: checking if javac works" >&5 -echo $ECHO_N "checking if javac works... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if javac works" >&5 +$as_echo_n "checking if javac works... " >&6; } javac_cmd="$JAVACOMPILER findhome.java 1>&2" { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 (eval $javac_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0 && test -f ./findhome.class ; then - echo "$as_me:$LINENO: result: javac works" >&5 -echo "${ECHO_T}javac works" >&6 + { $as_echo "$as_me:$LINENO: result: javac works" >&5 +$as_echo "javac works" >&6; } else echo "configure: javac test failed" >&5 cat findhome.java >&5 - { { echo "$as_me:$LINENO: error: javac does not work - java projects will not build!" >&5 -echo "$as_me: error: javac does not work - java projects will not build!" >&2;} + { { $as_echo "$as_me:$LINENO: error: javac does not work - java projects will not build!" >&5 +$as_echo "$as_me: error: javac does not work - java projects will not build!" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking if gij knows its java.home" >&5 -echo $ECHO_N "checking if gij knows its java.home... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if gij knows its java.home" >&5 +$as_echo_n "checking if gij knows its java.home... " >&6; } JAVA_HOME=`$JAVAINTERPRETER findhome` if test $? = 0 && test "$JAVA_HOME" != "" ; then - echo "$as_me:$LINENO: result: $JAVA_HOME" >&5 -echo "${ECHO_T}$JAVA_HOME" >&6 + { $as_echo "$as_me:$LINENO: result: $JAVA_HOME" >&5 +$as_echo "$JAVA_HOME" >&6; } else echo "configure: java test failed" >&5 cat findhome.java >&5 - { { echo "$as_me:$LINENO: error: gij does not know its java.home - use --with-jdk-home" >&5 -echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2;} + { { $as_echo "$as_me:$LINENO: error: gij does not know its java.home - use --with-jdk-home" >&5 +$as_echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2;} { (exit 1); exit 1; }; } fi else @@ -11220,10 +12739,10 @@ echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2; JAVA_HOME=$(readlink $JAVACOMPILER) else # else warn - { echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 -echo "$as_me: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&2;} - { echo "$as_me:$LINENO: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5 -echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 +$as_echo "$as_me: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5 +$as_echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&2;} echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn fi @@ -11245,12 +12764,12 @@ echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME JAVA_HOME_OK="NO" fi if test "$JAVA_HOME_OK" = "NO"; then - { echo "$as_me:$LINENO: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5 -echo "$as_me: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&2;} - { echo "$as_me:$LINENO: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5 -echo "$as_me: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&2;} - { echo "$as_me:$LINENO: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5 -echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5 +$as_echo "$as_me: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5 +$as_echo "$as_me: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5 +$as_echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&2;} echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn @@ -11263,8 +12782,8 @@ fi AWTLIB= if test "$SOLAR_JAVA" != ""; then - echo "$as_me:$LINENO: checking for jawt lib name" >&5 -echo $ECHO_N "checking for jawt lib name... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for jawt lib name" >&5 +$as_echo_n "checking for jawt lib name... " >&6; } if test "$JDK" = "gcj"; then save_CFLAGS=$CFLAGS save_LDFLAGS=$LDFLAGS @@ -11272,17 +12791,17 @@ echo $ECHO_N "checking for jawt lib name... $ECHO_C" >&6 LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" exec 6>/dev/null # no output if test "${ac_cv_header_jni_h+set}" = set; then - echo "$as_me:$LINENO: checking for jni.h" >&5 -echo $ECHO_N "checking for jni.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for jni.h" >&5 +$as_echo_n "checking for jni.h... " >&6; } if test "${ac_cv_header_jni_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -echo "${ECHO_T}$ac_cv_header_jni_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 +$as_echo "$ac_cv_header_jni_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking jni.h usability" >&5 -echo $ECHO_N "checking jni.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking jni.h usability" >&5 +$as_echo_n "checking jni.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11293,41 +12812,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking jni.h presence" >&5 -echo $ECHO_N "checking jni.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking jni.h presence" >&5 +$as_echo_n "checking jni.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11336,91 +12852,84 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for jni.h" >&5 -echo $ECHO_N "checking for jni.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for jni.h" >&5 +$as_echo_n "checking for jni.h... " >&6; } if test "${ac_cv_header_jni_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_jni_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -echo "${ECHO_T}$ac_cv_header_jni_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 +$as_echo "$ac_cv_header_jni_h" >&6; } fi -if test $ac_cv_header_jni_h = yes; then +if test "x$ac_cv_header_jni_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&5 -echo "$as_me: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&2;} + { { $as_echo "$as_me:$LINENO: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&5 +$as_echo "$as_me: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lgcjawt" >&5 -echo $ECHO_N "checking for JAWT_GetAWT in -lgcjawt... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lgcjawt" >&5 +$as_echo_n "checking for JAWT_GetAWT in -lgcjawt... " >&6; } if test "${ac_cv_lib_gcjawt_JAWT_GetAWT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgcjawt $LIBS" @@ -11431,57 +12940,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -JAWT_GetAWT (); +return JAWT_GetAWT (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_gcjawt_JAWT_GetAWT=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_gcjawt_JAWT_GetAWT=no + ac_cv_lib_gcjawt_JAWT_GetAWT=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_gcjawt_JAWT_GetAWT" >&5 -echo "${ECHO_T}$ac_cv_lib_gcjawt_JAWT_GetAWT" >&6 -if test $ac_cv_lib_gcjawt_JAWT_GetAWT = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gcjawt_JAWT_GetAWT" >&5 +$as_echo "$ac_cv_lib_gcjawt_JAWT_GetAWT" >&6; } +if test "x$ac_cv_lib_gcjawt_JAWT_GetAWT" = x""yes; then AWTLIB="-lgcjawt -lgcj" fi @@ -11501,17 +13011,17 @@ fi export LD_LIBRARY_PATH exec 6>/dev/null # no output if test "${ac_cv_header_jni_h+set}" = set; then - echo "$as_me:$LINENO: checking for jni.h" >&5 -echo $ECHO_N "checking for jni.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for jni.h" >&5 +$as_echo_n "checking for jni.h... " >&6; } if test "${ac_cv_header_jni_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -echo "${ECHO_T}$ac_cv_header_jni_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 +$as_echo "$ac_cv_header_jni_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking jni.h usability" >&5 -echo $ECHO_N "checking jni.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking jni.h usability" >&5 +$as_echo_n "checking jni.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11522,41 +13032,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking jni.h presence" >&5 -echo $ECHO_N "checking jni.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking jni.h presence" >&5 +$as_echo_n "checking jni.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11565,91 +13072,84 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for jni.h" >&5 -echo $ECHO_N "checking for jni.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for jni.h" >&5 +$as_echo_n "checking for jni.h... " >&6; } if test "${ac_cv_header_jni_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_jni_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -echo "${ECHO_T}$ac_cv_header_jni_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 +$as_echo "$ac_cv_header_jni_h" >&6; } fi -if test $ac_cv_header_jni_h = yes; then +if test "x$ac_cv_header_jni_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: jni.h could not be found." >&5 -echo "$as_me: error: jni.h could not be found." >&2;} + { { $as_echo "$as_me:$LINENO: error: jni.h could not be found." >&5 +$as_echo "$as_me: error: jni.h could not be found." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for JAWT_GetAWT in -ljawt" >&5 -echo $ECHO_N "checking for JAWT_GetAWT in -ljawt... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -ljawt" >&5 +$as_echo_n "checking for JAWT_GetAWT in -ljawt... " >&6; } if test "${ac_cv_lib_jawt_JAWT_GetAWT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljawt $LIBS" @@ -11660,66 +13160,67 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -JAWT_GetAWT (); +return JAWT_GetAWT (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_jawt_JAWT_GetAWT=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_jawt_JAWT_GetAWT=no + ac_cv_lib_jawt_JAWT_GetAWT=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_jawt_JAWT_GetAWT" >&5 -echo "${ECHO_T}$ac_cv_lib_jawt_JAWT_GetAWT" >&6 -if test $ac_cv_lib_jawt_JAWT_GetAWT = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jawt_JAWT_GetAWT" >&5 +$as_echo "$ac_cv_lib_jawt_JAWT_GetAWT" >&6; } +if test "x$ac_cv_lib_jawt_JAWT_GetAWT" = x""yes; then AWTLIB="-ljawt" fi if test -z "$AWTLIB"; then LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" - echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lmawt" >&5 -echo $ECHO_N "checking for JAWT_GetAWT in -lmawt... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lmawt" >&5 +$as_echo_n "checking for JAWT_GetAWT in -lmawt... " >&6; } if test "${ac_cv_lib_mawt_JAWT_GetAWT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmawt $LIBS" @@ -11730,57 +13231,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -JAWT_GetAWT (); +return JAWT_GetAWT (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mawt_JAWT_GetAWT=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mawt_JAWT_GetAWT=no + ac_cv_lib_mawt_JAWT_GetAWT=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_mawt_JAWT_GetAWT" >&5 -echo "${ECHO_T}$ac_cv_lib_mawt_JAWT_GetAWT" >&6 -if test $ac_cv_lib_mawt_JAWT_GetAWT = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mawt_JAWT_GetAWT" >&5 +$as_echo "$ac_cv_lib_mawt_JAWT_GetAWT" >&6; } +if test "x$ac_cv_lib_mawt_JAWT_GetAWT" = x""yes; then AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt" fi @@ -11793,24 +13295,24 @@ fi if test -z "$AWTLIB"; then AWTLIB=-ljawt fi - echo "$as_me:$LINENO: result: $AWTLIB" >&5 -echo "${ECHO_T}$AWTLIB" >&6 + { $as_echo "$as_me:$LINENO: result: $AWTLIB" >&5 +$as_echo "$AWTLIB" >&6; } fi if test "$SOLAR_JAVA" != ""; then - echo "$as_me:$LINENO: checking whether to enable gcj aot compilation" >&5 -echo $ECHO_N "checking whether to enable gcj aot compilation... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to enable gcj aot compilation" >&5 +$as_echo_n "checking whether to enable gcj aot compilation... " >&6; } if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then gcjaot="gcj" else gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"` fi - echo "$as_me:$LINENO: result: $gcjaot" >&5 -echo "${ECHO_T}$gcjaot" >&6 + { $as_echo "$as_me:$LINENO: result: $gcjaot" >&5 +$as_echo "$gcjaot" >&6; } if test -n "$with_jdk_home"; then _javac_path="$with_jdk_home/bin/$gcjaot" if test -x "$_javac_path"; then @@ -11820,10 +13322,10 @@ echo "${ECHO_T}$gcjaot" >&6 if test -z "$JAVAAOTCOMPILER"; then # Extract the first word of "$gcjaot", so it can be a program name with args. set dummy $gcjaot; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_JAVAAOTCOMPILER+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $JAVAAOTCOMPILER in [\\/]* | ?:[\\/]*) @@ -11836,35 +13338,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAAOTCOMPILER="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi JAVAAOTCOMPILER=$ac_cv_path_JAVAAOTCOMPILER - if test -n "$JAVAAOTCOMPILER"; then - echo "$as_me:$LINENO: result: $JAVAAOTCOMPILER" >&5 -echo "${ECHO_T}$JAVAAOTCOMPILER" >&6 + { $as_echo "$as_me:$LINENO: result: $JAVAAOTCOMPILER" >&5 +$as_echo "$JAVAAOTCOMPILER" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$JAVAAOTCOMPILER"; then - { echo "$as_me:$LINENO: WARNING: $gcjaot not found, set with_jdk_home" >&5 -echo "$as_me: WARNING: $gcjaot not found, set with_jdk_home" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $gcjaot not found, set with_jdk_home" >&5 +$as_echo "$as_me: WARNING: $gcjaot not found, set with_jdk_home" >&2;} fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -11881,10 +13384,10 @@ fi # Extract the first word of "dmake", so it can be a program name with args. set dummy dmake; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_DMAKE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $DMAKE in [\\/]* | ?:[\\/]*) @@ -11897,34 +13400,35 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DMAKE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_DMAKE" && ac_cv_path_DMAKE="no" ;; esac fi DMAKE=$ac_cv_path_DMAKE - if test -n "$DMAKE"; then - echo "$as_me:$LINENO: result: $DMAKE" >&5 -echo "${ECHO_T}$DMAKE" >&6 + { $as_echo "$as_me:$LINENO: result: $DMAKE" >&5 +$as_echo "$DMAKE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$DMAKE" = "no"; then BUILD_DMAKE=YES echo "dmake will be built on ./bootstrap" else - echo "$as_me:$LINENO: checking whether the found dmake is the right dmake" >&5 -echo $ECHO_N "checking whether the found dmake is the right dmake... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether the found dmake is the right dmake" >&5 +$as_echo_n "checking whether the found dmake is the right dmake... " >&6; } # we need to find out whether that dmake we found is "our" dmake # or the dmake from Sun's SunStudio Compiler which is something # different @@ -11933,48 +13437,48 @@ echo $ECHO_N "checking whether the found dmake is the right dmake... $ECHO_C" >& $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null if test $? -eq 0; then BUILD_DMAKE=NO - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking the dmake version" >&5 -echo $ECHO_N "checking the dmake version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: checking the dmake version" >&5 +$as_echo_n "checking the dmake version... " >&6; } DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then - echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 -echo "${ECHO_T}OK, >= 4.11" >&6 + { $as_echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 +$as_echo "OK, >= 4.11" >&6; } elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then - echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 -echo "${ECHO_T}OK, >= 4.11" >&6 + { $as_echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 +$as_echo "OK, >= 4.11" >&6; } else - echo "$as_me:$LINENO: result: too old. >= 4.11 is needed" >&5 -echo "${ECHO_T}too old. >= 4.11 is needed" >&6 + { $as_echo "$as_me:$LINENO: result: too old. >= 4.11 is needed" >&5 +$as_echo "too old. >= 4.11 is needed" >&6; } echo "A newer dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } echo "dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi fi -echo "$as_me:$LINENO: checking whether to enable EPM for packing" >&5 -echo $ECHO_N "checking whether to enable EPM for packing... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable EPM for packing" >&5 +$as_echo_n "checking whether to enable EPM for packing... " >&6; } if test "$enable_epm" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } if test "$_os" != "WINNT"; then if test -n "$with_epm"; then EPM=$with_epm else # Extract the first word of "epm", so it can be a program name with args. set dummy epm; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_EPM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $EPM in [\\/]* | ?:[\\/]*) @@ -11987,28 +13491,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_EPM="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_EPM" && ac_cv_path_EPM="no" ;; esac fi EPM=$ac_cv_path_EPM - if test -n "$EPM"; then - echo "$as_me:$LINENO: result: $EPM" >&5 -echo "${ECHO_T}$EPM" >&6 + { $as_echo "$as_me:$LINENO: result: $EPM" >&5 +$as_echo "$EPM" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test "$EPM" = "no" || test "$EPM" = "internal"; then echo "EPM will be built." @@ -12016,44 +13521,44 @@ fi BUILD_TYPE="$BUILD_TYPE EPM" else # Gentoo has some epm which is something different... - echo "$as_me:$LINENO: checking whether the found epm is the right epm" >&5 -echo $ECHO_N "checking whether the found epm is the right epm... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether the found epm is the right epm" >&5 +$as_echo_n "checking whether the found epm is the right epm... " >&6; } if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&5 -echo "$as_me: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&2;} + { { $as_echo "$as_me:$LINENO: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&5 +$as_echo "$as_me: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking epm version" >&5 -echo $ECHO_N "checking epm version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking epm version" >&5 +$as_echo_n "checking epm version... " >&6; } EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then - echo "$as_me:$LINENO: result: OK, >= 3.7" >&5 -echo "${ECHO_T}OK, >= 3.7" >&6 + { $as_echo "$as_me:$LINENO: result: OK, >= 3.7" >&5 +$as_echo "OK, >= 3.7" >&6; } BUILD_EPM=NO if test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking which PackageMaker EPM thinks to use" >&5 -echo $ECHO_N "checking which PackageMaker EPM thinks to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which PackageMaker EPM thinks to use" >&5 +$as_echo_n "checking which PackageMaker EPM thinks to use... " >&6; } _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1` if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then - { { echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 -echo "$as_me: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} + { { $as_echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 +$as_echo "$as_me: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} { (exit 1); exit 1; }; } elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then - echo "$as_me:$LINENO: result: $_pm, ok" >&5 -echo "${ECHO_T}$_pm, ok" >&6 + { $as_echo "$as_me:$LINENO: result: $_pm, ok" >&5 +$as_echo "$_pm, ok" >&6; } else # we never should get here, but go safe - { { echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 -echo "$as_me: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} + { { $as_echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 +$as_echo "$as_me: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} { (exit 1); exit 1; }; } fi fi else - echo "$as_me:$LINENO: result: too old. epm >= 3.7 is required." >&5 -echo "${ECHO_T}too old. epm >= 3.7 is required." >&6 + { $as_echo "$as_me:$LINENO: result: too old. epm >= 3.7 is required." >&5 +$as_echo "too old. epm >= 3.7 is required." >&6; } echo "EPM will be built." BUILD_EPM=YES BUILD_TYPE="$BUILD_TYPE EPM" @@ -12062,8 +13567,8 @@ echo "${ECHO_T}too old. epm >= 3.7 is required." >&6 fi # test which package format to use - echo "$as_me:$LINENO: checking which package format to use" >&5 -echo $ECHO_N "checking which package format to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which package format to use" >&5 +$as_echo_n "checking which package format to use... " >&6; } # defaults case "$_os" in @@ -12099,8 +13604,8 @@ echo $ECHO_N "checking which package format to use... $ECHO_C" >&6 # we never should get here since we check the arciecture/os at the beginning, # but go sure... *) - { { echo "$as_me:$LINENO: error: unknown system" >&5 -echo "$as_me: error: unknown system" >&2;} + { { $as_echo "$as_me:$LINENO: error: unknown system" >&5 +$as_echo "$as_me: error: unknown system" >&2;} { (exit 1); exit 1; }; } esac if test -n "$with_package_format"; then @@ -12109,7 +13614,7 @@ echo "$as_me: error: unknown system" >&2;} aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi) ;; *) - { { echo "$as_me:$LINENO: error: unsupported format $i. Supported by EPM are: + { { $as_echo "$as_me:$LINENO: error: unsupported format $i. Supported by EPM are: aix - AIX software distribution bsd - FreeBSD, NetBSD, or OpenBSD software distribution depot or swinstall - HP-UX software distribution @@ -12127,7 +13632,7 @@ dmg - Mac OS X .dmg installed - installation tree msi - Windows .msi " >&5 -echo "$as_me: error: unsupported format $i. Supported by EPM are: +$as_echo "$as_me: error: unsupported format $i. Supported by EPM are: aix - AIX software distribution bsd - FreeBSD, NetBSD, or OpenBSD software distribution depot or swinstall - HP-UX software distribution @@ -12151,11 +13656,11 @@ msi - Windows .msi done PKGFORMAT="$with_package_format" fi - echo "$as_me:$LINENO: result: $PKGFORMAT" >&5 -echo "${ECHO_T}$PKGFORMAT" >&6 + { $as_echo "$as_me:$LINENO: result: $PKGFORMAT" >&5 +$as_echo "$PKGFORMAT" >&6; } if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then - echo "$as_me:$LINENO: checking for rpm" >&5 -echo $ECHO_N "checking for rpm... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for rpm" >&5 +$as_echo_n "checking for rpm... " >&6; } for a in "$RPM" rpmbuild rpm; do $a --usage >/dev/null 2> /dev/null if test $? -eq 0; then @@ -12170,26 +13675,26 @@ echo $ECHO_N "checking for rpm... $ECHO_C" >&6 fi done if test -z "$RPM" ; then - { { echo "$as_me:$LINENO: error: not found" >&5 -echo "$as_me: error: not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: not found" >&5 +$as_echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then RPM_PATH=`which $RPM` - echo "$as_me:$LINENO: result: $RPM_PATH" >&5 -echo "${ECHO_T}$RPM_PATH" >&6 + { $as_echo "$as_me:$LINENO: result: $RPM_PATH" >&5 +$as_echo "$RPM_PATH" >&6; } else - { { echo "$as_me:$LINENO: error: cannot build packages. Try installing rpmbuild." >&5 -echo "$as_me: error: cannot build packages. Try installing rpmbuild." >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot build packages. Try installing rpmbuild." >&5 +$as_echo "$as_me: error: cannot build packages. Try installing rpmbuild." >&2;} { (exit 1); exit 1; }; } fi fi if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then # Extract the first word of "dpkg", so it can be a program name with args. set dummy dpkg; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_DPKG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $DPKG in [\\/]* | ?:[\\/]*) @@ -12202,49 +13707,50 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DPKG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_DPKG" && ac_cv_path_DPKG="no" ;; esac fi DPKG=$ac_cv_path_DPKG - if test -n "$DPKG"; then - echo "$as_me:$LINENO: result: $DPKG" >&5 -echo "${ECHO_T}$DPKG" >&6 + { $as_echo "$as_me:$LINENO: result: $DPKG" >&5 +$as_echo "$DPKG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$DPKG" = "no"; then - { { echo "$as_me:$LINENO: error: dpkg needed for deb creation. Install dpkg." >&5 -echo "$as_me: error: dpkg needed for deb creation. Install dpkg." >&2;} + { { $as_echo "$as_me:$LINENO: error: dpkg needed for deb creation. Install dpkg." >&5 +$as_echo "$as_me: error: dpkg needed for deb creation. Install dpkg." >&2;} { (exit 1); exit 1; }; } fi fi if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then if test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking for PackageMaker availability" >&5 -echo $ECHO_N "checking for PackageMaker availability... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for PackageMaker availability" >&5 +$as_echo_n "checking for PackageMaker availability... " >&6; } if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then - { { echo "$as_me:$LINENO: error: not installed. Please install Apples Dev Tools" >&5 -echo "$as_me: error: not installed. Please install Apples Dev Tools" >&2;} + { { $as_echo "$as_me:$LINENO: error: not installed. Please install Apples Dev Tools" >&5 +$as_echo "$as_me: error: not installed. Please install Apples Dev Tools" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } fi else - { { echo "$as_me:$LINENO: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&5 -echo "$as_me: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&2;} + { { $as_echo "$as_me:$LINENO: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&5 +$as_echo "$as_me: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&2;} { (exit 1); exit 1; }; } fi fi @@ -12252,30 +13758,30 @@ echo "$as_me: error: PackageMaker needed to build OSX packages and you are not o echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then if test "$EPM" != "no" && test "$EPM" != "internal"; then if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then - echo "$as_me:$LINENO: checking whether epm is patched for OOos needs" >&5 -echo $ECHO_N "checking whether epm is patched for OOos needs... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether epm is patched for OOos needs" >&5 +$as_echo_n "checking whether epm is patched for OOos needs... " >&6; } if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } if echo "$PKGFORMAT" | grep -q rpm; then _pt="rpm" - { echo "$as_me:$LINENO: WARNING: the rpms will need to be installed with --nodeps" >&5 -echo "$as_me: WARNING: the rpms will need to be installed with --nodeps" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: the rpms will need to be installed with --nodeps" >&5 +$as_echo "$as_me: WARNING: the rpms will need to be installed with --nodeps" >&2;} echo "the rpms will need to be installed with --nodeps" >> warn else _pt="pkg" fi - { echo "$as_me:$LINENO: WARNING: the ${_pt}s will not be relocateable" >&5 -echo "$as_me: WARNING: the ${_pt}s will not be relocateable" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: the ${_pt}s will not be relocateable" >&5 +$as_echo "$as_me: WARNING: the ${_pt}s will not be relocateable" >&2;} echo "the ${_pt}s will not be relocateable" >> warn - { echo "$as_me:$LINENO: WARNING: if you want to make sure installation without --nodeps and + { $as_echo "$as_me:$LINENO: WARNING: if you want to make sure installation without --nodeps and relocation will work, you need to patch your epm with the patch in epm/epm-3.7.patch or build with --with-epm=internal which will build a suitable epm" >&5 -echo "$as_me: WARNING: if you want to make sure installation without --nodeps and +$as_echo "$as_me: WARNING: if you want to make sure installation without --nodeps and relocation will work, you need to patch your epm with the patch in epm/epm-3.7.patch or build with --with-epm=internal which will build a suitable epm" >&2;} @@ -12286,10 +13792,10 @@ echo "$as_me: WARNING: if you want to make sure installation without --nodeps an if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then # Extract the first word of "pkgmk", so it can be a program name with args. set dummy pkgmk; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKGMK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PKGMK in [\\/]* | ?:[\\/]*) @@ -12302,31 +13808,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKGMK="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_PKGMK" && ac_cv_path_PKGMK="no" ;; esac fi PKGMK=$ac_cv_path_PKGMK - if test -n "$PKGMK"; then - echo "$as_me:$LINENO: result: $PKGMK" >&5 -echo "${ECHO_T}$PKGMK" >&6 + { $as_echo "$as_me:$LINENO: result: $PKGMK" >&5 +$as_echo "$PKGMK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$PKGMK" = "no"; then - { { echo "$as_me:$LINENO: error: pkgmk needed for Solaris pkg creation. Install it." >&5 -echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;} + { { $as_echo "$as_me:$LINENO: error: pkgmk needed for Solaris pkg creation. Install it." >&5 +$as_echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;} { (exit 1); exit 1; }; } fi fi @@ -12335,8 +13842,8 @@ echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;} else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } EPM=NO PKGFORMAT=native fi @@ -12345,10 +13852,10 @@ fi # Extract the first word of "gperf", so it can be a program name with args. set dummy gperf; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GPERF+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $GPERF in [\\/]* | ?:[\\/]*) @@ -12361,90 +13868,91 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GPERF="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi GPERF=$ac_cv_path_GPERF - if test -n "$GPERF"; then - echo "$as_me:$LINENO: result: $GPERF" >&5 -echo "${ECHO_T}$GPERF" >&6 + { $as_echo "$as_me:$LINENO: result: $GPERF" >&5 +$as_echo "$GPERF" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$GPERF"; then - { { echo "$as_me:$LINENO: error: gperf not found but needed. Install it." >&5 -echo "$as_me: error: gperf not found but needed. Install it." >&2;} + { { $as_echo "$as_me:$LINENO: error: gperf not found but needed. Install it." >&5 +$as_echo "$as_me: error: gperf not found but needed. Install it." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking gperf version" >&5 -echo $ECHO_N "checking gperf version... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking gperf version" >&5 +$as_echo_n "checking gperf version... " >&6; } if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: too old, you need at least 3.0.0" >&5 -echo "$as_me: error: too old, you need at least 3.0.0" >&2;} + { { $as_echo "$as_me:$LINENO: error: too old, you need at least 3.0.0" >&5 +$as_echo "$as_me: error: too old, you need at least 3.0.0" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking whether to build the stax" >&5 -echo $ECHO_N "checking whether to build the stax... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the stax" >&5 +$as_echo_n "checking whether to build the stax... " >&6; } if test -f "./stax/download/jsr173_1.0_api.jar"; then BUILD_STAX=NO - echo "$as_me:$LINENO: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 -echo "${ECHO_T}no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6 + { $as_echo "$as_me:$LINENO: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 +$as_echo "no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6; } else BUILD_STAX=YES - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi -echo "$as_me:$LINENO: checking whether to build the ODK" >&5 -echo $ECHO_N "checking whether to build the ODK... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the ODK" >&5 +$as_echo_n "checking whether to build the ODK... " >&6; } if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } if test "$WITH_JAVA" != "no"; then - echo "$as_me:$LINENO: checking for external/unowinreg/unowinreg.dll" >&5 -echo $ECHO_N "checking for external/unowinreg/unowinreg.dll... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for external/unowinreg/unowinreg.dll" >&5 +$as_echo_n "checking for external/unowinreg/unowinreg.dll... " >&6; } if ! test -f "./external/unowinreg/unowinreg.dll"; then HAVE_UNOWINREG_DLL=no else HAVE_UNOWINREG_DLL=yes fi if test "$HAVE_UNOWINREG_DLL" = "yes"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } BUILD_UNOWINREG=NO else if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: result: not found, will be built" >&5 -echo "${ECHO_T}not found, will be built" >&6 + { $as_echo "$as_me:$LINENO: result: not found, will be built" >&5 +$as_echo "not found, will be built" >&6; } else - { echo "$as_me:$LINENO: WARNING: not found, will be cross-built using mingw32" >&5 -echo "$as_me: WARNING: not found, will be cross-built using mingw32" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: not found, will be cross-built using mingw32" >&5 +$as_echo "$as_me: WARNING: not found, will be cross-built using mingw32" >&2;} fi BUILD_UNOWINREG=YES fi if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then - { { echo "$as_me:$LINENO: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. + { { $as_echo "$as_me:$LINENO: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. Specify mingw32 g++ executable name with --with-mingwin. Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and put it into external/unowinreg" >&5 -echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. +$as_echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. Specify mingw32 g++ executable name with --with-mingwin. Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and put it into external/unowinreg" >&2;} @@ -12456,10 +13964,10 @@ echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ compi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}$WITH_MINGWIN", so it can be a program name with args. set dummy ${ac_tool_prefix}$WITH_MINGWIN; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MINGWCXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$MINGWCXX"; then ac_cv_prog_MINGWCXX="$MINGWCXX" # Let the user override the test. @@ -12470,34 +13978,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MINGWCXX="${ac_tool_prefix}$WITH_MINGWIN" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi MINGWCXX=$ac_cv_prog_MINGWCXX if test -n "$MINGWCXX"; then - echo "$as_me:$LINENO: result: $MINGWCXX" >&5 -echo "${ECHO_T}$MINGWCXX" >&6 + { $as_echo "$as_me:$LINENO: result: $MINGWCXX" >&5 +$as_echo "$MINGWCXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_MINGWCXX"; then ac_ct_MINGWCXX=$MINGWCXX # Extract the first word of "$WITH_MINGWIN", so it can be a program name with args. set dummy $WITH_MINGWIN; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_MINGWCXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MINGWCXX"; then ac_cv_prog_ac_ct_MINGWCXX="$ac_ct_MINGWCXX" # Let the user override the test. @@ -12508,46 +14018,56 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MINGWCXX="$WITH_MINGWIN" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_MINGWCXX" && ac_cv_prog_ac_ct_MINGWCXX="false" fi fi ac_ct_MINGWCXX=$ac_cv_prog_ac_ct_MINGWCXX if test -n "$ac_ct_MINGWCXX"; then - echo "$as_me:$LINENO: result: $ac_ct_MINGWCXX" >&5 -echo "${ECHO_T}$ac_ct_MINGWCXX" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_MINGWCXX" >&5 +$as_echo "$ac_ct_MINGWCXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - MINGWCXX=$ac_ct_MINGWCXX + if test "x$ac_ct_MINGWCXX" = x; then + MINGWCXX="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MINGWCXX=$ac_ct_MINGWCXX + fi else MINGWCXX="$ac_cv_prog_MINGWCXX" fi fi if test "$MINGWCXX" = "false"; then - { { echo "$as_me:$LINENO: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&5 -echo "$as_me: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&2;} + { { $as_echo "$as_me:$LINENO: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&5 +$as_echo "$as_me: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking whether we are using the MinGW32 cross C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the MinGW32 cross C++ compiler... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether we are using the MinGW32 cross C++ compiler" >&5 +$as_echo_n "checking whether we are using the MinGW32 cross C++ compiler... " >&6; } if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then - { { echo "$as_me:$LINENO: error: no" >&5 -echo "$as_me: error: no" >&2;} + { { $as_echo "$as_me:$LINENO: error: no" >&5 +$as_echo "$as_me: error: no" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi if echo "$WITH_MINGWIN" | $EGREP -q "/"; then if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/)); fi @@ -12555,10 +14075,10 @@ echo "${ECHO_T}yes" >&6 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`", so it can be a program name with args. set dummy ${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MINGWSTRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$MINGWSTRIP"; then ac_cv_prog_MINGWSTRIP="$MINGWSTRIP" # Let the user override the test. @@ -12569,34 +14089,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MINGWSTRIP="${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi MINGWSTRIP=$ac_cv_prog_MINGWSTRIP if test -n "$MINGWSTRIP"; then - echo "$as_me:$LINENO: result: $MINGWSTRIP" >&5 -echo "${ECHO_T}$MINGWSTRIP" >&6 + { $as_echo "$as_me:$LINENO: result: $MINGWSTRIP" >&5 +$as_echo "$MINGWSTRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_MINGWSTRIP"; then ac_ct_MINGWSTRIP=$MINGWSTRIP # Extract the first word of "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`", so it can be a program name with args. set dummy `echo $WITH_MINGWIN | $SED -e s/g++/strip/`; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_MINGWSTRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MINGWSTRIP"; then ac_cv_prog_ac_ct_MINGWSTRIP="$ac_ct_MINGWSTRIP" # Let the user override the test. @@ -12607,38 +14129,48 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MINGWSTRIP="`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_MINGWSTRIP" && ac_cv_prog_ac_ct_MINGWSTRIP="false" fi fi ac_ct_MINGWSTRIP=$ac_cv_prog_ac_ct_MINGWSTRIP if test -n "$ac_ct_MINGWSTRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_MINGWSTRIP" >&5 -echo "${ECHO_T}$ac_ct_MINGWSTRIP" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_MINGWSTRIP" >&5 +$as_echo "$ac_ct_MINGWSTRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - MINGWSTRIP=$ac_ct_MINGWSTRIP + if test "x$ac_ct_MINGWSTRIP" = x; then + MINGWSTRIP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MINGWSTRIP=$ac_ct_MINGWSTRIP + fi else MINGWSTRIP="$ac_cv_prog_MINGWSTRIP" fi fi if test "$MINGWSTRIP" = "false"; then - { { echo "$as_me:$LINENO: error: MinGW32 binutils needed. Install them." >&5 -echo "$as_me: error: MinGW32 binutils needed. Install them." >&2;} + { { $as_echo "$as_me:$LINENO: error: MinGW32 binutils needed. Install them." >&5 +$as_echo "$as_me: error: MinGW32 binutils needed. Install them." >&2;} { (exit 1); exit 1; }; } fi - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -12657,10 +14189,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_LIBS=$LIBS LIBS="" -echo "$as_me:$LINENO: checking for main in -lkernel32" >&5 -echo $ECHO_N "checking for main in -lkernel32... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for main in -lkernel32" >&5 +$as_echo_n "checking for main in -lkernel32... " >&6; } if test "${ac_cv_lib_kernel32_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkernel32 $LIBS" @@ -12675,47 +14207,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_kernel32_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_kernel32_main=no + ac_cv_lib_kernel32_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_kernel32_main" >&5 -echo "${ECHO_T}$ac_cv_lib_kernel32_main" >&6 -if test $ac_cv_lib_kernel32_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_kernel32_main" >&5 +$as_echo "$ac_cv_lib_kernel32_main" >&6; } +if test "x$ac_cv_lib_kernel32_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBKERNEL32 1 _ACEOF @@ -12726,10 +14259,10 @@ fi ac_cv_lib_kernel32=ac_cv_lib_kernel32_main -echo "$as_me:$LINENO: checking for main in -ladvapi32" >&5 -echo $ECHO_N "checking for main in -ladvapi32... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for main in -ladvapi32" >&5 +$as_echo_n "checking for main in -ladvapi32... " >&6; } if test "${ac_cv_lib_advapi32_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ladvapi32 $LIBS" @@ -12744,47 +14277,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_advapi32_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_advapi32_main=no + ac_cv_lib_advapi32_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_advapi32_main" >&5 -echo "${ECHO_T}$ac_cv_lib_advapi32_main" >&6 -if test $ac_cv_lib_advapi32_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_advapi32_main" >&5 +$as_echo "$ac_cv_lib_advapi32_main" >&6; } +if test "x$ac_cv_lib_advapi32_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBADVAPI32 1 _ACEOF @@ -12795,17 +14329,17 @@ fi ac_cv_lib_advapi32=ac_cv_lib_advapi32_main if test "${ac_cv_header_windows_h+set}" = set; then - echo "$as_me:$LINENO: checking for windows.h" >&5 -echo $ECHO_N "checking for windows.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for windows.h" >&5 +$as_echo_n "checking for windows.h... " >&6; } if test "${ac_cv_header_windows_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 -echo "${ECHO_T}$ac_cv_header_windows_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 +$as_echo "$ac_cv_header_windows_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking windows.h usability" >&5 -echo $ECHO_N "checking windows.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking windows.h usability" >&5 +$as_echo_n "checking windows.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12816,41 +14350,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking windows.h presence" >&5 -echo $ECHO_N "checking windows.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking windows.h presence" >&5 +$as_echo_n "checking windows.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12859,83 +14390,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: windows.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: windows.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: windows.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: windows.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: windows.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: windows.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: windows.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: windows.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: windows.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: windows.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: windows.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: windows.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: windows.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: windows.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: windows.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: windows.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: windows.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: windows.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: windows.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: windows.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for windows.h" >&5 -echo $ECHO_N "checking for windows.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for windows.h" >&5 +$as_echo_n "checking for windows.h... " >&6; } if test "${ac_cv_header_windows_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_windows_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 -echo "${ECHO_T}$ac_cv_header_windows_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 +$as_echo "$ac_cv_header_windows_h" >&6; } fi -if test $ac_cv_header_windows_h = yes; then +if test "x$ac_cv_header_windows_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: windows.h missing" >&5 -echo "$as_me: error: windows.h missing" >&2;} + { { $as_echo "$as_me:$LINENO: error: windows.h missing" >&5 +$as_echo "$as_me: error: windows.h missing" >&2;} { (exit 1); exit 1; }; } fi @@ -12955,24 +14479,24 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi BUILD_TYPE="$BUILD_TYPE ODK" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } BUILD_UNOWINREG=NO fi -echo "$as_me:$LINENO: checking whether to provide libstdc++/libgcc_s in the installset" >&5 -echo $ECHO_N "checking whether to provide libstdc++/libgcc_s in the installset... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to provide libstdc++/libgcc_s in the installset" >&5 +$as_echo_n "checking whether to provide libstdc++/libgcc_s in the installset... " >&6; } if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ test "$with_system_stdlibs" != "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SYSTEM_STDLIBS=YES else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SYSTEM_STDLIBS=NO fi @@ -12980,25 +14504,25 @@ fi if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then with_system_zlib=yes fi -echo "$as_me:$LINENO: checking which zlib to use" >&5 -echo $ECHO_N "checking which zlib to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which zlib to use" >&5 +$as_echo_n "checking which zlib to use... " >&6; } if test -n "$with_system_zlib" -o -n "$with_system_libs" && \ test "$with_system_zlib" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_ZLIB=YES if test "${ac_cv_header_zlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 +$as_echo_n "checking for zlib.h... " >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +$as_echo "$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 +$as_echo_n "checking zlib.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13009,41 +14533,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 +$as_echo_n "checking zlib.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13052,91 +14573,84 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 +$as_echo_n "checking for zlib.h... " >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +$as_echo "$ac_cv_header_zlib_h" >&6; } fi -if test $ac_cv_header_zlib_h = yes; then +if test "x$ac_cv_header_zlib_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: zlib.h not found. install zlib" >&5 -echo "$as_me: error: zlib.h not found. install zlib" >&2;} + { { $as_echo "$as_me:$LINENO: error: zlib.h not found. install zlib" >&5 +$as_echo "$as_me: error: zlib.h not found. install zlib" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for deflate in -lz" >&5 -echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for deflate in -lz" >&5 +$as_echo_n "checking for deflate in -lz... " >&6; } if test "${ac_cv_lib_z_deflate+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -13147,91 +14661,92 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char deflate (); int main () { -deflate (); +return deflate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_z_deflate=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_z_deflate=no + ac_cv_lib_z_deflate=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 -echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6 -if test $ac_cv_lib_z_deflate = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 +$as_echo "$ac_cv_lib_z_deflate" >&6; } +if test "x$ac_cv_lib_z_deflate" = x""yes; then ZLIB=-lz else - { { echo "$as_me:$LINENO: error: zlib not found or functional" >&5 -echo "$as_me: error: zlib not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: zlib not found or functional" >&5 +$as_echo "$as_me: error: zlib not found or functional" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_ZLIB=NO BUILD_TYPE="$BUILD_TYPE ZLIB" fi -echo "$as_me:$LINENO: checking which jpeg to use" >&5 -echo $ECHO_N "checking which jpeg to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which jpeg to use" >&5 +$as_echo_n "checking which jpeg to use... " >&6; } if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ test "$with_system_jpeg" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_JPEG=YES if test "${ac_cv_header_jpeglib_h+set}" = set; then - echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +$as_echo_n "checking for jpeglib.h... " >&6; } if test "${ac_cv_header_jpeglib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 -echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +$as_echo "$ac_cv_header_jpeglib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 -echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 +$as_echo_n "checking jpeglib.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13242,41 +14757,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 -echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 +$as_echo_n "checking jpeglib.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13285,91 +14797,84 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +$as_echo_n "checking for jpeglib.h... " >&6; } if test "${ac_cv_header_jpeglib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_jpeglib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 -echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +$as_echo "$ac_cv_header_jpeglib_h" >&6; } fi -if test $ac_cv_header_jpeglib_h = yes; then +if test "x$ac_cv_header_jpeglib_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: jpeg.h not found. install libjpeg" >&5 -echo "$as_me: error: jpeg.h not found. install libjpeg" >&2;} + { { $as_echo "$as_me:$LINENO: error: jpeg.h not found. install libjpeg" >&5 +$as_echo "$as_me: error: jpeg.h not found. install libjpeg" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for jpeg_resync_to_restart in -ljpeg" >&5 -echo $ECHO_N "checking for jpeg_resync_to_restart in -ljpeg... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for jpeg_resync_to_restart in -ljpeg" >&5 +$as_echo_n "checking for jpeg_resync_to_restart in -ljpeg... " >&6; } if test "${ac_cv_lib_jpeg_jpeg_resync_to_restart+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" @@ -13380,90 +14885,91 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char jpeg_resync_to_restart (); int main () { -jpeg_resync_to_restart (); +return jpeg_resync_to_restart (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_jpeg_jpeg_resync_to_restart=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_jpeg_jpeg_resync_to_restart=no + ac_cv_lib_jpeg_jpeg_resync_to_restart=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_resync_to_restart" >&5 -echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_resync_to_restart" >&6 -if test $ac_cv_lib_jpeg_jpeg_resync_to_restart = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_resync_to_restart" >&5 +$as_echo "$ac_cv_lib_jpeg_jpeg_resync_to_restart" >&6; } +if test "x$ac_cv_lib_jpeg_jpeg_resync_to_restart" = x""yes; then JPEG3RDLIB=-ljpeg else - echo "$as_me:$LINENO: checking jpeg library not found or fuctional" >&5 -echo $ECHO_N "checking jpeg library not found or fuctional... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking jpeg library not found or fuctional" >&5 +$as_echo_n "checking jpeg library not found or fuctional... " >&6; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_JPEG=NO BUILD_TYPE="$BUILD_TYPE JPEG" fi -echo "$as_me:$LINENO: checking which expat to use" >&5 -echo $ECHO_N "checking which expat to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which expat to use" >&5 +$as_echo_n "checking which expat to use... " >&6; } if test -n "$with_system_expat" -o -n "$with_system_libs" && \ test "$with_system_expat" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_EXPAT=YES if test "${ac_cv_header_expat_h+set}" = set; then - echo "$as_me:$LINENO: checking for expat.h" >&5 -echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for expat.h" >&5 +$as_echo_n "checking for expat.h... " >&6; } if test "${ac_cv_header_expat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -echo "${ECHO_T}$ac_cv_header_expat_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 +$as_echo "$ac_cv_header_expat_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking expat.h usability" >&5 -echo $ECHO_N "checking expat.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking expat.h usability" >&5 +$as_echo_n "checking expat.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13474,41 +14980,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking expat.h presence" >&5 -echo $ECHO_N "checking expat.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking expat.h presence" >&5 +$as_echo_n "checking expat.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13517,92 +15020,85 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: expat.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: expat.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for expat.h" >&5 -echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for expat.h" >&5 +$as_echo_n "checking for expat.h... " >&6; } if test "${ac_cv_header_expat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_expat_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -echo "${ECHO_T}$ac_cv_header_expat_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 +$as_echo "$ac_cv_header_expat_h" >&6; } fi -if test $ac_cv_header_expat_h = yes; then +if test "x$ac_cv_header_expat_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: expat.h not found. install expat" >&5 -echo "$as_me: error: expat.h not found. install expat" >&2;} + { { $as_echo "$as_me:$LINENO: error: expat.h not found. install expat" >&5 +$as_echo "$as_me: error: expat.h not found. install expat" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5 -echo $ECHO_N "checking for XML_ParserCreate in -lexpat... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5 +$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; } if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" @@ -13613,57 +15109,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XML_ParserCreate (); int main () { -XML_ParserCreate (); +return XML_ParserCreate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_expat_XML_ParserCreate=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_expat_XML_ParserCreate=no + ac_cv_lib_expat_XML_ParserCreate=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 -echo "${ECHO_T}$ac_cv_lib_expat_XML_ParserCreate" >&6 -if test $ac_cv_lib_expat_XML_ParserCreate = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 +$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; } +if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXPAT 1 _ACEOF @@ -13671,35 +15168,35 @@ _ACEOF LIBS="-lexpat $LIBS" else - echo "$as_me:$LINENO: result: expat library not found or functional." >&5 -echo "${ECHO_T}expat library not found or functional." >&6 + { $as_echo "$as_me:$LINENO: result: expat library not found or functional." >&5 +$as_echo "expat library not found or functional." >&6; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_EXPAT=NO BUILD_TYPE="$BUILD_TYPE EXPAT" fi -echo "$as_me:$LINENO: checking which libwpd to use" >&5 -echo $ECHO_N "checking which libwpd to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which libwpd to use" >&5 +$as_echo_n "checking which libwpd to use... " >&6; } if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \ test "$with_system_libwpd" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LIBWPD=YES - succeeded=no - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -13712,114 +15209,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libwpd-0.8 " >&5 -echo $ECHO_N "checking for libwpd-0.8 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "libwpd-0.8 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking LIBWPD_CFLAGS" >&5 -echo $ECHO_N "checking LIBWPD_CFLAGS... $ECHO_C" >&6 - LIBWPD_CFLAGS=`$PKG_CONFIG --cflags "libwpd-0.8 "` - echo "$as_me:$LINENO: result: $LIBWPD_CFLAGS" >&5 -echo "${ECHO_T}$LIBWPD_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking LIBWPD_LIBS" >&5 -echo $ECHO_N "checking LIBWPD_LIBS... $ECHO_C" >&6 - LIBWPD_LIBS=`$PKG_CONFIG --libs "libwpd-0.8 "` - echo "$as_me:$LINENO: result: $LIBWPD_LIBS" >&5 -echo "${ECHO_T}$LIBWPD_LIBS" >&6 - else - LIBWPD_CFLAGS="" - LIBWPD_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBWPD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libwpd-0.8 "` - echo $LIBWPD_PKG_ERRORS - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } - fi -else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - SYSTEM_LIBWPD=NO - BUILD_TYPE="$BUILD_TYPE LIBWPD" fi - - - - -echo "$as_me:$LINENO: checking which cppunit to use" >&5 -echo $ECHO_N "checking which cppunit to use... $ECHO_C" >&6 -if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ - test "$with_system_cppunit" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 - SYSTEM_CPPUNIT=YES - # might work for earlier, too but go sure: - - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - case $PKG_CONFIG in + case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -13828,193 +15252,427 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - -if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for cppunit >= 1.12.0 " >&5 -echo $ECHO_N "checking for cppunit >= 1.12.0 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "cppunit >= 1.12.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking CPPUNIT_CFLAGS" >&5 -echo $ECHO_N "checking CPPUNIT_CFLAGS... $ECHO_C" >&6 - CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.12.0 "` - echo "$as_me:$LINENO: result: $CPPUNIT_CFLAGS" >&5 -echo "${ECHO_T}$CPPUNIT_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking CPPUNIT_LIBS" >&5 -echo $ECHO_N "checking CPPUNIT_LIBS... $ECHO_C" >&6 - CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.12.0 "` - echo "$as_me:$LINENO: result: $CPPUNIT_LIBS" >&5 -echo "${ECHO_T}$CPPUNIT_LIBS" >&6 - else - CPPUNIT_CFLAGS="" - CPPUNIT_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cppunit >= 1.12.0 "` - echo $CPPUNIT_PKG_ERRORS - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - : + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" else - { { echo "$as_me:$LINENO: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG fi - else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - SYSTEM_CPPUNIT=NO - BUILD_TYPE="$BUILD_TYPE CPPUNIT" + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for LIBWPD" >&5 +$as_echo_n "checking for LIBWPD... " >&6; } -if test "$test_freetype" = "yes"; then - echo "$as_me:$LINENO: checking whether freetype is available" >&5 -echo $ECHO_N "checking whether freetype is available... $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$LIBWPD_CFLAGS"; then + pkg_cv_LIBWPD_CFLAGS="$LIBWPD_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libwpd-0.8 \"") >&5 + ($PKG_CONFIG --exists --print-errors "libwpd-0.8 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBWPD_CFLAGS=`$PKG_CONFIG --cflags "libwpd-0.8 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$LIBWPD_LIBS"; then + pkg_cv_LIBWPD_LIBS="$LIBWPD_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libwpd-0.8 \"") >&5 + ($PKG_CONFIG --exists --print-errors "libwpd-0.8 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBWPD_LIBS=`$PKG_CONFIG --libs "libwpd-0.8 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi - succeeded=no - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBWPD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libwpd-0.8 "` + else + LIBWPD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libwpd-0.8 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBWPD_PKG_ERRORS" >&5 - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + { { $as_echo "$as_me:$LINENO: error: Package requirements (libwpd-0.8 ) were not met: + +$LIBWPD_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBWPD_CFLAGS +and LIBWPD_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libwpd-0.8 ) were not met: + +$LIBWPD_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBWPD_CFLAGS +and LIBWPD_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBWPD_CFLAGS +and LIBWPD_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBWPD_CFLAGS +and LIBWPD_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + LIBWPD_CFLAGS=$pkg_cv_LIBWPD_CFLAGS + LIBWPD_LIBS=$pkg_cv_LIBWPD_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi +else + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_LIBWPD=NO + BUILD_TYPE="$BUILD_TYPE LIBWPD" fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG + + + +{ $as_echo "$as_me:$LINENO: checking which cppunit to use" >&5 +$as_echo_n "checking which cppunit to use... " >&6; } +if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ + test "$with_system_cppunit" != "no"; then + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_CPPUNIT=YES + # might work for earlier, too but go sure: + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for CPPUNIT" >&5 +$as_echo_n "checking for CPPUNIT... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$CPPUNIT_CFLAGS"; then + pkg_cv_CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.12.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "cppunit >= 1.12.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.12.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$CPPUNIT_LIBS"; then + pkg_cv_CPPUNIT_LIBS="$CPPUNIT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.12.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "cppunit >= 1.12.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.12.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for freetype2 >= 2.0 " >&5 -echo $ECHO_N "checking for freetype2 >= 2.0 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "freetype2 >= 2.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5 -echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6 - FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.0 "` - echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5 -echo "${ECHO_T}$FREETYPE_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5 -echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6 - FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.0 "` - echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5 -echo "${ECHO_T}$FREETYPE_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cppunit >= 1.12.0 "` else - FREETYPE_CFLAGS="" - FREETYPE_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 2.0 "` - echo $FREETYPE_PKG_ERRORS + CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cppunit >= 1.12.0 "` fi + # Put the nasty error message in config.log where it belongs + echo "$CPPUNIT_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (cppunit >= 1.12.0 ) were not met: +$CPPUNIT_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables CPPUNIT_CFLAGS +and CPPUNIT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (cppunit >= 1.12.0 ) were not met: + +$CPPUNIT_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables CPPUNIT_CFLAGS +and CPPUNIT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables CPPUNIT_CFLAGS +and CPPUNIT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables CPPUNIT_CFLAGS +and CPPUNIT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + CPPUNIT_CFLAGS=$pkg_cv_CPPUNIT_CFLAGS + CPPUNIT_LIBS=$pkg_cv_CPPUNIT_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi +else + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_CPPUNIT=NO + BUILD_TYPE="$BUILD_TYPE CPPUNIT" +fi + + + + +if test "$test_freetype" = "yes"; then + { $as_echo "$as_me:$LINENO: checking whether freetype is available" >&5 +$as_echo_n "checking whether freetype is available... " >&6; } + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for FREETYPE" >&5 +$as_echo_n "checking for FREETYPE... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FREETYPE_CFLAGS"; then + pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FREETYPE_LIBS"; then + pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2 >= 2.0 "` + else + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 2.0 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$FREETYPE_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements (freetype2 >= 2.0 ) were not met: + +$FREETYPE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables FREETYPE_CFLAGS +and FREETYPE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (freetype2 >= 2.0 ) were not met: + +$FREETYPE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables FREETYPE_CFLAGS +and FREETYPE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables FREETYPE_CFLAGS +and FREETYPE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables FREETYPE_CFLAGS +and FREETYPE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS + FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi fi @@ -14025,10 +15683,10 @@ if test "$test_freetype" = "yes"; then save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" LDFLAGS="$LDFLAGS $FREETYPE_LIBS" - echo "$as_me:$LINENO: checking for FT_GlyphSlot_Embolden in -lfreetype" >&5 -echo $ECHO_N "checking for FT_GlyphSlot_Embolden in -lfreetype... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for FT_GlyphSlot_Embolden in -lfreetype" >&5 +$as_echo_n "checking for FT_GlyphSlot_Embolden in -lfreetype... " >&6; } if test "${ac_cv_lib_freetype_FT_GlyphSlot_Embolden+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfreetype $LIBS" @@ -14039,57 +15697,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char FT_GlyphSlot_Embolden (); int main () { -FT_GlyphSlot_Embolden (); +return FT_GlyphSlot_Embolden (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_freetype_FT_GlyphSlot_Embolden=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no + ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&5 -echo "${ECHO_T}$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&6 -if test $ac_cv_lib_freetype_FT_GlyphSlot_Embolden = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&5 +$as_echo "$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&6; } +if test "x$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" = x""yes; then USE_FT_EMBOLDEN="YES" else USE_FT_EMBOLDEN="NO" @@ -14122,136 +15781,151 @@ if test -n "$with_system_libxml" -o -n "$with_system_libs" && \ fi fi -echo "$as_me:$LINENO: checking which libxslt to use" >&5 -echo $ECHO_N "checking which libxslt to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which libxslt to use" >&5 +$as_echo_n "checking which libxslt to use... " >&6; } if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ test "$with_system_libxslt" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LIBXSLT=YES if test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 -echo $ECHO_N "checking LIBXSLT_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 +$as_echo_n "checking LIBXSLT_CFLAGS... " >&6; } LIBXSLT_CFLAGS=`xslt-config --cflags` - echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 -echo "${ECHO_T}$LIBXSLT_CFLAGS" >&6 - echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 -echo $ECHO_N "checking LIBXSLT_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 +$as_echo "$LIBXSLT_CFLAGS" >&6; } + { $as_echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 +$as_echo_n "checking LIBXSLT_LIBS... " >&6; } LIBXSLT_LIBS=`xslt-config --libs` - echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 -echo "${ECHO_T}$LIBXSLT_LIBS" >&6 + { $as_echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 +$as_echo "$LIBXSLT_LIBS" >&6; } else - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for LIBXSLT" >&5 +$as_echo_n "checking for LIBXSLT... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$LIBXSLT_CFLAGS"; then + pkg_cv_LIBXSLT_CFLAGS="$LIBXSLT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxslt\"") >&5 + ($PKG_CONFIG --exists --print-errors "libxslt") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBXSLT_CFLAGS=`$PKG_CONFIG --cflags "libxslt" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$LIBXSLT_LIBS"; then + pkg_cv_LIBXSLT_LIBS="$LIBXSLT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxslt\"") >&5 + ($PKG_CONFIG --exists --print-errors "libxslt") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBXSLT_LIBS=`$PKG_CONFIG --libs "libxslt" 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libxslt" >&5 -echo $ECHO_N "checking for libxslt... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "libxslt" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 -echo $ECHO_N "checking LIBXSLT_CFLAGS... $ECHO_C" >&6 - LIBXSLT_CFLAGS=`$PKG_CONFIG --cflags "libxslt"` - echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 -echo "${ECHO_T}$LIBXSLT_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 -echo $ECHO_N "checking LIBXSLT_LIBS... $ECHO_C" >&6 - LIBXSLT_LIBS=`$PKG_CONFIG --libs "libxslt"` - echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 -echo "${ECHO_T}$LIBXSLT_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBXSLT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxslt"` else - LIBXSLT_CFLAGS="" - LIBXSLT_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBXSLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxslt"` - echo $LIBXSLT_PKG_ERRORS + LIBXSLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxslt"` fi + # Put the nasty error message in config.log where it belongs + echo "$LIBXSLT_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (libxslt) were not met: +$LIBXSLT_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables LIBXSLT_CFLAGS +and LIBXSLT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libxslt) were not met: + +$LIBXSLT_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBXSLT_CFLAGS +and LIBXSLT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBXSLT_CFLAGS +and LIBXSLT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBXSLT_CFLAGS +and LIBXSLT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + LIBXSLT_CFLAGS=$pkg_cv_LIBXSLT_CFLAGS + LIBXSLT_LIBS=$pkg_cv_LIBXSLT_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi fi # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XSLTPROC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $XSLTPROC in [\\/]* | ?:[\\/]*) @@ -14264,36 +15938,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="no" ;; esac fi XSLTPROC=$ac_cv_path_XSLTPROC - if test -n "$XSLTPROC"; then - echo "$as_me:$LINENO: result: $XSLTPROC" >&5 -echo "${ECHO_T}$XSLTPROC" >&6 + { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$XSLTPROC" = "no"; then - { { echo "$as_me:$LINENO: error: xsltproc is required" >&5 -echo "$as_me: error: xsltproc is required" >&2;} + { { $as_echo "$as_me:$LINENO: error: xsltproc is required" >&5 +$as_echo "$as_me: error: xsltproc is required" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LIBXSLT=NO BUILD_TYPE="$BUILD_TYPE LIBXSLT" fi @@ -14302,132 +15977,147 @@ fi -echo "$as_me:$LINENO: checking which libxml to use" >&5 -echo $ECHO_N "checking which libxml to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which libxml to use" >&5 +$as_echo_n "checking which libxml to use... " >&6; } if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ test "$with_system_libxml" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LIBXML=YES if test "$_os" = "Darwin"; then - echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 -echo $ECHO_N "checking LIBXML_CFLAGS... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 +$as_echo_n "checking LIBXML_CFLAGS... " >&6; } LIBXML_CFLAGS=`xml2-config --cflags` - echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 -echo "${ECHO_T}$LIBXML_CFLAGS" >&6 - echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 -echo $ECHO_N "checking LIBXML_LIBS... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 +$as_echo "$LIBXML_CFLAGS" >&6; } + { $as_echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 +$as_echo_n "checking LIBXML_LIBS... " >&6; } LIBXML_LIBS=`xml2-config --libs` - echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 -echo "${ECHO_T}$LIBXML_LIBS" >&6 + { $as_echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 +$as_echo "$LIBXML_LIBS" >&6; } else - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for LIBXML" >&5 +$as_echo_n "checking for LIBXML... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$LIBXML_CFLAGS"; then + pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$LIBXML_LIBS"; then + pkg_cv_LIBXML_LIBS="$LIBXML_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libxml-2.0 >= 2.0" >&5 -echo $ECHO_N "checking for libxml-2.0 >= 2.0... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "libxml-2.0 >= 2.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 -echo $ECHO_N "checking LIBXML_CFLAGS... $ECHO_C" >&6 - LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0"` - echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 -echo "${ECHO_T}$LIBXML_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 -echo $ECHO_N "checking LIBXML_LIBS... $ECHO_C" >&6 - LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0"` - echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 -echo "${ECHO_T}$LIBXML_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0 >= 2.0"` else - LIBXML_CFLAGS="" - LIBXML_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBXML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.0"` - echo $LIBXML_PKG_ERRORS + LIBXML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.0"` fi + # Put the nasty error message in config.log where it belongs + echo "$LIBXML_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (libxml-2.0 >= 2.0) were not met: +$LIBXML_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables LIBXML_CFLAGS +and LIBXML_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libxml-2.0 >= 2.0) were not met: + +$LIBXML_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBXML_CFLAGS +and LIBXML_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBXML_CFLAGS +and LIBXML_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBXML_CFLAGS +and LIBXML_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS + LIBXML_LIBS=$pkg_cv_LIBXML_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi fi BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LIBXML=NO BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" fi @@ -14435,27 +16125,27 @@ fi -echo "$as_me:$LINENO: checking which python to use" >&5 -echo $ECHO_N "checking which python to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which python to use" >&5 +$as_echo_n "checking which python to use... " >&6; } if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then with_system_python=yes - echo "$as_me:$LINENO: result: compiling against MacOSX10.4u.sdk (python version 2.3)" >&5 -echo "${ECHO_T}compiling against MacOSX10.4u.sdk (python version 2.3)" >&6 + { $as_echo "$as_me:$LINENO: result: compiling against MacOSX10.4u.sdk (python version 2.3)" >&5 +$as_echo "compiling against MacOSX10.4u.sdk (python version 2.3)" >&6; } PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3" PYTHON_LIBS="-framework Python" elif test -n "$with_system_python" -o -n "$with_system_libs" && \ test "$with_system_python" != "no"; then with_system_python=yes - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.2" >&5 -echo $ECHO_N "checking whether $PYTHON version >= 2.2... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.2" >&5 +$as_echo_n "checking whether $PYTHON version >= 2.2... " >&6; } prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. @@ -14468,11 +16158,11 @@ sys.exit(sys.hexversion < minverhex)" ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: too old" >&5 -echo "$as_me: error: too old" >&2;} + { { $as_echo "$as_me:$LINENO: error: too old" >&5 +$as_echo "$as_me: error: too old" >&2;} { (exit 1); exit 1; }; } fi @@ -14480,13 +16170,13 @@ fi else # Otherwise, try each interpreter until we find one that satisfies # VERSION. - echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.2" >&5 -echo $ECHO_N "checking for a Python interpreter with version >= 2.2... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.2" >&5 +$as_echo_n "checking for a Python interpreter with version >= 2.2... " >&6; } if test "${am_cv_pathless_PYTHON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do + for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros @@ -14505,18 +16195,18 @@ fi done fi -echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5 -echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6 +{ $as_echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) @@ -14529,48 +16219,49 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON - if test -n "$PYTHON"; then - echo "$as_me:$LINENO: result: $PYTHON" >&5 -echo "${ECHO_T}$PYTHON" >&6 + { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then - { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 -echo "$as_me: error: no suitable Python interpreter found" >&2;} + { { $as_echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 +$as_echo "$as_me: error: no suitable Python interpreter found" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 -echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } if test "${am_cv_python_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi -echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 -echo "${ECHO_T}$am_cv_python_version" >&6 +{ $as_echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version @@ -14581,30 +16272,43 @@ echo "${ECHO_T}$am_cv_python_version" >&6 - echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 -echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if test "${am_cv_python_platform+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi -echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 -echo "${ECHO_T}$am_cv_python_platform" >&6 +{ $as_echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform - echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 -echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if test "${am_cv_python_pythondir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + esac + fi -echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 -echo "${ECHO_T}$am_cv_python_pythondir" >&6 +{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir @@ -14612,16 +16316,29 @@ echo "${ECHO_T}$am_cv_python_pythondir" >&6 pkgpythondir=\${pythondir}/$PACKAGE - echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 -echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if test "${am_cv_python_pyexecdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || - echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || + echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + esac + fi -echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 -echo "${ECHO_T}$am_cv_python_pyexecdir" >&6 +{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir @@ -14644,17 +16361,17 @@ if test "$with_system_python" = "yes" ; then save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" if test "${ac_cv_header_Python_h+set}" = set; then - echo "$as_me:$LINENO: checking for Python.h" >&5 -echo $ECHO_N "checking for Python.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for Python.h" >&5 +$as_echo_n "checking for Python.h... " >&6; } if test "${ac_cv_header_Python_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 -echo "${ECHO_T}$ac_cv_header_Python_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 +$as_echo "$ac_cv_header_Python_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking Python.h usability" >&5 -echo $ECHO_N "checking Python.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking Python.h usability" >&5 +$as_echo_n "checking Python.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14665,41 +16382,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking Python.h presence" >&5 -echo $ECHO_N "checking Python.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking Python.h presence" >&5 +$as_echo_n "checking Python.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14708,83 +16422,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: Python.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: Python.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Python.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: Python.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for Python.h" >&5 -echo $ECHO_N "checking for Python.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for Python.h" >&5 +$as_echo_n "checking for Python.h... " >&6; } if test "${ac_cv_header_Python_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_Python_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 -echo "${ECHO_T}$ac_cv_header_Python_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 +$as_echo "$ac_cv_header_Python_h" >&6; } fi -if test $ac_cv_header_Python_h = yes; then +if test "x$ac_cv_header_Python_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Python headers not found" >&5 -echo "$as_me: error: Python headers not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: Python headers not found" >&5 +$as_echo "$as_me: error: Python headers not found" >&2;} { (exit 1); exit 1; }; } fi @@ -14793,8 +16500,8 @@ fi else SYSTEM_PYTHON=NO BUILD_TYPE="$BUILD_TYPE PYTHON" - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } # Embedded python dies without Home set if test "z$HOME" = "z"; then export HOME=""; @@ -14803,10 +16510,10 @@ echo "${ECHO_T}internal" >&6 if test -z "$BZIP2"; then # Extract the first word of "bzip2", so it can be a program name with args. set dummy bzip2; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_BZIP2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $BZIP2 in [\\/]* | ?:[\\/]*) @@ -14819,30 +16526,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi BZIP2=$ac_cv_path_BZIP2 - if test -n "$BZIP2"; then - echo "$as_me:$LINENO: result: $BZIP2" >&5 -echo "${ECHO_T}$BZIP2" >&6 + { $as_echo "$as_me:$LINENO: result: $BZIP2" >&5 +$as_echo "$BZIP2" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$BZIP2"; then - { { echo "$as_me:$LINENO: error: the internal Python module has a .tar.bz2. You need bzip2" >&5 -echo "$as_me: error: the internal Python module has a .tar.bz2. You need bzip2" >&2;} + { { $as_echo "$as_me:$LINENO: error: the internal Python module has a .tar.bz2. You need bzip2" >&5 +$as_echo "$as_me: error: the internal Python module has a .tar.bz2. You need bzip2" >&2;} { (exit 1); exit 1; }; } fi fi @@ -14853,17 +16561,17 @@ fi HOME=`echo $HOME | sed 's:\\\\:/:g'` -echo "$as_me:$LINENO: checking which db to use" >&5 -echo $ECHO_N "checking which db to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which db to use" >&5 +$as_echo_n "checking which db to use... " >&6; } if test -n "$with_system_db" -o -n "$with_system_libs" && \ test "$with_system_db" != "no"; then SYSTEM_DB=YES - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 - echo "$as_me:$LINENO: checking for db.h" >&5 -echo $ECHO_N "checking for db.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } + { $as_echo "$as_me:$LINENO: checking for db.h" >&5 +$as_echo_n "checking for db.h... " >&6; } if test "${ac_cv_header_db_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14877,47 +16585,44 @@ cat >>conftest.$ac_ext <<_ACEOF #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_db_h=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_db_h=no + ac_cv_header_db_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 -echo "${ECHO_T}$ac_cv_header_db_h" >&6 -if test $ac_cv_header_db_h = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 +$as_echo "$ac_cv_header_db_h" >&6; } +if test "x$ac_cv_header_db_h" = x""yes; then DB_INCLUDES=/usr/include else CFLAGS=-I/usr/include/db4 - echo "$as_me:$LINENO: checking for db4/db.h" >&5 -echo $ECHO_N "checking for db4/db.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for db4/db.h" >&5 +$as_echo_n "checking for db4/db.h... " >&6; } if test "${ac_cv_header_db4_db_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14930,43 +16635,40 @@ cat >>conftest.$ac_ext <<_ACEOF #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_db4_db_h=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_db4_db_h=no + ac_cv_header_db4_db_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_db4_db_h" >&5 -echo "${ECHO_T}$ac_cv_header_db4_db_h" >&6 -if test $ac_cv_header_db4_db_h = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db4_db_h" >&5 +$as_echo "$ac_cv_header_db4_db_h" >&6; } +if test "x$ac_cv_header_db4_db_h" = x""yes; then DB_INCLUDES=/usr/include/db4 else - { { echo "$as_me:$LINENO: error: no. install the db4 libraries" >&5 -echo "$as_me: error: no. install the db4 libraries" >&2;} + { { $as_echo "$as_me:$LINENO: error: no. install the db4 libraries" >&5 +$as_echo "$as_me: error: no. install the db4 libraries" >&2;} { (exit 1); exit 1; }; } fi @@ -14975,14 +16677,16 @@ fi fi - echo "$as_me:$LINENO: checking whether db is at least 4.1" >&5 -echo $ECHO_N "checking whether db is at least 4.1... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether db is at least 4.1" >&5 +$as_echo_n "checking whether db is at least 4.1... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -15000,35 +16704,49 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: no. you need at least db 4.1" >&5 -echo "$as_me: error: no. you need at least db 4.1" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no. you need at least db 4.1" >&5 +$as_echo "$as_me: error: no. you need at least db 4.1" >&2;} { (exit 1); exit 1; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: checking for main in -ldb" >&5 -echo $ECHO_N "checking for main in -ldb... $ECHO_C" >&6 + + +{ $as_echo "$as_me:$LINENO: checking for main in -ldb" >&5 +$as_echo_n "checking for main in -ldb... " >&6; } if test "${ac_cv_lib_db_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldb $LIBS" @@ -15043,47 +16761,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_db_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_db_main=no + ac_cv_lib_db_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_db_main" >&5 -echo "${ECHO_T}$ac_cv_lib_db_main" >&6 -if test $ac_cv_lib_db_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_db_main" >&5 +$as_echo "$ac_cv_lib_db_main" >&6; } +if test "x$ac_cv_lib_db_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDB 1 _ACEOF @@ -15091,16 +16810,16 @@ _ACEOF LIBS="-ldb $LIBS" else - { { echo "$as_me:$LINENO: error: db not installed or functional" >&5 -echo "$as_me: error: db not installed or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: db not installed or functional" >&5 +$as_echo "$as_me: error: db not installed or functional" >&2;} { (exit 1); exit 1; }; } fi ac_cv_lib_db=ac_cv_lib_db_main SCPDEFS="$SCPDEFS -DSYSTEM_DB" else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_DB=NO BUILD_TYPE="$BUILD_TYPE BERKELEYDB" fi @@ -15109,22 +16828,22 @@ fi -echo "$as_me:$LINENO: checking which lucene to use" >&5 -echo $ECHO_N "checking which lucene to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which lucene to use" >&5 +$as_echo_n "checking which lucene to use... " >&6; } if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LUCENE=YES if test -z $LUCENE_CORE_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core-2.3.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene-core-2.3.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core-2.3.jar" >&5 +$as_echo_n "checking for /usr/share/java/lucene-core-2.3.jar... " >&6; } if test "${ac_cv_file__usr_share_java_lucene_core_2_3_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene-core-2.3.jar"; then ac_cv_file__usr_share_java_lucene_core_2_3_jar=yes @@ -15132,20 +16851,20 @@ else ac_cv_file__usr_share_java_lucene_core_2_3_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_core_2_3_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_lucene_core_2_3_jar" = x""yes; then LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene-core.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core.jar" >&5 +$as_echo_n "checking for /usr/share/java/lucene-core.jar... " >&6; } if test "${ac_cv_file__usr_share_java_lucene_core_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene-core.jar"; then ac_cv_file__usr_share_java_lucene_core_jar=yes @@ -15153,19 +16872,19 @@ else ac_cv_file__usr_share_java_lucene_core_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_core_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_core_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_lucene_core_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_lucene_core_jar" = x""yes; then LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/lucene.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene.jar" >&5 +$as_echo_n "checking for /usr/share/java/lucene.jar... " >&6; } if test "${ac_cv_file__usr_share_java_lucene_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene.jar"; then ac_cv_file__usr_share_java_lucene_jar=yes @@ -15173,13 +16892,13 @@ else ac_cv_file__usr_share_java_lucene_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_lucene_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_lucene_jar" = x""yes; then LUCENE_CORE_JAR=/usr/share/java/lucene.jar else - { { echo "$as_me:$LINENO: error: lucene-core.jar replacement not found" >&5 -echo "$as_me: error: lucene-core.jar replacement not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: lucene-core.jar replacement not found" >&5 +$as_echo "$as_me: error: lucene-core.jar replacement not found" >&2;} { (exit 1); exit 1; }; } fi @@ -15193,15 +16912,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 -echo $ECHO_N "checking for $LUCENE_CORE_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 +$as_echo_n "checking for $LUCENE_CORE_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LUCENE_CORE_JAR"; then eval "$as_ac_File=yes" @@ -15209,27 +16928,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: lucene-core.jar not found." >&5 -echo "$as_me: error: lucene-core.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: lucene-core.jar not found." >&5 +$as_echo "$as_me: error: lucene-core.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LUCENE_ANALYZERS_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/lucene-analyzers-2.3.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene-analyzers-2.3.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-analyzers-2.3.jar" >&5 +$as_echo_n "checking for /usr/share/java/lucene-analyzers-2.3.jar... " >&6; } if test "${ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene-analyzers-2.3.jar"; then ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar=yes @@ -15237,20 +16960,20 @@ else ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" = x""yes; then LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar" >&5 +$as_echo_n "checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar... " >&6; } if test "${ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene-contrib/lucene-analyzers.jar"; then ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar=yes @@ -15258,13 +16981,13 @@ else ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&6 -if test $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" = x""yes; then LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar else - { { echo "$as_me:$LINENO: error: lucene-analyzers.jar replacement not found." >&5 -echo "$as_me: error: lucene-analyzers.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: lucene-analyzers.jar replacement not found." >&5 +$as_echo "$as_me: error: lucene-analyzers.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -15274,15 +16997,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 -echo $ECHO_N "checking for $LUCENE_CORE_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 +$as_echo_n "checking for $LUCENE_CORE_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LUCENE_CORE_JAR"; then eval "$as_ac_File=yes" @@ -15290,19 +17013,23 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: lucene-analyzers.jar not found." >&5 -echo "$as_me: error: lucene-analyzers.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: lucene-analyzers.jar not found." >&5 +$as_echo "$as_me: error: lucene-analyzers.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi - echo "$as_me:$LINENO: checking whether lucene is version 2.x" >&5 -echo $ECHO_N "checking whether lucene is version 2.x... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether lucene is version 2.x" >&5 +$as_echo_n "checking whether lucene is version 2.x... " >&6; } export LUCENE_CORE_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'LUCENE_CORE_JAR'}"; @@ -15313,17 +17040,17 @@ echo $ECHO_N "checking whether lucene is version 2.x... $ECHO_C" >&6 } else { exit 1; }'; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no, you need lucene 2" >&5 -echo "$as_me: error: no, you need lucene 2" >&2;} + { { $as_echo "$as_me:$LINENO: error: no, you need lucene 2" >&5 +$as_echo "$as_me: error: no, you need lucene 2" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LUCENE=NO BUILD_TYPE="$BUILD_TYPE LUCENE" fi @@ -15331,44 +17058,44 @@ fi -echo "$as_me:$LINENO: checking whether to build the MySQL Connector extension" >&5 -echo $ECHO_N "checking whether to build the MySQL Connector extension... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the MySQL Connector extension" >&5 +$as_echo_n "checking whether to build the MySQL Connector extension... " >&6; } if test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_MYSQLC=YES - echo "$as_me:$LINENO: checking for mysqlc module" >&5 -echo $ECHO_N "checking for mysqlc module... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mysqlc module" >&5 +$as_echo_n "checking for mysqlc module... " >&6; } if test -d mysqlc; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi BUILD_TYPE="$BUILD_TYPE MYSQLC" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_MYSQLC=NO fi if test "$ENABLE_MYSQLC" = "YES"; then -echo "$as_me:$LINENO: checking for mysql pre-requisites" >&5 -echo $ECHO_N "checking for mysql pre-requisites... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for mysql pre-requisites" >&5 +$as_echo_n "checking for mysql pre-requisites... " >&6; } if test -n "$with_system_mysql" -o -n "$with_system_libs" && \ test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then - echo "$as_me:$LINENO: result: external MySQL" >&5 -echo "${ECHO_T}external MySQL" >&6 + { $as_echo "$as_me:$LINENO: result: external MySQL" >&5 +$as_echo "external MySQL" >&6; } SYSTEM_MYSQL=YES # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MYSQLCONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MYSQLCONFIG in [\\/]* | ?:[\\/]*) @@ -15381,71 +17108,72 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MYSQLCONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi MYSQLCONFIG=$ac_cv_path_MYSQLCONFIG - if test -n "$MYSQLCONFIG"; then - echo "$as_me:$LINENO: result: $MYSQLCONFIG" >&5 -echo "${ECHO_T}$MYSQLCONFIG" >&6 + { $as_echo "$as_me:$LINENO: result: $MYSQLCONFIG" >&5 +$as_echo "$MYSQLCONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking MySQL version" >&5 -echo $ECHO_N "checking MySQL version... $ECHO_C" >&6 + + { $as_echo "$as_me:$LINENO: checking MySQL version" >&5 +$as_echo_n "checking MySQL version... " >&6; } MYSQL_VERSION=`$MYSQLCONFIG --version` MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1` if test "$MYSQL_MAJOR" -ge "5"; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: too old, use 5.0.x or 5.1.x" >&5 -echo "$as_me: error: too old, use 5.0.x or 5.1.x" >&2;} + { { $as_echo "$as_me:$LINENO: error: too old, use 5.0.x or 5.1.x" >&5 +$as_echo "$as_me: error: too old, use 5.0.x or 5.1.x" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for MySQL Client library" >&5 -echo $ECHO_N "checking for MySQL Client library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for MySQL Client library" >&5 +$as_echo_n "checking for MySQL Client library... " >&6; } MYSQL_INC=`$MYSQLCONFIG --include` MYSQL_LIB=`$MYSQLCONFIG --libs` MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,` - echo "$as_me:$LINENO: result: includes $MYSQL_INC, libraries $MYSQL_LIB" >&5 -echo "${ECHO_T}includes $MYSQL_INC, libraries $MYSQL_LIB" >&6 + { $as_echo "$as_me:$LINENO: result: includes $MYSQL_INC, libraries $MYSQL_LIB" >&5 +$as_echo "includes $MYSQL_INC, libraries $MYSQL_LIB" >&6; } else SYSTEM_MYSQL=NO if test -n "$with_libmysql_path"; then - echo "$as_me:$LINENO: result: external Connector/C (libmysql)" >&5 -echo "${ECHO_T}external Connector/C (libmysql)" >&6 + { $as_echo "$as_me:$LINENO: result: external Connector/C (libmysql)" >&5 +$as_echo "external Connector/C (libmysql)" >&6; } LIBMYSQL=libmysql.so if test "$_os" = "Darwin"; then LIBMYSQL=libmysql.dylib elif test "$_os" = "WINNT"; then LIBMYSQL=libmysql.dll fi - echo "$as_me:$LINENO: checking for $LIBMYSQL" >&5 -echo $ECHO_N "checking for $LIBMYSQL... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for $LIBMYSQL" >&5 +$as_echo_n "checking for $LIBMYSQL... " >&6; } if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then - echo "$as_me:$LINENO: result: found." >&5 -echo "${ECHO_T}found." >&6 + { $as_echo "$as_me:$LINENO: result: found." >&5 +$as_echo "found." >&6; } LIBMYSQL_PATH=$with_libmysql_path else - { { echo "$as_me:$LINENO: error: not found. Please specify proper path in --with-libmysql-path." >&5 -echo "$as_me: error: not found. Please specify proper path in --with-libmysql-path." >&2;} + { { $as_echo "$as_me:$LINENO: error: not found. Please specify proper path in --with-libmysql-path." >&5 +$as_echo "$as_me: error: not found. Please specify proper path in --with-libmysql-path." >&2;} { (exit 1); exit 1; }; } fi else - { { echo "$as_me:$LINENO: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&5 -echo "$as_me: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&2;} + { { $as_echo "$as_me:$LINENO: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&5 +$as_echo "$as_me: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&2;} { (exit 1); exit 1; }; } fi fi @@ -15455,7 +17183,7 @@ fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -15463,31 +17191,31 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # FIXME! # who thought this too-generic cppconn dir was a good idea? -echo "$as_me:$LINENO: checking MySQL Connector/C++" >&5 -echo $ECHO_N "checking MySQL Connector/C++... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking MySQL Connector/C++" >&5 +$as_echo_n "checking MySQL Connector/C++... " >&6; } if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_MYSQL_CPPCONN=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${ac_cv_header_mysql_driver_h+set}" = set; then - echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 -echo $ECHO_N "checking for mysql_driver.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 +$as_echo_n "checking for mysql_driver.h... " >&6; } if test "${ac_cv_header_mysql_driver_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_mysql_driver_h" >&5 -echo "${ECHO_T}$ac_cv_header_mysql_driver_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mysql_driver_h" >&5 +$as_echo "$ac_cv_header_mysql_driver_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking mysql_driver.h usability" >&5 -echo $ECHO_N "checking mysql_driver.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking mysql_driver.h usability" >&5 +$as_echo_n "checking mysql_driver.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15498,41 +17226,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking mysql_driver.h presence" >&5 -echo $ECHO_N "checking mysql_driver.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking mysql_driver.h presence" >&5 +$as_echo_n "checking mysql_driver.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15541,92 +17266,85 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: mysql_driver.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mysql_driver.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mysql_driver.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mysql_driver.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: mysql_driver.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: mysql_driver.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mysql_driver.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mysql_driver.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mysql_driver.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mysql_driver.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mysql_driver.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mysql_driver.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mysql_driver.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mysql_driver.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mysql_driver.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mysql_driver.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: mysql_driver.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: mysql_driver.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: mysql_driver.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: mysql_driver.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: mysql_driver.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: mysql_driver.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: mysql_driver.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: mysql_driver.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 -echo $ECHO_N "checking for mysql_driver.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 +$as_echo_n "checking for mysql_driver.h... " >&6; } if test "${ac_cv_header_mysql_driver_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_mysql_driver_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_mysql_driver_h" >&5 -echo "${ECHO_T}$ac_cv_header_mysql_driver_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mysql_driver_h" >&5 +$as_echo "$ac_cv_header_mysql_driver_h" >&6; } fi -if test $ac_cv_header_mysql_driver_h = yes; then +if test "x$ac_cv_header_mysql_driver_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&5 -echo "$as_me: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&2;} + { { $as_echo "$as_me:$LINENO: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&5 +$as_echo "$as_me: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for main in -lmysqlcppconn" >&5 -echo $ECHO_N "checking for main in -lmysqlcppconn... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for main in -lmysqlcppconn" >&5 +$as_echo_n "checking for main in -lmysqlcppconn... " >&6; } if test "${ac_cv_lib_mysqlcppconn_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmysqlcppconn $LIBS" @@ -15641,47 +17359,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mysqlcppconn_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mysqlcppconn_main=no + ac_cv_lib_mysqlcppconn_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlcppconn_main" >&5 -echo "${ECHO_T}$ac_cv_lib_mysqlcppconn_main" >&6 -if test $ac_cv_lib_mysqlcppconn_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlcppconn_main" >&5 +$as_echo "$ac_cv_lib_mysqlcppconn_main" >&6; } +if test "x$ac_cv_lib_mysqlcppconn_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYSQLCPPCONN 1 _ACEOF @@ -15689,19 +17408,21 @@ _ACEOF LIBS="-lmysqlcppconn $LIBS" else - { { echo "$as_me:$LINENO: error: MySQL C++ Connectivity lib not found or functional" >&5 -echo "$as_me: error: MySQL C++ Connectivity lib not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: MySQL C++ Connectivity lib not found or functional" >&5 +$as_echo "$as_me: error: MySQL C++ Connectivity lib not found or functional" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking version" >&5 -echo $ECHO_N "checking version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking version" >&5 +$as_echo_n "checking version... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -15725,31 +17446,45 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: not suitable, we need >= 1.0.6" >&5 -echo "$as_me: error: not suitable, we need >= 1.0.6" >&2;} +{ { $as_echo "$as_me:$LINENO: error: not suitable, we need >= 1.0.6" >&5 +$as_echo "$as_me: error: not suitable, we need >= 1.0.6" >&2;} { (exit 1); exit 1; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - ac_ext=cc + + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -15757,16 +17492,16 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - echo "$as_me:$LINENO: checking for mysqlcppconn module" >&5 -echo $ECHO_N "checking for mysqlcppconn module... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } + { $as_echo "$as_me:$LINENO: checking for mysqlcppconn module" >&5 +$as_echo_n "checking for mysqlcppconn module... " >&6; } if test -d mysqlcppconn; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN" @@ -15781,25 +17516,25 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -echo "$as_me:$LINENO: checking which hsqldb to use" >&5 -echo $ECHO_N "checking which hsqldb to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which hsqldb to use" >&5 +$as_echo_n "checking which hsqldb to use... " >&6; } if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_HSQLDB=YES if test -z $HSQLDB_JAR; then HSQLDB_JAR=/usr/share/java/hsqldb.jar fi - as_ac_File=`echo "ac_cv_file_$HSQLDB_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $HSQLDB_JAR" >&5 -echo $ECHO_N "checking for $HSQLDB_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$HSQLDB_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $HSQLDB_JAR" >&5 +$as_echo_n "checking for $HSQLDB_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$HSQLDB_JAR"; then eval "$as_ac_File=yes" @@ -15807,18 +17542,22 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: hsqldb.jar not found." >&5 -echo "$as_me: error: hsqldb.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: hsqldb.jar not found." >&5 +$as_echo "$as_me: error: hsqldb.jar not found." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking whether hsqldb is 1.8.0.x" >&5 -echo $ECHO_N "checking whether hsqldb is 1.8.0.x... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether hsqldb is 1.8.0.x" >&5 +$as_echo_n "checking whether hsqldb is 1.8.0.x... " >&6; } export HSQLDB_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'HSQLDB_JAR'}"; @@ -15841,41 +17580,41 @@ echo $ECHO_N "checking whether hsqldb is 1.8.0.x... $ECHO_C" >&6 } else { exit 1; }'; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&5 -echo "$as_me: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&2;} + { { $as_echo "$as_me:$LINENO: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&5 +$as_echo "$as_me: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_HSQLDB=NO BUILD_TYPE="$BUILD_TYPE HSQLDB" fi -echo "$as_me:$LINENO: checking which beanshell to use" >&5 -echo $ECHO_N "checking which beanshell to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which beanshell to use" >&5 +$as_echo_n "checking which beanshell to use... " >&6; } if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_BSH=YES if test -z $BSH_JAR; then BSH_JAR=/usr/share/java/bsh.jar fi - as_ac_File=`echo "ac_cv_file_$BSH_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $BSH_JAR" >&5 -echo $ECHO_N "checking for $BSH_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$BSH_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $BSH_JAR" >&5 +$as_echo_n "checking for $BSH_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$BSH_JAR"; then eval "$as_ac_File=yes" @@ -15883,19 +17622,23 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: bsh.jar not found." >&5 -echo "$as_me: error: bsh.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: bsh.jar not found." >&5 +$as_echo "$as_me: error: bsh.jar not found." >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_BSH=NO BUILD_TYPE="$BUILD_TYPE BSH" fi @@ -15903,22 +17646,22 @@ fi -echo "$as_me:$LINENO: checking which saxon to use" >&5 -echo $ECHO_N "checking which saxon to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which saxon to use" >&5 +$as_echo_n "checking which saxon to use... " >&6; } if test -n "$with_system_saxon" -o -n "$with_system_libs" && \ test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_SAXON=YES if test -z $SAXON_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/saxon9.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 +$as_echo_n "checking for /usr/share/java/saxon9.jar... " >&6; } if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/saxon9.jar"; then ac_cv_file__usr_share_java_saxon9_jar=yes @@ -15926,20 +17669,20 @@ else ac_cv_file__usr_share_java_saxon9_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon9_jar" >&6 -if test $ac_cv_file__usr_share_java_saxon9_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_saxon9_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_saxon9_jar" = x""yes; then SAXON_JAR=/usr/share/java/saxon9.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/saxon.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/saxon.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon.jar" >&5 +$as_echo_n "checking for /usr/share/java/saxon.jar... " >&6; } if test "${ac_cv_file__usr_share_java_saxon_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/saxon.jar"; then ac_cv_file__usr_share_java_saxon_jar=yes @@ -15947,19 +17690,19 @@ else ac_cv_file__usr_share_java_saxon_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon_jar" >&6 -if test $ac_cv_file__usr_share_java_saxon_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_saxon_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_saxon_jar" = x""yes; then SAXON_JAR=/usr/share/java/saxon.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/saxon9.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 +$as_echo_n "checking for /usr/share/java/saxon9.jar... " >&6; } if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/saxon9.jar"; then ac_cv_file__usr_share_java_saxon9_jar=yes @@ -15967,13 +17710,13 @@ else ac_cv_file__usr_share_java_saxon9_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon9_jar" >&6 -if test $ac_cv_file__usr_share_java_saxon9_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_saxon9_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_saxon9_jar" = x""yes; then SAXON_JAR=/usr/share/java/saxon9.jar else - { { echo "$as_me:$LINENO: error: saxon.jar replacement not found" >&5 -echo "$as_me: error: saxon.jar replacement not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: saxon.jar replacement not found" >&5 +$as_echo "$as_me: error: saxon.jar replacement not found" >&2;} { (exit 1); exit 1; }; } fi @@ -15987,15 +17730,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$SAXON_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $SAXON_JAR" >&5 -echo $ECHO_N "checking for $SAXON_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$SAXON_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $SAXON_JAR" >&5 +$as_echo_n "checking for $SAXON_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$SAXON_JAR"; then eval "$as_ac_File=yes" @@ -16003,27 +17746,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: saxon.jar replacement not found." >&5 -echo "$as_me: error: saxon.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: saxon.jar replacement not found." >&5 +$as_echo "$as_me: error: saxon.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -n "$SERIALIZER_JAR"; then - as_ac_File=`echo "ac_cv_file_$SERIALIZER_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $SERIALIZER_JAR" >&5 -echo $ECHO_N "checking for $SERIALIZER_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$SERIALIZER_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $SERIALIZER_JAR" >&5 +$as_echo_n "checking for $SERIALIZER_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$SERIALIZER_JAR"; then eval "$as_ac_File=yes" @@ -16031,13 +17778,17 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: serializer.jar not found." >&5 -echo "$as_me: error: serializer.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: serializer.jar not found." >&5 +$as_echo "$as_me: error: serializer.jar not found." >&2;} { (exit 1); exit 1; }; } fi @@ -16045,8 +17796,8 @@ fi fi - echo "$as_me:$LINENO: checking if saxon works" >&5 -echo $ECHO_N "checking if saxon works... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if saxon works" >&5 +$as_echo_n "checking if saxon works... " >&6; } cat > saxontest.java <<_ACEOF import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; @@ -16090,37 +17841,37 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 (eval $javac_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0 && test -f ./saxontest.class ; then java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" { (eval echo "$as_me:$LINENO: \"$java_cmd\"") >&5 (eval $java_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else cat saxontest.java >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&5 -echo "$as_me: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&5 +$as_echo "$as_me: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } cat saxontest.java >&5 - { { echo "$as_me:$LINENO: error: saxontest could not be compiled, non-functional saxon jar" >&5 -echo "$as_me: error: saxontest could not be compiled, non-functional saxon jar" >&2;} + { { $as_echo "$as_me:$LINENO: error: saxontest could not be compiled, non-functional saxon jar" >&5 +$as_echo "$as_me: error: saxontest could not be compiled, non-functional saxon jar" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_SAXON=NO NEED_SAXON=TRUE fi @@ -16134,20 +17885,20 @@ fi if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then with_system_curl=yes fi -echo "$as_me:$LINENO: checking which curl to use" >&5 -echo $ECHO_N "checking which curl to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which curl to use" >&5 +$as_echo_n "checking which curl to use... " >&6; } if test -n "$with_system_curl" -o -n "$with_system_libs" && \ test "$with_system_curl" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_CURL=YES # Extract the first word of "curl-config", so it can be a program name with args. set dummy curl-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CURLCONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CURLCONFIG in [\\/]* | ?:[\\/]*) @@ -16160,51 +17911,52 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CURLCONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi CURLCONFIG=$ac_cv_path_CURLCONFIG - if test -n "$CURLCONFIG"; then - echo "$as_me:$LINENO: result: $CURLCONFIG" >&5 -echo "${ECHO_T}$CURLCONFIG" >&6 + { $as_echo "$as_me:$LINENO: result: $CURLCONFIG" >&5 +$as_echo "$CURLCONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$CURLCONFIG"; then - { { echo "$as_me:$LINENO: error: install curl to run this script" >&5 -echo "$as_me: error: install curl to run this script" >&2;} + { { $as_echo "$as_me:$LINENO: error: install curl to run this script" >&5 +$as_echo "$as_me: error: install curl to run this script" >&2;} { (exit 1); exit 1; }; } fi # check curl version - echo "$as_me:$LINENO: checking whether curl is >= 7.13.1" >&5 -echo $ECHO_N "checking whether curl is >= 7.13.1... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether curl is >= 7.13.1" >&5 +$as_echo_n "checking whether curl is >= 7.13.1... " >&6; } if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then - { { echo "$as_me:$LINENO: error: no, you need at least curl 7.13,1" >&5 -echo "$as_me: error: no, you need at least curl 7.13,1" >&2;} + { { $as_echo "$as_me:$LINENO: error: no, you need at least curl 7.13,1" >&5 +$as_echo "$as_me: error: no, you need at least curl 7.13,1" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi CURL_LIBS=`$CURLCONFIG --libs` CURL_CFLAGS=`$CURLCONFIG --cflags` else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_CURL=NO BUILD_TYPE="$BUILD_TYPE CURL" fi @@ -16212,31 +17964,31 @@ fi -echo "$as_me:$LINENO: checking which mdds to use" >&5 -echo $ECHO_N "checking which mdds to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which mdds to use" >&5 +$as_echo_n "checking which mdds to use... " >&6; } if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ test "$with_system_mdds" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_MDDS=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then - echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 -echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 +$as_echo_n "checking for mdds/flat_segment_tree.hpp... " >&6; } if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 +$as_echo "$ac_cv_header_mdds_flat_segment_tree_hpp" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp usability" >&5 -echo $ECHO_N "checking mdds/flat_segment_tree.hpp usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp usability" >&5 +$as_echo_n "checking mdds/flat_segment_tree.hpp usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16247,41 +17999,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp presence" >&5 -echo $ECHO_N "checking mdds/flat_segment_tree.hpp presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp presence" >&5 +$as_echo_n "checking mdds/flat_segment_tree.hpp presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16290,83 +18039,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 -echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 +$as_echo_n "checking for mdds/flat_segment_tree.hpp... " >&6; } if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_mdds_flat_segment_tree_hpp=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 +$as_echo "$ac_cv_header_mdds_flat_segment_tree_hpp" >&6; } fi -if test $ac_cv_header_mdds_flat_segment_tree_hpp = yes; then +if test "x$ac_cv_header_mdds_flat_segment_tree_hpp" = x""yes; then : else - { { echo "$as_me:$LINENO: error: mdds/flat_segment_tree.hpp not found. install mdds" >&5 -echo "$as_me: error: mdds/flat_segment_tree.hpp not found. install mdds" >&2;} + { { $as_echo "$as_me:$LINENO: error: mdds/flat_segment_tree.hpp not found. install mdds" >&5 +$as_echo "$as_me: error: mdds/flat_segment_tree.hpp not found. install mdds" >&2;} { (exit 1); exit 1; }; } fi @@ -16378,38 +18120,38 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE MDDS" SYSTEM_MDDS=NO fi -echo "$as_me:$LINENO: checking which boost to use" >&5 -echo $ECHO_N "checking which boost to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which boost to use" >&5 +$as_echo_n "checking which boost to use... " >&6; } if test -n "$with_system_boost" -o -n "$with_system_headers" && \ test "$with_system_boost" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_BOOST=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 -echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +$as_echo_n "checking for boost/shared_ptr.hpp... " >&6; } if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +$as_echo "$ac_cv_header_boost_shared_ptr_hpp" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5 -echo $ECHO_N "checking boost/shared_ptr.hpp usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5 +$as_echo_n "checking boost/shared_ptr.hpp usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16420,41 +18162,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5 -echo $ECHO_N "checking boost/shared_ptr.hpp presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5 +$as_echo_n "checking boost/shared_ptr.hpp presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16463,99 +18202,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5 -echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 -echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +$as_echo_n "checking for boost/shared_ptr.hpp... " >&6; } if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_boost_shared_ptr_hpp=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +$as_echo "$ac_cv_header_boost_shared_ptr_hpp" >&6; } fi -if test $ac_cv_header_boost_shared_ptr_hpp = yes; then +if test "x$ac_cv_header_boost_shared_ptr_hpp" = x""yes; then : else - { { echo "$as_me:$LINENO: error: boost/shared_ptr.hpp not found. install boost" >&5 -echo "$as_me: error: boost/shared_ptr.hpp not found. install boost" >&2;} + { { $as_echo "$as_me:$LINENO: error: boost/shared_ptr.hpp not found. install boost" >&5 +$as_echo "$as_me: error: boost/shared_ptr.hpp not found. install boost" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 -echo $ECHO_N "checking for boost/spirit/include/classic_core.hpp... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 +$as_echo_n "checking for boost/spirit/include/classic_core.hpp... " >&6; } if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 +$as_echo "$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp usability" >&5 -echo $ECHO_N "checking boost/spirit/include/classic_core.hpp usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp usability" >&5 +$as_echo_n "checking boost/spirit/include/classic_core.hpp usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16566,41 +18298,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp presence" >&5 -echo $ECHO_N "checking boost/spirit/include/classic_core.hpp presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp presence" >&5 +$as_echo_n "checking boost/spirit/include/classic_core.hpp presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16609,99 +18338,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&5 -echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 -echo $ECHO_N "checking for boost/spirit/include/classic_core.hpp... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 +$as_echo_n "checking for boost/spirit/include/classic_core.hpp... " >&6; } if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_boost_spirit_include_classic_core_hpp=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 +$as_echo "$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6; } fi -if test $ac_cv_header_boost_spirit_include_classic_core_hpp = yes; then +if test "x$ac_cv_header_boost_spirit_include_classic_core_hpp" = x""yes; then : else - { { echo "$as_me:$LINENO: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&5 -echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&2;} + { { $as_echo "$as_me:$LINENO: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&5 +$as_echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_boost_function_hpp+set}" = set; then - echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 -echo $ECHO_N "checking for boost/function.hpp... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 +$as_echo_n "checking for boost/function.hpp... " >&6; } if test "${ac_cv_header_boost_function_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_boost_function_hpp" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 +$as_echo "$ac_cv_header_boost_function_hpp" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking boost/function.hpp usability" >&5 -echo $ECHO_N "checking boost/function.hpp usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking boost/function.hpp usability" >&5 +$as_echo_n "checking boost/function.hpp usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16712,41 +18434,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking boost/function.hpp presence" >&5 -echo $ECHO_N "checking boost/function.hpp presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking boost/function.hpp presence" >&5 +$as_echo_n "checking boost/function.hpp presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16755,83 +18474,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: boost/function.hpp: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: boost/function.hpp: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: boost/function.hpp: present but cannot be compiled" >&5 -echo "$as_me: WARNING: boost/function.hpp: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/function.hpp: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: boost/function.hpp: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: boost/function.hpp: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: boost/function.hpp: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 -echo $ECHO_N "checking for boost/function.hpp... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 +$as_echo_n "checking for boost/function.hpp... " >&6; } if test "${ac_cv_header_boost_function_hpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_boost_function_hpp=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 -echo "${ECHO_T}$ac_cv_header_boost_function_hpp" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 +$as_echo "$ac_cv_header_boost_function_hpp" >&6; } fi -if test $ac_cv_header_boost_function_hpp = yes; then +if test "x$ac_cv_header_boost_function_hpp" = x""yes; then : else - { { echo "$as_me:$LINENO: error: boost/function.hpp not found. install boost" >&5 -echo "$as_me: error: boost/function.hpp not found. install boost" >&2;} + { { $as_echo "$as_me:$LINENO: error: boost/function.hpp not found. install boost" >&5 +$as_echo "$as_me: error: boost/function.hpp not found. install boost" >&2;} { (exit 1); exit 1; }; } fi @@ -16839,8 +18551,8 @@ fi save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -fno-exceptions" - echo "$as_me:$LINENO: checking whether boost/function.hpp compiles with -fno-exceptions" >&5 -echo $ECHO_N "checking whether boost/function.hpp compiles with -fno-exceptions... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether boost/function.hpp compiles with -fno-exceptions" >&5 +$as_echo_n "checking whether boost/function.hpp compiles with -fno-exceptions... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16858,43 +18570,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_cxx_boost_no_exceptons_broken=no else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_cxx_boost_no_exceptons_broken=yes + ac_cv_cxx_boost_no_exceptons_broken=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then - { { echo "$as_me:$LINENO: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&5 -echo "$as_me: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&2;} + { { $as_echo "$as_me:$LINENO: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&5 +$as_echo "$as_me: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi CXXFLAGS=$save_CXXFLAGS ac_ext=c @@ -16904,38 +18613,38 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE BOOST" SYSTEM_BOOST=NO fi -echo "$as_me:$LINENO: checking which vigra to use" >&5 -echo $ECHO_N "checking which vigra to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which vigra to use" >&5 +$as_echo_n "checking which vigra to use... " >&6; } if test -n "$with_system_vigra" -o -n "$with_system_headers" && \ test "$with_system_vigra" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_VIGRA=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 -echo $ECHO_N "checking for vigra/copyimage.hxx... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 +$as_echo_n "checking for vigra/copyimage.hxx... " >&6; } if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 -echo "${ECHO_T}$ac_cv_header_vigra_copyimage_hxx" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 +$as_echo "$ac_cv_header_vigra_copyimage_hxx" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking vigra/copyimage.hxx usability" >&5 -echo $ECHO_N "checking vigra/copyimage.hxx usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking vigra/copyimage.hxx usability" >&5 +$as_echo_n "checking vigra/copyimage.hxx usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16946,41 +18655,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking vigra/copyimage.hxx presence" >&5 -echo $ECHO_N "checking vigra/copyimage.hxx presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking vigra/copyimage.hxx presence" >&5 +$as_echo_n "checking vigra/copyimage.hxx presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16989,83 +18695,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&5 -echo "$as_me: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 -echo $ECHO_N "checking for vigra/copyimage.hxx... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 +$as_echo_n "checking for vigra/copyimage.hxx... " >&6; } if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_vigra_copyimage_hxx=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 -echo "${ECHO_T}$ac_cv_header_vigra_copyimage_hxx" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 +$as_echo "$ac_cv_header_vigra_copyimage_hxx" >&6; } fi -if test $ac_cv_header_vigra_copyimage_hxx = yes; then +if test "x$ac_cv_header_vigra_copyimage_hxx" = x""yes; then : else - { { echo "$as_me:$LINENO: error: vigra/copyimage.hxx not found. install vigra" >&5 -echo "$as_me: error: vigra/copyimage.hxx not found. install vigra" >&2;} + { { $as_echo "$as_me:$LINENO: error: vigra/copyimage.hxx not found. install vigra" >&5 +$as_echo "$as_me: error: vigra/copyimage.hxx not found. install vigra" >&2;} { (exit 1); exit 1; }; } fi @@ -17077,33 +18776,33 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE VIGRA" SYSTEM_VIGRA=NO fi -echo "$as_me:$LINENO: checking which odbc headers to use" >&5 -echo $ECHO_N "checking which odbc headers to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which odbc headers to use" >&5 +$as_echo_n "checking which odbc headers to use... " >&6; } if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \ test "$with_system_odbc_headers" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_ODBC_HEADERS=YES if test "${ac_cv_header_sqlext_h+set}" = set; then - echo "$as_me:$LINENO: checking for sqlext.h" >&5 -echo $ECHO_N "checking for sqlext.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for sqlext.h" >&5 +$as_echo_n "checking for sqlext.h... " >&6; } if test "${ac_cv_header_sqlext_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 -echo "${ECHO_T}$ac_cv_header_sqlext_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 +$as_echo "$ac_cv_header_sqlext_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sqlext.h usability" >&5 -echo $ECHO_N "checking sqlext.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking sqlext.h usability" >&5 +$as_echo_n "checking sqlext.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17114,41 +18813,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sqlext.h presence" >&5 -echo $ECHO_N "checking sqlext.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking sqlext.h presence" >&5 +$as_echo_n "checking sqlext.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17157,173 +18853,168 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sqlext.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sqlext.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sqlext.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sqlext.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlext.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sqlext.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlext.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sqlext.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sqlext.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlext.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sqlext.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sqlext.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sqlext.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sqlext.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sqlext.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sqlext.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sqlext.h" >&5 -echo $ECHO_N "checking for sqlext.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for sqlext.h" >&5 +$as_echo_n "checking for sqlext.h... " >&6; } if test "${ac_cv_header_sqlext_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_sqlext_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 -echo "${ECHO_T}$ac_cv_header_sqlext_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 +$as_echo "$ac_cv_header_sqlext_h" >&6; } fi -if test $ac_cv_header_sqlext_h = yes; then +if test "x$ac_cv_header_sqlext_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: odbc not found. install odbc" >&5 -echo "$as_me: error: odbc not found. install odbc" >&2;} + { { $as_echo "$as_me:$LINENO: error: odbc not found. install odbc" >&5 +$as_echo "$as_me: error: odbc not found. install odbc" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_ODBC_HEADERS=NO BUILD_TYPE="$BUILD_TYPE UNIXODBC" fi -echo "$as_me:$LINENO: checking whether to enable build of Mozilla/Mozilla NSS-using components" >&5 -echo $ECHO_N "checking whether to enable build of Mozilla/Mozilla NSS-using components... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable build of Mozilla/Mozilla NSS-using components" >&5 +$as_echo_n "checking whether to enable build of Mozilla/Mozilla NSS-using components... " >&6; } if test "$enable_mozilla" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } WITH_MOZILLA=NO ENABLE_NSS_MODULE=NO else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } WITH_MOZILLA=YES fi -echo "$as_me:$LINENO: checking whether to build Mozilla addressbook connectivity" >&5 -echo $ECHO_N "checking whether to build Mozilla addressbook connectivity... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build Mozilla addressbook connectivity" >&5 +$as_echo_n "checking whether to build Mozilla addressbook connectivity... " >&6; } if test "$enable_mozilla" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } elif test "$with_system_mozilla" = "yes"; then - echo "$as_me:$LINENO: result: no, not possible with system-mozilla" >&5 -echo "${ECHO_T}no, not possible with system-mozilla" >&6 + { $as_echo "$as_me:$LINENO: result: no, not possible with system-mozilla" >&5 +$as_echo "no, not possible with system-mozilla" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi -echo "$as_me:$LINENO: checking whether to build XML Security support" >&5 -echo $ECHO_N "checking whether to build XML Security support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build XML Security support" >&5 +$as_echo_n "checking whether to build XML Security support... " >&6; } if test "$enable_mozilla" = "no"; then - echo "$as_me:$LINENO: result: no, since Mozilla (NSS) disabled but needed" >&5 -echo "${ECHO_T}no, since Mozilla (NSS) disabled but needed" >&6 + { $as_echo "$as_me:$LINENO: result: no, since Mozilla (NSS) disabled but needed" >&5 +$as_echo "no, since Mozilla (NSS) disabled but needed" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi -echo "$as_me:$LINENO: checking whether to build LDAP configuration backend" >&5 -echo $ECHO_N "checking whether to build LDAP configuration backend... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build LDAP configuration backend" >&5 +$as_echo_n "checking whether to build LDAP configuration backend... " >&6; } if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } WITH_LDAP=YES else - echo "$as_me:$LINENO: result: no. Either Mozilla or OpenLDAP needed" >&5 -echo "${ECHO_T}no. Either Mozilla or OpenLDAP needed" >&6 + { $as_echo "$as_me:$LINENO: result: no. Either Mozilla or OpenLDAP needed" >&5 +$as_echo "no. Either Mozilla or OpenLDAP needed" >&6; } WITH_LDAP=NO fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } WITH_LDAP=NO fi if test "$WITH_LDAP" = "YES"; then - echo "$as_me:$LINENO: checking which LDAP SDK to use" >&5 -echo $ECHO_N "checking which LDAP SDK to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which LDAP SDK to use" >&5 +$as_echo_n "checking which LDAP SDK to use... " >&6; } if test -n "$with_openldap" && test "$with_openldap" != "no"; then - echo "$as_me:$LINENO: result: OpenLDAP" >&5 -echo "${ECHO_T}OpenLDAP" >&6 + { $as_echo "$as_me:$LINENO: result: OpenLDAP" >&5 +$as_echo "OpenLDAP" >&6; } WITH_OPENLDAP=YES for ac_header in ldap.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17334,41 +19025,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17377,96 +19065,93 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { echo "$as_me:$LINENO: error: ldap.h not found. install openldap libs" >&5 -echo "$as_me: error: ldap.h not found. install openldap libs" >&2;} + { { $as_echo "$as_me:$LINENO: error: ldap.h not found. install openldap libs" >&5 +$as_echo "$as_me: error: ldap.h not found. install openldap libs" >&2;} { (exit 1); exit 1; }; } fi done -echo "$as_me:$LINENO: checking for ldap_simple_bind_s in -lldap" >&5 -echo $ECHO_N "checking for ldap_simple_bind_s in -lldap... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for ldap_simple_bind_s in -lldap" >&5 +$as_echo_n "checking for ldap_simple_bind_s in -lldap... " >&6; } if test "${ac_cv_lib_ldap_ldap_simple_bind_s+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" @@ -17477,57 +19162,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char ldap_simple_bind_s (); int main () { -ldap_simple_bind_s (); +return ldap_simple_bind_s (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ldap_ldap_simple_bind_s=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ldap_ldap_simple_bind_s=no + ac_cv_lib_ldap_ldap_simple_bind_s=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5 -echo "${ECHO_T}$ac_cv_lib_ldap_ldap_simple_bind_s" >&6 -if test $ac_cv_lib_ldap_ldap_simple_bind_s = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5 +$as_echo "$ac_cv_lib_ldap_ldap_simple_bind_s" >&6; } +if test "x$ac_cv_lib_ldap_ldap_simple_bind_s" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -17535,18 +19221,18 @@ _ACEOF LIBS="-lldap $LIBS" else - { { echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 -echo "$as_me: error: openldap lib not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 +$as_echo "$as_me: error: openldap lib not found or functional" >&2;} { (exit 1); exit 1; }; } fi # rumours say that OpenLDAP doesn't have that function. I looked and # it has it. Test for it to be sure -echo "$as_me:$LINENO: checking for ldap_set_option in -lldap" >&5 -echo $ECHO_N "checking for ldap_set_option in -lldap... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for ldap_set_option in -lldap" >&5 +$as_echo_n "checking for ldap_set_option in -lldap... " >&6; } if test "${ac_cv_lib_ldap_ldap_set_option+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" @@ -17557,57 +19243,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char ldap_set_option (); int main () { -ldap_set_option (); +return ldap_set_option (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ldap_ldap_set_option=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ldap_ldap_set_option=no + ac_cv_lib_ldap_ldap_set_option=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_set_option" >&5 -echo "${ECHO_T}$ac_cv_lib_ldap_ldap_set_option" >&6 -if test $ac_cv_lib_ldap_ldap_set_option = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_set_option" >&5 +$as_echo "$ac_cv_lib_ldap_ldap_set_option" >&6; } +if test "x$ac_cv_lib_ldap_ldap_set_option" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -17615,14 +19302,14 @@ _ACEOF LIBS="-lldap $LIBS" else - { { echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 -echo "$as_me: error: openldap lib not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 +$as_echo "$as_me: error: openldap lib not found or functional" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: Netscape/Mozilla" >&5 -echo "${ECHO_T}Netscape/Mozilla" >&6 + { $as_echo "$as_me:$LINENO: result: Netscape/Mozilla" >&5 +$as_echo "Netscape/Mozilla" >&6; } # TODO. Actually do a sanity check and check for # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT WITH_OPENLDAP=NO @@ -17631,16 +19318,16 @@ fi -echo "$as_me:$LINENO: checking which mozilla to use" >&5 -echo $ECHO_N "checking which mozilla to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which mozilla to use" >&5 +$as_echo_n "checking which mozilla to use... " >&6; } if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_MOZILLA=YES ENABLE_NSS_MODULE=NO enable_nss_module=no - echo "$as_me:$LINENO: checking which Mozilla flavour to use" >&5 -echo $ECHO_N "checking which Mozilla flavour to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which Mozilla flavour to use" >&5 +$as_echo_n "checking which Mozilla flavour to use... " >&6; } if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then MOZ_FLAVOUR=libxul elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then @@ -17655,204 +19342,194 @@ echo $ECHO_N "checking which Mozilla flavour to use... $ECHO_C" >&6 MOZ_FLAVOUR=libxul fi tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst();'` - echo "$as_me:$LINENO: result: $tmp" >&5 -echo "${ECHO_T}$tmp" >&6 + { $as_echo "$as_me:$LINENO: result: $tmp" >&5 +$as_echo "$tmp" >&6; } - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZ_NSS" >&5 +$as_echo_n "checking for MOZ_NSS... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZ_NSS_CFLAGS"; then + pkg_cv_MOZ_NSS_CFLAGS="$MOZ_NSS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5 + ($PKG_CONFIG --exists --print-errors "nss") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZ_NSS_LIBS"; then + pkg_cv_MOZ_NSS_LIBS="$MOZ_NSS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5 + ($PKG_CONFIG --exists --print-errors "nss") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZ_NSS_LIBS=`$PKG_CONFIG --libs "nss" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for nss" >&5 -echo $ECHO_N "checking for nss... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "nss" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 -echo $ECHO_N "checking MOZ_NSS_CFLAGS... $ECHO_C" >&6 - MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss"` - echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 -echo "${ECHO_T}$MOZ_NSS_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 -echo $ECHO_N "checking MOZ_NSS_LIBS... $ECHO_C" >&6 - MOZ_NSS_LIBS=`$PKG_CONFIG --libs "nss"` - echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 -echo "${ECHO_T}$MOZ_NSS_LIBS" >&6 - else - MOZ_NSS_CFLAGS="" - MOZ_NSS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - STANDALONENSS="TRUE" - else - STANDALONENSS="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nss"` + else + MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZ_NSS_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + STANDALONENSS="" +elif test $pkg_failed = untried; then + STANDALONENSS="" +else + MOZ_NSS_CFLAGS=$pkg_cv_MOZ_NSS_CFLAGS + MOZ_NSS_LIBS=$pkg_cv_MOZ_NSS_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + STANDALONENSS="TRUE" +fi if test -z "$STANDALONENSS"; then - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZ_NSS" >&5 +$as_echo_n "checking for MOZ_NSS... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZ_NSS_CFLAGS"; then + pkg_cv_MOZ_NSS_CFLAGS="$MOZ_NSS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-nss \"") >&5 + ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-nss ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nss " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZ_NSS_LIBS"; then + pkg_cv_MOZ_NSS_LIBS="$MOZ_NSS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-nss \"") >&5 + ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-nss ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZ_NSS_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nss " 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nss " >&5 -echo $ECHO_N "checking for $MOZ_FLAVOUR-nss ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nss " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 -echo $ECHO_N "checking MOZ_NSS_CFLAGS... $ECHO_C" >&6 - MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nss "` - echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 -echo "${ECHO_T}$MOZ_NSS_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 -echo $ECHO_N "checking MOZ_NSS_LIBS... $ECHO_C" >&6 - MOZ_NSS_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nss "` - echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 -echo "${ECHO_T}$MOZ_NSS_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nss "` else - MOZ_NSS_CFLAGS="" - MOZ_NSS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nss "` - echo $MOZ_NSS_PKG_ERRORS + MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nss "` fi + # Put the nasty error message in config.log where it belongs + echo "$MOZ_NSS_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements ($MOZ_FLAVOUR-nss ) were not met: +$MOZ_NSS_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables MOZ_NSS_CFLAGS +and MOZ_NSS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements ($MOZ_FLAVOUR-nss ) were not met: + +$MOZ_NSS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables MOZ_NSS_CFLAGS +and MOZ_NSS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables MOZ_NSS_CFLAGS +and MOZ_NSS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables MOZ_NSS_CFLAGS +and MOZ_NSS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + MOZ_NSS_CFLAGS=$pkg_cv_MOZ_NSS_CFLAGS + MOZ_NSS_LIBS=$pkg_cv_MOZ_NSS_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi else NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`" @@ -17860,406 +19537,426 @@ echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider if $PKG_CONFIG --exists nspr ; then - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZ_NSPR" >&5 +$as_echo_n "checking for MOZ_NSPR... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZ_NSPR_CFLAGS"; then + pkg_cv_MOZ_NSPR_CFLAGS="$MOZ_NSPR_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nspr \"") >&5 + ($PKG_CONFIG --exists --print-errors "nspr ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "nspr " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZ_NSPR_LIBS"; then + pkg_cv_MOZ_NSPR_LIBS="$MOZ_NSPR_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nspr \"") >&5 + ($PKG_CONFIG --exists --print-errors "nspr ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "nspr " 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for nspr " >&5 -echo $ECHO_N "checking for nspr ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "nspr " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 -echo $ECHO_N "checking MOZ_NSPR_CFLAGS... $ECHO_C" >&6 - MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "nspr "` - echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 -echo "${ECHO_T}$MOZ_NSPR_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 -echo $ECHO_N "checking MOZ_NSPR_LIBS... $ECHO_C" >&6 - MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "nspr "` - echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 -echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nspr "` else - MOZ_NSPR_CFLAGS="" - MOZ_NSPR_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nspr "` - echo $MOZ_NSPR_PKG_ERRORS + MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nspr "` fi + # Put the nasty error message in config.log where it belongs + echo "$MOZ_NSPR_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (nspr ) were not met: +$MOZ_NSPR_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS +and MOZ_NSPR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (nspr ) were not met: + +$MOZ_NSPR_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS +and MOZ_NSPR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS +and MOZ_NSPR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS +and MOZ_NSPR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + MOZ_NSPR_CFLAGS=$pkg_cv_MOZ_NSPR_CFLAGS + MOZ_NSPR_LIBS=$pkg_cv_MOZ_NSPR_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`" else - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZ_NSPR" >&5 +$as_echo_n "checking for MOZ_NSPR... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZ_NSPR_CFLAGS"; then + pkg_cv_MOZ_NSPR_CFLAGS="$MOZ_NSPR_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-nspr \"") >&5 + ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-nspr ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nspr " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZ_NSPR_LIBS"; then + pkg_cv_MOZ_NSPR_LIBS="$MOZ_NSPR_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-nspr \"") >&5 + ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-nspr ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nspr " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nspr " >&5 -echo $ECHO_N "checking for $MOZ_FLAVOUR-nspr ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nspr " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 -echo $ECHO_N "checking MOZ_NSPR_CFLAGS... $ECHO_C" >&6 - MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nspr "` - echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 -echo "${ECHO_T}$MOZ_NSPR_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 -echo $ECHO_N "checking MOZ_NSPR_LIBS... $ECHO_C" >&6 - MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nspr "` - echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 -echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nspr "` else - MOZ_NSPR_CFLAGS="" - MOZ_NSPR_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nspr "` - echo $MOZ_NSPR_PKG_ERRORS + MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nspr "` fi + # Put the nasty error message in config.log where it belongs + echo "$MOZ_NSPR_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements ($MOZ_FLAVOUR-nspr ) were not met: +$MOZ_NSPR_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS +and MOZ_NSPR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements ($MOZ_FLAVOUR-nspr ) were not met: + +$MOZ_NSPR_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS +and MOZ_NSPR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS +and MOZ_NSPR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS +and MOZ_NSPR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + MOZ_NSPR_CFLAGS=$pkg_cv_MOZ_NSPR_CFLAGS + MOZ_NSPR_LIBS=$pkg_cv_MOZ_NSPR_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi fi if test "$MOZ_FLAVOUR" != "libxul"; then - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZILLAXPCOM" >&5 +$as_echo_n "checking for MOZILLAXPCOM... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZILLAXPCOM_CFLAGS"; then + pkg_cv_MOZILLAXPCOM_CFLAGS="$MOZILLAXPCOM_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-xpcom\"") >&5 + ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-xpcom") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-xpcom" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZILLAXPCOM_LIBS"; then + pkg_cv_MOZILLAXPCOM_LIBS="$MOZILLAXPCOM_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-xpcom\"") >&5 + ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-xpcom") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-xpcom" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-xpcom" >&5 -echo $ECHO_N "checking for $MOZ_FLAVOUR-xpcom... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "$MOZ_FLAVOUR-xpcom" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 -echo $ECHO_N "checking MOZILLAXPCOM_CFLAGS... $ECHO_C" >&6 - MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-xpcom"` - echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 -echo "${ECHO_T}$MOZILLAXPCOM_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 -echo $ECHO_N "checking MOZILLAXPCOM_LIBS... $ECHO_C" >&6 - MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-xpcom"` - echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 -echo "${ECHO_T}$MOZILLAXPCOM_LIBS" >&6 - else - MOZILLAXPCOM_CFLAGS="" - MOZILLAXPCOM_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-xpcom"` - - fi +if test $pkg_failed = yes; then - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HASXPCOM="TRUE" - else - HASXPCOM="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$MOZ_FLAVOUR-xpcom"` + else + MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-xpcom"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZILLAXPCOM_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HASXPCOM="" +elif test $pkg_failed = untried; then + HASXPCOM="" +else + MOZILLAXPCOM_CFLAGS=$pkg_cv_MOZILLAXPCOM_CFLAGS + MOZILLAXPCOM_LIBS=$pkg_cv_MOZILLAXPCOM_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HASXPCOM="TRUE" +fi MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom` MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom` fi if test -z "$HASXPCOM"; then - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZILLAXPCOM" >&5 +$as_echo_n "checking for MOZILLAXPCOM... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZILLAXPCOM_CFLAGS"; then + pkg_cv_MOZILLAXPCOM_CFLAGS="$MOZILLAXPCOM_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxul \"") >&5 + ($PKG_CONFIG --exists --print-errors "libxul ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "libxul " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZILLAXPCOM_LIBS"; then + pkg_cv_MOZILLAXPCOM_LIBS="$MOZILLAXPCOM_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxul \"") >&5 + ($PKG_CONFIG --exists --print-errors "libxul ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "libxul " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libxul " >&5 -echo $ECHO_N "checking for libxul ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "libxul " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 -echo $ECHO_N "checking MOZILLAXPCOM_CFLAGS... $ECHO_C" >&6 - MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "libxul "` - echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 -echo "${ECHO_T}$MOZILLAXPCOM_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 -echo $ECHO_N "checking MOZILLAXPCOM_LIBS... $ECHO_C" >&6 - MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "libxul "` - echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 -echo "${ECHO_T}$MOZILLAXPCOM_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxul "` else - MOZILLAXPCOM_CFLAGS="" - MOZILLAXPCOM_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxul "` - echo $MOZILLAXPCOM_PKG_ERRORS + MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxul "` fi + # Put the nasty error message in config.log where it belongs + echo "$MOZILLAXPCOM_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (libxul ) were not met: +$MOZILLAXPCOM_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables MOZILLAXPCOM_CFLAGS +and MOZILLAXPCOM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libxul ) were not met: + +$MOZILLAXPCOM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables MOZILLAXPCOM_CFLAGS +and MOZILLAXPCOM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables MOZILLAXPCOM_CFLAGS +and MOZILLAXPCOM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables MOZILLAXPCOM_CFLAGS +and MOZILLAXPCOM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + MOZILLAXPCOM_CFLAGS=$pkg_cv_MOZILLAXPCOM_CFLAGS + MOZILLAXPCOM_LIBS=$pkg_cv_MOZILLAXPCOM_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi MOZ_INC=`$PKG_CONFIG --variable=includedir libxul` MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul` if ! test -e "$MOZ_LIB/libxul.so"; then @@ -18276,10 +19973,10 @@ echo "$as_me: error: Library requirements (libxul ) not met; consider adjusting CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS" LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS" -echo "$as_me:$LINENO: checking for PK11_GetCertFromPrivateKey in -lnss3" >&5 -echo $ECHO_N "checking for PK11_GetCertFromPrivateKey in -lnss3... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for PK11_GetCertFromPrivateKey in -lnss3" >&5 +$as_echo_n "checking for PK11_GetCertFromPrivateKey in -lnss3... " >&6; } if test "${ac_cv_lib_nss3_PK11_GetCertFromPrivateKey+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnss3 $LIBS" @@ -18290,57 +19987,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char PK11_GetCertFromPrivateKey (); int main () { -PK11_GetCertFromPrivateKey (); +return PK11_GetCertFromPrivateKey (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no + ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&5 -echo "${ECHO_T}$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&6 -if test $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&5 +$as_echo "$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&6; } +if test "x$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSS3 1 _ACEOF @@ -18348,10 +20046,10 @@ _ACEOF LIBS="-lnss3 $LIBS" else - { { echo "$as_me:$LINENO: error: PK11_GetCertFromPrivateKey missing but needed. + { { $as_echo "$as_me:$LINENO: error: PK11_GetCertFromPrivateKey missing but needed. See https://bugzilla.mozilla.org/show_bug.cgi?id=262274. Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&5 -echo "$as_me: error: PK11_GetCertFromPrivateKey missing but needed. +$as_echo "$as_me: error: PK11_GetCertFromPrivateKey missing but needed. See https://bugzilla.mozilla.org/show_bug.cgi?id=262274. Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&2;} { (exit 1); exit 1; }; } @@ -18363,17 +20061,17 @@ fi MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then - echo "$as_me:$LINENO: checking whether $tmp was compiled with --enable-ldap" >&5 -echo $ECHO_N "checking whether $tmp was compiled with --enable-ldap... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether $tmp was compiled with --enable-ldap" >&5 +$as_echo_n "checking whether $tmp was compiled with --enable-ldap... " >&6; } if test -d "$MOZ_INC/ldap"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } MOZ_LDAP_CFLAGS="-I$MOZ_INC" else - { { echo "$as_me:$LINENO: error: no. + { { $as_echo "$as_me:$LINENO: error: no. Could not find LDAP header include files in $MOZ_INC/ldap. Please recompile $tmp with --enable-ldap or use --with-openldap." >&5 -echo "$as_me: error: no. +$as_echo "$as_me: error: no. Could not find LDAP header include files in $MOZ_INC/ldap. Please recompile $tmp with --enable-ldap or use --with-openldap." >&2;} { (exit 1); exit 1; }; } @@ -18387,48 +20085,48 @@ Please recompile $tmp with --enable-ldap or use --with-openldap." >&2;} fi elif test "$enable_mozilla" = "no"; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } WITH_MOZILLA=NO ENABLE_NSS_MODULE=NO enable_nss_module=no else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_MOZILLA=NO BUILD_TYPE="$BUILD_TYPE MOZ" if test -z "$with_mozilla_version"; then MOZILLA_VERSION= else - echo "$as_me:$LINENO: checking which mozilla version to build" >&5 -echo $ECHO_N "checking which mozilla version to build... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which mozilla version to build" >&5 +$as_echo_n "checking which mozilla version to build... " >&6; } MOZILLA_VERSION=$with_mozilla_version enable_build_mozilla=1 - echo "$as_me:$LINENO: result: $MOZILLA_VERSION" >&5 -echo "${ECHO_T}$MOZILLA_VERSION" >&6 + { $as_echo "$as_me:$LINENO: result: $MOZILLA_VERSION" >&5 +$as_echo "$MOZILLA_VERSION" >&6; } fi -echo "$as_me:$LINENO: checking for toolkit mozilla should use" >&5 -echo $ECHO_N "checking for toolkit mozilla should use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for toolkit mozilla should use" >&5 +$as_echo_n "checking for toolkit mozilla should use... " >&6; } if test -z "$with_mozilla_toolkit"; then if test "$_os" != "WINNT" ; then if test "$_os" = "Darwin" ; then MOZILLA_TOOLKIT=mac - echo "$as_me:$LINENO: result: mac" >&5 -echo "${ECHO_T}mac" >&6 + { $as_echo "$as_me:$LINENO: result: mac" >&5 +$as_echo "mac" >&6; } else MOZILLA_TOOLKIT=gtk2 - echo "$as_me:$LINENO: result: gtk2" >&5 -echo "${ECHO_T}gtk2" >&6 + { $as_echo "$as_me:$LINENO: result: gtk2" >&5 +$as_echo "gtk2" >&6; } fi fi else MOZILLA_TOOLKIT=$with_mozilla_toolkit enable_build_mozilla=1 - echo "$as_me:$LINENO: result: $MOZILLA_TOOLKIT" >&5 -echo "${ECHO_T}$MOZILLA_TOOLKIT" >&6 + { $as_echo "$as_me:$LINENO: result: $MOZILLA_TOOLKIT" >&5 +$as_echo "$MOZILLA_TOOLKIT" >&6; } fi #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not @@ -18445,63 +20143,63 @@ else enable_build_mozilla= fi -echo "$as_me:$LINENO: checking whether to build Mozilla/SeaMonkey" >&5 -echo $ECHO_N "checking whether to build Mozilla/SeaMonkey... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build Mozilla/SeaMonkey" >&5 +$as_echo_n "checking whether to build Mozilla/SeaMonkey... " >&6; } if test -n "$enable_build_mozilla"; then BUILD_MOZAB="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else BUILD_MOZAB="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to build provided NSS module" >&5 -echo $ECHO_N "checking whether to build provided NSS module... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build provided NSS module" >&5 +$as_echo_n "checking whether to build provided NSS module... " >&6; } if test "$enable_nss_module" != "no"; then ENABLE_NSS_MODULE="YES" BUILD_TYPE="$BUILD_TYPE NSS" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for Mozilla build tooling" >&5 -echo $ECHO_N "checking for Mozilla build tooling... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for Mozilla build tooling" >&5 +$as_echo_n "checking for Mozilla build tooling... " >&6; } if test -z "$MOZILLABUILD" ; then -{ { echo "$as_me:$LINENO: error: Mozilla build tooling not found. +{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling not found. Use the --with-mozilla-build option after installling the tools obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32" >&5 -echo "$as_me: error: Mozilla build tooling not found. +$as_echo "$as_me: error: Mozilla build tooling not found. Use the --with-mozilla-build option after installling the tools obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32" >&2;} { (exit 1); exit 1; }; } else if test \( "$WITH_MINGWIN" = "yes" \) ; then if test ! -d "$MOZILLABUILD" ; then -{ { echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 -echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} +{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 +$as_echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } fi else if test ! -d "$MOZILLABUILD/moztools" \ -o ! -d "$MOZILLABUILD/msys" ; then -{ { echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 -echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} +{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 +$as_echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } fi fi fi fi else ENABLE_NSS_MODULE="NO" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "$BUILD_MOZAB" = "TRUE"; then @@ -18509,13 +20207,13 @@ if test "$BUILD_MOZAB" = "TRUE"; then if test "$WITH_MINGWIN" != "yes"; then # compiling with MSVC. Only supported platform here is MSVS2005 at the moment. if test "$MSVSVER" != "2005"; then - { { echo "$as_me:$LINENO: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&5 -echo "$as_me: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&2;} + { { $as_echo "$as_me:$LINENO: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&5 +$as_echo "$as_me: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&2;} { (exit 1); exit 1; }; } fi else - { echo "$as_me:$LINENO: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&5 -echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&5 +$as_echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&2;} echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn fi fi @@ -18525,254 +20223,206 @@ echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and likely fi MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source" MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst` - echo "$as_me:$LINENO: checking for mozilla sources" >&5 -echo $ECHO_N "checking for mozilla sources... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mozilla sources" >&5 +$as_echo_n "checking for mozilla sources... " >&6; } if test -z "$MOZILLA_FETCH_FILE"; then - echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6 + { $as_echo "$as_me:$LINENO: result: not found" >&5 +$as_echo "not found" >&6; } HAVE_MOZILLA_TARBALL=n else - echo "$as_me:$LINENO: checking for $MOZILLA_FETCH_FILE" >&5 -echo $ECHO_N "checking for $MOZILLA_FETCH_FILE... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for $MOZILLA_FETCH_FILE" >&5 +$as_echo_n "checking for $MOZILLA_FETCH_FILE... " >&6; } if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then if test -z "$DO_FETCH"; then - echo "$as_me:$LINENO: result: will be fetched" >&5 -echo "${ECHO_T}will be fetched" >&6 + { $as_echo "$as_me:$LINENO: result: will be fetched" >&5 +$as_echo "will be fetched" >&6; } HAVE_MOZILLA_TARBALL=y else - echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6 + { $as_echo "$as_me:$LINENO: result: not found" >&5 +$as_echo "not found" >&6; } HAVE_MOZILLA_TARBALL=n fi else - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } HAVE_MOZILLA_TARBALL=y fi fi if test "$HAVE_MOZILLA_TARBALL" != "y"; then - { { echo "$as_me:$LINENO: error: Mozilla/SeaMonkey source archive not found. + { { $as_echo "$as_me:$LINENO: error: Mozilla/SeaMonkey source archive not found. Use \"./fetch_tarballs.sh ooo.lst\" to download." >&5 -echo "$as_me: error: Mozilla/SeaMonkey source archive not found. +$as_echo "$as_me: error: Mozilla/SeaMonkey source archive not found. Use \"./fetch_tarballs.sh ooo.lst\" to download." >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for moztools binaries" >&5 -echo $ECHO_N "checking for moztools binaries... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for moztools binaries" >&5 +$as_echo_n "checking for moztools binaries... " >&6; } if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then - { { echo "$as_me:$LINENO: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip + { { $as_echo "$as_me:$LINENO: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)" >&5 -echo "$as_me: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip +$as_echo "$as_me: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } fi elif test "$_os" = "Darwin"; then if test "$MOZILLA_TOOLKIT" = "gtk2"; then - { echo "$as_me:$LINENO: checking whether mozilla can be built..." >&5 -echo "$as_me: checking whether mozilla can be built..." >&6;} + { $as_echo "$as_me:$LINENO: checking whether mozilla can be built..." >&5 +$as_echo "$as_me: checking whether mozilla can be built..." >&6;} - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZGTK2" >&5 +$as_echo_n "checking for MOZGTK2... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZGTK2_CFLAGS"; then + pkg_cv_MOZGTK2_CFLAGS="$MOZGTK2_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZGTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZGTK2_LIBS"; then + pkg_cv_MOZGTK2_LIBS="$MOZGTK2_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZGTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" >&5 -echo $ECHO_N "checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZGTK2_CFLAGS" >&5 -echo $ECHO_N "checking MOZGTK2_CFLAGS... $ECHO_C" >&6 - MOZGTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - echo "$as_me:$LINENO: result: $MOZGTK2_CFLAGS" >&5 -echo "${ECHO_T}$MOZGTK2_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZGTK2_LIBS" >&5 -echo $ECHO_N "checking MOZGTK2_LIBS... $ECHO_C" >&6 - MOZGTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - echo "$as_me:$LINENO: result: $MOZGTK2_LIBS" >&5 -echo "${ECHO_T}$MOZGTK2_LIBS" >&6 - else - MOZGTK2_CFLAGS="" - MOZGTK2_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZGTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - - fi +if test $pkg_failed = yes; then - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZGTK2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` + else + MOZGTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZGTK2_PKG_ERRORS" >&5 - if test $succeeded = yes; then - { echo "$as_me:$LINENO: OK - can build mozilla" >&5 -echo "$as_me: OK - can build mozilla" >&6;} - else - { { echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 -echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 +$as_echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} { (exit 1); exit 1; }; } - fi - +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 +$as_echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} + { (exit 1); exit 1; }; } +else + MOZGTK2_CFLAGS=$pkg_cv_MOZGTK2_CFLAGS + MOZGTK2_LIBS=$pkg_cv_MOZGTK2_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: OK - can build mozilla" >&5 +$as_echo "$as_me: OK - can build mozilla" >&6;} +fi else - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 +$as_echo_n "checking for MOZLIBREQ... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZLIBREQ_CFLAGS"; then + pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libIDL-2.0 >= 0.6.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "libIDL-2.0 >= 0.6.3") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.6.3" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZLIBREQ_LIBS"; then + pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libIDL-2.0 >= 0.6.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "libIDL-2.0 >= 0.6.3") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.6.3" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.6.3" >&5 -echo $ECHO_N "checking for libIDL-2.0 >= 0.6.3... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "libIDL-2.0 >= 0.6.3" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 - MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.6.3"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 - MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.6.3"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 - else - MOZLIBREQ_CFLAGS="" - MOZLIBREQ_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.6.3"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - MOZIDL="TRUE" - else - MOZIDL="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libIDL-2.0 >= 0.6.3"` + else + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.6.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZLIBREQ_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + MOZIDL="" +elif test $pkg_failed = untried; then + MOZIDL="" +else + MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS + MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + MOZIDL="TRUE" +fi if test -z "$MOZIDL"; then - { { echo "$as_me:$LINENO: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&5 -echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&2;} + { { $as_echo "$as_me:$LINENO: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&5 +$as_echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&2;} { (exit 1); exit 1; }; } fi fi @@ -18780,408 +20430,308 @@ echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac t # Generic Unix/Linux section if test "$MOZILLA_TOOLKIT" = "gtk2"; then - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 +$as_echo_n "checking for MOZLIBREQ... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZLIBREQ_CFLAGS"; then + pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZLIBREQ_LIBS"; then + pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+-2.0" >&5 -echo $ECHO_N "checking for gtk+-2.0... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gtk+-2.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 - MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 - MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+-2.0"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 - else - MOZLIBREQ_CFLAGS="" - MOZLIBREQ_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - MOZGTK="TRUE" - else - MOZGTK="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0"` + else + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZLIBREQ_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + MOZGTK="" +elif test $pkg_failed = untried; then + MOZGTK="" +else + MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS + MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + MOZGTK="TRUE" +fi if test -z "$MOZGTK"; then - { { echo "$as_me:$LINENO: error: GTK2 is needed to build mozilla." >&5 -echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} + { { $as_echo "$as_me:$LINENO: error: GTK2 is needed to build mozilla." >&5 +$as_echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} { (exit 1); exit 1; }; } fi - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 +$as_echo_n "checking for MOZLIBREQ... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZLIBREQ_CFLAGS"; then + pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libIDL-2.0 >= 0.8.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libIDL-2.0 >= 0.8.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZLIBREQ_LIBS"; then + pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libIDL-2.0 >= 0.8.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libIDL-2.0 >= 0.8.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.8.0" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.8.0" >&5 -echo $ECHO_N "checking for libIDL-2.0 >= 0.8.0... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 - MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 - MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.8.0"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 - else - MOZLIBREQ_CFLAGS="" - MOZLIBREQ_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - MOZIDL="TRUE" - else - MOZIDL="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"` + else + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZLIBREQ_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + MOZIDL="" +elif test $pkg_failed = untried; then + MOZIDL="" +else + MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS + MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + MOZIDL="TRUE" +fi if test -z "$MOZIDL"; then - { { echo "$as_me:$LINENO: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&5 -echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&2;} + { { $as_echo "$as_me:$LINENO: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&5 +$as_echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&2;} { (exit 1); exit 1; }; } fi else - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 +$as_echo_n "checking for MOZLIBREQ... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZLIBREQ_CFLAGS"; then + pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+ >= 1.2.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+ >= 1.2.3") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+ >= 1.2.3" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZLIBREQ_LIBS"; then + pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+ >= 1.2.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+ >= 1.2.3") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+ >= 1.2.3" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+ >= 1.2.3" >&5 -echo $ECHO_N "checking for gtk+ >= 1.2.3... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gtk+ >= 1.2.3" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 - MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+ >= 1.2.3"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 - MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+ >= 1.2.3"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 - else - MOZLIBREQ_CFLAGS="" - MOZLIBREQ_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+ >= 1.2.3"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - MOZGTK="TRUE" - else - MOZGTK="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+ >= 1.2.3"` + else + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+ >= 1.2.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZLIBREQ_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + MOZGTK="" +elif test $pkg_failed = untried; then + MOZGTK="" +else + MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS + MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + MOZGTK="TRUE" +fi if test -z "$MOZGTK"; then - { { echo "$as_me:$LINENO: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&5 -echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&2;} + { { $as_echo "$as_me:$LINENO: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&5 +$as_echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&2;} { (exit 1); exit 1; }; } fi - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 +$as_echo_n "checking for MOZLIBREQ... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MOZLIBREQ_CFLAGS"; then + pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libidl >= 0.6.3 libidl <= 0.6.8\"") >&5 + ($PKG_CONFIG --exists --print-errors "libidl >= 0.6.3 libidl <= 0.6.8") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libidl >= 0.6.3 libidl <= 0.6.8" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MOZLIBREQ_LIBS"; then + pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libidl >= 0.6.3 libidl <= 0.6.8\"") >&5 + ($PKG_CONFIG --exists --print-errors "libidl >= 0.6.3 libidl <= 0.6.8") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libidl >= 0.6.3 libidl <= 0.6.8" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libidl >= 0.6.3 libidl <= 0.6.8" >&5 -echo $ECHO_N "checking for libidl >= 0.6.3 libidl <= 0.6.8... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "libidl >= 0.6.3 libidl <= 0.6.8" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 - MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libidl >= 0.6.3 libidl <= 0.6.8"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 - MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libidl >= 0.6.3 libidl <= 0.6.8"` - echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 - else - MOZLIBREQ_CFLAGS="" - MOZLIBREQ_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libidl >= 0.6.3 libidl <= 0.6.8"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - MOZIDL="TRUE" - else - MOZIDL="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libidl >= 0.6.3 libidl <= 0.6.8"` + else + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libidl >= 0.6.3 libidl <= 0.6.8"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MOZLIBREQ_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + MOZIDL="" +elif test $pkg_failed = untried; then + MOZIDL="" +else + MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS + MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + MOZIDL="TRUE" +fi if test -z "$MOZIDL"; then - { { echo "$as_me:$LINENO: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&5 -echo "$as_me: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&2;} + { { $as_echo "$as_me:$LINENO: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&5 +$as_echo "$as_me: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&2;} { (exit 1); exit 1; }; } fi fi @@ -19202,25 +20752,25 @@ fi -echo "$as_me:$LINENO: checking which sane header to use" >&5 -echo $ECHO_N "checking which sane header to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which sane header to use" >&5 +$as_echo_n "checking which sane header to use... " >&6; } if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \ test "$with_system_sane_header" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_SANE_HEADER=YES if test "${ac_cv_header_sane_sane_h+set}" = set; then - echo "$as_me:$LINENO: checking for sane/sane.h" >&5 -echo $ECHO_N "checking for sane/sane.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for sane/sane.h" >&5 +$as_echo_n "checking for sane/sane.h... " >&6; } if test "${ac_cv_header_sane_sane_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 -echo "${ECHO_T}$ac_cv_header_sane_sane_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 +$as_echo "$ac_cv_header_sane_sane_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sane/sane.h usability" >&5 -echo $ECHO_N "checking sane/sane.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking sane/sane.h usability" >&5 +$as_echo_n "checking sane/sane.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19231,41 +20781,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sane/sane.h presence" >&5 -echo $ECHO_N "checking sane/sane.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking sane/sane.h presence" >&5 +$as_echo_n "checking sane/sane.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19274,110 +20821,103 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sane/sane.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sane/sane.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sane/sane.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sane/sane.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sane/sane.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sane/sane.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sane/sane.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sane/sane.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sane/sane.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sane/sane.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sane/sane.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sane/sane.h" >&5 -echo $ECHO_N "checking for sane/sane.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for sane/sane.h" >&5 +$as_echo_n "checking for sane/sane.h... " >&6; } if test "${ac_cv_header_sane_sane_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_sane_sane_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 -echo "${ECHO_T}$ac_cv_header_sane_sane_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 +$as_echo "$ac_cv_header_sane_sane_h" >&6; } fi -if test $ac_cv_header_sane_sane_h = yes; then +if test "x$ac_cv_header_sane_sane_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: sane not found. install sane" >&5 -echo "$as_me: error: sane not found. install sane" >&2;} + { { $as_echo "$as_me:$LINENO: error: sane not found. install sane" >&5 +$as_echo "$as_me: error: sane not found. install sane" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_SANE_HEADER=NO BUILD_TYPE="$BUILD_TYPE SANE" fi -echo "$as_me:$LINENO: checking which icu to use" >&5 -echo $ECHO_N "checking which icu to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which icu to use" >&5 +$as_echo_n "checking which icu to use... " >&6; } if test -n "$with_system_icu" -o -n "$with_system_libs" && \ test "$with_system_icu" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_ICU=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - echo "$as_me:$LINENO: checking for unicode/rbbi.h" >&5 -echo $ECHO_N "checking for unicode/rbbi.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for unicode/rbbi.h" >&5 +$as_echo_n "checking for unicode/rbbi.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19386,41 +20926,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ unicode/rbbi.h _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - echo "$as_me:$LINENO: result: checked." >&5 -echo "${ECHO_T}checked." >&6 -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + { $as_echo "$as_me:$LINENO: result: checked." >&5 +$as_echo "checked." >&6; } +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: icu headers not found." >&5 -echo "$as_me: error: icu headers not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: icu headers not found." >&5 +$as_echo "$as_me: error: icu headers not found." >&2;} { (exit 1); exit 1; }; } fi + rm -f conftest.err conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Extract the first word of "genbrk", so it can be a program name with args. set dummy genbrk; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SYSTEM_GENBRK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $SYSTEM_GENBRK in [\\/]* | ?:[\\/]*) @@ -19434,38 +20980,39 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENBRK="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi SYSTEM_GENBRK=$ac_cv_path_SYSTEM_GENBRK - if test -n "$SYSTEM_GENBRK"; then - echo "$as_me:$LINENO: result: $SYSTEM_GENBRK" >&5 -echo "${ECHO_T}$SYSTEM_GENBRK" >&6 + { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENBRK" >&5 +$as_echo "$SYSTEM_GENBRK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$SYSTEM_GENBRK"; then - { { echo "$as_me:$LINENO: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&5 -echo "$as_me: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&2;} + { { $as_echo "$as_me:$LINENO: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&5 +$as_echo "$as_me: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "genccode", so it can be a program name with args. set dummy genccode; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SYSTEM_GENCCODE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $SYSTEM_GENCCODE in [\\/]* | ?:[\\/]*) @@ -19479,38 +21026,39 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENCCODE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi SYSTEM_GENCCODE=$ac_cv_path_SYSTEM_GENCCODE - if test -n "$SYSTEM_GENCCODE"; then - echo "$as_me:$LINENO: result: $SYSTEM_GENCCODE" >&5 -echo "${ECHO_T}$SYSTEM_GENCCODE" >&6 + { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENCCODE" >&5 +$as_echo "$SYSTEM_GENCCODE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$SYSTEM_GENCCODE"; then - { { echo "$as_me:$LINENO: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&5 -echo "$as_me: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&2;} + { { $as_echo "$as_me:$LINENO: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&5 +$as_echo "$as_me: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "gencmn", so it can be a program name with args. set dummy gencmn; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SYSTEM_GENCMN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $SYSTEM_GENCMN in [\\/]* | ?:[\\/]*) @@ -19524,128 +21072,44 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENCMN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 - fi -done -done - - ;; -esac -fi -SYSTEM_GENCMN=$ac_cv_path_SYSTEM_GENCMN - -if test -n "$SYSTEM_GENCMN"; then - echo "$as_me:$LINENO: result: $SYSTEM_GENCMN" >&5 -echo "${ECHO_T}$SYSTEM_GENCMN" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - if test -z "$SYSTEM_GENCMN"; then - { { echo "$as_me:$LINENO: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&5 -echo "$as_me: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&2;} - { (exit 1); exit 1; }; } - fi - echo "$as_me:$LINENO: checking ICU version" >&5 -echo $ECHO_N "checking ICU version... $ECHO_C" >&6 - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -int main(int argc, char **argv) { - if(U_ICU_VERSION_MAJOR_NUM < 4) - return 1; - else - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: not suitable, only >= 4.0 supported currently" >&5 -echo "$as_me: error: not suitable, only >= 4.0 supported currently" >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + fi +done +done +IFS=$as_save_IFS + ;; +esac +fi +SYSTEM_GENCMN=$ac_cv_path_SYSTEM_GENCMN +if test -n "$SYSTEM_GENCMN"; then + { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENCMN" >&5 +$as_echo "$SYSTEM_GENCMN" >&6; } else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - SYSTEM_ICU=NO - BUILD_TYPE="$BUILD_TYPE ICU" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$SYSTEM_GENCMN"; then + { { $as_echo "$as_me:$LINENO: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&5 +$as_echo "$as_me: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&2;} + { (exit 1); exit 1; }; } + fi - - - -echo "$as_me:$LINENO: checking whether to enable graphite support" >&5 -echo $ECHO_N "checking whether to enable graphite support... $ECHO_C" >&6 -if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - ENABLE_GRAPHITE="TRUE" - echo "$as_me:$LINENO: checking which graphite to use" >&5 -echo $ECHO_N "checking which graphite to use... $ECHO_C" >&6 - if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ - test "$with_system_graphite" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 - SYSTEM_GRAPHITE=YES - - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + # Extract the first word of "icu-config", so it can be a program name with args. +set dummy icu-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ICUCONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - case $PKG_CONFIG in + case $ICUCONFIG in [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ac_cv_path_ICUCONFIG="$ICUCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -19654,91 +21118,194 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ICUCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG +ICUCONFIG=$ac_cv_path_ICUCONFIG +if test -n "$ICUCONFIG"; then + { $as_echo "$as_me:$LINENO: result: $ICUCONFIG" >&5 +$as_echo "$ICUCONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + { $as_echo "$as_me:$LINENO: checking ICU version" >&5 +$as_echo_n "checking ICU version... " >&6; } + ICU_VERSION=`$ICUCONFIG --version` + ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` + ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` + ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` + + if test "$ICU_MAJOR" -ge "4"; then + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } + else + { { $as_echo "$as_me:$LINENO: error: not suitable, only >= 4.0 supported currently" >&5 +$as_echo "$as_me: error: not suitable, only >= 4.0 supported currently" >&2;} + { (exit 1); exit 1; }; } + fi + +else + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_ICU=NO + BUILD_TYPE="$BUILD_TYPE ICU" +fi + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking whether to enable graphite support" >&5 +$as_echo_n "checking whether to enable graphite support... " >&6; } +if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + ENABLE_GRAPHITE="TRUE" + { $as_echo "$as_me:$LINENO: checking which graphite to use" >&5 +$as_echo_n "checking which graphite to use... " >&6; } + if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ + test "$with_system_graphite" != "no"; then + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_GRAPHITE=YES + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GRAPHITE" >&5 +$as_echo_n "checking for GRAPHITE... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GRAPHITE_CFLAGS"; then + pkg_cv_GRAPHITE_CFLAGS="$GRAPHITE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"silgraphite \"") >&5 + ($PKG_CONFIG --exists --print-errors "silgraphite ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GRAPHITE_CFLAGS=`$PKG_CONFIG --cflags "silgraphite " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$GRAPHITE_LIBS"; then + pkg_cv_GRAPHITE_LIBS="$GRAPHITE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"silgraphite \"") >&5 + ($PKG_CONFIG --exists --print-errors "silgraphite ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GRAPHITE_LIBS=`$PKG_CONFIG --libs "silgraphite " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for silgraphite " >&5 -echo $ECHO_N "checking for silgraphite ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "silgraphite " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GRAPHITE_CFLAGS" >&5 -echo $ECHO_N "checking GRAPHITE_CFLAGS... $ECHO_C" >&6 - GRAPHITE_CFLAGS=`$PKG_CONFIG --cflags "silgraphite "` - echo "$as_me:$LINENO: result: $GRAPHITE_CFLAGS" >&5 -echo "${ECHO_T}$GRAPHITE_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GRAPHITE_LIBS" >&5 -echo $ECHO_N "checking GRAPHITE_LIBS... $ECHO_C" >&6 - GRAPHITE_LIBS=`$PKG_CONFIG --libs "silgraphite "` - echo "$as_me:$LINENO: result: $GRAPHITE_LIBS" >&5 -echo "${ECHO_T}$GRAPHITE_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GRAPHITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "silgraphite "` else - GRAPHITE_CFLAGS="" - GRAPHITE_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GRAPHITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "silgraphite "` - echo $GRAPHITE_PKG_ERRORS + GRAPHITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "silgraphite "` fi + # Put the nasty error message in config.log where it belongs + echo "$GRAPHITE_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (silgraphite ) were not met: +$GRAPHITE_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables GRAPHITE_CFLAGS +and GRAPHITE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (silgraphite ) were not met: + +$GRAPHITE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GRAPHITE_CFLAGS +and GRAPHITE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GRAPHITE_CFLAGS +and GRAPHITE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GRAPHITE_CFLAGS +and GRAPHITE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + GRAPHITE_CFLAGS=$pkg_cv_GRAPHITE_CFLAGS + GRAPHITE_LIBS=$pkg_cv_GRAPHITE_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_GRAPHITE=NO BUILD_TYPE="$BUILD_TYPE GRAPHITE" fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -19748,15 +21315,15 @@ fi if test "$_os" = "Darwin"; then if test "x$with_x" = "xyes"; then - { { echo "$as_me:$LINENO: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&5 -echo "$as_me: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&2;} + { { $as_echo "$as_me:$LINENO: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&5 +$as_echo "$as_me: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: checking for /System/Library/Frameworks/AppKit.framework" >&5 -echo $ECHO_N "checking for /System/Library/Frameworks/AppKit.framework... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /System/Library/Frameworks/AppKit.framework" >&5 +$as_echo_n "checking for /System/Library/Frameworks/AppKit.framework... " >&6; } if test -d "/System/Library/Frameworks/AppKit.framework/"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } x_includes="no_x_includes" x_libraries="no_x_libraries" enable_gtk=no @@ -19764,8 +21331,8 @@ echo "${ECHO_T}yes" >&6 ENABLE_CUPS="" else - { { echo "$as_me:$LINENO: error: No AppKit.framewrok found" >&5 -echo "$as_me: error: No AppKit.framewrok found" >&2;} + { { $as_echo "$as_me:$LINENO: error: No AppKit.framewrok found" >&5 +$as_echo "$as_me: error: No AppKit.framewrok found" >&2;} { (exit 1); exit 1; }; } fi fi @@ -19778,44 +21345,49 @@ elif test "$_os" = "OS2" ; then echo "Do Nothing for _os = OS2. Don't check for X11." : elif test "$_os" != "WINNT" ; then - echo "$as_me:$LINENO: checking for X" >&5 -echo $ECHO_N "checking for X... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for X" >&5 +$as_echo_n "checking for X... " >&6; } -# Check whether --with-x or --without-x was given. +# Check whether --with-x was given. if test "${with_x+set}" = set; then - withval="$with_x" + withval=$with_x; +fi -fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else - if test "${ac_cv_have_x+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + case $x_includes,$x_libraries in #( + *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 +$as_echo "$as_me: error: cannot use X directory names containing '" >&2;} + { (exit 1); exit 1; }; };; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no -rm -fr conftest.dir +rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' -acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -_ACEOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then + for ac_extension in a so sl dylib la dll; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done @@ -19823,16 +21395,16 @@ _ACEOF # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in - /usr/include) ;; + /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in - /usr/lib | /lib) ;; + /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. - rm -fr conftest.dir + rm -f -r conftest.dir fi # Standard set of common directories for X headers. @@ -19873,7 +21445,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Intrinsic.h. + # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19881,39 +21453,39 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # We can compile using X headers with no special include directory. ac_x_includes= else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Intrinsic.h"; then + if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi + rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no @@ -19922,94 +21494,99 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lXt $LIBS" + LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XtMalloc (0) +XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -LIBS=$ac_save_LIBS -for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` + LIBS=$ac_save_LIBS +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl; do - if test -r $ac_dir/libXt.$ac_extension; then + for ac_extension in a so sl dylib la dll; do + if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no -if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" -else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -fi +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac fi - - fi +;; #( + *) have_x=yes;; + esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then - echo "$as_me:$LINENO: result: $have_x" >&5 -echo "${ECHO_T}$have_x" >&6 + { $as_echo "$as_me:$LINENO: result: $have_x" >&5 +$as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then @@ -20030,12 +21607,12 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 -echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +$as_echo_n "checking whether -R must be followed by a space... " >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20051,43 +21628,35 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_R_nospace=yes -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_R_nospace=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $ac_R_nospace = yes; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - X_LIBS="$X_LIBS -R$x_libraries" - else LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20103,47 +21672,47 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_R_space=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_R_space=no + { $as_echo "$as_me:$LINENO: result: neither works" >&5 +$as_echo "neither works" >&6; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - if test $ac_R_space = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - X_LIBS="$X_LIBS -R $x_libraries" - else - echo "$as_me:$LINENO: result: neither works" >&5 -echo "${ECHO_T}neither works" >&6 - fi - fi - LIBS=$ac_xsave_LIBS - esac +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. @@ -20164,52 +21733,51 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { -XOpenDisplay (); +return XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" @@ -20220,65 +21788,66 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { -dnet_ntoa (); +return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dnet_dnet_ntoa=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dnet_dnet_ntoa=no + ac_cv_lib_dnet_dnet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 -if test $ac_cv_lib_dnet_dnet_ntoa = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" @@ -20289,63 +21858,66 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { -dnet_ntoa (); +return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dnet_stub_dnet_ntoa=no + ac_cv_lib_dnet_stub_dnet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 -if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" @@ -20357,10 +21929,10 @@ rm -f conftest.err conftest.$ac_objext \ # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 +$as_echo_n "checking for gethostbyname... " >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20385,74 +21957,69 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_gethostbyname=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +$as_echo "$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = no; then - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" @@ -20463,65 +22030,66 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_nsl_gethostbyname=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 -if test $ac_cv_lib_nsl_gethostbyname = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 -echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -20532,57 +22100,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_bsd_gethostbyname=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gethostbyname=no + ac_cv_lib_bsd_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 -if test $ac_cv_lib_bsd_gethostbyname = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } +if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -20596,10 +22165,10 @@ fi # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for connect" >&5 +$as_echo_n "checking for connect... " >&6; } if test "${ac_cv_func_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20624,74 +22193,69 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_connect=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +$as_echo "$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = no; then - echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +$as_echo_n "checking for connect in -lsocket... " >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" @@ -20702,67 +22266,68 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); int main () { -connect (); +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_socket_connect=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_connect=no + ac_cv_lib_socket_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 -if test $ac_cv_lib_socket_connect = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +$as_echo "$ac_cv_lib_socket_connect" >&6; } +if test "x$ac_cv_lib_socket_connect" = x""yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - echo "$as_me:$LINENO: checking for remove" >&5 -echo $ECHO_N "checking for remove... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for remove" >&5 +$as_echo_n "checking for remove... " >&6; } if test "${ac_cv_func_remove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20787,74 +22352,69 @@ cat >>conftest.$ac_ext <<_ACEOF #undef remove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char remove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_remove) || defined (__stub___remove) +#if defined __stub_remove || defined __stub___remove choke me -#else -char (*f) () = remove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != remove; +return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_remove=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_remove=no + ac_cv_func_remove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -echo "${ECHO_T}$ac_cv_func_remove" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +$as_echo "$ac_cv_func_remove" >&6; } if test $ac_cv_func_remove = no; then - echo "$as_me:$LINENO: checking for remove in -lposix" >&5 -echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +$as_echo_n "checking for remove in -lposix... " >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" @@ -20865,67 +22425,68 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char remove (); int main () { -remove (); +return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_posix_remove=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_posix_remove=no + ac_cv_lib_posix_remove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 -echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 -if test $ac_cv_lib_posix_remove = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +$as_echo "$ac_cv_lib_posix_remove" >&6; } +if test "x$ac_cv_lib_posix_remove" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo "$as_me:$LINENO: checking for shmat" >&5 -echo $ECHO_N "checking for shmat... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for shmat" >&5 +$as_echo_n "checking for shmat... " >&6; } if test "${ac_cv_func_shmat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20950,74 +22511,69 @@ cat >>conftest.$ac_ext <<_ACEOF #undef shmat -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shmat (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_shmat) || defined (__stub___shmat) +#if defined __stub_shmat || defined __stub___shmat choke me -#else -char (*f) () = shmat; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != shmat; +return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_shmat=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_shmat=no + ac_cv_func_shmat=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -echo "${ECHO_T}$ac_cv_func_shmat" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +$as_echo "$ac_cv_func_shmat" >&6; } if test $ac_cv_func_shmat = no; then - echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 -echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +$as_echo_n "checking for shmat in -lipc... " >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" @@ -21028,57 +22584,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shmat (); int main () { -shmat (); +return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ipc_shmat=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ipc_shmat=no + ac_cv_lib_ipc_shmat=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 -echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 -if test $ac_cv_lib_ipc_shmat = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +$as_echo "$ac_cv_lib_ipc_shmat" >&6; } +if test "x$ac_cv_lib_ipc_shmat" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -21094,10 +22651,10 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" @@ -21108,57 +22665,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char IceConnectionNumber (); int main () { -IceConnectionNumber (); +return IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ICE_IceConnectionNumber=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ICE_IceConnectionNumber=no + ac_cv_lib_ICE_IceConnectionNumber=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 -if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -21175,21 +22733,21 @@ fi x_libraries="default_x_libraries" fi if test -z "$x_libraries"; then - { { echo "$as_me:$LINENO: error: No X libraries found" >&5 -echo "$as_me: error: No X libraries found" >&2;} + { { $as_echo "$as_me:$LINENO: error: No X libraries found" >&5 +$as_echo "$as_me: error: No X libraries found" >&2;} { (exit 1); exit 1; }; } # Exit fi if test -z "$x_includes"; then - { { echo "$as_me:$LINENO: error: No X includes found" >&5 -echo "$as_me: error: No X includes found" >&2;} + { { $as_echo "$as_me:$LINENO: error: No X includes found" >&5 +$as_echo "$as_me: error: No X includes found" >&2;} { (exit 1); exit 1; }; } # Exit fi CFLAGS=$X_CFLAGS LDFLAGS="$X_LDFLAGS $X_LIBS" - echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 -echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 +$as_echo_n "checking for XOpenDisplay in -lX11... " >&6; } if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" @@ -21200,68 +22758,69 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { -XOpenDisplay (); +return XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_X11_XOpenDisplay=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_X11_XOpenDisplay=no + ac_cv_lib_X11_XOpenDisplay=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5 -echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 -if test $ac_cv_lib_X11_XOpenDisplay = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +$as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; } +if test "x$ac_cv_lib_X11_XOpenDisplay" = x""yes; then x_libs="-lX11 $X_EXTRA_LIBS" else - { { echo "$as_me:$LINENO: error: X Development libraries not found" >&5 -echo "$as_me: error: X Development libraries not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: X Development libraries not found" >&5 +$as_echo "$as_me: error: X Development libraries not found" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for XauDisposeAuth in -lXau" >&5 -echo $ECHO_N "checking for XauDisposeAuth in -lXau... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for XauDisposeAuth in -lXau" >&5 +$as_echo_n "checking for XauDisposeAuth in -lXau... " >&6; } if test "${ac_cv_lib_Xau_XauDisposeAuth+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXau $LIBS" @@ -21272,57 +22831,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XauDisposeAuth (); int main () { -XauDisposeAuth (); +return XauDisposeAuth (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_Xau_XauDisposeAuth=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_Xau_XauDisposeAuth=no + ac_cv_lib_Xau_XauDisposeAuth=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xau_XauDisposeAuth" >&5 -echo "${ECHO_T}$ac_cv_lib_Xau_XauDisposeAuth" >&6 -if test $ac_cv_lib_Xau_XauDisposeAuth = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xau_XauDisposeAuth" >&5 +$as_echo "$ac_cv_lib_Xau_XauDisposeAuth" >&6; } +if test "x$ac_cv_lib_Xau_XauDisposeAuth" = x""yes; then XAU_LIBS="-lXau" fi @@ -21354,20 +22914,20 @@ fi if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then - echo "$as_me:$LINENO: checking whether to use Xaw" >&5 -echo $ECHO_N "checking whether to use Xaw... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use Xaw" >&5 +$as_echo_n "checking whether to use Xaw... " >&6; } if test "$enable_Xaw" = "no"; then DISABLE_XAW=TRUE - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } for ac_header in X11/Composite.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21380,62 +22940,63 @@ cat >>conftest.$ac_ext <<_ACEOF #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { echo "$as_me:$LINENO: error: Xt include headers not found" >&5 -echo "$as_me: error: Xt include headers not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: Xt include headers not found" >&5 +$as_echo "$as_me: error: Xt include headers not found" >&2;} { (exit 1); exit 1; }; } fi done else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } for ac_header in X11/Xaw/Label.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21448,56 +23009,57 @@ cat >>conftest.$ac_ext <<_ACEOF #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { echo "$as_me:$LINENO: error: Xaw include headers not found" >&5 -echo "$as_me: error: Xaw include headers not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: Xaw include headers not found" >&5 +$as_echo "$as_me: error: Xaw include headers not found" >&2;} { (exit 1); exit 1; }; } fi done -echo "$as_me:$LINENO: checking for main in -lXaw" >&5 -echo $ECHO_N "checking for main in -lXaw... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for main in -lXaw" >&5 +$as_echo_n "checking for main in -lXaw... " >&6; } if test "${ac_cv_lib_Xaw_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXaw $LIBS" @@ -21512,47 +23074,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_Xaw_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_Xaw_main=no + ac_cv_lib_Xaw_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_main" >&5 -echo "${ECHO_T}$ac_cv_lib_Xaw_main" >&6 -if test $ac_cv_lib_Xaw_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_main" >&5 +$as_echo "$ac_cv_lib_Xaw_main" >&6; } +if test "x$ac_cv_lib_Xaw_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXAW 1 _ACEOF @@ -21560,8 +23123,8 @@ _ACEOF LIBS="-lXaw $LIBS" else - { { echo "$as_me:$LINENO: error: Xaw library not found or functional" >&5 -echo "$as_me: error: Xaw library not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: Xaw library not found or functional" >&5 +$as_echo "$as_me: error: Xaw library not found or functional" >&2;} { (exit 1); exit 1; }; } fi @@ -21573,17 +23136,17 @@ fi if test "$ENABLE_FONTCONFIG" = "TRUE" ; then if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 -echo $ECHO_N "checking for fontconfig/fontconfig.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 +$as_echo_n "checking for fontconfig/fontconfig.h... " >&6; } if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 -echo "${ECHO_T}$ac_cv_header_fontconfig_fontconfig_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 +$as_echo "$ac_cv_header_fontconfig_fontconfig_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking fontconfig/fontconfig.h usability" >&5 -echo $ECHO_N "checking fontconfig/fontconfig.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking fontconfig/fontconfig.h usability" >&5 +$as_echo_n "checking fontconfig/fontconfig.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21594,41 +23157,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking fontconfig/fontconfig.h presence" >&5 -echo $ECHO_N "checking fontconfig/fontconfig.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking fontconfig/fontconfig.h presence" >&5 +$as_echo_n "checking fontconfig/fontconfig.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21637,95 +23197,90 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 -echo $ECHO_N "checking for fontconfig/fontconfig.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 +$as_echo_n "checking for fontconfig/fontconfig.h... " >&6; } if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_fontconfig_fontconfig_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 -echo "${ECHO_T}$ac_cv_header_fontconfig_fontconfig_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 +$as_echo "$ac_cv_header_fontconfig_fontconfig_h" >&6; } fi -if test $ac_cv_header_fontconfig_fontconfig_h = yes; then +if test "x$ac_cv_header_fontconfig_fontconfig_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&5 -echo "$as_me: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&2;} + { { $as_echo "$as_me:$LINENO: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&5 +$as_echo "$as_me: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking whether fontconfig is >= 2.2.0" >&5 -echo $ECHO_N "checking whether fontconfig is >= 2.2.0... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether fontconfig is >= 2.2.0" >&5 +$as_echo_n "checking whether fontconfig is >= 2.2.0... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21743,63 +23298,77 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: no, fontconfig >= 2.2.0 needed" >&5 -echo "$as_me: error: no, fontconfig >= 2.2.0 needed" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no, fontconfig >= 2.2.0 needed" >&5 +$as_echo "$as_me: error: no, fontconfig >= 2.2.0 needed" >&2;} { (exit 1); exit 1; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: checking whether to link to Xrender" >&5 -echo $ECHO_N "checking whether to link to Xrender... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to link to Xrender" >&5 +$as_echo_n "checking whether to link to Xrender... " >&6; } if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } XRENDER_LINK=YES with_system_xrender_headers=yes else - echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -echo "${ECHO_T}no, dynamically open it" >&6 + { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 +$as_echo "no, dynamically open it" >&6; } XRENDER_LINK=NO fi -echo "$as_me:$LINENO: checking which Xrender headers to use" >&5 -echo $ECHO_N "checking which Xrender headers to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which Xrender headers to use" >&5 +$as_echo_n "checking which Xrender headers to use... " >&6; } if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \ test "$with_system_xrender_headers" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_XRENDER_HEADERS=YES if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 -echo $ECHO_N "checking for X11/extensions/Xrender.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 +$as_echo_n "checking for X11/extensions/Xrender.h... " >&6; } if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrender_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_Xrender_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking X11/extensions/Xrender.h usability" >&5 -echo $ECHO_N "checking X11/extensions/Xrender.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrender.h usability" >&5 +$as_echo_n "checking X11/extensions/Xrender.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21810,41 +23379,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking X11/extensions/Xrender.h presence" >&5 -echo $ECHO_N "checking X11/extensions/Xrender.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrender.h presence" >&5 +$as_echo_n "checking X11/extensions/Xrender.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21853,99 +23419,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 -echo $ECHO_N "checking for X11/extensions/Xrender.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 +$as_echo_n "checking for X11/extensions/Xrender.h... " >&6; } if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_X11_extensions_Xrender_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrender_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_Xrender_h" >&6; } fi -if test $ac_cv_header_X11_extensions_Xrender_h = yes; then +if test "x$ac_cv_header_X11_extensions_Xrender_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Xrender not found. install X" >&5 -echo "$as_me: error: Xrender not found. install X" >&2;} + { { $as_echo "$as_me:$LINENO: error: Xrender not found. install X" >&5 +$as_echo "$as_me: error: Xrender not found. install X" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_XRENDER_HEADERS=NO BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" fi if test "$XRENDER_LINK" = "YES"; then -echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5 -echo $ECHO_N "checking for XRenderQueryVersion in -lXrender... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5 +$as_echo_n "checking for XRenderQueryVersion in -lXrender... " >&6; } if test "${ac_cv_lib_Xrender_XRenderQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrender $LIBS" @@ -21956,57 +23515,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XRenderQueryVersion (); int main () { -XRenderQueryVersion (); +return XRenderQueryVersion (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_Xrender_XRenderQueryVersion=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_Xrender_XRenderQueryVersion=no + ac_cv_lib_Xrender_XRenderQueryVersion=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderQueryVersion" >&6 -if test $ac_cv_lib_Xrender_XRenderQueryVersion = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryVersion" >&5 +$as_echo "$ac_cv_lib_Xrender_XRenderQueryVersion" >&6; } +if test "x$ac_cv_lib_Xrender_XRenderQueryVersion" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXRENDER 1 _ACEOF @@ -22014,8 +23574,8 @@ _ACEOF LIBS="-lXrender $LIBS" else - { { echo "$as_me:$LINENO: error: libXrender not found or functional" >&5 -echo "$as_me: error: libXrender not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: libXrender not found or functional" >&5 +$as_echo "$as_me: error: libXrender not found or functional" >&2;} { (exit 1); exit 1; }; } fi @@ -22023,124 +23583,99 @@ fi -echo "$as_me:$LINENO: checking whether to enable RandR support" >&5 -echo $ECHO_N "checking whether to enable RandR support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable RandR support" >&5 +$as_echo_n "checking whether to enable RandR support... " >&6; } if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then XRANDR_DLOPEN="TRUE" - echo "$as_me:$LINENO: result: resorting to dlopen libXrandr at runtime" >&5 -echo "${ECHO_T}resorting to dlopen libXrandr at runtime" >&6 + { $as_echo "$as_me:$LINENO: result: resorting to dlopen libXrandr at runtime" >&5 +$as_echo "resorting to dlopen libXrandr at runtime" >&6; } else XRANDR_DLOPEN="FALSE" - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for XRANDR" >&5 +$as_echo_n "checking for XRANDR... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$XRANDR_CFLAGS"; then + pkg_cv_XRANDR_CFLAGS="$XRANDR_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrandr >= 1.2\"") >&5 + ($PKG_CONFIG --exists --print-errors "xrandr >= 1.2") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XRANDR_CFLAGS=`$PKG_CONFIG --cflags "xrandr >= 1.2" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$XRANDR_LIBS"; then + pkg_cv_XRANDR_LIBS="$XRANDR_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrandr >= 1.2\"") >&5 + ($PKG_CONFIG --exists --print-errors "xrandr >= 1.2") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XRANDR_LIBS=`$PKG_CONFIG --libs "xrandr >= 1.2" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for xrandr >= 1.2" >&5 -echo $ECHO_N "checking for xrandr >= 1.2... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "xrandr >= 1.2" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking XRANDR_CFLAGS" >&5 -echo $ECHO_N "checking XRANDR_CFLAGS... $ECHO_C" >&6 - XRANDR_CFLAGS=`$PKG_CONFIG --cflags "xrandr >= 1.2"` - echo "$as_me:$LINENO: result: $XRANDR_CFLAGS" >&5 -echo "${ECHO_T}$XRANDR_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking XRANDR_LIBS" >&5 -echo $ECHO_N "checking XRANDR_LIBS... $ECHO_C" >&6 - XRANDR_LIBS=`$PKG_CONFIG --libs "xrandr >= 1.2"` - echo "$as_me:$LINENO: result: $XRANDR_LIBS" >&5 -echo "${ECHO_T}$XRANDR_LIBS" >&6 - else - XRANDR_CFLAGS="" - XRANDR_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - XRANDR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrandr >= 1.2"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - ENABLE_RANDR="TRUE" - else - ENABLE_RANDR="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XRANDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xrandr >= 1.2"` + else + XRANDR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrandr >= 1.2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$XRANDR_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + ENABLE_RANDR="" +elif test $pkg_failed = untried; then + ENABLE_RANDR="" +else + XRANDR_CFLAGS=$pkg_cv_XRANDR_CFLAGS + XRANDR_LIBS=$pkg_cv_XRANDR_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + ENABLE_RANDR="TRUE" +fi if test "$ENABLE_RANDR" != "TRUE"; then if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 -echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 +$as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; } if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h usability" >&5 -echo $ECHO_N "checking X11/extensions/Xrandr.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h usability" >&5 +$as_echo_n "checking X11/extensions/Xrandr.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22151,41 +23686,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h presence" >&5 -echo $ECHO_N "checking X11/extensions/Xrandr.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h presence" >&5 +$as_echo_n "checking X11/extensions/Xrandr.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22194,93 +23726,86 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 -echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 +$as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; } if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_X11_extensions_Xrandr_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; } fi -if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then +if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&5 -echo "$as_me: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&2;} + { { $as_echo "$as_me:$LINENO: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&5 +$as_echo "$as_me: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&2;} { (exit 1); exit 1; }; } fi XRANDR_CFLAGS=" " -echo "$as_me:$LINENO: checking for XRRQueryExtension in -lXrandr" >&5 -echo $ECHO_N "checking for XRRQueryExtension in -lXrandr... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for XRRQueryExtension in -lXrandr" >&5 +$as_echo_n "checking for XRRQueryExtension in -lXrandr... " >&6; } if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrandr $LIBS" @@ -22291,57 +23816,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XRRQueryExtension (); int main () { -XRRQueryExtension (); +return XRRQueryExtension (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_Xrandr_XRRQueryExtension=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_Xrandr_XRRQueryExtension=no + ac_cv_lib_Xrandr_XRRQueryExtension=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5 -echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRQueryExtension" >&6 -if test $ac_cv_lib_Xrandr_XRRQueryExtension = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5 +$as_echo "$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; } +if test "x$ac_cv_lib_Xrandr_XRRQueryExtension" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXRANDR 1 _ACEOF @@ -22349,147 +23875,124 @@ _ACEOF LIBS="-lXrandr $LIBS" else - { { echo "$as_me:$LINENO: error: libXrandr not found or functional" >&5 -echo "$as_me: error: libXrandr not found or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: libXrandr not found or functional" >&5 +$as_echo "$as_me: error: libXrandr not found or functional" >&2;} { (exit 1); exit 1; }; } fi XRANDR_LIBS="-lXrandr " ENABLE_RANDR="TRUE" - echo "$as_me:$LINENO: result: enabling RandR support" >&5 -echo "${ECHO_T}enabling RandR support" >&6 + { $as_echo "$as_me:$LINENO: result: enabling RandR support" >&5 +$as_echo "enabling RandR support" >&6; } fi fi else ENABLE_RANDR="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to use neon" >&5 -echo $ECHO_N "checking whether to use neon... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to use neon" >&5 +$as_echo_n "checking whether to use neon... " >&6; } if test "$enable_neon" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } DISABLE_NEON=TRUE else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -echo "$as_me:$LINENO: checking which neon to use" >&5 -echo $ECHO_N "checking which neon to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +{ $as_echo "$as_me:$LINENO: checking which neon to use" >&5 +$as_echo_n "checking which neon to use... " >&6; } if test -n "$with_system_neon" -o -n "$with_system_libs" && \ test "$with_system_neon" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for NEON" >&5 +$as_echo_n "checking for NEON... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$NEON_CFLAGS"; then + pkg_cv_NEON_CFLAGS="$NEON_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"neon >= 0.26.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "neon >= 0.26.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.26.0" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$NEON_LIBS"; then + pkg_cv_NEON_LIBS="$NEON_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"neon >= 0.26.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "neon >= 0.26.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.26.0" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for neon >= 0.26.0" >&5 -echo $ECHO_N "checking for neon >= 0.26.0... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "neon >= 0.26.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5 -echo $ECHO_N "checking NEON_CFLAGS... $ECHO_C" >&6 - NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.26.0"` - echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5 -echo "${ECHO_T}$NEON_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking NEON_LIBS" >&5 -echo $ECHO_N "checking NEON_LIBS... $ECHO_C" >&6 - NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.26.0"` - echo "$as_me:$LINENO: result: $NEON_LIBS" >&5 -echo "${ECHO_T}$NEON_LIBS" >&6 - else - NEON_CFLAGS="" - NEON_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - NEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "neon >= 0.26.0"` - - fi +if test $pkg_failed = yes; then - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + NEON_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "neon >= 0.26.0"` + else + NEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "neon >= 0.26.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$NEON_PKG_ERRORS" >&5 - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 -echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 +$as_echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} { (exit 1); exit 1; }; } - fi - +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 +$as_echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} + { (exit 1); exit 1; }; } +else + NEON_CFLAGS=$pkg_cv_NEON_CFLAGS + NEON_LIBS=$pkg_cv_NEON_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" SYSTEM_NEON=YES else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_NEON=NO NEON_LIBS=-lneon NEON_CFLAGS= @@ -22504,12 +24007,12 @@ fi if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then with_system_openssl=yes fi -echo "$as_me:$LINENO: checking which libssl to use" >&5 -echo $ECHO_N "checking which libssl to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which libssl to use" >&5 +$as_echo_n "checking which libssl to use... " >&6; } if test -n "$with_system_openssl" -o -n "$with_system_libs" && \ test "$with_system_openssl" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } # Mac OS builds should get out without extra stuff is the Mac porters' # wish. And pkg-config is although Xcode ships a .pc for openssl if test "$_os" = "Darwin"; then @@ -22517,108 +24020,123 @@ echo "${ECHO_T}external" >&6 OPENSSL_LIBS="-lssl -lcrypto" else - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for OPENSSL" >&5 +$as_echo_n "checking for OPENSSL... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$OPENSSL_CFLAGS"; then + pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"openssl \"") >&5 + ($PKG_CONFIG --exists --print-errors "openssl ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$OPENSSL_LIBS"; then + pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"openssl \"") >&5 + ($PKG_CONFIG --exists --print-errors "openssl ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for openssl " >&5 -echo $ECHO_N "checking for openssl ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "openssl " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking OPENSSL_CFLAGS" >&5 -echo $ECHO_N "checking OPENSSL_CFLAGS... $ECHO_C" >&6 - OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl "` - echo "$as_me:$LINENO: result: $OPENSSL_CFLAGS" >&5 -echo "${ECHO_T}$OPENSSL_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking OPENSSL_LIBS" >&5 -echo $ECHO_N "checking OPENSSL_LIBS... $ECHO_C" >&6 - OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl "` - echo "$as_me:$LINENO: result: $OPENSSL_LIBS" >&5 -echo "${ECHO_T}$OPENSSL_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl "` else - OPENSSL_CFLAGS="" - OPENSSL_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl "` - echo $OPENSSL_PKG_ERRORS + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl "` fi + # Put the nasty error message in config.log where it belongs + echo "$OPENSSL_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (openssl ) were not met: +$OPENSSL_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables OPENSSL_CFLAGS +and OPENSSL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (openssl ) were not met: + +$OPENSSL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables OPENSSL_CFLAGS +and OPENSSL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables OPENSSL_CFLAGS +and OPENSSL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables OPENSSL_CFLAGS +and OPENSSL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS + OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi fi SYSTEM_OPENSSL=YES else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_OPENSSL=NO BUILD_TYPE="$BUILD_TYPE OPENSSL" fi @@ -22626,123 +24144,138 @@ fi -echo "$as_me:$LINENO: checking whether to enable agg" >&5 -echo $ECHO_N "checking whether to enable agg... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable agg" >&5 +$as_echo_n "checking whether to enable agg... " >&6; } if test "$with_agg" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_AGG=YES - echo "$as_me:$LINENO: checking which AGG to use" >&5 -echo $ECHO_N "checking which AGG to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which AGG to use" >&5 +$as_echo_n "checking which AGG to use... " >&6; } if test -n "$with_system_agg" -o -n "$with_system_libs" && \ test "$with_system_agg" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for AGG" >&5 +$as_echo_n "checking for AGG... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$AGG_CFLAGS"; then + pkg_cv_AGG_CFLAGS="$AGG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libagg >= 2.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "libagg >= 2.3") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$AGG_LIBS"; then + pkg_cv_AGG_LIBS="$AGG_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libagg >= 2.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "libagg >= 2.3") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3" 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libagg >= 2.3" >&5 -echo $ECHO_N "checking for libagg >= 2.3... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "libagg >= 2.3" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking AGG_CFLAGS" >&5 -echo $ECHO_N "checking AGG_CFLAGS... $ECHO_C" >&6 - AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3"` - echo "$as_me:$LINENO: result: $AGG_CFLAGS" >&5 -echo "${ECHO_T}$AGG_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking AGG_LIBS" >&5 -echo $ECHO_N "checking AGG_LIBS... $ECHO_C" >&6 - AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3"` - echo "$as_me:$LINENO: result: $AGG_LIBS" >&5 -echo "${ECHO_T}$AGG_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + AGG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libagg >= 2.3"` else - AGG_CFLAGS="" - AGG_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - AGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libagg >= 2.3"` - echo $AGG_PKG_ERRORS + AGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libagg >= 2.3"` fi + # Put the nasty error message in config.log where it belongs + echo "$AGG_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (libagg >= 2.3) were not met: +$AGG_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables AGG_CFLAGS +and AGG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libagg >= 2.3) were not met: + +$AGG_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables AGG_CFLAGS +and AGG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables AGG_CFLAGS +and AGG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } - fi +Alternatively, you may set the environment variables AGG_CFLAGS +and AGG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - echo "$as_me:$LINENO: checking agg version" >&5 -echo $ECHO_N "checking agg version... $ECHO_C" >&6 +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + AGG_CFLAGS=$pkg_cv_AGG_CFLAGS + AGG_LIBS=$pkg_cv_AGG_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + { $as_echo "$as_me:$LINENO: checking agg version" >&5 +$as_echo_n "checking agg version... " >&6; } # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway # (/usr/include gets stripped from pkg-config output) if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then @@ -22754,23 +24287,23 @@ echo $ECHO_N "checking agg version... $ECHO_C" >&6 $PKG_CONFIG --modversion libagg | grep -q 2.4; then # 2.4's libagg.pc.in still contains 2.3 :/ if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then - echo "$as_me:$LINENO: result: 2.4" >&5 -echo "${ECHO_T}2.4" >&6 + { $as_echo "$as_me:$LINENO: result: 2.4" >&5 +$as_echo "2.4" >&6; } AGG_VERSION=2400 else - echo "$as_me:$LINENO: result: 2.3" >&5 -echo "${ECHO_T}2.3" >&6 + { $as_echo "$as_me:$LINENO: result: 2.3" >&5 +$as_echo "2.3" >&6; } AGG_VERSION=2300 fi SYSTEM_AGG=YES else - { { echo "$as_me:$LINENO: error: only agg 2.3 and 2.4 are supported" >&5 -echo "$as_me: error: only agg 2.3 and 2.4 are supported" >&2;} + { { $as_echo "$as_me:$LINENO: error: only agg 2.3 and 2.4 are supported" >&5 +$as_echo "$as_me: error: only agg 2.3 and 2.4 are supported" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_AGG=NO AGG_VERSION=2300 BUILD_TYPE="$BUILD_TYPE AGG" @@ -22779,114 +24312,129 @@ echo "${ECHO_T}internal" >&6 fi -echo "$as_me:$LINENO: checking which redland library to use" >&5 -echo $ECHO_N "checking which redland library to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which redland library to use" >&5 +$as_echo_n "checking which redland library to use... " >&6; } if test -n "$with_system_redland" -o -n "$with_system_libs" && \ test "$with_system_redland" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_REDLAND=YES - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for REDLAND" >&5 +$as_echo_n "checking for REDLAND... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$REDLAND_CFLAGS"; then + pkg_cv_REDLAND_CFLAGS="$REDLAND_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"redland >= 1.0.8\"") >&5 + ($PKG_CONFIG --exists --print-errors "redland >= 1.0.8") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_REDLAND_CFLAGS=`$PKG_CONFIG --cflags "redland >= 1.0.8" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$REDLAND_LIBS"; then + pkg_cv_REDLAND_LIBS="$REDLAND_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"redland >= 1.0.8\"") >&5 + ($PKG_CONFIG --exists --print-errors "redland >= 1.0.8") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_REDLAND_LIBS=`$PKG_CONFIG --libs "redland >= 1.0.8" 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for redland >= 1.0.8" >&5 -echo $ECHO_N "checking for redland >= 1.0.8... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "redland >= 1.0.8" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking REDLAND_CFLAGS" >&5 -echo $ECHO_N "checking REDLAND_CFLAGS... $ECHO_C" >&6 - REDLAND_CFLAGS=`$PKG_CONFIG --cflags "redland >= 1.0.8"` - echo "$as_me:$LINENO: result: $REDLAND_CFLAGS" >&5 -echo "${ECHO_T}$REDLAND_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking REDLAND_LIBS" >&5 -echo $ECHO_N "checking REDLAND_LIBS... $ECHO_C" >&6 - REDLAND_LIBS=`$PKG_CONFIG --libs "redland >= 1.0.8"` - echo "$as_me:$LINENO: result: $REDLAND_LIBS" >&5 -echo "${ECHO_T}$REDLAND_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + REDLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "redland >= 1.0.8"` else - REDLAND_CFLAGS="" - REDLAND_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - REDLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "redland >= 1.0.8"` - echo $REDLAND_PKG_ERRORS + REDLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "redland >= 1.0.8"` fi + # Put the nasty error message in config.log where it belongs + echo "$REDLAND_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (redland >= 1.0.8) were not met: +$REDLAND_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables REDLAND_CFLAGS +and REDLAND_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (redland >= 1.0.8) were not met: + +$REDLAND_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables REDLAND_CFLAGS +and REDLAND_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables REDLAND_CFLAGS +and REDLAND_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables REDLAND_CFLAGS +and REDLAND_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + REDLAND_CFLAGS=$pkg_cv_REDLAND_CFLAGS + REDLAND_LIBS=$pkg_cv_REDLAND_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi +else + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE REDLAND" SYSTEM_REDLAND=NO fi @@ -22894,128 +24442,103 @@ fi -echo "$as_me:$LINENO: checking which libhunspell to use" >&5 -echo $ECHO_N "checking which libhunspell to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which libhunspell to use" >&5 +$as_echo_n "checking which libhunspell to use... " >&6; } if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ test "$with_system_hunspell" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_HUNSPELL=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for HUNSPELL" >&5 +$as_echo_n "checking for HUNSPELL... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$HUNSPELL_CFLAGS"; then + pkg_cv_HUNSPELL_CFLAGS="$HUNSPELL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hunspell\"") >&5 + ($PKG_CONFIG --exists --print-errors "hunspell") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$HUNSPELL_LIBS"; then + pkg_cv_HUNSPELL_LIBS="$HUNSPELL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hunspell\"") >&5 + ($PKG_CONFIG --exists --print-errors "hunspell") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for hunspell" >&5 -echo $ECHO_N "checking for hunspell... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "hunspell" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking HUNSPELL_CFLAGS" >&5 -echo $ECHO_N "checking HUNSPELL_CFLAGS... $ECHO_C" >&6 - HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell"` - echo "$as_me:$LINENO: result: $HUNSPELL_CFLAGS" >&5 -echo "${ECHO_T}$HUNSPELL_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking HUNSPELL_LIBS" >&5 -echo $ECHO_N "checking HUNSPELL_LIBS... $ECHO_C" >&6 - HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell"` - echo "$as_me:$LINENO: result: $HUNSPELL_LIBS" >&5 -echo "${ECHO_T}$HUNSPELL_LIBS" >&6 - else - HUNSPELL_CFLAGS="" - HUNSPELL_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hunspell"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - HUNSPELL_PC="TRUE" - else - HUNSPELL_PC="" - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "hunspell"` + else + HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hunspell"` + fi + # Put the nasty error message in config.log where it belongs + echo "$HUNSPELL_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HUNSPELL_PC="" +elif test $pkg_failed = untried; then + HUNSPELL_PC="" +else + HUNSPELL_CFLAGS=$pkg_cv_HUNSPELL_CFLAGS + HUNSPELL_LIBS=$pkg_cv_HUNSPELL_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HUNSPELL_PC="TRUE" +fi if test "$HUNSPELL_PC" != "TRUE"; then if test "${ac_cv_header_hunspell_hxx+set}" = set; then - echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 -echo $ECHO_N "checking for hunspell.hxx... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 +$as_echo_n "checking for hunspell.hxx... " >&6; } if test "${ac_cv_header_hunspell_hxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 -echo "${ECHO_T}$ac_cv_header_hunspell_hxx" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 +$as_echo "$ac_cv_header_hunspell_hxx" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking hunspell.hxx usability" >&5 -echo $ECHO_N "checking hunspell.hxx usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking hunspell.hxx usability" >&5 +$as_echo_n "checking hunspell.hxx usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23026,41 +24549,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking hunspell.hxx presence" >&5 -echo $ECHO_N "checking hunspell.hxx presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking hunspell.hxx presence" >&5 +$as_echo_n "checking hunspell.hxx presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23069,94 +24589,87 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: hunspell.hxx: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: hunspell.hxx: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: hunspell.hxx: present but cannot be compiled" >&5 -echo "$as_me: WARNING: hunspell.hxx: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell.hxx: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: hunspell.hxx: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: hunspell.hxx: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: hunspell.hxx: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 -echo $ECHO_N "checking for hunspell.hxx... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 +$as_echo_n "checking for hunspell.hxx... " >&6; } if test "${ac_cv_header_hunspell_hxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_hunspell_hxx=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 -echo "${ECHO_T}$ac_cv_header_hunspell_hxx" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 +$as_echo "$ac_cv_header_hunspell_hxx" >&6; } fi -if test $ac_cv_header_hunspell_hxx = yes; then +if test "x$ac_cv_header_hunspell_hxx" = x""yes; then : else if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then - echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 -echo $ECHO_N "checking for hunspell/hunspell.hxx... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 +$as_echo_n "checking for hunspell/hunspell.hxx... " >&6; } if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 -echo "${ECHO_T}$ac_cv_header_hunspell_hunspell_hxx" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 +$as_echo "$ac_cv_header_hunspell_hunspell_hxx" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking hunspell/hunspell.hxx usability" >&5 -echo $ECHO_N "checking hunspell/hunspell.hxx usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking hunspell/hunspell.hxx usability" >&5 +$as_echo_n "checking hunspell/hunspell.hxx usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23167,41 +24680,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking hunspell/hunspell.hxx presence" >&5 -echo $ECHO_N "checking hunspell/hunspell.hxx presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking hunspell/hunspell.hxx presence" >&5 +$as_echo_n "checking hunspell/hunspell.hxx presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23210,83 +24720,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&5 -echo "$as_me: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 -echo $ECHO_N "checking for hunspell/hunspell.hxx... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 +$as_echo_n "checking for hunspell/hunspell.hxx... " >&6; } if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_hunspell_hunspell_hxx=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 -echo "${ECHO_T}$ac_cv_header_hunspell_hunspell_hxx" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 +$as_echo "$ac_cv_header_hunspell_hunspell_hxx" >&6; } fi -if test $ac_cv_header_hunspell_hunspell_hxx = yes; then +if test "x$ac_cv_header_hunspell_hunspell_hxx" = x""yes; then HUNSPELL_CFLAGS=-I/usr/include/hunspell else - { { echo "$as_me:$LINENO: error: hunspell headers not found." >&5 -echo "$as_me: error: hunspell headers not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: hunspell headers not found." >&5 +$as_echo "$as_me: error: hunspell headers not found." >&2;} { (exit 1); exit 1; }; } fi @@ -23296,10 +24799,10 @@ fi -echo "$as_me:$LINENO: checking for main in -lhunspell" >&5 -echo $ECHO_N "checking for main in -lhunspell... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for main in -lhunspell" >&5 +$as_echo_n "checking for main in -lhunspell... " >&6; } if test "${ac_cv_lib_hunspell_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhunspell $LIBS" @@ -23314,47 +24817,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_hunspell_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_hunspell_main=no + ac_cv_lib_hunspell_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_main" >&5 -echo "${ECHO_T}$ac_cv_lib_hunspell_main" >&6 -if test $ac_cv_lib_hunspell_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_main" >&5 +$as_echo "$ac_cv_lib_hunspell_main" >&6; } +if test "x$ac_cv_lib_hunspell_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBHUNSPELL 1 _ACEOF @@ -23362,8 +24866,8 @@ _ACEOF LIBS="-lhunspell $LIBS" else - { { echo "$as_me:$LINENO: error: hunspell library not found." >&5 -echo "$as_me: error: hunspell library not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: hunspell library not found." >&5 +$as_echo "$as_me: error: hunspell library not found." >&2;} { (exit 1); exit 1; }; } fi @@ -23376,8 +24880,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_HUNSPELL=NO BUILD_TYPE="$BUILD_TYPE HUNSPELL" fi @@ -23385,25 +24889,25 @@ fi -echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5 -echo $ECHO_N "checking which altlinuxhyph to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5 +$as_echo_n "checking which altlinuxhyph to use... " >&6; } if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \ test "$with_system_altlinuxhyph" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_HYPH=YES if test "${ac_cv_header_hyphen_h+set}" = set; then - echo "$as_me:$LINENO: checking for hyphen.h" >&5 -echo $ECHO_N "checking for hyphen.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for hyphen.h" >&5 +$as_echo_n "checking for hyphen.h... " >&6; } if test "${ac_cv_header_hyphen_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 -echo "${ECHO_T}$ac_cv_header_hyphen_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 +$as_echo "$ac_cv_header_hyphen_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking hyphen.h usability" >&5 -echo $ECHO_N "checking hyphen.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking hyphen.h usability" >&5 +$as_echo_n "checking hyphen.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23414,41 +24918,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking hyphen.h presence" >&5 -echo $ECHO_N "checking hyphen.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking hyphen.h presence" >&5 +$as_echo_n "checking hyphen.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23457,91 +24958,84 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: hyphen.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: hyphen.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: hyphen.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: hyphen.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: hyphen.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: hyphen.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: hyphen.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: hyphen.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: hyphen.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: hyphen.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: hyphen.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: hyphen.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: hyphen.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: hyphen.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: hyphen.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: hyphen.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for hyphen.h" >&5 -echo $ECHO_N "checking for hyphen.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for hyphen.h" >&5 +$as_echo_n "checking for hyphen.h... " >&6; } if test "${ac_cv_header_hyphen_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_hyphen_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 -echo "${ECHO_T}$ac_cv_header_hyphen_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 +$as_echo "$ac_cv_header_hyphen_h" >&6; } fi -if test $ac_cv_header_hyphen_h = yes; then +if test "x$ac_cv_header_hyphen_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: altlinuxhyph headers not found." >&5 -echo "$as_me: error: altlinuxhyph headers not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: altlinuxhyph headers not found." >&5 +$as_echo "$as_me: error: altlinuxhyph headers not found." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for struct _HyphenDict.cset" >&5 -echo $ECHO_N "checking for struct _HyphenDict.cset... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for struct _HyphenDict.cset" >&5 +$as_echo_n "checking for struct _HyphenDict.cset... " >&6; } if test "${ac_cv_member_struct__HyphenDict_cset+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23562,33 +25056,29 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct__HyphenDict_cset=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -23607,52 +25097,50 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct__HyphenDict_cset=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct__HyphenDict_cset=no + ac_cv_member_struct__HyphenDict_cset=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct__HyphenDict_cset" >&5 -echo "${ECHO_T}$ac_cv_member_struct__HyphenDict_cset" >&6 -if test $ac_cv_member_struct__HyphenDict_cset = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct__HyphenDict_cset" >&5 +$as_echo "$ac_cv_member_struct__HyphenDict_cset" >&6; } +if test "x$ac_cv_member_struct__HyphenDict_cset" = x""yes; then : else - { { echo "$as_me:$LINENO: error: no. You are sure you have altlinuyhyph headers?" >&5 -echo "$as_me: error: no. You are sure you have altlinuyhyph headers?" >&2;} + { { $as_echo "$as_me:$LINENO: error: no. You are sure you have altlinuyhyph headers?" >&5 +$as_echo "$as_me: error: no. You are sure you have altlinuyhyph headers?" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyphen" >&5 -echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhyphen... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyphen" >&5 +$as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhyphen... " >&6; } if test "${ac_cv_lib_hyphen_hnj_hyphen_hyphenate2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyphen $LIBS" @@ -23663,69 +25151,70 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -hnj_hyphen_hyphenate2 (); +return hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no + ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&5 -echo "${ECHO_T}$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&6 -if test $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2 = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&5 +$as_echo "$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&6; } +if test "x$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" = x""yes; then HYPHEN_LIB=-lhyphen else - { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} + { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 +$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} { (exit 1); exit 1; }; } fi if test -z "$HYPHEN_LIB"; then - echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyph" >&5 -echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhyph... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyph" >&5 +$as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhyph... " >&6; } if test "${ac_cv_lib_hyph_hnj_hyphen_hyphenate2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyph $LIBS" @@ -23736,70 +25225,71 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -hnj_hyphen_hyphenate2 (); +return hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_hyph_hnj_hyphen_hyphenate2=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no + ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&5 -echo "${ECHO_T}$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&6 -if test $ac_cv_lib_hyph_hnj_hyphen_hyphenate2 = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&5 +$as_echo "$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&6; } +if test "x$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" = x""yes; then HYPHEN_LIB=-lhyph else - { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} + { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 +$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} { (exit 1); exit 1; }; } fi fi if test -z "$HYPHEN_LIB"; then - echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhnj" >&5 -echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhnj... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhnj" >&5 +$as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhnj... " >&6; } if test "${ac_cv_lib_hnj_hnj_hyphen_hyphenate2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhnj $LIBS" @@ -23810,195 +25300,171 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -hnj_hyphen_hyphenate2 (); +return hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_hnj_hnj_hyphen_hyphenate2=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no + ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&5 -echo "${ECHO_T}$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&6 -if test $ac_cv_lib_hnj_hnj_hyphen_hyphenate2 = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&5 +$as_echo "$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&6; } +if test "x$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" = x""yes; then HYPHEN_LIB=-lhnj else - { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} + { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 +$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} { (exit 1); exit 1; }; } fi fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_HYPH=NO BUILD_TYPE="$BUILD_TYPE HYPHEN" fi -echo "$as_me:$LINENO: checking which mythes to use" >&5 -echo $ECHO_N "checking which mythes to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which mythes to use" >&5 +$as_echo_n "checking which mythes to use... " >&6; } if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_MYTHES=YES - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for MYTHES" >&5 +$as_echo_n "checking for MYTHES... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$MYTHES_CFLAGS"; then + pkg_cv_MYTHES_CFLAGS="$MYTHES_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mythes\"") >&5 + ($PKG_CONFIG --exists --print-errors "mythes") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MYTHES_CFLAGS=`$PKG_CONFIG --cflags "mythes" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$MYTHES_LIBS"; then + pkg_cv_MYTHES_LIBS="$MYTHES_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mythes\"") >&5 + ($PKG_CONFIG --exists --print-errors "mythes") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_MYTHES_LIBS=`$PKG_CONFIG --libs "mythes" 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for mythes" >&5 -echo $ECHO_N "checking for mythes... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "mythes" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking MYTHES_CFLAGS" >&5 -echo $ECHO_N "checking MYTHES_CFLAGS... $ECHO_C" >&6 - MYTHES_CFLAGS=`$PKG_CONFIG --cflags "mythes"` - echo "$as_me:$LINENO: result: $MYTHES_CFLAGS" >&5 -echo "${ECHO_T}$MYTHES_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking MYTHES_LIBS" >&5 -echo $ECHO_N "checking MYTHES_LIBS... $ECHO_C" >&6 - MYTHES_LIBS=`$PKG_CONFIG --libs "mythes"` - echo "$as_me:$LINENO: result: $MYTHES_LIBS" >&5 -echo "${ECHO_T}$MYTHES_LIBS" >&6 - else - MYTHES_CFLAGS="" - MYTHES_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MYTHES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mythes"` - - fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if test $pkg_failed = yes; then - if test $succeeded = yes; then - MYTHES_PKGCONFIG=yes - else - MYTHES_PKGCONFIG=no - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + MYTHES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mythes"` + else + MYTHES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mythes"` + fi + # Put the nasty error message in config.log where it belongs + echo "$MYTHES_PKG_ERRORS" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + MYTHES_PKGCONFIG=no +elif test $pkg_failed = untried; then + MYTHES_PKGCONFIG=no +else + MYTHES_CFLAGS=$pkg_cv_MYTHES_CFLAGS + MYTHES_LIBS=$pkg_cv_MYTHES_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + MYTHES_PKGCONFIG=yes +fi if test "$MYTHES_PKGCONFIG" = "no"; then if test "${ac_cv_header_mythes_hxx+set}" = set; then - echo "$as_me:$LINENO: checking for mythes.hxx" >&5 -echo $ECHO_N "checking for mythes.hxx... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mythes.hxx" >&5 +$as_echo_n "checking for mythes.hxx... " >&6; } if test "${ac_cv_header_mythes_hxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 -echo "${ECHO_T}$ac_cv_header_mythes_hxx" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 +$as_echo "$ac_cv_header_mythes_hxx" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking mythes.hxx usability" >&5 -echo $ECHO_N "checking mythes.hxx usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking mythes.hxx usability" >&5 +$as_echo_n "checking mythes.hxx usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24009,41 +25475,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking mythes.hxx presence" >&5 -echo $ECHO_N "checking mythes.hxx presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking mythes.hxx presence" >&5 +$as_echo_n "checking mythes.hxx presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24052,92 +25515,85 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mythes.hxx: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: mythes.hxx: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mythes.hxx: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mythes.hxx: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mythes.hxx: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mythes.hxx: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mythes.hxx: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mythes.hxx: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: mythes.hxx: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: mythes.hxx: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: mythes.hxx: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for mythes.hxx" >&5 -echo $ECHO_N "checking for mythes.hxx... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for mythes.hxx" >&5 +$as_echo_n "checking for mythes.hxx... " >&6; } if test "${ac_cv_header_mythes_hxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_mythes_hxx=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 -echo "${ECHO_T}$ac_cv_header_mythes_hxx" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 +$as_echo "$ac_cv_header_mythes_hxx" >&6; } fi -if test $ac_cv_header_mythes_hxx = yes; then +if test "x$ac_cv_header_mythes_hxx" = x""yes; then : else - { { echo "$as_me:$LINENO: error: mythes.hxx headers not found." >&5 -echo "$as_me: error: mythes.hxx headers not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: mythes.hxx headers not found." >&5 +$as_echo "$as_me: error: mythes.hxx headers not found." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for main in -lmythes-1.2" >&5 -echo $ECHO_N "checking for main in -lmythes-1.2... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for main in -lmythes-1.2" >&5 +$as_echo_n "checking for main in -lmythes-1.2... " >&6; } if test "${ac_cv_lib_mythes_1_2_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes-1.2 $LIBS" @@ -24152,47 +25608,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mythes_1_2_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mythes_1_2_main=no + ac_cv_lib_mythes_1_2_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_1_2_main" >&5 -echo "${ECHO_T}$ac_cv_lib_mythes_1_2_main" >&6 -if test $ac_cv_lib_mythes_1_2_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_1_2_main" >&5 +$as_echo "$ac_cv_lib_mythes_1_2_main" >&6; } +if test "x$ac_cv_lib_mythes_1_2_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYTHES_1_2 1 _ACEOF @@ -24204,10 +25661,10 @@ else fi if test "$MYTHES_FOUND" = "no"; then - echo "$as_me:$LINENO: checking for main in -lmythes" >&5 -echo $ECHO_N "checking for main in -lmythes... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for main in -lmythes" >&5 +$as_echo_n "checking for main in -lmythes... " >&6; } if test "${ac_cv_lib_mythes_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes $LIBS" @@ -24222,47 +25679,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mythes_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mythes_main=no + ac_cv_lib_mythes_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_main" >&5 -echo "${ECHO_T}$ac_cv_lib_mythes_main" >&6 -if test $ac_cv_lib_mythes_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_main" >&5 +$as_echo "$ac_cv_lib_mythes_main" >&6; } +if test "x$ac_cv_lib_mythes_main" = x""yes; then MYTHES_FOUND=yes else MYTHES_FOUND=no @@ -24270,8 +25728,8 @@ fi fi if test "$MYTHES_FOUND" = "no"; then - { { echo "$as_me:$LINENO: error: mythes library not found!." >&5 -echo "$as_me: error: mythes library not found!." >&2;} + { { $as_echo "$as_me:$LINENO: error: mythes library not found!." >&5 +$as_echo "$as_me: error: mythes library not found!." >&2;} { (exit 1); exit 1; }; } fi fi @@ -24282,8 +25740,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_MYTHES=NO BUILD_TYPE="$BUILD_TYPE MYTHES" fi @@ -24291,25 +25749,25 @@ fi -echo "$as_me:$LINENO: checking which lpsolve to use" >&5 -echo $ECHO_N "checking which lpsolve to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which lpsolve to use" >&5 +$as_echo_n "checking which lpsolve to use... " >&6; } if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \ test "$with_system_lpsolve" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LPSOLVE=YES if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 -echo $ECHO_N "checking for lpsolve/lp_lib.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 +$as_echo_n "checking for lpsolve/lp_lib.h... " >&6; } if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 -echo "${ECHO_T}$ac_cv_header_lpsolve_lp_lib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 +$as_echo "$ac_cv_header_lpsolve_lp_lib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking lpsolve/lp_lib.h usability" >&5 -echo $ECHO_N "checking lpsolve/lp_lib.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking lpsolve/lp_lib.h usability" >&5 +$as_echo_n "checking lpsolve/lp_lib.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24320,41 +25778,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking lpsolve/lp_lib.h presence" >&5 -echo $ECHO_N "checking lpsolve/lp_lib.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking lpsolve/lp_lib.h presence" >&5 +$as_echo_n "checking lpsolve/lp_lib.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24363,93 +25818,86 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 -echo $ECHO_N "checking for lpsolve/lp_lib.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 +$as_echo_n "checking for lpsolve/lp_lib.h... " >&6; } if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_lpsolve_lp_lib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 -echo "${ECHO_T}$ac_cv_header_lpsolve_lp_lib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 +$as_echo "$ac_cv_header_lpsolve_lp_lib_h" >&6; } fi -if test $ac_cv_header_lpsolve_lp_lib_h = yes; then +if test "x$ac_cv_header_lpsolve_lp_lib_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: lpsolve headers not found." >&5 -echo "$as_me: error: lpsolve headers not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: lpsolve headers not found." >&5 +$as_echo "$as_me: error: lpsolve headers not found." >&2;} { (exit 1); exit 1; }; } fi # some systems need this. Like Ubuntu.... -echo "$as_me:$LINENO: checking for floor in -lm" >&5 -echo $ECHO_N "checking for floor in -lm... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for floor in -lm" >&5 +$as_echo_n "checking for floor in -lm... " >&6; } if test "${ac_cv_lib_m_floor+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" @@ -24460,57 +25908,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char floor (); int main () { -floor (); +return floor (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_m_floor=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_m_floor=no + ac_cv_lib_m_floor=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_m_floor" >&5 -echo "${ECHO_T}$ac_cv_lib_m_floor" >&6 -if test $ac_cv_lib_m_floor = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_floor" >&5 +$as_echo "$ac_cv_lib_m_floor" >&6; } +if test "x$ac_cv_lib_m_floor" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -24520,10 +25969,10 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -24534,57 +25983,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -24594,10 +26044,10 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for make_lp in -llpsolve55" >&5 -echo $ECHO_N "checking for make_lp in -llpsolve55... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for make_lp in -llpsolve55" >&5 +$as_echo_n "checking for make_lp in -llpsolve55... " >&6; } if test "${ac_cv_lib_lpsolve55_make_lp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llpsolve55 $LIBS" @@ -24608,57 +26058,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char make_lp (); int main () { -make_lp (); +return make_lp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_lpsolve55_make_lp=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_lpsolve55_make_lp=no + ac_cv_lib_lpsolve55_make_lp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_lpsolve55_make_lp" >&5 -echo "${ECHO_T}$ac_cv_lib_lpsolve55_make_lp" >&6 -if test $ac_cv_lib_lpsolve55_make_lp = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lpsolve55_make_lp" >&5 +$as_echo "$ac_cv_lib_lpsolve55_make_lp" >&6; } +if test "x$ac_cv_lib_lpsolve55_make_lp" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBLPSOLVE55 1 _ACEOF @@ -24666,37 +26117,37 @@ _ACEOF LIBS="-llpsolve55 $LIBS" else - { { echo "$as_me:$LINENO: error: lpsolve library not found or too old." >&5 -echo "$as_me: error: lpsolve library not found or too old." >&2;} + { { $as_echo "$as_me:$LINENO: error: lpsolve library not found or too old." >&5 +$as_echo "$as_me: error: lpsolve library not found or too old." >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LPSOLVE=NO BUILD_TYPE="$BUILD_TYPE LPSOLVE" fi -echo "$as_me:$LINENO: checking which libtextcat to use" >&5 -echo $ECHO_N "checking which libtextcat to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which libtextcat to use" >&5 +$as_echo_n "checking which libtextcat to use... " >&6; } if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_LIBTEXTCAT=YES if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 -echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 +$as_echo_n "checking for libtextcat/textcat.h... " >&6; } if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 -echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 +$as_echo "$ac_cv_header_libtextcat_textcat_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking libtextcat/textcat.h usability" >&5 -echo $ECHO_N "checking libtextcat/textcat.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking libtextcat/textcat.h usability" >&5 +$as_echo_n "checking libtextcat/textcat.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24707,41 +26158,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking libtextcat/textcat.h presence" >&5 -echo $ECHO_N "checking libtextcat/textcat.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking libtextcat/textcat.h presence" >&5 +$as_echo_n "checking libtextcat/textcat.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24750,92 +26198,85 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 -echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 +$as_echo_n "checking for libtextcat/textcat.h... " >&6; } if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_libtextcat_textcat_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 -echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 +$as_echo "$ac_cv_header_libtextcat_textcat_h" >&6; } fi -if test $ac_cv_header_libtextcat_textcat_h = yes; then +if test "x$ac_cv_header_libtextcat_textcat_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: libtextcat headers not found." >&5 -echo "$as_me: error: libtextcat headers not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libtextcat headers not found." >&5 +$as_echo "$as_me: error: libtextcat headers not found." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for special_textcat_Init in -ltextcat" >&5 -echo $ECHO_N "checking for special_textcat_Init in -ltextcat... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for special_textcat_Init in -ltextcat" >&5 +$as_echo_n "checking for special_textcat_Init in -ltextcat... " >&6; } if test "${ac_cv_lib_textcat_special_textcat_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltextcat $LIBS" @@ -24846,57 +26287,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char special_textcat_Init (); int main () { -special_textcat_Init (); +return special_textcat_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_textcat_special_textcat_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_textcat_special_textcat_Init=no + ac_cv_lib_textcat_special_textcat_Init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_textcat_special_textcat_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_textcat_special_textcat_Init" >&6 -if test $ac_cv_lib_textcat_special_textcat_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_textcat_special_textcat_Init" >&5 +$as_echo "$ac_cv_lib_textcat_special_textcat_Init" >&6; } +if test "x$ac_cv_lib_textcat_special_textcat_Init" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTEXTCAT 1 _ACEOF @@ -24904,44 +26346,44 @@ _ACEOF LIBS="-ltextcat $LIBS" else - { { echo "$as_me:$LINENO: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&5 -echo "$as_me: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&2;} + { { $as_echo "$as_me:$LINENO: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&5 +$as_echo "$as_me: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_LIBTEXTCAT=NO BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" fi -echo "$as_me:$LINENO: checking which libtextcat data directory to use" >&5 -echo $ECHO_N "checking which libtextcat data directory to use... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which libtextcat data directory to use" >&5 +$as_echo_n "checking which libtextcat data directory to use... " >&6; } if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then if test "$with_system_libtextcat_data" = "yes"; then SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat else SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data fi - echo "$as_me:$LINENO: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 -echo "${ECHO_T}$SYSTEM_LIBTEXTCAT_DATA" >&6 + { $as_echo "$as_me:$LINENO: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 +$as_echo "$SYSTEM_LIBTEXTCAT_DATA" >&6; } else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" fi if test "$_os" = "Linux"; then - echo "$as_me:$LINENO: checking whether libc is >= 2.1.1" >&5 -echo $ECHO_N "checking whether libc is >= 2.1.1... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether libc is >= 2.1.1" >&5 +$as_echo_n "checking whether libc is >= 2.1.1... " >&6; } exec 6>/dev/null # no output - echo "$as_me:$LINENO: checking for gnu_get_libc_version in -lc" >&5 -echo $ECHO_N "checking for gnu_get_libc_version in -lc... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for gnu_get_libc_version in -lc" >&5 +$as_echo_n "checking for gnu_get_libc_version in -lc... " >&6; } if test "${ac_cv_lib_c_gnu_get_libc_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" @@ -24952,67 +26394,68 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gnu_get_libc_version (); int main () { -gnu_get_libc_version (); +return gnu_get_libc_version (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_c_gnu_get_libc_version=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_gnu_get_libc_version=no + ac_cv_lib_c_gnu_get_libc_version=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_gnu_get_libc_version" >&5 -echo "${ECHO_T}$ac_cv_lib_c_gnu_get_libc_version" >&6 -if test $ac_cv_lib_c_gnu_get_libc_version = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gnu_get_libc_version" >&5 +$as_echo "$ac_cv_lib_c_gnu_get_libc_version" >&6; } +if test "x$ac_cv_lib_c_gnu_get_libc_version" = x""yes; then HAVE_LIBC=yes; export HAVE_LIBC fi exec 6>&1 # output on again if test "$HAVE_LIBC"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no, upgrade libc" >&5 -echo "$as_me: error: no, upgrade libc" >&2;} + { { $as_echo "$as_me:$LINENO: error: no, upgrade libc" >&5 +$as_echo "$as_me: error: no, upgrade libc" >&2;} { (exit 1); exit 1; }; } fi fi @@ -25021,11 +26464,11 @@ if test "$_os" != "WNT"; then for ac_func in getopt do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25050,71 +26493,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF HAVE_GETOPT=YES else @@ -25125,11 +26567,11 @@ done for ac_func in readdir_r do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25154,71 +26596,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF HAVE_READDIR_R=YES else @@ -25239,8 +26680,8 @@ fi if test \( "$_os" = "WINNT" \) ; then - echo "$as_me:$LINENO: checking for PSDK files" >&5 -echo $ECHO_N "checking for PSDK files... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for PSDK files" >&5 +$as_echo_n "checking for PSDK files... " >&6; } if test -z "$with_psdk_home"; then # This first line will detect a February 2003 Microsoft Platform SDK PSDK_HOME=`./oowintool --psdk-home` @@ -25261,13 +26702,13 @@ echo $ECHO_N "checking for PSDK files... $ECHO_C" >&6 PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'` # Problem with current PSDK (iz 49865) if test -f "$PSDK_HOME/Lib/libcp.lib"; then - { { echo "$as_me:$LINENO: error: + { { $as_echo "$as_me:$LINENO: error: Some modules do not build correctly with MS Platform SDK - April 2005 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found. Remove/rename/backup that file and restart configure. Details about this problem can be found in issue 49856." >&5 -echo "$as_me: error: +$as_echo "$as_me: error: Some modules do not build correctly with MS Platform SDK - April 2005 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found. @@ -25289,9 +26730,9 @@ problem can be found in issue 49856." >&2;} HAVE_PSDK_LIB="no" fi if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then - { { echo "$as_me:$LINENO: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs + { { $as_echo "$as_me:$LINENO: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs are installed or use --with-psdk-home ." >&5 -echo "$as_me: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs +$as_echo "$as_me: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs are installed or use --with-psdk-home ." >&2;} { (exit 1); exit 1; }; } fi @@ -25299,31 +26740,31 @@ are installed or use --with-psdk-home ." >&2;} -o ! -x "$PSDK_HOME/bin/msidb.exe" \ -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \ -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then - { { echo "$as_me:$LINENO: error: Some (all) files of the Windows Installer SDK are missing, please install." >&5 -echo "$as_me: error: Some (all) files of the Windows Installer SDK are missing, please install." >&2;} + { { $as_echo "$as_me:$LINENO: error: Some (all) files of the Windows Installer SDK are missing, please install." >&5 +$as_echo "$as_me: error: Some (all) files of the Windows Installer SDK are missing, please install." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: result: SDK files found ...)" >&5 -echo "${ECHO_T}SDK files found ...)" >&6 + { $as_echo "$as_me:$LINENO: result: SDK files found ...)" >&5 +$as_echo "SDK files found ...)" >&6; } if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: Found Windows SDK 6.1 ($PSDK_HOME)" >&5 -echo "${ECHO_T}Found Windows SDK 6.1 ($PSDK_HOME)" >&6 + { $as_echo "$as_me:$LINENO: result: Found Windows SDK 6.1 ($PSDK_HOME)" >&5 +$as_echo "Found Windows SDK 6.1 ($PSDK_HOME)" >&6; } WINDOWS_VISTA_PSDK=TRUE elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: Found Windows SDK 6.0 ($PSDK_HOME)" >&5 -echo "${ECHO_T}Found Windows SDK 6.0 ($PSDK_HOME)" >&6 + { $as_echo "$as_me:$LINENO: result: Found Windows SDK 6.0 ($PSDK_HOME)" >&5 +$as_echo "Found Windows SDK 6.0 ($PSDK_HOME)" >&6; } WINDOWS_VISTA_PSDK=TRUE else - echo "$as_me:$LINENO: result: Found Legacy Windows Platform SDK ($PSDK_HOME)" >&5 -echo "${ECHO_T}Found Legacy Windows Platform SDK ($PSDK_HOME)" >&6 + { $as_echo "$as_me:$LINENO: result: Found Legacy Windows Platform SDK ($PSDK_HOME)" >&5 +$as_echo "Found Legacy Windows Platform SDK ($PSDK_HOME)" >&6; } fi fi if test \( "$_os" = "WINNT" \) ; then - echo "$as_me:$LINENO: checking for DirectX SDK files" >&5 -echo $ECHO_N "checking for DirectX SDK files... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for DirectX SDK files" >&5 +$as_echo_n "checking for DirectX SDK files... " >&6; } if test -z "$with_directx_home"; then if test -n "$DXSDK_DIR"; then DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"` @@ -25355,17 +26796,17 @@ echo $ECHO_N "checking for DirectX SDK files... $ECHO_C" >&6 fi if test -n "$ENABLE_DIRECTX"; then if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&5 -echo "$as_me: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&2;} + { { $as_echo "$as_me:$LINENO: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&5 +$as_echo "$as_me: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&2;} { (exit 1); exit 1; }; } fi else DIRECTXSDK_HOME="" - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { $as_echo "$as_me:$LINENO: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi @@ -25373,14 +26814,14 @@ fi NSIS_PATH="" if test "$_os" = "WINNT" ; then - echo "$as_me:$LINENO: checking for NSIS" >&5 -echo $ECHO_N "checking for NSIS... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for NSIS" >&5 +$as_echo_n "checking for NSIS... " >&6; } # Extract the first word of "nsis.exe", so it can be a program name with args. set dummy nsis.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_NSIS_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $NSIS_PATH in [\\/]* | ?:[\\/]*) @@ -25393,27 +26834,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NSIS_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi NSIS_PATH=$ac_cv_path_NSIS_PATH - if test -n "$NSIS_PATH"; then - echo "$as_me:$LINENO: result: $NSIS_PATH" >&5 -echo "${ECHO_T}$NSIS_PATH" >&6 + { $as_echo "$as_me:$LINENO: result: $NSIS_PATH" >&5 +$as_echo "$NSIS_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -n "$NSIS_PATH"; then NSIS_PATH=`dirname "$NSIS_PATH"` fi @@ -25428,24 +26870,24 @@ fi NSIS_PATH="$nsistest" fi if test -z "$NSIS_PATH"; then - { echo "$as_me:$LINENO: WARNING: NSIS not found, no self contained installer will be build." >&5 -echo "$as_me: WARNING: NSIS not found, no self contained installer will be build." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: NSIS not found, no self contained installer will be build." >&5 +$as_echo "$as_me: WARNING: NSIS not found, no self contained installer will be build." >&2;} echo "NSIS not found, no self contained installer will be build." >> warn else NSIS_PATH=`cygpath -d "$NSIS_PATH"` NSIS_PATH=`cygpath -u "$NSIS_PATH"` - echo "$as_me:$LINENO: result: found ($NSIS_PATH)" >&5 -echo "${ECHO_T}found ($NSIS_PATH)" >&6 + { $as_echo "$as_me:$LINENO: result: found ($NSIS_PATH)" >&5 +$as_echo "found ($NSIS_PATH)" >&6; } fi fi # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_BISON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $BISON in [\\/]* | ?:[\\/]*) @@ -25458,58 +26900,59 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi BISON=$ac_cv_path_BISON - if test -n "$BISON"; then - echo "$as_me:$LINENO: result: $BISON" >&5 -echo "${ECHO_T}$BISON" >&6 + { $as_echo "$as_me:$LINENO: result: $BISON" >&5 +$as_echo "$BISON" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$BISON"; then - { { echo "$as_me:$LINENO: error: no bison found in \$PATH, install bison" >&5 -echo "$as_me: error: no bison found in \$PATH, install bison" >&2;} + { { $as_echo "$as_me:$LINENO: error: no bison found in \$PATH, install bison" >&5 +$as_echo "$as_me: error: no bison found in \$PATH, install bison" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: checking the bison version" >&5 -echo $ECHO_N "checking the bison version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking the bison version" >&5 +$as_echo_n "checking the bison version... " >&6; } _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` # Accept newer than 1.875 or older(equal) than 1.75 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then if test "$_bison_version" = "1.875" ; then - { echo "$as_me:$LINENO: WARNING: suspect ($BISON $_bison_version)" >&5 -echo "$as_me: WARNING: suspect ($BISON $_bison_version)" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: suspect ($BISON $_bison_version)" >&5 +$as_echo "$as_me: WARNING: suspect ($BISON $_bison_version)" >&2;} echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn else - echo "$as_me:$LINENO: result: checked ($BISON $_bison_version)" >&5 -echo "${ECHO_T}checked ($BISON $_bison_version)" >&6 + { $as_echo "$as_me:$LINENO: result: checked ($BISON $_bison_version)" >&5 +$as_echo "checked ($BISON $_bison_version)" >&6; } fi else - { { echo "$as_me:$LINENO: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&5 -echo "$as_me: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&2;} + { { $as_echo "$as_me:$LINENO: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&5 +$as_echo "$as_me: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&2;} { (exit 1); exit 1; }; } fi fi # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_FLEX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $FLEX in [\\/]* | ?:[\\/]*) @@ -25522,38 +26965,39 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi FLEX=$ac_cv_path_FLEX - if test -n "$FLEX"; then - echo "$as_me:$LINENO: result: $FLEX" >&5 -echo "${ECHO_T}$FLEX" >&6 + { $as_echo "$as_me:$LINENO: result: $FLEX" >&5 +$as_echo "$FLEX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$FLEX"; then - { { echo "$as_me:$LINENO: error: no flex found in \$PATH, install flex" >&5 -echo "$as_me: error: no flex found in \$PATH, install flex" >&2;} + { { $as_echo "$as_me:$LINENO: error: no flex found in \$PATH, install flex" >&5 +$as_echo "$as_me: error: no flex found in \$PATH, install flex" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "patch", so it can be a program name with args. set dummy patch; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PATCH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PATCH in [\\/]* | ?:[\\/]*) @@ -25566,30 +27010,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi PATCH=$ac_cv_path_PATCH - if test -n "$PATCH"; then - echo "$as_me:$LINENO: result: $PATCH" >&5 -echo "${ECHO_T}$PATCH" >&6 + { $as_echo "$as_me:$LINENO: result: $PATCH" >&5 +$as_echo "$PATCH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$PATCH"; then - { { echo "$as_me:$LINENO: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&5 -echo "$as_me: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&2;} + { { $as_echo "$as_me:$LINENO: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&5 +$as_echo "$as_me: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&2;} { (exit 1); exit 1; }; } fi @@ -25600,20 +27045,20 @@ if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then if test -x "$with_gnu_patch"; then GNUPATCH=$with_gnu_patch else - { { echo "$as_me:$LINENO: error: --with-gnu-patch did not point to an executable" >&5 -echo "$as_me: error: --with-gnu-patch did not point to an executable" >&2;} + { { $as_echo "$as_me:$LINENO: error: --with-gnu-patch did not point to an executable" >&5 +$as_echo "$as_me: error: --with-gnu-patch did not point to an executable" >&2;} { (exit 1); exit 1; }; } fi fi - echo "$as_me:$LINENO: checking whether $GNUPATCH is GNU patch" >&5 -echo $ECHO_N "checking whether $GNUPATCH is GNU patch... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether $GNUPATCH is GNU patch" >&5 +$as_echo_n "checking whether $GNUPATCH is GNU patch... " >&6; } if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { { echo "$as_me:$LINENO: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&5 -echo "$as_me: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&2;} + { { $as_echo "$as_me:$LINENO: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&5 +$as_echo "$as_me: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&2;} { (exit 1); exit 1; }; } fi fi @@ -25624,10 +27069,10 @@ if test -z "$with_gnu_cp"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GNUCP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $GNUCP in [\\/]* | ?:[\\/]*) @@ -25640,63 +27085,64 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GNUCP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi GNUCP=$ac_cv_path_GNUCP - if test -n "$GNUCP"; then - echo "$as_me:$LINENO: result: $GNUCP" >&5 -echo "${ECHO_T}$GNUCP" >&6 + { $as_echo "$as_me:$LINENO: result: $GNUCP" >&5 +$as_echo "$GNUCP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$GNUCP" && break done if test -z $GNUCP; then - { { echo "$as_me:$LINENO: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&5 -echo "$as_me: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&2;} + { { $as_echo "$as_me:$LINENO: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&5 +$as_echo "$as_me: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&2;} { (exit 1); exit 1; }; } fi else if test -x "$with_gnu_cp"; then GNUCP=$with_gnu_cp else - { { echo "$as_me:$LINENO: error: --with-gnu-cp did not point to an executable" >&5 -echo "$as_me: error: --with-gnu-cp did not point to an executable" >&2;} + { { $as_echo "$as_me:$LINENO: error: --with-gnu-cp did not point to an executable" >&5 +$as_echo "$as_me: error: --with-gnu-cp did not point to an executable" >&2;} { (exit 1); exit 1; }; } fi fi -echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp" >&5 -echo $ECHO_N "checking whether $GNUCP is GNU cp... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp" >&5 +$as_echo_n "checking whether $GNUCP is GNU cp... " >&6; } if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then - { { echo "$as_me:$LINENO: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&5 -echo "$as_me: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&2;} + { { $as_echo "$as_me:$LINENO: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&5 +$as_echo "$as_me: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&2;} { (exit 1); exit 1; }; } else GNUCP='' - echo "$as_me:$LINENO: result: no gnucp found - using the system's cp command" >&5 -echo "${ECHO_T}no gnucp found - using the system's cp command" >&6 + { $as_echo "$as_me:$LINENO: result: no gnucp found - using the system's cp command" >&5 +$as_echo "no gnucp found - using the system's cp command" >&6; } fi fi fi @@ -25708,10 +27154,10 @@ if test "$_os" = "WINNT"; then CYGWIN_PATH="" # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CYGWIN_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $CYGWIN_PATH in [\\/]* | ?:[\\/]*) @@ -25724,27 +27170,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CYGWIN_PATH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi CYGWIN_PATH=$ac_cv_path_CYGWIN_PATH - if test -n "$CYGWIN_PATH"; then - echo "$as_me:$LINENO: result: $CYGWIN_PATH" >&5 -echo "${ECHO_T}$CYGWIN_PATH" >&6 + { $as_echo "$as_me:$LINENO: result: $CYGWIN_PATH" >&5 +$as_echo "$CYGWIN_PATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + CYGWIN_PATH=`dirname "$CYGWIN_PATH"` fi if test -z "$CYGWIN_PATH"; then @@ -25753,18 +27200,18 @@ fi if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then - echo "$as_me:$LINENO: checking ml.exe assembler path" >&5 -echo $ECHO_N "checking ml.exe assembler path... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking ml.exe assembler path" >&5 +$as_echo_n "checking ml.exe assembler path... " >&6; } if test -n "$with_asm_home"; then with_asm_home=`cygpath -u "$with_asm_home"` fi if test ! -x "$with_asm_home/ml.exe"; then # Extract the first word of "ml.exe", so it can be a program name with args. set dummy ml.exe; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ML_EXE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $ML_EXE in [\\/]* | ?:[\\/]*) @@ -25777,43 +27224,44 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ML_EXE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi ML_EXE=$ac_cv_path_ML_EXE - if test -n "$ML_EXE"; then - echo "$as_me:$LINENO: result: $ML_EXE" >&5 -echo "${ECHO_T}$ML_EXE" >&6 + { $as_echo "$as_me:$LINENO: result: $ML_EXE" >&5 +$as_echo "$ML_EXE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z "$ML_EXE"; then if test -x "$with_cl_home/bin/ml.exe"; then with_asm_home=$with_cl_home/bin - echo "$as_me:$LINENO: result: found ($with_asm_home)" >&5 -echo "${ECHO_T}found ($with_asm_home)" >&6 + { $as_echo "$as_me:$LINENO: result: found ($with_asm_home)" >&5 +$as_echo "found ($with_asm_home)" >&6; } else - { { echo "$as_me:$LINENO: error: Configure did not find ml.exe assembler." >&5 -echo "$as_me: error: Configure did not find ml.exe assembler." >&2;} + { { $as_echo "$as_me:$LINENO: error: Configure did not find ml.exe assembler." >&5 +$as_echo "$as_me: error: Configure did not find ml.exe assembler." >&2;} { (exit 1); exit 1; }; } fi else with_asm_home="ASM_IN_PATH" fi fi - echo "$as_me:$LINENO: result: $ASM_HOME" >&5 -echo "${ECHO_T}$ASM_HOME" >&6 + { $as_echo "$as_me:$LINENO: result: $ASM_HOME" >&5 +$as_echo "$ASM_HOME" >&6; } else with_asm_home="NO_ASM_HOME" fi @@ -25833,10 +27281,10 @@ if test -n "$with_zip_home" ; then else # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ZIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $ZIP in [\\/]* | ?:[\\/]*) @@ -25849,33 +27297,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi ZIP=$ac_cv_path_ZIP - if test -n "$ZIP"; then - echo "$as_me:$LINENO: result: $ZIP" >&5 -echo "${ECHO_T}$ZIP" >&6 + { $as_echo "$as_me:$LINENO: result: $ZIP" >&5 +$as_echo "$ZIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + # Extract the first word of "unzip", so it can be a program name with args. set dummy unzip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_UNZIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $UNZIP in [\\/]* | ?:[\\/]*) @@ -25888,57 +27337,58 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi UNZIP=$ac_cv_path_UNZIP - if test -n "$UNZIP"; then - echo "$as_me:$LINENO: result: $UNZIP" >&5 -echo "${ECHO_T}$UNZIP" >&6 + { $as_echo "$as_me:$LINENO: result: $UNZIP" >&5 +$as_echo "$UNZIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + ZIP_HOME=`dirname "$ZIP"` fi if test -z "$ZIP" -o -z "$UNZIP"; then - { { echo "$as_me:$LINENO: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&5 -echo "$as_me: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&2;} + { { $as_echo "$as_me:$LINENO: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&5 +$as_echo "$as_me: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then if test -n "`$ZIP -h | grep -i WinNT`" ; then -{ { echo "$as_me:$LINENO: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&5 -echo "$as_me: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&2;} +{ { $as_echo "$as_me:$LINENO: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&5 +$as_echo "$as_me: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&2;} { (exit 1); exit 1; }; } fi fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for unicows.dll" >&5 -echo $ECHO_N "checking for unicows.dll... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for unicows.dll" >&5 +$as_echo_n "checking for unicows.dll... " >&6; } if test -x ./external/unicows/unicows.dll; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. + { { $as_echo "$as_me:$LINENO: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. Get it from the Microsoft site and put it into external/unicows. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: ." >&5 -echo "$as_me: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. +$as_echo "$as_me: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. Get it from the Microsoft site and put it into external/unicows. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: @@ -25948,18 +27398,18 @@ may have to search Microsoft's website.) Last time it was seen at: fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for dbghelp.dll" >&5 -echo $ECHO_N "checking for dbghelp.dll... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dbghelp.dll" >&5 +$as_echo_n "checking for dbghelp.dll... " >&6; } if test -x ./external/dbghelp/dbghelp.dll; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: dbghelp.dll is missing in external/dbghelp/. + { { $as_echo "$as_me:$LINENO: error: dbghelp.dll is missing in external/dbghelp/. Get it from the Microsoft site and put it into external/dbghelp. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: ." >&5 -echo "$as_me: error: dbghelp.dll is missing in external/dbghelp/. +$as_echo "$as_me: error: dbghelp.dll is missing in external/dbghelp/. Get it from the Microsoft site and put it into external/dbghelp. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: @@ -25972,24 +27422,24 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then if ./oowintool --msvc-copy-dlls ./external/msvcp ; then : else - { { echo "$as_me:$LINENO: error: oowintool failed to copy CRT" >&5 -echo "$as_me: error: oowintool failed to copy CRT" >&2;} + { { $as_echo "$as_me:$LINENO: error: oowintool failed to copy CRT" >&5 +$as_echo "$as_me: error: oowintool failed to copy CRT" >&2;} { (exit 1); exit 1; }; } fi fi if test "$_os" = "WINNT"; then - echo "$as_me:$LINENO: checking for gdiplus.dll" >&5 -echo $ECHO_N "checking for gdiplus.dll... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for gdiplus.dll" >&5 +$as_echo_n "checking for gdiplus.dll... " >&6; } if test -x ./external/gdiplus/gdiplus.dll; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else - { { echo "$as_me:$LINENO: error: gdiplus.dll is missing in external/gdiplus/. + { { $as_echo "$as_me:$LINENO: error: gdiplus.dll is missing in external/gdiplus/. Get it from the Microsoft site and put it into external/gdiplus. You may have to search Microsoft's website. Last time it was seen at: ." >&5 -echo "$as_me: error: gdiplus.dll is missing in external/gdiplus/. +$as_echo "$as_me: error: gdiplus.dll is missing in external/gdiplus/. Get it from the Microsoft site and put it into external/gdiplus. You may have to search Microsoft's website. Last time it was seen at: ." >&2;} @@ -26003,11 +27453,11 @@ fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then - echo "$as_me:$LINENO: checking for instmsia.exe/instmsiw.exe" >&5 -echo $ECHO_N "checking for instmsia.exe/instmsiw.exe... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for instmsia.exe/instmsiw.exe" >&5 +$as_echo_n "checking for instmsia.exe/instmsiw.exe... " >&6; } if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then - echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6 + { $as_echo "$as_me:$LINENO: result: found" >&5 +$as_echo "found" >&6; } else MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1` MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1` @@ -26016,27 +27466,27 @@ echo "${ECHO_T}found" >&6 cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK" fi if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then - { { echo "$as_me:$LINENO: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. + { { $as_echo "$as_me:$LINENO: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. These programs are part of the Visual Studio installation and should be found in a directory similar to: \"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\" As the automatic detection fails please copy the files to external/msi/." >&5 -echo "$as_me: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. +$as_echo "$as_me: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. These programs are part of the Visual Studio installation and should be found in a directory similar to: \"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\" As the automatic detection fails please copy the files to external/msi/." >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: found and copied" >&5 -echo "${ECHO_T}found and copied" >&6 + { $as_echo "$as_me:$LINENO: result: found and copied" >&5 +$as_echo "found and copied" >&6; } fi fi fi fi -echo "$as_me:$LINENO: checking which VCLplugs shall be built" >&5 -echo $ECHO_N "checking which VCLplugs shall be built... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which VCLplugs shall be built" >&5 +$as_echo_n "checking which VCLplugs shall be built... " >&6; } ENABLE_GTK="" if test "x$enable_gtk" = "xyes"; then ENABLE_GTK="TRUE" @@ -26059,334 +27509,379 @@ fi if test -z "$R"; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } else - echo "$as_me:$LINENO: result: $R" >&5 -echo "${ECHO_T}$R" >&6 + { $as_echo "$as_me:$LINENO: result: $R" >&5 +$as_echo "$R" >&6; } fi ENABLE_GCONF="" -echo "$as_me:$LINENO: checking whether to enable GConf support" >&5 -echo $ECHO_N "checking whether to enable GConf support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable GConf support" >&5 +$as_echo_n "checking whether to enable GConf support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then ENABLE_GCONF="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GCONF" >&5 +$as_echo_n "checking for GCONF... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$GCONF_CFLAGS"; then + pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$GCONF_LIBS"; then + pkg_cv_GCONF_LIBS="$GCONF_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 -echo $ECHO_N "checking for gconf-2.0 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gconf-2.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 -echo $ECHO_N "checking GCONF_CFLAGS... $ECHO_C" >&6 - GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` - echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 -echo "${ECHO_T}$GCONF_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 -echo $ECHO_N "checking GCONF_LIBS... $ECHO_C" >&6 - GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` - echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 -echo "${ECHO_T}$GCONF_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gconf-2.0 "` else - GCONF_CFLAGS="" - GCONF_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "` - echo $GCONF_PKG_ERRORS + GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "` fi + # Put the nasty error message in config.log where it belongs + echo "$GCONF_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (gconf-2.0 ) were not met: +$GCONF_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables GCONF_CFLAGS +and GCONF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (gconf-2.0 ) were not met: + +$GCONF_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GCONF_CFLAGS +and GCONF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GCONF_CFLAGS +and GCONF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GCONF_CFLAGS +and GCONF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS + GCONF_LIBS=$pkg_cv_GCONF_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi ENABLE_GNOMEVFS="" -echo "$as_me:$LINENO: checking whether to enable GNOME VFS support" >&5 -echo $ECHO_N "checking whether to enable GNOME VFS support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable GNOME VFS support" >&5 +$as_echo_n "checking whether to enable GNOME VFS support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then ENABLE_GNOMEVFS="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GNOMEVFS" >&5 +$as_echo_n "checking for GNOMEVFS... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$GNOMEVFS_CFLAGS"; then + pkg_cv_GNOMEVFS_CFLAGS="$GNOMEVFS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-vfs-2.0 >= 2.6.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gnome-vfs-2.0 >= 2.6.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6.0 " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$GNOMEVFS_LIBS"; then + pkg_cv_GNOMEVFS_LIBS="$GNOMEVFS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-vfs-2.0 >= 2.6.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gnome-vfs-2.0 >= 2.6.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GNOMEVFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6.0 " 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gnome-vfs-2.0 >= 2.6.0 " >&5 -echo $ECHO_N "checking for gnome-vfs-2.0 >= 2.6.0 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gnome-vfs-2.0 >= 2.6.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GNOMEVFS_CFLAGS" >&5 -echo $ECHO_N "checking GNOMEVFS_CFLAGS... $ECHO_C" >&6 - GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6.0 "` - echo "$as_me:$LINENO: result: $GNOMEVFS_CFLAGS" >&5 -echo "${ECHO_T}$GNOMEVFS_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GNOMEVFS_LIBS" >&5 -echo $ECHO_N "checking GNOMEVFS_LIBS... $ECHO_C" >&6 - GNOMEVFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6.0 "` - echo "$as_me:$LINENO: result: $GNOMEVFS_LIBS" >&5 -echo "${ECHO_T}$GNOMEVFS_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GNOMEVFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnome-vfs-2.0 >= 2.6.0 "` else - GNOMEVFS_CFLAGS="" - GNOMEVFS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GNOMEVFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-vfs-2.0 >= 2.6.0 "` - echo $GNOMEVFS_PKG_ERRORS + GNOMEVFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-vfs-2.0 >= 2.6.0 "` fi + # Put the nasty error message in config.log where it belongs + echo "$GNOMEVFS_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (gnome-vfs-2.0 >= 2.6.0 ) were not met: +$GNOMEVFS_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables GNOMEVFS_CFLAGS +and GNOMEVFS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (gnome-vfs-2.0 >= 2.6.0 ) were not met: + +$GNOMEVFS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GNOMEVFS_CFLAGS +and GNOMEVFS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - if test "$ENABLE_GCONF" != "TRUE"; then +Alternatively, you may set the environment variables GNOMEVFS_CFLAGS +and GNOMEVFS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - succeeded=no +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +Alternatively, you may set the environment variables GNOMEVFS_CFLAGS +and GNOMEVFS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + GNOMEVFS_CFLAGS=$pkg_cv_GNOMEVFS_CFLAGS + GNOMEVFS_LIBS=$pkg_cv_GNOMEVFS_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test "$ENABLE_GCONF" != "TRUE"; then + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GCONF" >&5 +$as_echo_n "checking for GCONF... " >&6; } if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$GCONF_CFLAGS"; then + pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GCONF_LIBS"; then + pkg_cv_GCONF_LIBS="$GCONF_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 -echo $ECHO_N "checking for gconf-2.0 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gconf-2.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 -echo $ECHO_N "checking GCONF_CFLAGS... $ECHO_C" >&6 - GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` - echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 -echo "${ECHO_T}$GCONF_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 -echo $ECHO_N "checking GCONF_LIBS... $ECHO_C" >&6 - GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` - echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 -echo "${ECHO_T}$GCONF_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gconf-2.0 "` else - GCONF_CFLAGS="" - GCONF_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "` - echo $GCONF_PKG_ERRORS + GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "` fi + # Put the nasty error message in config.log where it belongs + echo "$GCONF_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (gconf-2.0 ) were not met: +$GCONF_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables GCONF_CFLAGS +and GCONF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (gconf-2.0 ) were not met: + +$GCONF_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GCONF_CFLAGS +and GCONF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GCONF_CFLAGS +and GCONF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GCONF_CFLAGS +and GCONF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS + GCONF_LIBS=$pkg_cv_GCONF_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -26399,103 +27894,80 @@ if test "$test_gtk" = "yes"; then if test "$ENABLE_GTK" = "TRUE" ; then - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GTK" >&5 +$as_echo_n "checking for GTK... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$GTK_CFLAGS"; then + pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$GTK_LIBS"; then + pkg_cv_GTK_LIBS="$GTK_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " >&5 -echo $ECHO_N "checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 -echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6 - GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 -echo "${ECHO_T}$GTK_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GTK_LIBS" >&5 -echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6 - GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 -echo "${ECHO_T}$GTK_LIBS" >&6 - else - GTK_CFLAGS="" - GTK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - - fi +if test $pkg_failed = yes; then - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` + else + GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK_PKG_ERRORS" >&5 - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 -echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 +$as_echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} { (exit 1); exit 1; }; } - fi - +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 +$as_echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} + { (exit 1); exit 1; }; } +else + GTK_CFLAGS=$pkg_cv_GTK_CFLAGS + GTK_LIBS=$pkg_cv_GTK_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi BUILD_TYPE="$BUILD_TYPE GTK" if test "x$enable_systray" = "xyes"; then @@ -26503,227 +27975,257 @@ echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK" fi - echo "$as_me:$LINENO: checking whether to enable DBUS support" >&5 -echo $ECHO_N "checking whether to enable DBUS support... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to enable DBUS support" >&5 +$as_echo_n "checking whether to enable DBUS support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then ENABLE_DBUS="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for DBUS" >&5 +$as_echo_n "checking for DBUS... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$DBUS_CFLAGS"; then + pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.70 \"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.70 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.70 " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$DBUS_LIBS"; then + pkg_cv_DBUS_LIBS="$DBUS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.70 \"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.70 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.70 " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for dbus-glib-1 >= 0.70 " >&5 -echo $ECHO_N "checking for dbus-glib-1 >= 0.70 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "dbus-glib-1 >= 0.70 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5 -echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6 - DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.70 "` - echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5 -echo "${ECHO_T}$DBUS_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking DBUS_LIBS" >&5 -echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6 - DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.70 "` - echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5 -echo "${ECHO_T}$DBUS_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-glib-1 >= 0.70 "` else - DBUS_CFLAGS="" - DBUS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= 0.70 "` - echo $DBUS_PKG_ERRORS + DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= 0.70 "` fi + # Put the nasty error message in config.log where it belongs + echo "$DBUS_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (dbus-glib-1 >= 0.70 ) were not met: +$DBUS_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables DBUS_CFLAGS +and DBUS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (dbus-glib-1 >= 0.70 ) were not met: + +$DBUS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DBUS_CFLAGS +and DBUS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DBUS_CFLAGS +and DBUS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DBUS_CFLAGS +and DBUS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS + DBUS_LIBS=$pkg_cv_DBUS_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - echo "$as_me:$LINENO: checking whether to enable GIO support" >&5 -echo $ECHO_N "checking whether to enable GIO support... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to enable GIO support" >&5 +$as_echo_n "checking whether to enable GIO support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then if test "$ENABLE_GNOMEVFS" = "TRUE" ; then - { { echo "$as_me:$LINENO: error: please use --enable-gio only together with --disable-gnome-vfs." >&5 -echo "$as_me: error: please use --enable-gio only together with --disable-gnome-vfs." >&2;} + { { $as_echo "$as_me:$LINENO: error: please use --enable-gio only together with --disable-gnome-vfs." >&5 +$as_echo "$as_me: error: please use --enable-gio only together with --disable-gnome-vfs." >&2;} { (exit 1); exit 1; }; } fi ENABLE_GIO="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GIO" >&5 +$as_echo_n "checking for GIO... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$GIO_CFLAGS"; then + pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gio-2.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$GIO_LIBS"; then + pkg_cv_GIO_LIBS="$GIO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gio-2.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gio-2.0 " >&5 -echo $ECHO_N "checking for gio-2.0 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gio-2.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GIO_CFLAGS" >&5 -echo $ECHO_N "checking GIO_CFLAGS... $ECHO_C" >&6 - GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 "` - echo "$as_me:$LINENO: result: $GIO_CFLAGS" >&5 -echo "${ECHO_T}$GIO_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GIO_LIBS" >&5 -echo $ECHO_N "checking GIO_LIBS... $ECHO_C" >&6 - GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 "` - echo "$as_me:$LINENO: result: $GIO_LIBS" >&5 -echo "${ECHO_T}$GIO_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gio-2.0 "` else - GIO_CFLAGS="" - GIO_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 "` - echo $GIO_PKG_ERRORS + GIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 "` fi + # Put the nasty error message in config.log where it belongs + echo "$GIO_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (gio-2.0 ) were not met: +$GIO_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables GIO_CFLAGS +and GIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (gio-2.0 ) were not met: + +$GIO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GIO_CFLAGS +and GIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GIO_CFLAGS +and GIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GIO_CFLAGS +and GIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + GIO_CFLAGS=$pkg_cv_GIO_CFLAGS + GIO_LIBS=$pkg_cv_GIO_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -26741,113 +28243,90 @@ GSTREAMER_LIBS="" ENABLE_GSTREAMER="" if test "$test_gstreamer" = "yes"; then - echo "$as_me:$LINENO: checking whether to build the GStreamer media backend" >&5 -echo $ECHO_N "checking whether to build the GStreamer media backend... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to build the GStreamer media backend" >&5 +$as_echo_n "checking whether to build the GStreamer media backend... " >&6; } if test "x$enable_gstreamer" != "xno" ; then - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GSTREAMER" >&5 +$as_echo_n "checking for GSTREAMER... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$GSTREAMER_CFLAGS"; then + pkg_cv_GSTREAMER_CFLAGS="$GSTREAMER_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$GSTREAMER_LIBS"; then + pkg_cv_GSTREAMER_LIBS="$GSTREAMER_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 \"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GSTREAMER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 -echo $ECHO_N "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GSTREAMER_CFLAGS" >&5 -echo $ECHO_N "checking GSTREAMER_CFLAGS... $ECHO_C" >&6 - GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - echo "$as_me:$LINENO: result: $GSTREAMER_CFLAGS" >&5 -echo "${ECHO_T}$GSTREAMER_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GSTREAMER_LIBS" >&5 -echo $ECHO_N "checking GSTREAMER_LIBS... $ECHO_C" >&6 - GSTREAMER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - echo "$as_me:$LINENO: result: $GSTREAMER_LIBS" >&5 -echo "${ECHO_T}$GSTREAMER_LIBS" >&6 - else - GSTREAMER_CFLAGS="" - GSTREAMER_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GSTREAMER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - - fi +if test $pkg_failed = yes; then - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GSTREAMER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` + else + GSTREAMER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` + fi + # Put the nasty error message in config.log where it belongs + echo "$GSTREAMER_PKG_ERRORS" >&5 - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 -echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 +$as_echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} { (exit 1); exit 1; }; } - fi - +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 +$as_echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} + { (exit 1); exit 1; }; } +else + GSTREAMER_CFLAGS=$pkg_cv_GSTREAMER_CFLAGS + GSTREAMER_LIBS=$pkg_cv_GSTREAMER_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi ENABLE_GSTREAMER="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -26862,132 +28341,149 @@ SYSTEM_CAIRO="" if test "$test_cairo" = "yes"; then - echo "$as_me:$LINENO: checking whether to use cairo" >&5 -echo $ECHO_N "checking whether to use cairo... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether to use cairo" >&5 +$as_echo_n "checking whether to use cairo... " >&6; } if test "x$enable_cairo" != "xno" ; then ENABLE_CAIRO="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking which cairo to use" >&5 -echo $ECHO_N "checking which cairo to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: checking which cairo to use" >&5 +$as_echo_n "checking which cairo to use... " >&6; } if test -n "$with_system_cairo" -o -n "$with_system_libs" && \ test "$with_system_cairo" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_CAIRO=YES - - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for CAIRO" >&5 +$as_echo_n "checking for CAIRO... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$CAIRO_CFLAGS"; then + pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.0.2 \"") >&5 + ($PKG_CONFIG --exists --print-errors "cairo >= 1.0.2 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.0.2 " 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$CAIRO_LIBS"; then + pkg_cv_CAIRO_LIBS="$CAIRO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.0.2 \"") >&5 + ($PKG_CONFIG --exists --print-errors "cairo >= 1.0.2 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.0.2 " 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for cairo >= 1.0.2 " >&5 -echo $ECHO_N "checking for cairo >= 1.0.2 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "cairo >= 1.0.2 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking CAIRO_CFLAGS" >&5 -echo $ECHO_N "checking CAIRO_CFLAGS... $ECHO_C" >&6 - CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.0.2 "` - echo "$as_me:$LINENO: result: $CAIRO_CFLAGS" >&5 -echo "${ECHO_T}$CAIRO_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking CAIRO_LIBS" >&5 -echo $ECHO_N "checking CAIRO_LIBS... $ECHO_C" >&6 - CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.0.2 "` - echo "$as_me:$LINENO: result: $CAIRO_LIBS" >&5 -echo "${ECHO_T}$CAIRO_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.0.2 "` else - CAIRO_CFLAGS="" - CAIRO_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.0.2 "` - echo $CAIRO_PKG_ERRORS + CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.0.2 "` fi + # Put the nasty error message in config.log where it belongs + echo "$CAIRO_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (cairo >= 1.0.2 ) were not met: +$CAIRO_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables CAIRO_CFLAGS +and CAIRO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (cairo >= 1.0.2 ) were not met: + +$CAIRO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables CAIRO_CFLAGS +and CAIRO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables CAIRO_CFLAGS +and CAIRO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables CAIRO_CFLAGS +and CAIRO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS + CAIRO_LIBS=$pkg_cv_CAIRO_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then - { { echo "$as_me:$LINENO: error: Cairo library requires fontconfig." >&5 -echo "$as_me: error: Cairo library requires fontconfig." >&2;} + { { $as_echo "$as_me:$LINENO: error: Cairo library requires fontconfig." >&5 +$as_echo "$as_me: error: Cairo library requires fontconfig." >&2;} { (exit 1); exit 1; }; } fi if test "$with_system_xrender_headers" = "yes"; then - echo "$as_me:$LINENO: checking whether Xrender.h defines PictStandardA8" >&5 -echo $ECHO_N "checking whether Xrender.h defines PictStandardA8... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether Xrender.h defines PictStandardA8" >&5 +$as_echo_n "checking whether Xrender.h defines PictStandardA8... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -27008,42 +28504,56 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: no, X headers too old." >&5 -echo "$as_me: error: no, X headers too old." >&2;} +{ { $as_echo "$as_me:$LINENO: error: no, X headers too old." >&5 +$as_echo "$as_me: error: no, X headers too old." >&2;} { (exit 1); exit 1; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi else BUILD_TYPE="$BUILD_TYPE CAIRO" if test "$build_cpu" != "x86_64"; then BUILD_PIXMAN=YES fi - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -27054,25 +28564,25 @@ fi -echo "$as_me:$LINENO: checking whether to build the OpenGL Transitions component" >&5 -echo $ECHO_N "checking whether to build the OpenGL Transitions component... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the OpenGL Transitions component" >&5 +$as_echo_n "checking whether to build the OpenGL Transitions component... " >&6; } ENABLE_OPENGL= if test "x$enable_opengl" != "xno" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } if test "${ac_cv_header_GL_gl_h+set}" = set; then - echo "$as_me:$LINENO: checking for GL/gl.h" >&5 -echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5 +$as_echo_n "checking for GL/gl.h... " >&6; } if test "${ac_cv_header_GL_gl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 -echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 +$as_echo "$ac_cv_header_GL_gl_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking GL/gl.h usability" >&5 -echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5 +$as_echo_n "checking GL/gl.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27083,41 +28593,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking GL/gl.h presence" >&5 -echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5 +$as_echo_n "checking GL/gl.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27126,92 +28633,85 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for GL/gl.h" >&5 -echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5 +$as_echo_n "checking for GL/gl.h... " >&6; } if test "${ac_cv_header_GL_gl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_GL_gl_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 -echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 +$as_echo "$ac_cv_header_GL_gl_h" >&6; } fi -if test $ac_cv_header_GL_gl_h = yes; then +if test "x$ac_cv_header_GL_gl_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: OpenGL headers not found" >&5 -echo "$as_me: error: OpenGL headers not found" >&2;} + { { $as_echo "$as_me:$LINENO: error: OpenGL headers not found" >&5 +$as_echo "$as_me: error: OpenGL headers not found" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for main in -lGL" >&5 -echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for main in -lGL" >&5 +$as_echo_n "checking for main in -lGL... " >&6; } if test "${ac_cv_lib_GL_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGL $LIBS" @@ -27226,47 +28726,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_GL_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_GL_main=no + ac_cv_lib_GL_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 -echo "${ECHO_T}$ac_cv_lib_GL_main" >&6 -if test $ac_cv_lib_GL_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 +$as_echo "$ac_cv_lib_GL_main" >&6; } +if test "x$ac_cv_lib_GL_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGL 1 _ACEOF @@ -27274,16 +28775,16 @@ _ACEOF LIBS="-lGL $LIBS" else - { { echo "$as_me:$LINENO: error: libGL not installed or functional" >&5 -echo "$as_me: error: libGL not installed or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: libGL not installed or functional" >&5 +$as_echo "$as_me: error: libGL not installed or functional" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking for main in -lGLU" >&5 -echo $ECHO_N "checking for main in -lGLU... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for main in -lGLU" >&5 +$as_echo_n "checking for main in -lGLU... " >&6; } if test "${ac_cv_lib_GLU_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGLU $LIBS" @@ -27298,47 +28799,48 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_GLU_main=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_GLU_main=no + ac_cv_lib_GLU_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5 -echo "${ECHO_T}$ac_cv_lib_GLU_main" >&6 -if test $ac_cv_lib_GLU_main = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5 +$as_echo "$ac_cv_lib_GLU_main" >&6; } +if test "x$ac_cv_lib_GLU_main" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGLU 1 _ACEOF @@ -27346,189 +28848,204 @@ _ACEOF LIBS="-lGLU $LIBS" else - { { echo "$as_me:$LINENO: error: libGLU not installed or functional" >&5 -echo "$as_me: error: libGLU not installed or functional" >&2;} + { { $as_echo "$as_me:$LINENO: error: libGLU not installed or functional" >&5 +$as_echo "$as_me: error: libGLU not installed or functional" >&2;} { (exit 1); exit 1; }; } fi ENABLE_OPENGL=TRUE else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to build extra presenter ui" >&5 -echo $ECHO_N "checking whether to build extra presenter ui... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build extra presenter ui" >&5 +$as_echo_n "checking whether to build extra presenter ui... " >&6; } if test -n "$enable_presenter_extra_ui" -a "$enable_presenter_extra_ui" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_PRESENTER_EXTRA_UI=YES else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_PRESENTER_EXTRA_UI=NO fi -echo "$as_me:$LINENO: checking whether to build the Presentation Minimizer extension" >&5 -echo $ECHO_N "checking whether to build the Presentation Minimizer extension... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the Presentation Minimizer extension" >&5 +$as_echo_n "checking whether to build the Presentation Minimizer extension... " >&6; } if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_MINIMIZER=YES else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_MINIMIZER=NO fi -echo "$as_me:$LINENO: checking whether to build the Presenter Screen extension" >&5 -echo $ECHO_N "checking whether to build the Presenter Screen extension... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the Presenter Screen extension" >&5 +$as_echo_n "checking whether to build the Presenter Screen extension... " >&6; } if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_PRESENTER_SCREEN=YES else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_PRESENTER_SCREEN=NO fi -echo "$as_me:$LINENO: checking whether to build the PDF Import extension" >&5 -echo $ECHO_N "checking whether to build the PDF Import extension... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the PDF Import extension" >&5 +$as_echo_n "checking whether to build the PDF Import extension... " >&6; } if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_PDFIMPORT=YES - echo "$as_me:$LINENO: checking which pdf backend to use" >&5 -echo $ECHO_N "checking which pdf backend to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which pdf backend to use" >&5 +$as_echo_n "checking which pdf backend to use... " >&6; } if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ test "$with_system_poppler" != "no"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_POPPLER=YES - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for POPPLER" >&5 +$as_echo_n "checking for POPPLER... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$POPPLER_CFLAGS"; then + pkg_cv_POPPLER_CFLAGS="$POPPLER_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.8.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "poppler >= 0.8.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.8.0 " 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$POPPLER_LIBS"; then + pkg_cv_POPPLER_LIBS="$POPPLER_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.8.0 \"") >&5 + ($PKG_CONFIG --exists --print-errors "poppler >= 0.8.0 ") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.8.0 " 2>/dev/null` else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for poppler >= 0.8.0 " >&5 -echo $ECHO_N "checking for poppler >= 0.8.0 ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "poppler >= 0.8.0 " ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking POPPLER_CFLAGS" >&5 -echo $ECHO_N "checking POPPLER_CFLAGS... $ECHO_C" >&6 - POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.8.0 "` - echo "$as_me:$LINENO: result: $POPPLER_CFLAGS" >&5 -echo "${ECHO_T}$POPPLER_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking POPPLER_LIBS" >&5 -echo $ECHO_N "checking POPPLER_LIBS... $ECHO_C" >&6 - POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.8.0 "` - echo "$as_me:$LINENO: result: $POPPLER_LIBS" >&5 -echo "${ECHO_T}$POPPLER_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + POPPLER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "poppler >= 0.8.0 "` else - POPPLER_CFLAGS="" - POPPLER_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - POPPLER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "poppler >= 0.8.0 "` - echo $POPPLER_PKG_ERRORS + POPPLER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "poppler >= 0.8.0 "` fi + # Put the nasty error message in config.log where it belongs + echo "$POPPLER_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (poppler >= 0.8.0 ) were not met: +$POPPLER_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables POPPLER_CFLAGS +and POPPLER_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (poppler >= 0.8.0 ) were not met: + +$POPPLER_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables POPPLER_CFLAGS +and POPPLER_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables POPPLER_CFLAGS +and POPPLER_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables POPPLER_CFLAGS +and POPPLER_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + POPPLER_CFLAGS=$pkg_cv_POPPLER_CFLAGS + POPPLER_LIBS=$pkg_cv_POPPLER_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_POPPLER=NO BUILD_TYPE="$BUILD_TYPE XPDF" - echo "$as_me:$LINENO: checking for xpdf module" >&5 -echo $ECHO_N "checking for xpdf module... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for xpdf module" >&5 +$as_echo_n "checking for xpdf module... " >&6; } if test -d ./xpdf; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_PDFIMPORT=NO fi @@ -27537,62 +29054,62 @@ fi if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then - echo "$as_me:$LINENO: checking for sdext module" >&5 -echo $ECHO_N "checking for sdext module... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for sdext module" >&5 +$as_echo_n "checking for sdext module... " >&6; } if test -d ./sdext; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi BUILD_TYPE="$BUILD_TYPE SDEXT" fi -echo "$as_me:$LINENO: checking whether to build the Wiki Publisher extension" >&5 -echo $ECHO_N "checking whether to build the Wiki Publisher extension... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the Wiki Publisher extension" >&5 +$as_echo_n "checking whether to build the Wiki Publisher extension... " >&6; } if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking for swext module" >&5 -echo $ECHO_N "checking for swext module... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: checking for swext module" >&5 +$as_echo_n "checking for swext module... " >&6; } if test -d ./swext; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi ENABLE_MEDIAWIKI=YES BUILD_TYPE="$BUILD_TYPE SWEXT" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_MEDIAWIKI=NO fi if test "$ENABLE_MEDIAWIKI" = "YES"; then - echo "$as_me:$LINENO: checking which Servlet API Jar to use" >&5 -echo $ECHO_N "checking which Servlet API Jar to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which Servlet API Jar to use" >&5 +$as_echo_n "checking which Servlet API Jar to use... " >&6; } if test -n "$with_system_servlet_api"; then - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } SYSTEM_SERVLETAPI=YES if test -z "$SERVLETAPI_JAR"; then SERVLETAPI_JAR=/usr/share/java/servlet-api.jar fi - as_ac_File=`echo "ac_cv_file_$SERVLETAPI_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $SERVLETAPI_JAR" >&5 -echo $ECHO_N "checking for $SERVLETAPI_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$SERVLETAPI_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $SERVLETAPI_JAR" >&5 +$as_echo_n "checking for $SERVLETAPI_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$SERVLETAPI_JAR"; then eval "$as_ac_File=yes" @@ -27600,19 +29117,23 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: servlet-api.jar not found." >&5 -echo "$as_me: error: servlet-api.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: servlet-api.jar not found." >&5 +$as_echo "$as_me: error: servlet-api.jar not found." >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_SERVLETAPI=NO BUILD_TYPE="$BUILD_TYPE TOMCAT" fi @@ -27620,40 +29141,40 @@ fi -echo "$as_me:$LINENO: checking whether to build the Report Builder extension" >&5 -echo $ECHO_N "checking whether to build the Report Builder extension... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to build the Report Builder extension" >&5 +$as_echo_n "checking whether to build the Report Builder extension... " >&6; } if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } ENABLE_REPORTBUILDER=YES - echo "$as_me:$LINENO: checking for reportbuilder module" >&5 -echo $ECHO_N "checking for reportbuilder module... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for reportbuilder module" >&5 +$as_echo_n "checking for reportbuilder module... " >&6; } if test -d ./reportbuilder; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking which jfreereport libs to use" >&5 -echo $ECHO_N "checking which jfreereport libs to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which jfreereport libs to use" >&5 +$as_echo_n "checking which jfreereport libs to use... " >&6; } if test "$with_system_jfreereport" = "yes"; then SYSTEM_JFREEREPORT=YES - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } if test -z $SAC_JAR; then SAC_JAR=/usr/share/java/sac.jar fi - as_ac_File=`echo "ac_cv_file_$SAC_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $SAC_JAR" >&5 -echo $ECHO_N "checking for $SAC_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$SAC_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $SAC_JAR" >&5 +$as_echo_n "checking for $SAC_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$SAC_JAR"; then eval "$as_ac_File=yes" @@ -27661,26 +29182,30 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: sac.jar not found." >&5 -echo "$as_me: error: sac.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: sac.jar not found." >&5 +$as_echo "$as_me: error: sac.jar not found." >&2;} { (exit 1); exit 1; }; } fi if test -z $LIBXML_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libxml-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libxml-1.0.0.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libxml-1.0.0.jar" >&5 +$as_echo_n "checking for /usr/share/java/libxml-1.0.0.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libxml_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libxml-1.0.0.jar"; then ac_cv_file__usr_share_java_libxml_1_0_0_jar=yes @@ -27688,20 +29213,20 @@ else ac_cv_file__usr_share_java_libxml_1_0_0_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libxml_1_0_0_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libxml_1_0_0_jar" = x""yes; then LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libxml.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libxml.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libxml.jar" >&5 +$as_echo_n "checking for /usr/share/java/libxml.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libxml_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libxml.jar"; then ac_cv_file__usr_share_java_libxml_jar=yes @@ -27709,13 +29234,13 @@ else ac_cv_file__usr_share_java_libxml_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libxml_jar" >&6 -if test $ac_cv_file__usr_share_java_libxml_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libxml_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libxml_jar" = x""yes; then LIBXML_JAR=/usr/share/java/libxml.jar else - { { echo "$as_me:$LINENO: error: libxml.jar replacement not found." >&5 -echo "$as_me: error: libxml.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libxml.jar replacement not found." >&5 +$as_echo "$as_me: error: libxml.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -27725,15 +29250,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBXML_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBXML_JAR" >&5 -echo $ECHO_N "checking for $LIBXML_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBXML_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LIBXML_JAR" >&5 +$as_echo_n "checking for $LIBXML_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBXML_JAR"; then eval "$as_ac_File=yes" @@ -27741,27 +29266,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: libxml.jar not found." >&5 -echo "$as_me: error: libxml.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libxml.jar not found." >&5 +$as_echo "$as_me: error: libxml.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $FLUTE_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/flute-1.3.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/flute-1.3.0.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flute-1.3.0.jar" >&5 +$as_echo_n "checking for /usr/share/java/flute-1.3.0.jar... " >&6; } if test "${ac_cv_file__usr_share_java_flute_1_3_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/flute-1.3.0.jar"; then ac_cv_file__usr_share_java_flute_1_3_0_jar=yes @@ -27769,20 +29298,20 @@ else ac_cv_file__usr_share_java_flute_1_3_0_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_1_3_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_flute_1_3_0_jar" >&6 -if test $ac_cv_file__usr_share_java_flute_1_3_0_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_1_3_0_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_flute_1_3_0_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_flute_1_3_0_jar" = x""yes; then FLUTE_JAR=/usr/share/java/flute-1.3.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/flute.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/flute.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flute.jar" >&5 +$as_echo_n "checking for /usr/share/java/flute.jar... " >&6; } if test "${ac_cv_file__usr_share_java_flute_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/flute.jar"; then ac_cv_file__usr_share_java_flute_jar=yes @@ -27790,13 +29319,13 @@ else ac_cv_file__usr_share_java_flute_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_flute_jar" >&6 -if test $ac_cv_file__usr_share_java_flute_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_flute_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_flute_jar" = x""yes; then FLUTE_JAR=/usr/share/java/flute.jar else - { { echo "$as_me:$LINENO: error: flute-1.3.0.jar replacement not found." >&5 -echo "$as_me: error: flute-1.3.0.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: flute-1.3.0.jar replacement not found." >&5 +$as_echo "$as_me: error: flute-1.3.0.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -27806,15 +29335,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$FLUTE_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $FLUTE_JAR" >&5 -echo $ECHO_N "checking for $FLUTE_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$FLUTE_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $FLUTE_JAR" >&5 +$as_echo_n "checking for $FLUTE_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$FLUTE_JAR"; then eval "$as_ac_File=yes" @@ -27822,27 +29351,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: flute-1.3.0.jar not found." >&5 -echo "$as_me: error: flute-1.3.0.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: flute-1.3.0.jar not found." >&5 +$as_echo "$as_me: error: flute-1.3.0.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $JFREEREPORT_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine-0.9.2.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/flow-engine-0.9.2.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine-0.9.2.jar" >&5 +$as_echo_n "checking for /usr/share/java/flow-engine-0.9.2.jar... " >&6; } if test "${ac_cv_file__usr_share_java_flow_engine_0_9_2_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/flow-engine-0.9.2.jar"; then ac_cv_file__usr_share_java_flow_engine_0_9_2_jar=yes @@ -27850,20 +29383,20 @@ else ac_cv_file__usr_share_java_flow_engine_0_9_2_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&6 -if test $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" = x""yes; then JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/flow-engine.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine.jar" >&5 +$as_echo_n "checking for /usr/share/java/flow-engine.jar... " >&6; } if test "${ac_cv_file__usr_share_java_flow_engine_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/flow-engine.jar"; then ac_cv_file__usr_share_java_flow_engine_jar=yes @@ -27871,13 +29404,13 @@ else ac_cv_file__usr_share_java_flow_engine_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_flow_engine_jar" >&6 -if test $ac_cv_file__usr_share_java_flow_engine_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_flow_engine_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_flow_engine_jar" = x""yes; then JFREEREPORT_JAR=/usr/share/java/flow-engine.jar else - { { echo "$as_me:$LINENO: error: jfreereport.jar replacement not found." >&5 -echo "$as_me: error: jfreereport.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: jfreereport.jar replacement not found." >&5 +$as_echo "$as_me: error: jfreereport.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -27887,15 +29420,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$JFREEREPORT_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $JFREEREPORT_JAR" >&5 -echo $ECHO_N "checking for $JFREEREPORT_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$JFREEREPORT_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $JFREEREPORT_JAR" >&5 +$as_echo_n "checking for $JFREEREPORT_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$JFREEREPORT_JAR"; then eval "$as_ac_File=yes" @@ -27903,27 +29436,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: jfreereport.jar not found." >&5 -echo "$as_me: error: jfreereport.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: jfreereport.jar not found." >&5 +$as_echo "$as_me: error: jfreereport.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBLAYOUT_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/liblayout-0.2.9.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/liblayout-0.2.9.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/liblayout-0.2.9.jar" >&5 +$as_echo_n "checking for /usr/share/java/liblayout-0.2.9.jar... " >&6; } if test "${ac_cv_file__usr_share_java_liblayout_0_2_9_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/liblayout-0.2.9.jar"; then ac_cv_file__usr_share_java_liblayout_0_2_9_jar=yes @@ -27931,20 +29468,20 @@ else ac_cv_file__usr_share_java_liblayout_0_2_9_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&6 -if test $ac_cv_file__usr_share_java_liblayout_0_2_9_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" = x""yes; then LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/liblayout.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/liblayout.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/liblayout.jar" >&5 +$as_echo_n "checking for /usr/share/java/liblayout.jar... " >&6; } if test "${ac_cv_file__usr_share_java_liblayout_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/liblayout.jar"; then ac_cv_file__usr_share_java_liblayout_jar=yes @@ -27952,13 +29489,13 @@ else ac_cv_file__usr_share_java_liblayout_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_liblayout_jar" >&6 -if test $ac_cv_file__usr_share_java_liblayout_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_liblayout_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_liblayout_jar" = x""yes; then LIBLAYOUT_JAR=/usr/share/java/liblayout.jar else - { { echo "$as_me:$LINENO: error: liblayout.jar replacement not found." >&5 -echo "$as_me: error: liblayout.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: liblayout.jar replacement not found." >&5 +$as_echo "$as_me: error: liblayout.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -27968,15 +29505,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBLAYOUT_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBLAYOUT_JAR" >&5 -echo $ECHO_N "checking for $LIBLAYOUT_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBLAYOUT_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LIBLAYOUT_JAR" >&5 +$as_echo_n "checking for $LIBLAYOUT_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBLAYOUT_JAR"; then eval "$as_ac_File=yes" @@ -27984,27 +29521,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: liblayout.jar not found." >&5 -echo "$as_me: error: liblayout.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: liblayout.jar not found." >&5 +$as_echo "$as_me: error: liblayout.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBLOADER_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libloader-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libloader-1.0.0.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libloader-1.0.0.jar" >&5 +$as_echo_n "checking for /usr/share/java/libloader-1.0.0.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libloader_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libloader-1.0.0.jar"; then ac_cv_file__usr_share_java_libloader_1_0_0_jar=yes @@ -28012,20 +29553,20 @@ else ac_cv_file__usr_share_java_libloader_1_0_0_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libloader_1_0_0_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libloader_1_0_0_jar" = x""yes; then LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libloader.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libloader.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libloader.jar" >&5 +$as_echo_n "checking for /usr/share/java/libloader.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libloader_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libloader.jar"; then ac_cv_file__usr_share_java_libloader_jar=yes @@ -28033,13 +29574,13 @@ else ac_cv_file__usr_share_java_libloader_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libloader_jar" >&6 -if test $ac_cv_file__usr_share_java_libloader_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libloader_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libloader_jar" = x""yes; then LIBLOADER_JAR=/usr/share/java/libloader.jar else - { { echo "$as_me:$LINENO: error: libloader.jar replacement not found." >&5 -echo "$as_me: error: libloader.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libloader.jar replacement not found." >&5 +$as_echo "$as_me: error: libloader.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28049,15 +29590,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBLOADER_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBLOADER_JAR" >&5 -echo $ECHO_N "checking for $LIBLOADER_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBLOADER_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LIBLOADER_JAR" >&5 +$as_echo_n "checking for $LIBLOADER_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBLOADER_JAR"; then eval "$as_ac_File=yes" @@ -28065,27 +29606,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: libloader.jar not found." >&5 -echo "$as_me: error: libloader.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libloader.jar not found." >&5 +$as_echo "$as_me: error: libloader.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBFORMULA_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libformula-0.2.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libformula-0.2.0.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libformula-0.2.0.jar" >&5 +$as_echo_n "checking for /usr/share/java/libformula-0.2.0.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libformula_0_2_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libformula-0.2.0.jar"; then ac_cv_file__usr_share_java_libformula_0_2_0_jar=yes @@ -28093,20 +29638,20 @@ else ac_cv_file__usr_share_java_libformula_0_2_0_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libformula_0_2_0_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libformula_0_2_0_jar" = x""yes; then LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libformula.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libformula.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libformula.jar" >&5 +$as_echo_n "checking for /usr/share/java/libformula.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libformula_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libformula.jar"; then ac_cv_file__usr_share_java_libformula_jar=yes @@ -28114,13 +29659,13 @@ else ac_cv_file__usr_share_java_libformula_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libformula_jar" >&6 -if test $ac_cv_file__usr_share_java_libformula_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libformula_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libformula_jar" = x""yes; then LIBFORMULA_JAR=/usr/share/java/libformula.jar else - { { echo "$as_me:$LINENO: error: libformula.jar replacement not found." >&5 -echo "$as_me: error: libformula.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libformula.jar replacement not found." >&5 +$as_echo "$as_me: error: libformula.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28130,15 +29675,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBFORMULA_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBFORMULA_JAR" >&5 -echo $ECHO_N "checking for $LIBFORMULA_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBFORMULA_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LIBFORMULA_JAR" >&5 +$as_echo_n "checking for $LIBFORMULA_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBFORMULA_JAR"; then eval "$as_ac_File=yes" @@ -28146,27 +29691,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: libformula.jar not found." >&5 -echo "$as_me: error: libformula.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libformula.jar not found." >&5 +$as_echo "$as_me: error: libformula.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBREPOSITORY_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/librepository-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/librepository-1.0.0.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/librepository-1.0.0.jar" >&5 +$as_echo_n "checking for /usr/share/java/librepository-1.0.0.jar... " >&6; } if test "${ac_cv_file__usr_share_java_librepository_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/librepository-1.0.0.jar"; then ac_cv_file__usr_share_java_librepository_1_0_0_jar=yes @@ -28174,20 +29723,20 @@ else ac_cv_file__usr_share_java_librepository_1_0_0_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_librepository_1_0_0_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_librepository_1_0_0_jar" = x""yes; then LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/librepository.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/librepository.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/librepository.jar" >&5 +$as_echo_n "checking for /usr/share/java/librepository.jar... " >&6; } if test "${ac_cv_file__usr_share_java_librepository_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/librepository.jar"; then ac_cv_file__usr_share_java_librepository_jar=yes @@ -28195,13 +29744,13 @@ else ac_cv_file__usr_share_java_librepository_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_librepository_jar" >&6 -if test $ac_cv_file__usr_share_java_librepository_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_librepository_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_librepository_jar" = x""yes; then LIBREPOSITORY_JAR=/usr/share/java/librepository.jar else - { { echo "$as_me:$LINENO: error: librepository.jar replacement not found." >&5 -echo "$as_me: error: librepository.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: librepository.jar replacement not found." >&5 +$as_echo "$as_me: error: librepository.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28211,15 +29760,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBREPOSITORY_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBREPOSITORY_JAR" >&5 -echo $ECHO_N "checking for $LIBREPOSITORY_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBREPOSITORY_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LIBREPOSITORY_JAR" >&5 +$as_echo_n "checking for $LIBREPOSITORY_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBREPOSITORY_JAR"; then eval "$as_ac_File=yes" @@ -28227,27 +29776,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: librepository.jar not found." >&5 -echo "$as_me: error: librepository.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: librepository.jar not found." >&5 +$as_echo "$as_me: error: librepository.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBFONTS_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libfonts-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libfonts-1.0.0.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libfonts-1.0.0.jar" >&5 +$as_echo_n "checking for /usr/share/java/libfonts-1.0.0.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libfonts_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libfonts-1.0.0.jar"; then ac_cv_file__usr_share_java_libfonts_1_0_0_jar=yes @@ -28255,20 +29808,20 @@ else ac_cv_file__usr_share_java_libfonts_1_0_0_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libfonts_1_0_0_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" = x""yes; then LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libfonts.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libfonts.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libfonts.jar" >&5 +$as_echo_n "checking for /usr/share/java/libfonts.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libfonts_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libfonts.jar"; then ac_cv_file__usr_share_java_libfonts_jar=yes @@ -28276,13 +29829,13 @@ else ac_cv_file__usr_share_java_libfonts_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libfonts_jar" >&6 -if test $ac_cv_file__usr_share_java_libfonts_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libfonts_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libfonts_jar" = x""yes; then LIBFONTS_JAR=/usr/share/java/libfonts.jar else - { { echo "$as_me:$LINENO: error: libfonts.jar replacement not found." >&5 -echo "$as_me: error: libfonts.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libfonts.jar replacement not found." >&5 +$as_echo "$as_me: error: libfonts.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28292,15 +29845,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBFONTS_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBFONTS_JAR" >&5 -echo $ECHO_N "checking for $LIBFONTS_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBFONTS_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LIBFONTS_JAR" >&5 +$as_echo_n "checking for $LIBFONTS_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBFONTS_JAR"; then eval "$as_ac_File=yes" @@ -28308,27 +29861,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: libfonts.jar not found." >&5 -echo "$as_me: error: libfonts.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libfonts.jar not found." >&5 +$as_echo "$as_me: error: libfonts.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBSERIALIZER_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libserializer-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libserializer-1.0.0.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libserializer-1.0.0.jar" >&5 +$as_echo_n "checking for /usr/share/java/libserializer-1.0.0.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libserializer_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libserializer-1.0.0.jar"; then ac_cv_file__usr_share_java_libserializer_1_0_0_jar=yes @@ -28336,20 +29893,20 @@ else ac_cv_file__usr_share_java_libserializer_1_0_0_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libserializer_1_0_0_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" = x""yes; then LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libserializer.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libserializer.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libserializer.jar" >&5 +$as_echo_n "checking for /usr/share/java/libserializer.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libserializer_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libserializer.jar"; then ac_cv_file__usr_share_java_libserializer_jar=yes @@ -28357,13 +29914,13 @@ else ac_cv_file__usr_share_java_libserializer_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libserializer_jar" >&6 -if test $ac_cv_file__usr_share_java_libserializer_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libserializer_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libserializer_jar" = x""yes; then LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar else - { { echo "$as_me:$LINENO: error: libserializer.jar replacement not found." >&5 -echo "$as_me: error: libserializer.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libserializer.jar replacement not found." >&5 +$as_echo "$as_me: error: libserializer.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28373,15 +29930,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBSERIALIZER_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBSERIALIZER_JAR" >&5 -echo $ECHO_N "checking for $LIBSERIALIZER_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBSERIALIZER_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LIBSERIALIZER_JAR" >&5 +$as_echo_n "checking for $LIBSERIALIZER_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBSERIALIZER_JAR"; then eval "$as_ac_File=yes" @@ -28389,13 +29946,17 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: libserializer.jar not found." >&5 -echo "$as_me: error: libserializer.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libserializer.jar not found." >&5 +$as_echo "$as_me: error: libserializer.jar not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28403,14 +29964,14 @@ fi if test -z $LIBBASE_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/libbase-1.0.0.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libbase-1.0.0.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libbase-1.0.0.jar" >&5 +$as_echo_n "checking for /usr/share/java/libbase-1.0.0.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libbase_1_0_0_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libbase-1.0.0.jar"; then ac_cv_file__usr_share_java_libbase_1_0_0_jar=yes @@ -28418,20 +29979,20 @@ else ac_cv_file__usr_share_java_libbase_1_0_0_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&6 -if test $ac_cv_file__usr_share_java_libbase_1_0_0_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libbase_1_0_0_jar" = x""yes; then LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/libbase.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/libbase.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libbase.jar" >&5 +$as_echo_n "checking for /usr/share/java/libbase.jar... " >&6; } if test "${ac_cv_file__usr_share_java_libbase_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libbase.jar"; then ac_cv_file__usr_share_java_libbase_jar=yes @@ -28439,13 +30000,13 @@ else ac_cv_file__usr_share_java_libbase_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_libbase_jar" >&6 -if test $ac_cv_file__usr_share_java_libbase_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_libbase_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_libbase_jar" = x""yes; then LIBBASE_JAR=/usr/share/java/libbase.jar else - { { echo "$as_me:$LINENO: error: libbase.jar replacement not found." >&5 -echo "$as_me: error: libbase.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libbase.jar replacement not found." >&5 +$as_echo "$as_me: error: libbase.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28455,15 +30016,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$LIBBASE_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $LIBBASE_JAR" >&5 -echo $ECHO_N "checking for $LIBBASE_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$LIBBASE_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $LIBBASE_JAR" >&5 +$as_echo_n "checking for $LIBBASE_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBBASE_JAR"; then eval "$as_ac_File=yes" @@ -28471,29 +30032,33 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: libbase.jar not found." >&5 -echo "$as_me: error: libbase.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: libbase.jar not found." >&5 +$as_echo "$as_me: error: libbase.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 - echo "$as_me:$LINENO: checking for jfreereport module" >&5 -echo $ECHO_N "checking for jfreereport module... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } + { $as_echo "$as_me:$LINENO: checking for jfreereport module" >&5 +$as_echo_n "checking for jfreereport module... " >&6; } if test -d ./jfreereport; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 + { $as_echo "$as_me:$LINENO: result: OK" >&5 +$as_echo "OK" >&6; } else - { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi SYSTEM_JFREEREPORT=NO @@ -28501,8 +30066,8 @@ echo "$as_me: error: not existing. get it (did you get the -extensions tarball?) fi BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_REPORTBUILDER=NO SYSTEM_JFREEREPORT=NO fi @@ -28523,22 +30088,22 @@ fi # this has to be here because both the wiki publisher and the SRB use # commons-logging if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then - echo "$as_me:$LINENO: checking which Apache commons-* libs to use" >&5 -echo $ECHO_N "checking which Apache commons-* libs to use... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking which Apache commons-* libs to use" >&5 +$as_echo_n "checking which Apache commons-* libs to use... " >&6; } if test "$with_system_apache_commons" = "yes"; then SYSTEM_APACHE_COMMONS=YES - echo "$as_me:$LINENO: result: external" >&5 -echo "${ECHO_T}external" >&6 + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } if test "$ENABLE_MEDIAWIKI" = "YES"; then if test -z $COMMONS_CODEC_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec-1.3.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-codec-1.3.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec-1.3.jar" >&5 +$as_echo_n "checking for /usr/share/java/commons-codec-1.3.jar... " >&6; } if test "${ac_cv_file__usr_share_java_commons_codec_1_3_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-codec-1.3.jar"; then ac_cv_file__usr_share_java_commons_codec_1_3_jar=yes @@ -28546,20 +30111,20 @@ else ac_cv_file__usr_share_java_commons_codec_1_3_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_codec_1_3_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_commons_codec_1_3_jar" = x""yes; then COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-codec.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec.jar" >&5 +$as_echo_n "checking for /usr/share/java/commons-codec.jar... " >&6; } if test "${ac_cv_file__usr_share_java_commons_codec_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-codec.jar"; then ac_cv_file__usr_share_java_commons_codec_jar=yes @@ -28567,13 +30132,13 @@ else ac_cv_file__usr_share_java_commons_codec_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_codec_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_codec_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_commons_codec_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_commons_codec_jar" = x""yes; then COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar else - { { echo "$as_me:$LINENO: error: commons-codec.jar replacement not found." >&5 -echo "$as_me: error: commons-codec.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: commons-codec.jar replacement not found." >&5 +$as_echo "$as_me: error: commons-codec.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28583,15 +30148,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_CODEC_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_CODEC_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $COMMONS_CODEC_JAR" >&5 +$as_echo_n "checking for $COMMONS_CODEC_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$COMMONS_CODEC_JAR"; then eval "$as_ac_File=yes" @@ -28599,27 +30164,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: commons-codec.jar not found." >&5 -echo "$as_me: error: commons-codec.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: commons-codec.jar not found." >&5 +$as_echo "$as_me: error: commons-codec.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $COMMONS_LANG_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang-2.3.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-lang-2.3.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang-2.3.jar" >&5 +$as_echo_n "checking for /usr/share/java/commons-lang-2.3.jar... " >&6; } if test "${ac_cv_file__usr_share_java_commons_lang_2_3_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-lang-2.3.jar"; then ac_cv_file__usr_share_java_commons_lang_2_3_jar=yes @@ -28627,20 +30196,20 @@ else ac_cv_file__usr_share_java_commons_lang_2_3_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_lang_2_3_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_commons_lang_2_3_jar" = x""yes; then COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-lang.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang.jar" >&5 +$as_echo_n "checking for /usr/share/java/commons-lang.jar... " >&6; } if test "${ac_cv_file__usr_share_java_commons_lang_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-lang.jar"; then ac_cv_file__usr_share_java_commons_lang_jar=yes @@ -28648,13 +30217,13 @@ else ac_cv_file__usr_share_java_commons_lang_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_lang_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_lang_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_commons_lang_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_commons_lang_jar" = x""yes; then COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar else - { { echo "$as_me:$LINENO: error: commons-lang.jar replacement not found." >&5 -echo "$as_me: error: commons-lang.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: commons-lang.jar replacement not found." >&5 +$as_echo "$as_me: error: commons-lang.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28664,15 +30233,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_LANG_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_LANG_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $COMMONS_LANG_JAR" >&5 +$as_echo_n "checking for $COMMONS_LANG_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$COMMONS_LANG_JAR"; then eval "$as_ac_File=yes" @@ -28680,27 +30249,31 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: commons-lang.jar not found." >&5 -echo "$as_me: error: commons-lang.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: commons-lang.jar not found." >&5 +$as_echo "$as_me: error: commons-lang.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $COMMONS_HTTPCLIENT_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient-3.1.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-httpclient-3.1.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient-3.1.jar" >&5 +$as_echo_n "checking for /usr/share/java/commons-httpclient-3.1.jar... " >&6; } if test "${ac_cv_file__usr_share_java_commons_httpclient_3_1_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-httpclient-3.1.jar"; then ac_cv_file__usr_share_java_commons_httpclient_3_1_jar=yes @@ -28708,20 +30281,20 @@ else ac_cv_file__usr_share_java_commons_httpclient_3_1_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" = x""yes; then COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-httpclient.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient.jar" >&5 +$as_echo_n "checking for /usr/share/java/commons-httpclient.jar... " >&6; } if test "${ac_cv_file__usr_share_java_commons_httpclient_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-httpclient.jar"; then ac_cv_file__usr_share_java_commons_httpclient_jar=yes @@ -28729,13 +30302,13 @@ else ac_cv_file__usr_share_java_commons_httpclient_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_httpclient_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_httpclient_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_commons_httpclient_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_commons_httpclient_jar" = x""yes; then COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar else - { { echo "$as_me:$LINENO: error: commons-httpclient.jar replacement not found." >&5 -echo "$as_me: error: commons-httpclient.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: commons-httpclient.jar replacement not found." >&5 +$as_echo "$as_me: error: commons-httpclient.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28745,15 +30318,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_HTTPCLIENT_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_HTTPCLIENT_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $COMMONS_HTTPCLIENT_JAR" >&5 +$as_echo_n "checking for $COMMONS_HTTPCLIENT_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$COMMONS_HTTPCLIENT_JAR"; then eval "$as_ac_File=yes" @@ -28761,13 +30334,17 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: commons-httpclient.jar not found." >&5 -echo "$as_me: error: commons-httpclient.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: commons-httpclient.jar not found." >&5 +$as_echo "$as_me: error: commons-httpclient.jar not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28775,14 +30352,14 @@ fi fi if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then if test -z $COMMONS_LOGGING_JAR; then - echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging-1.1.1.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-logging-1.1.1.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging-1.1.1.jar" >&5 +$as_echo_n "checking for /usr/share/java/commons-logging-1.1.1.jar... " >&6; } if test "${ac_cv_file__usr_share_java_commons_logging_1_1_1_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-logging-1.1.1.jar"; then ac_cv_file__usr_share_java_commons_logging_1_1_1_jar=yes @@ -28790,20 +30367,20 @@ else ac_cv_file__usr_share_java_commons_logging_1_1_1_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" = x""yes; then COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar else - echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging.jar" >&5 -echo $ECHO_N "checking for /usr/share/java/commons-logging.jar... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging.jar" >&5 +$as_echo_n "checking for /usr/share/java/commons-logging.jar... " >&6; } if test "${ac_cv_file__usr_share_java_commons_logging_jar+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-logging.jar"; then ac_cv_file__usr_share_java_commons_logging_jar=yes @@ -28811,13 +30388,13 @@ else ac_cv_file__usr_share_java_commons_logging_jar=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_jar" >&5 -echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_logging_jar" >&6 -if test $ac_cv_file__usr_share_java_commons_logging_jar = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_jar" >&5 +$as_echo "$ac_cv_file__usr_share_java_commons_logging_jar" >&6; } +if test "x$ac_cv_file__usr_share_java_commons_logging_jar" = x""yes; then COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar else - { { echo "$as_me:$LINENO: error: commons-logging.jar replacement not found." >&5 -echo "$as_me: error: commons-logging.jar replacement not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: commons-logging.jar replacement not found." >&5 +$as_echo "$as_me: error: commons-logging.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -28827,15 +30404,15 @@ fi fi else - as_ac_File=`echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_LOGGING_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_LOGGING_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $COMMONS_LOGGING_JAR" >&5 +$as_echo_n "checking for $COMMONS_LOGGING_JAR... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$COMMONS_LOGGING_JAR"; then eval "$as_ac_File=yes" @@ -28843,21 +30420,25 @@ else eval "$as_ac_File=no" fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 -if test `eval echo '${'$as_ac_File'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then : else - { { echo "$as_me:$LINENO: error: commons-logging.jar not found." >&5 -echo "$as_me: error: commons-logging.jar not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: commons-logging.jar not found." >&5 +$as_echo "$as_me: error: commons-logging.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi fi else - echo "$as_me:$LINENO: result: internal" >&5 -echo "${ECHO_T}internal" >&6 + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } SYSTEM_APACHE_COMMONS=NO BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" fi @@ -28909,8 +30490,8 @@ if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then kde_test_include="ksharedptr.h" kde_test_library="libkdeui.so" - echo "$as_me:$LINENO: checking for Qt headers" >&5 -echo $ECHO_N "checking for Qt headers... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for Qt headers" >&5 +$as_echo_n "checking for Qt headers... " >&6; } qt_incdir="no" for kde_check in $qt_incdirs ; do if test -r "$kde_check/$qt_test_include" ; then @@ -28918,18 +30499,18 @@ echo $ECHO_N "checking for Qt headers... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $qt_incdir" >&5 -echo "${ECHO_T}$qt_incdir" >&6 + { $as_echo "$as_me:$LINENO: result: $qt_incdir" >&5 +$as_echo "$qt_incdir" >&6; } if test "x$qt_incdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: Qt headers not found. Please specify the root of + { { $as_echo "$as_me:$LINENO: error: Qt headers not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&5 -echo "$as_me: error: Qt headers not found. Please specify the root of +$as_echo "$as_me: error: Qt headers not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for Qt libraries" >&5 -echo $ECHO_N "checking for Qt libraries... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for Qt libraries" >&5 +$as_echo_n "checking for Qt libraries... " >&6; } qt_libdir="no" for qt_check in $qt_libdirs ; do if test -r "$qt_check/$qt_test_library" ; then @@ -28937,22 +30518,22 @@ echo $ECHO_N "checking for Qt libraries... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $qt_libdir" >&5 -echo "${ECHO_T}$qt_libdir" >&6 + { $as_echo "$as_me:$LINENO: result: $qt_libdir" >&5 +$as_echo "$qt_libdir" >&6; } if test "x$qt_libdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: Qt libraries not found. Please specify the root of + { { $as_echo "$as_me:$LINENO: error: Qt libraries not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&5 -echo "$as_me: error: Qt libraries not found. Please specify the root of +$as_echo "$as_me: error: Qt libraries not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MOC in [\\/]* | ?:[\\/]*) @@ -28966,38 +30547,39 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no" ;; esac fi MOC=$ac_cv_path_MOC - if test -n "$MOC"; then - echo "$as_me:$LINENO: result: $MOC" >&5 -echo "${ECHO_T}$MOC" >&6 + { $as_echo "$as_me:$LINENO: result: $MOC" >&5 +$as_echo "$MOC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$MOC" = "no" ; then - { { echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify + { { $as_echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&5 -echo "$as_me: error: Qt Meta Object Compiler not found. Please specify +$as_echo "$as_me: error: Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for KDE headers" >&5 -echo $ECHO_N "checking for KDE headers... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for KDE headers" >&5 +$as_echo_n "checking for KDE headers... " >&6; } kde_incdir="no" for kde_check in $kde_incdirs ; do if test -r "$kde_check/$kde_test_include" ; then @@ -29005,18 +30587,18 @@ echo $ECHO_N "checking for KDE headers... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $kde_incdir" >&5 -echo "${ECHO_T}$kde_incdir" >&6 + { $as_echo "$as_me:$LINENO: result: $kde_incdir" >&5 +$as_echo "$kde_incdir" >&6; } if test "x$kde_incdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: KDE headers not found. Please specify the root of + { { $as_echo "$as_me:$LINENO: error: KDE headers not found. Please specify the root of your KDE installation by exporting KDEDIR before running \"configure\"." >&5 -echo "$as_me: error: KDE headers not found. Please specify the root of +$as_echo "$as_me: error: KDE headers not found. Please specify the root of your KDE installation by exporting KDEDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for KDE libraries" >&5 -echo $ECHO_N "checking for KDE libraries... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for KDE libraries" >&5 +$as_echo_n "checking for KDE libraries... " >&6; } kde_libdir="no" for kde_check in $kde_libdirs ; do if test -r "$kde_check/$kde_test_library" ; then @@ -29024,12 +30606,12 @@ echo $ECHO_N "checking for KDE libraries... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $kde_libdir" >&5 -echo "${ECHO_T}$kde_libdir" >&6 + { $as_echo "$as_me:$LINENO: result: $kde_libdir" >&5 +$as_echo "$kde_libdir" >&6; } if test "x$kde_libdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: KDE libraries not found. Please specify the root of + { { $as_echo "$as_me:$LINENO: error: KDE libraries not found. Please specify the root of your KDE installation by exporting KDEDIR before running \"configure\"." >&5 -echo "$as_me: error: KDE libraries not found. Please specify the root of +$as_echo "$as_me: error: KDE libraries not found. Please specify the root of your KDE installation by exporting KDEDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi @@ -29071,8 +30653,8 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then kde_test_include="ksharedptr.h" kde_test_library="libkdeui.so" - echo "$as_me:$LINENO: checking for Qt4 headers" >&5 -echo $ECHO_N "checking for Qt4 headers... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for Qt4 headers" >&5 +$as_echo_n "checking for Qt4 headers... " >&6; } qt_header_dir="no" for inc_dir in $qt_incdirs ; do if test -r "$inc_dir/$qt_test_include" ; then @@ -29081,16 +30663,16 @@ echo $ECHO_N "checking for Qt4 headers... $ECHO_C" >&6 fi done - echo "$as_me:$LINENO: result: $qt_header_dir" >&5 -echo "${ECHO_T}$qt_header_dir" >&6 + { $as_echo "$as_me:$LINENO: result: $qt_header_dir" >&5 +$as_echo "$qt_header_dir" >&6; } if test "x$qt_header_dir" = "xno" ; then - { { echo "$as_me:$LINENO: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 -echo "$as_me: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} + { { $as_echo "$as_me:$LINENO: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 +$as_echo "$as_me: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for Qt4 libraries" >&5 -echo $ECHO_N "checking for Qt4 libraries... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for Qt4 libraries" >&5 +$as_echo_n "checking for Qt4 libraries... " >&6; } qt_lib_dir="no" for lib_dir in $qt_libdirs ; do if test -r "$lib_dir/$qt_test_library" ; then @@ -29099,21 +30681,21 @@ echo $ECHO_N "checking for Qt4 libraries... $ECHO_C" >&6 fi done - echo "$as_me:$LINENO: result: $qt_lib_dir" >&5 -echo "${ECHO_T}$qt_lib_dir" >&6 + { $as_echo "$as_me:$LINENO: result: $qt_lib_dir" >&5 +$as_echo "$qt_lib_dir" >&6; } if test "x$qt_lib_dir" = "xno" ; then - { { echo "$as_me:$LINENO: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 -echo "$as_me: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} + { { $as_echo "$as_me:$LINENO: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 +$as_echo "$as_me: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MOC4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $MOC4 in [\\/]* | ?:[\\/]*) @@ -29127,38 +30709,39 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MOC4="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_MOC4" && ac_cv_path_MOC4="no" ;; esac fi MOC4=$ac_cv_path_MOC4 - if test -n "$MOC4"; then - echo "$as_me:$LINENO: result: $MOC4" >&5 -echo "${ECHO_T}$MOC4" >&6 + { $as_echo "$as_me:$LINENO: result: $MOC4" >&5 +$as_echo "$MOC4" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + if test "$MOC4" = "no" ; then - { { echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify + { { $as_echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT4DIR before running \"configure\"." >&5 -echo "$as_me: error: Qt Meta Object Compiler not found. Please specify +$as_echo "$as_me: error: Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for KDE4 headers" >&5 -echo $ECHO_N "checking for KDE4 headers... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for KDE4 headers" >&5 +$as_echo_n "checking for KDE4 headers... " >&6; } kde_incdir="no" for kde_check in $kde_incdirs ; do if test -r "$kde_check/$kde_test_include" ; then @@ -29166,16 +30749,16 @@ echo $ECHO_N "checking for KDE4 headers... $ECHO_C" >&6 break fi done - echo "$as_me:$LINENO: result: $kde_incdir" >&5 -echo "${ECHO_T}$kde_incdir" >&6 + { $as_echo "$as_me:$LINENO: result: $kde_incdir" >&5 +$as_echo "$kde_incdir" >&6; } if test "x$kde_incdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 -echo "$as_me: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} + { { $as_echo "$as_me:$LINENO: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 +$as_echo "$as_me: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for KDE4 libraries" >&5 -echo $ECHO_N "checking for KDE4 libraries... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for KDE4 libraries" >&5 +$as_echo_n "checking for KDE4 libraries... " >&6; } kde_libdir="no" for kde_check in $kde_libdirs ; do if test -r "$kde_check/$kde_test_library" ; then @@ -29184,11 +30767,11 @@ echo $ECHO_N "checking for KDE4 libraries... $ECHO_C" >&6 fi done - echo "$as_me:$LINENO: result: $kde_libdir" >&5 -echo "${ECHO_T}$kde_libdir" >&6 + { $as_echo "$as_me:$LINENO: result: $kde_libdir" >&5 +$as_echo "$kde_libdir" >&6; } if test "x$kde_libdir" = "xno" ; then - { { echo "$as_me:$LINENO: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 -echo "$as_me: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} + { { $as_echo "$as_me:$LINENO: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 +$as_echo "$as_me: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi @@ -29199,138 +30782,153 @@ fi -echo "$as_me:$LINENO: checking whether to enable the lockdown pieces" >&5 -echo $ECHO_N "checking whether to enable the lockdown pieces... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable the lockdown pieces" >&5 +$as_echo_n "checking whether to enable the lockdown pieces... " >&6; } ENABLE_LOCKDOWN="" if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then ENABLE_LOCKDOWN=YES - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to enable evolution 2 support" >&5 -echo $ECHO_N "checking whether to enable evolution 2 support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable evolution 2 support" >&5 +$as_echo_n "checking whether to enable evolution 2 support... " >&6; } if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GOBJECT" >&5 +$as_echo_n "checking for GOBJECT... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$GOBJECT_CFLAGS"; then + pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + if test -n "$GOBJECT_LIBS"; then + pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gobject-2.0" >&5 -echo $ECHO_N "checking for gobject-2.0... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gobject-2.0" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GOBJECT_CFLAGS" >&5 -echo $ECHO_N "checking GOBJECT_CFLAGS... $ECHO_C" >&6 - GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0"` - echo "$as_me:$LINENO: result: $GOBJECT_CFLAGS" >&5 -echo "${ECHO_T}$GOBJECT_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GOBJECT_LIBS" >&5 -echo $ECHO_N "checking GOBJECT_LIBS... $ECHO_C" >&6 - GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0"` - echo "$as_me:$LINENO: result: $GOBJECT_LIBS" >&5 -echo "${ECHO_T}$GOBJECT_LIBS" >&6 + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gobject-2.0"` else - GOBJECT_CFLAGS="" - GOBJECT_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0"` - echo $GOBJECT_PKG_ERRORS + GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0"` fi + # Put the nasty error message in config.log where it belongs + echo "$GOBJECT_PKG_ERRORS" >&5 + { { $as_echo "$as_me:$LINENO: error: Package requirements (gobject-2.0) were not met: +$GOBJECT_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - : - else - { { echo "$as_me:$LINENO: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables GOBJECT_CFLAGS +and GOBJECT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (gobject-2.0) were not met: + +$GOBJECT_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GOBJECT_CFLAGS +and GOBJECT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GOBJECT_CFLAGS +and GOBJECT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GOBJECT_CFLAGS +and GOBJECT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + GOBJECT_CFLAGS=$pkg_cv_GOBJECT_CFLAGS + GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi ENABLE_EVOAB2="TRUE" else ENABLE_EVOAB2="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to enable KDE address book support" >&5 -echo $ECHO_N "checking whether to enable KDE address book support... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable KDE address book support" >&5 +$as_echo_n "checking whether to enable KDE address book support... " >&6; } if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - ac_ext=cc + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -29338,14 +30936,16 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $KDE_CFLAGS" - echo "$as_me:$LINENO: checking whether KDE is between 3.2 and 3.6" >&5 -echo $ECHO_N "checking whether KDE is between 3.2 and 3.6... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether KDE is between 3.2 and 3.6" >&5 +$as_echo_n "checking whether KDE is between 3.2 and 3.6... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -29363,30 +30963,44 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&5 -echo "$as_me: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&2;} +{ { $as_echo "$as_me:$LINENO: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&5 +$as_echo "$as_me: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&2;} { (exit 1); exit 1; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + CXXFLAGS=$save_CXXFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -29396,67 +31010,67 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ENABLE_KAB=TRUE else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } ENABLE_KAB= fi -echo "$as_me:$LINENO: checking whether to include MathMLDTD" >&5 -echo $ECHO_N "checking whether to include MathMLDTD... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to include MathMLDTD" >&5 +$as_echo_n "checking whether to include MathMLDTD... " >&6; } if test -n "$enable_mathmldtd"; then if test "$enable_mathmldtd" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } BUILD_TYPE="$BUILD_TYPE MATHMLDTD" fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" fi -echo "$as_me:$LINENO: checking whether to include third-party fonts" >&5 -echo $ECHO_N "checking whether to include third-party fonts... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to include third-party fonts" >&5 +$as_echo_n "checking whether to include third-party fonts... " >&6; } if test "$with_fonts" != "no" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } WITH_FONTS=YES BUILD_TYPE="$BUILD_TYPE MORE_FONTS" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } WITH_FONTS=NO SCPDEFS="$SCPDEFS -DWITHOUT_FONTS" fi -echo "$as_me:$LINENO: checking whether to include PPDs" >&5 -echo $ECHO_N "checking whether to include PPDs... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to include PPDs" >&5 +$as_echo_n "checking whether to include PPDs... " >&6; } if test "$with_ppds" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } WITHOUT_PPDS=YES SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" fi -echo "$as_me:$LINENO: checking whether to include AFMs" >&5 -echo $ECHO_N "checking whether to include AFMs... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to include AFMs" >&5 +$as_echo_n "checking whether to include AFMs... " >&6; } if test "$with_afms" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } BUILD_TYPE="$BUILD_TYPE AFMS" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } WITHOUT_AFMS=YES SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" fi @@ -29464,13 +31078,13 @@ fi -echo "$as_me:$LINENO: checking whether and how to use Xinerama" >&5 -echo $ECHO_N "checking whether and how to use Xinerama... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether and how to use Xinerama" >&5 +$as_echo_n "checking whether and how to use Xinerama... " >&6; } if test "$_os" = "Darwin"; then USE_XINERAMA=YES XINERAMA_LINK=dynamic - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then # we have both versions, let the user decide but use the dynamic one @@ -29500,20 +31114,20 @@ elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then XINERAMA_LINK=none fi if test "$USE_XINERAMA" = "YES"; then - echo "$as_me:$LINENO: result: yes, with $XINERAMA_LINK linking" >&5 -echo "${ECHO_T}yes, with $XINERAMA_LINK linking" >&6 + { $as_echo "$as_me:$LINENO: result: yes, with $XINERAMA_LINK linking" >&5 +$as_echo "yes, with $XINERAMA_LINK linking" >&6; } if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 -echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 +$as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; } if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h usability" >&5 -echo $ECHO_N "checking X11/extensions/Xinerama.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h usability" >&5 +$as_echo_n "checking X11/extensions/Xinerama.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29524,41 +31138,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h presence" >&5 -echo $ECHO_N "checking X11/extensions/Xinerama.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h presence" >&5 +$as_echo_n "checking X11/extensions/Xinerama.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29567,83 +31178,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 -echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 +$as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; } if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_X11_extensions_Xinerama_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; } fi -if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then +if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Xinerama header not found." >&5 -echo "$as_me: error: Xinerama header not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Xinerama header not found." >&5 +$as_echo "$as_me: error: Xinerama header not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29656,10 +31260,10 @@ fi XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" fi -echo "$as_me:$LINENO: checking for XineramaIsActive in -lXinerama" >&5 -echo $ECHO_N "checking for XineramaIsActive in -lXinerama... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for XineramaIsActive in -lXinerama" >&5 +$as_echo_n "checking for XineramaIsActive in -lXinerama... " >&6; } if test "${ac_cv_lib_Xinerama_XineramaIsActive+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXinerama $XINERAMA_EXTRA_LIBS $LIBS" @@ -29670,57 +31274,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XineramaIsActive (); int main () { -XineramaIsActive (); +return XineramaIsActive (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_Xinerama_XineramaIsActive=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_Xinerama_XineramaIsActive=no + ac_cv_lib_Xinerama_XineramaIsActive=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaIsActive" >&5 -echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaIsActive" >&6 -if test $ac_cv_lib_Xinerama_XineramaIsActive = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaIsActive" >&5 +$as_echo "$ac_cv_lib_Xinerama_XineramaIsActive" >&6; } +if test "x$ac_cv_lib_Xinerama_XineramaIsActive" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXINERAMA 1 _ACEOF @@ -29728,18 +31333,18 @@ _ACEOF LIBS="-lXinerama $LIBS" else - { { echo "$as_me:$LINENO: error: Xinerama not functional?" >&5 -echo "$as_me: error: Xinerama not functional?" >&2;} + { { $as_echo "$as_me:$LINENO: error: Xinerama not functional?" >&5 +$as_echo "$as_me: error: Xinerama not functional?" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: no, libXinerama not found or wrong architecture." >&5 -echo "${ECHO_T}no, libXinerama not found or wrong architecture." >&6 + { $as_echo "$as_me:$LINENO: result: no, libXinerama not found or wrong architecture." >&5 +$as_echo "no, libXinerama not found or wrong architecture." >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -29753,10 +31358,10 @@ if test -z "$with_ant_home"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ANT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $ANT in [\\/]* | ?:[\\/]*) @@ -29769,27 +31374,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi ANT=$ac_cv_path_ANT - if test -n "$ANT"; then - echo "$as_me:$LINENO: result: $ANT" >&5 -echo "${ECHO_T}$ANT" >&6 + { $as_echo "$as_me:$LINENO: result: $ANT" >&5 +$as_echo "$ANT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ANT" && break done @@ -29801,10 +31407,10 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ANT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $ANT in [\\/]* | ?:[\\/]*) @@ -29818,27 +31424,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi ANT=$ac_cv_path_ANT - if test -n "$ANT"; then - echo "$as_me:$LINENO: result: $ANT" >&5 -echo "${ECHO_T}$ANT" >&6 + { $as_echo "$as_me:$LINENO: result: $ANT" >&5 +$as_echo "$ANT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ANT" && break done @@ -29847,8 +31454,8 @@ done fi if test -z "$ANT"; then - { { echo "$as_me:$LINENO: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&5 -echo "$as_me: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&2;} + { { $as_echo "$as_me:$LINENO: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&5 +$as_echo "$as_me: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&2;} { (exit 1); exit 1; }; } else # resolve relative or absolute symlink @@ -29867,8 +31474,8 @@ else export ANT_HOME fi - echo "$as_me:$LINENO: checking if $ANT works" >&5 -echo $ECHO_N "checking if $ANT works... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if $ANT works" >&5 +$as_echo_n "checking if $ANT works... " >&6; } cat > conftest.java << EOF public class conftest { int testmethod(int a, int b) { @@ -29895,11 +31502,11 @@ EOF { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 (eval $ant_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0 && test -f ./conftest.class ; then - echo "$as_me:$LINENO: result: Ant works" >&5 -echo "${ECHO_T}Ant works" >&6 + { $as_echo "$as_me:$LINENO: result: Ant works" >&5 +$as_echo "Ant works" >&6; } if test -z "$WITH_ANT_HOME"; then ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` if test -z "$ANT_HOME"; then @@ -29912,8 +31519,8 @@ echo "${ECHO_T}Ant works" >&6 echo "configure: Ant test failed" >&5 cat conftest.java >&5 cat conftest.xml >&5 - { echo "$as_me:$LINENO: WARNING: Ant does not work - Some Java projects will not build!" >&5 -echo "$as_me: WARNING: Ant does not work - Some Java projects will not build!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Ant does not work - Some Java projects will not build!" >&5 +$as_echo "$as_me: WARNING: Ant does not work - Some Java projects will not build!" >&2;} ANT_HOME="" echo "Ant does not work - Some Java projects will not build!" >>warn fi @@ -29926,8 +31533,8 @@ fi if test "$ANT_HOME" != "NO_ANT_HOME"; then - echo "$as_me:$LINENO: checking Ant lib directory" >&5 -echo $ECHO_N "checking Ant lib directory... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking Ant lib directory" >&5 +$as_echo_n "checking Ant lib directory... " >&6; } if test -f $ANT_HOME/lib/ant.jar; then ANT_LIB="$ANT_HOME/lib" else @@ -29943,16 +31550,16 @@ echo $ECHO_N "checking Ant lib directory... $ECHO_C" >&6 if test -f $ANT_HOME/lib/ant/ant.jar; then ANT_LIB="$ANT_HOME/lib/ant" else - { { echo "$as_me:$LINENO: error: Ant libraries not found!" >&5 -echo "$as_me: error: Ant libraries not found!" >&2;} + { { $as_echo "$as_me:$LINENO: error: Ant libraries not found!" >&5 +$as_echo "$as_me: error: Ant libraries not found!" >&2;} { (exit 1); exit 1; }; } fi fi fi fi fi - echo "$as_me:$LINENO: result: Ant lib directory found." >&5 -echo "${ECHO_T}Ant lib directory found." >&6 + { $as_echo "$as_me:$LINENO: result: Ant lib directory found." >&5 +$as_echo "Ant lib directory found." >&6; } fi fi @@ -29964,8 +31571,8 @@ if test "$ENABLE_MEDIAWIKI" = "YES"; then fi ant_minminor1=`echo $ant_minver | cut -d"." -f2` -echo "$as_me:$LINENO: checking whether ant is >= $ant_minver" >&5 -echo $ECHO_N "checking whether ant is >= $ant_minver... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether ant is >= $ant_minver" >&5 +$as_echo_n "checking whether ant is >= $ant_minver... " >&6; } ant_version=`$ANT -version | $AWK '{ print $4; }'` ant_version_major=`echo $ant_version | cut -d. -f1` ant_version_minor=`echo $ant_version | cut -d. -f2` @@ -29973,20 +31580,20 @@ echo "configure: ant_version $ant_version " >&5 echo "configure: ant_version_major $ant_version_major " >&5 echo "configure: ant_version_minor $ant_version_minor " >&5 if test "$ant_version_major" -ge "2"; then - echo "$as_me:$LINENO: result: yes, $ant_version" >&5 -echo "${ECHO_T}yes, $ant_version" >&6 + { $as_echo "$as_me:$LINENO: result: yes, $ant_version" >&5 +$as_echo "yes, $ant_version" >&6; } elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then - echo "$as_me:$LINENO: result: yes, $ant_version" >&5 -echo "${ECHO_T}yes, $ant_version" >&6 + { $as_echo "$as_me:$LINENO: result: yes, $ant_version" >&5 +$as_echo "yes, $ant_version" >&6; } else - { { echo "$as_me:$LINENO: error: no, you need at least ant >= $ant_minver" >&5 -echo "$as_me: error: no, you need at least ant >= $ant_minver" >&2;} + { { $as_echo "$as_me:$LINENO: error: no, you need at least ant >= $ant_minver" >&5 +$as_echo "$as_me: error: no, you need at least ant >= $ant_minver" >&2;} { (exit 1); exit 1; }; } fi if test "$ENABLE_MEDIAWIKI" = "YES"; then -echo "$as_me:$LINENO: checking whether ant supports mapper type=\"regexp\"" >&5 -echo $ECHO_N "checking whether ant supports mapper type=\"regexp\"... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether ant supports mapper type=\"regexp\"" >&5 +$as_echo_n "checking whether ant supports mapper type=\"regexp\"... " >&6; } rm -rf confdir mkdir confdir cat > conftest.java << EOF @@ -30021,19 +31628,19 @@ EOF { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 (eval $ant_cmd) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0 && test -f ./conftest.class ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } rm -rf confdir else echo "configure: Ant test failed" >&5 cat conftest.java >&5 cat conftest.xml >&5 rm -rf confdir - { { echo "$as_me:$LINENO: error: no. Did you install ant-apache-regexp?" >&5 -echo "$as_me: error: no. Did you install ant-apache-regexp?" >&2;} + { { $as_echo "$as_me:$LINENO: error: no. Did you install ant-apache-regexp?" >&5 +$as_echo "$as_me: error: no. Did you install ant-apache-regexp?" >&2;} { (exit 1); exit 1; }; } fi fi @@ -30041,8 +31648,8 @@ rm -f conftest* core core.* *.core OOO_JUNIT_JAR= if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then - echo "$as_me:$LINENO: checking for JUnit 4" >&5 -echo $ECHO_N "checking for JUnit 4... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for JUnit 4" >&5 +$as_echo_n "checking for JUnit 4... " >&6; } if test "$with_junit" == "yes"; then if test -e /usr/share/java/junit4.jar; then OOO_JUNIT_JAR=/usr/share/java/junit4.jar @@ -30058,15 +31665,15 @@ echo $ECHO_N "checking for JUnit 4... $ECHO_C" >&6 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \ grep org/junit/Before.class > /dev/null 2>&5 if test $? -eq 0; then - echo "$as_me:$LINENO: result: $OOO_JUNIT_JAR" >&5 -echo "${ECHO_T}$OOO_JUNIT_JAR" >&6 + { $as_echo "$as_me:$LINENO: result: $OOO_JUNIT_JAR" >&5 +$as_echo "$OOO_JUNIT_JAR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: cannot find JUnit 4 jar; please install one in the default + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: cannot find JUnit 4 jar; please install one in the default location (/usr/share/java), specify its pathname via --with-junit=..., or disable it via --without-junit" >&5 -echo "$as_me: error: cannot find JUnit 4 jar; please install one in the default +$as_echo "$as_me: error: cannot find JUnit 4 jar; please install one in the default location (/usr/share/java), specify its pathname via --with-junit=..., or disable it via --without-junit" >&2;} { (exit 1); exit 1; }; } @@ -30074,172 +31681,172 @@ location (/usr/share/java), specify its pathname via fi -echo "$as_me:$LINENO: checking which languages to be built" >&5 -echo $ECHO_N "checking which languages to be built... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which languages to be built" >&5 +$as_echo_n "checking which languages to be built... " >&6; } WITH_LANG="$with_lang" if test -z "$WITH_LANG"; then - echo "$as_me:$LINENO: result: en-US" >&5 -echo "${ECHO_T}en-US" >&6 + { $as_echo "$as_me:$LINENO: result: en-US" >&5 +$as_echo "en-US" >&6; } else - echo "$as_me:$LINENO: result: $WITH_LANG" >&5 -echo "${ECHO_T}$WITH_LANG" >&6 + { $as_echo "$as_me:$LINENO: result: $WITH_LANG" >&5 +$as_echo "$WITH_LANG" >&6; } fi -echo "$as_me:$LINENO: checking which languages have poor help localizations" >&5 -echo $ECHO_N "checking which languages have poor help localizations... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which languages have poor help localizations" >&5 +$as_echo_n "checking which languages have poor help localizations... " >&6; } WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations" if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } else - echo "$as_me:$LINENO: result: $WITH_POOR_HELP_LOCALIZATIONS" >&5 -echo "${ECHO_T}$WITH_POOR_HELP_LOCALIZATIONS" >&6 + { $as_echo "$as_me:$LINENO: result: $WITH_POOR_HELP_LOCALIZATIONS" >&5 +$as_echo "$WITH_POOR_HELP_LOCALIZATIONS" >&6; } fi -echo "$as_me:$LINENO: checking which dictionaries to include" >&5 -echo $ECHO_N "checking which dictionaries to include... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking which dictionaries to include" >&5 +$as_echo_n "checking which dictionaries to include... " >&6; } if test -z "$with_dict"; then WITH_DICT=,ALL, - echo "$as_me:$LINENO: result: ALL" >&5 -echo "${ECHO_T}ALL" >&6 + { $as_echo "$as_me:$LINENO: result: ALL" >&5 +$as_echo "ALL" >&6; } else WITH_DICT=","$with_dict"," - echo "$as_me:$LINENO: result: $with_dict" >&5 -echo "${ECHO_T}$with_dict" >&6 + { $as_echo "$as_me:$LINENO: result: $with_dict" >&5 +$as_echo "$with_dict" >&6; } fi -echo "$as_me:$LINENO: checking for additional 'intro' bitmaps" >&5 -echo $ECHO_N "checking for additional 'intro' bitmaps... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for additional 'intro' bitmaps" >&5 +$as_echo_n "checking for additional 'intro' bitmaps... " >&6; } INTRO_BITMAPS= if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then INTRO_BITMAPS= - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } else for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do case "$bitmap" in *.bmp) ;; - *) bitmap= ; { echo "$as_me:$LINENO: WARNING: Intro bitmaps should be .bmp files!" >&5 -echo "$as_me: WARNING: Intro bitmaps should be .bmp files!" >&2;} ;; + *) bitmap= ; { $as_echo "$as_me:$LINENO: WARNING: Intro bitmaps should be .bmp files!" >&5 +$as_echo "$as_me: WARNING: Intro bitmaps should be .bmp files!" >&2;} ;; esac if test -n "$bitmap" ; then INTRO_BITMAPS="$INTRO_BITMAPS $bitmap" fi done - echo "$as_me:$LINENO: result: $INTRO_BITMAPS" >&5 -echo "${ECHO_T}$INTRO_BITMAPS" >&6 + { $as_echo "$as_me:$LINENO: result: $INTRO_BITMAPS" >&5 +$as_echo "$INTRO_BITMAPS" >&6; } fi -echo "$as_me:$LINENO: checking for additional 'about' bitmaps" >&5 -echo $ECHO_N "checking for additional 'about' bitmaps... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for additional 'about' bitmaps" >&5 +$as_echo_n "checking for additional 'about' bitmaps... " >&6; } ABOUT_BITMAPS= if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then ABOUT_BITMAPS= - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } else for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do case "$bitmap" in *.bmp) ;; - *) bitmap= ; { echo "$as_me:$LINENO: WARNING: About bitmaps should be .bmp files!" >&5 -echo "$as_me: WARNING: About bitmaps should be .bmp files!" >&2;} ;; + *) bitmap= ; { $as_echo "$as_me:$LINENO: WARNING: About bitmaps should be .bmp files!" >&5 +$as_echo "$as_me: WARNING: About bitmaps should be .bmp files!" >&2;} ;; esac if test -n "$bitmap" ; then ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap" fi done - echo "$as_me:$LINENO: result: $ABOUT_BITMAPS" >&5 -echo "${ECHO_T}$ABOUT_BITMAPS" >&6 + { $as_echo "$as_me:$LINENO: result: $ABOUT_BITMAPS" >&5 +$as_echo "$ABOUT_BITMAPS" >&6; } fi OOO_VENDOR= -echo "$as_me:$LINENO: checking for vendor" >&5 -echo $ECHO_N "checking for vendor... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for vendor" >&5 +$as_echo_n "checking for vendor... " >&6; } if test -z "$with_vendor" -o "$with_vendor" = "no" ; then - echo "$as_me:$LINENO: result: not set" >&5 -echo "${ECHO_T}not set" >&6 + { $as_echo "$as_me:$LINENO: result: not set" >&5 +$as_echo "not set" >&6; } else OOO_VENDOR="$with_vendor" - echo "$as_me:$LINENO: result: $OOO_VENDOR" >&5 -echo "${ECHO_T}$OOO_VENDOR" >&6 + { $as_echo "$as_me:$LINENO: result: $OOO_VENDOR" >&5 +$as_echo "$OOO_VENDOR" >&6; } fi UNIXWRAPPERNAME= -echo "$as_me:$LINENO: checking for UNIX wrapper name" >&5 -echo $ECHO_N "checking for UNIX wrapper name... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for UNIX wrapper name" >&5 +$as_echo_n "checking for UNIX wrapper name... " >&6; } if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then - echo "$as_me:$LINENO: result: not set" >&5 -echo "${ECHO_T}not set" >&6 + { $as_echo "$as_me:$LINENO: result: not set" >&5 +$as_echo "not set" >&6; } else UNIXWRAPPERNAME="$with_unix_wrapper" - echo "$as_me:$LINENO: result: $UNIXWRAPPERNAME" >&5 -echo "${ECHO_T}$UNIXWRAPPERNAME" >&6 + { $as_echo "$as_me:$LINENO: result: $UNIXWRAPPERNAME" >&5 +$as_echo "$UNIXWRAPPERNAME" >&6; } fi -echo "$as_me:$LINENO: checking whether to statically link to Gtk" >&5 -echo $ECHO_N "checking whether to statically link to Gtk... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to statically link to Gtk" >&5 +$as_echo_n "checking whether to statically link to Gtk... " >&6; } if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then ENABLE_STATIC_GTK="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_STATIC_GTK="FALSE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking whether to use layout dialogs" >&5 -echo $ECHO_N "checking whether to use layout dialogs... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to use layout dialogs" >&5 +$as_echo_n "checking whether to use layout dialogs... " >&6; } if test -n "$enable_layout" && test "$enable_layout" != "no"; then ENABLE_LAYOUT="TRUE" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else ENABLE_LAYOUT="FALSE" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # =================================================================== # De- or increase default verbosity of build process # =================================================================== -echo "$as_me:$LINENO: checking build verbosity" >&5 -echo $ECHO_N "checking build verbosity... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking build verbosity" >&5 +$as_echo_n "checking build verbosity... " >&6; } if test -n "$enable_verbose"; then if test "$enable_verbose" = "yes"; then VERBOSE="TRUE" - echo "$as_me:$LINENO: result: high" >&5 -echo "${ECHO_T}high" >&6 + { $as_echo "$as_me:$LINENO: result: high" >&5 +$as_echo "high" >&6; } fi if test "$enable_verbose" = "no"; then VERBOSE="FALSE" - echo "$as_me:$LINENO: result: low" >&5 -echo "${ECHO_T}low" >&6 + { $as_echo "$as_me:$LINENO: result: low" >&5 +$as_echo "low" >&6; } fi else - echo "$as_me:$LINENO: result: not set" >&5 -echo "${ECHO_T}not set" >&6 + { $as_echo "$as_me:$LINENO: result: not set" >&5 +$as_echo "not set" >&6; } fi -echo "$as_me:$LINENO: checking whether to enable dependency tracking" >&5 -echo $ECHO_N "checking whether to enable dependency tracking... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether to enable dependency tracking" >&5 +$as_echo_n "checking whether to enable dependency tracking... " >&6; } if test "$enable_dependency_tracking" = "no"; then nodep=TRUE - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi @@ -30250,22 +31857,22 @@ echo "* *" echo "********************************************************************" if test -z "$COMPATH"; then - { { echo "$as_me:$LINENO: error: No compiler found." >&5 -echo "$as_me: error: No compiler found." >&2;} + { { $as_echo "$as_me:$LINENO: error: No compiler found." >&5 +$as_echo "$as_me: error: No compiler found." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: checking solver path" >&5 -echo $ECHO_N "checking solver path... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking solver path" >&5 +$as_echo_n "checking solver path... " >&6; } if test -z "$with_local_solver"; then LOCAL_SOLVER="DEFAULT" - echo "$as_me:$LINENO: result: default" >&5 -echo "${ECHO_T}default" >&6 + { $as_echo "$as_me:$LINENO: result: default" >&5 +$as_echo "default" >&6; } else LOCAL_SOLVER=$with_local_solver - echo "$as_me:$LINENO: result: $with_local_solver" >&5 -echo "${ECHO_T}$with_local_solver" >&6 + { $as_echo "$as_me:$LINENO: result: $with_local_solver" >&5 +$as_echo "$with_local_solver" >&6; } fi @@ -30274,7 +31881,8 @@ fi # make sure config.guess is +x; we execute config.guess, so it has to be so; chmod +x ./config.guess - ac_config_files="$ac_config_files set_soenv Makefile" +ac_config_files="$ac_config_files set_soenv Makefile" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -30293,39 +31901,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -30334,63 +31962,54 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -30398,12 +32017,14 @@ LTLIBOBJS=$ac_ltlibobjs + : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -30416,22 +32037,78 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -30441,33 +32118,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -30475,159 +32179,122 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -30636,7 +32303,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -30645,31 +32333,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -30677,124 +32348,107 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -30808,31 +32462,47 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "set_soenv" ) CONFIG_FILES="$CONFIG_FILES set_soenv" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + case $ac_config_target in + "set_soenv") CONFIG_FILES="$CONFIG_FILES set_soenv" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -30842,694 +32512,464 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then -cat >>$CONFIG_STATUS <<_ACEOF -# -# CONFIG_FILES section. -# +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@EGREP@,$EGREP,;t t -s,@AWK@,$AWK,;t t -s,@SED@,$SED,;t t -s,@LOCAL_SOLENV@,$LOCAL_SOLENV,;t t -s,@_solenv@,$_solenv,;t t -s,@UPD@,$UPD,;t t -s,@SOURCEVERSION@,$SOURCEVERSION,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@target@,$target,;t t -s,@target_cpu@,$target_cpu,;t t -s,@target_vendor@,$target_vendor,;t t -s,@target_os@,$target_os,;t t -s,@GNUTAR@,$GNUTAR,;t t -s,@OSVERSION@,$OSVERSION,;t t -s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t -s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t -s,@ENABLE_CRASHDUMP@,$ENABLE_CRASHDUMP,;t t -s,@VC_STANDARD@,$VC_STANDARD,;t t -s,@ENABLE_WERROR@,$ENABLE_WERROR,;t t -s,@ENABLE_DEBUG@,$ENABLE_DEBUG,;t t -s,@PRODUCT@,$PRODUCT,;t t -s,@PROFULLSWITCH@,$PROFULLSWITCH,;t t -s,@PROEXT@,$PROEXT,;t t -s,@ENABLE_SYMBOLS@,$ENABLE_SYMBOLS,;t t -s,@DISABLE_STRIP@,$DISABLE_STRIP,;t t -s,@ENABLE_CUPS@,$ENABLE_CUPS,;t t -s,@ENABLE_FONTCONFIG@,$ENABLE_FONTCONFIG,;t t -s,@TARFILE_LOCATION@,$TARFILE_LOCATION,;t t -s,@DO_FETCH_TARBALLS@,$DO_FETCH_TARBALLS,;t t -s,@WITH_BINFILTER@,$WITH_BINFILTER,;t t -s,@ENABLE_DIRECTX@,$ENABLE_DIRECTX,;t t -s,@DISABLE_ACTIVEX@,$DISABLE_ACTIVEX,;t t -s,@DISABLE_ATL@,$DISABLE_ATL,;t t -s,@ENABLE_RPATH@,$ENABLE_RPATH,;t t -s,@WITH_MYSPELL_DICTS@,$WITH_MYSPELL_DICTS,;t t -s,@SYSTEM_DICTS@,$SYSTEM_DICTS,;t t -s,@DICT_SYSTEM_DIR@,$DICT_SYSTEM_DIR,;t t -s,@HYPH_SYSTEM_DIR@,$HYPH_SYSTEM_DIR,;t t -s,@THES_SYSTEM_DIR@,$THES_SYSTEM_DIR,;t t -s,@WITH_MINGWIN@,$WITH_MINGWIN,;t t -s,@SHELLPATH@,$SHELLPATH,;t t -s,@GCC_HOME@,$GCC_HOME,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@COMPATH@,$COMPATH,;t t -s,@GCCVER@,$GCCVER,;t t -s,@HAVE_LD_BSYMBOLIC_FUNCTIONS@,$HAVE_LD_BSYMBOLIC_FUNCTIONS,;t t -s,@ENABLE_PCH@,$ENABLE_PCH,;t t -s,@GNUMAKE@,$GNUMAKE,;t t -s,@_cc@,$_cc,;t t -s,@HAVE_LD_HASH_STYLE@,$HAVE_LD_HASH_STYLE,;t t -s,@PERL@,$PERL,;t t -s,@MSPDB_PATH@,$MSPDB_PATH,;t t -s,@COMEX@,$COMEX,;t t -s,@USE_MINGW@,$USE_MINGW,;t t -s,@MIDL_PATH@,$MIDL_PATH,;t t -s,@CSC_PATH@,$CSC_PATH,;t t -s,@FRAME_HOME@,$FRAME_HOME,;t t -s,@CPP@,$CPP,;t t -s,@CXX@,$CXX,;t t -s,@CXXFLAGS@,$CXXFLAGS,;t t -s,@ac_ct_CXX@,$ac_ct_CXX,;t t -s,@CXXCPP@,$CXXCPP,;t t -s,@SIZEOF_LONG@,$SIZEOF_LONG,;t t -s,@WORDS_BIGENDIAN@,$WORDS_BIGENDIAN,;t t -s,@LFS_CFLAGS@,$LFS_CFLAGS,;t t -s,@ENABLE_VBA@,$ENABLE_VBA,;t t -s,@VBA_EXTENSION@,$VBA_EXTENSION,;t t -s,@PAM@,$PAM,;t t -s,@NEW_SHADOW_API@,$NEW_SHADOW_API,;t t -s,@PAM_LINK@,$PAM_LINK,;t t -s,@CRYPT_LINK@,$CRYPT_LINK,;t t -s,@GXX_INCLUDE_PATH@,$GXX_INCLUDE_PATH,;t t -s,@MINGW_LIB_INCLUDE_PATH@,$MINGW_LIB_INCLUDE_PATH,;t t -s,@MINGW_BACKWARD_INCLUDE_PATH@,$MINGW_BACKWARD_INCLUDE_PATH,;t t -s,@MINGW_CLIB_DIR@,$MINGW_CLIB_DIR,;t t -s,@MINGW_SHARED_GCCLIB@,$MINGW_SHARED_GCCLIB,;t t -s,@MINGW_GCCLIB_EH@,$MINGW_GCCLIB_EH,;t t -s,@MINGW_SHARED_GXXLIB@,$MINGW_SHARED_GXXLIB,;t t -s,@MINGW_GCCDLL@,$MINGW_GCCDLL,;t t -s,@MINGW_GXXDLL@,$MINGW_GXXDLL,;t t -s,@EXCEPTIONS@,$EXCEPTIONS,;t t -s,@STLPORT4@,$STLPORT4,;t t -s,@STLPORT_VER@,$STLPORT_VER,;t t -s,@USE_SYSTEM_STL@,$USE_SYSTEM_STL,;t t -s,@USE_CCACHE@,$USE_CCACHE,;t t -s,@CCACHE@,$CCACHE,;t t -s,@HAVE_GCC_VISIBILITY_FEATURE@,$HAVE_GCC_VISIBILITY_FEATURE,;t t -s,@ALLOC@,$ALLOC,;t t -s,@BUILD_VER_STRING@,$BUILD_VER_STRING,;t t -s,@SOLAR_JAVA@,$SOLAR_JAVA,;t t -s,@JAVAINTERPRETER@,$JAVAINTERPRETER,;t t -s,@JAVACOMPILER@,$JAVACOMPILER,;t t -s,@JAVACISGCJ@,$JAVACISGCJ,;t t -s,@JAVADOC@,$JAVADOC,;t t -s,@AWTLIB@,$AWTLIB,;t t -s,@JAVAAOTCOMPILER@,$JAVAAOTCOMPILER,;t t -s,@JAVA_HOME@,$JAVA_HOME,;t t -s,@JDK@,$JDK,;t t -s,@JAVAFLAGS@,$JAVAFLAGS,;t t -s,@JAVAIFLAGS@,$JAVAIFLAGS,;t t -s,@DMAKE@,$DMAKE,;t t -s,@BUILD_DMAKE@,$BUILD_DMAKE,;t t -s,@EPM@,$EPM,;t t -s,@DPKG@,$DPKG,;t t -s,@PKGMK@,$PKGMK,;t t -s,@BUILD_EPM@,$BUILD_EPM,;t t -s,@RPM@,$RPM,;t t -s,@PKGFORMAT@,$PKGFORMAT,;t t -s,@GPERF@,$GPERF,;t t -s,@BUILD_STAX@,$BUILD_STAX,;t t -s,@MINGWCXX@,$MINGWCXX,;t t -s,@ac_ct_MINGWCXX@,$ac_ct_MINGWCXX,;t t -s,@MINGWSTRIP@,$MINGWSTRIP,;t t -s,@ac_ct_MINGWSTRIP@,$ac_ct_MINGWSTRIP,;t t -s,@BUILD_UNOWINREG@,$BUILD_UNOWINREG,;t t -s,@SYSTEM_STDLIBS@,$SYSTEM_STDLIBS,;t t -s,@SYSTEM_ZLIB@,$SYSTEM_ZLIB,;t t -s,@SYSTEM_JPEG@,$SYSTEM_JPEG,;t t -s,@SYSTEM_EXPAT@,$SYSTEM_EXPAT,;t t -s,@PKG_CONFIG@,$PKG_CONFIG,;t t -s,@LIBWPD_CFLAGS@,$LIBWPD_CFLAGS,;t t -s,@LIBWPD_LIBS@,$LIBWPD_LIBS,;t t -s,@SYSTEM_LIBWPD@,$SYSTEM_LIBWPD,;t t -s,@CPPUNIT_CFLAGS@,$CPPUNIT_CFLAGS,;t t -s,@CPPUNIT_LIBS@,$CPPUNIT_LIBS,;t t -s,@SYSTEM_CPPUNIT@,$SYSTEM_CPPUNIT,;t t -s,@FREETYPE_CFLAGS@,$FREETYPE_CFLAGS,;t t -s,@FREETYPE_LIBS@,$FREETYPE_LIBS,;t t -s,@USE_FT_EMBOLDEN@,$USE_FT_EMBOLDEN,;t t -s,@LIBXSLT_CFLAGS@,$LIBXSLT_CFLAGS,;t t -s,@LIBXSLT_LIBS@,$LIBXSLT_LIBS,;t t -s,@XSLTPROC@,$XSLTPROC,;t t -s,@SYSTEM_LIBXSLT@,$SYSTEM_LIBXSLT,;t t -s,@LIBXML_CFLAGS@,$LIBXML_CFLAGS,;t t -s,@LIBXML_LIBS@,$LIBXML_LIBS,;t t -s,@SYSTEM_LIBXML@,$SYSTEM_LIBXML,;t t -s,@PYTHON@,$PYTHON,;t t -s,@PYTHON_VERSION@,$PYTHON_VERSION,;t t -s,@PYTHON_PREFIX@,$PYTHON_PREFIX,;t t -s,@PYTHON_EXEC_PREFIX@,$PYTHON_EXEC_PREFIX,;t t -s,@PYTHON_PLATFORM@,$PYTHON_PLATFORM,;t t -s,@pythondir@,$pythondir,;t t -s,@pkgpythondir@,$pkgpythondir,;t t -s,@pyexecdir@,$pyexecdir,;t t -s,@pkgpyexecdir@,$pkgpyexecdir,;t t -s,@BZIP2@,$BZIP2,;t t -s,@SYSTEM_PYTHON@,$SYSTEM_PYTHON,;t t -s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t -s,@PYTHON_LIBS@,$PYTHON_LIBS,;t t -s,@HOME@,$HOME,;t t -s,@SYSTEM_DB@,$SYSTEM_DB,;t t -s,@DB_VERSION@,$DB_VERSION,;t t -s,@DB_INCLUDES@,$DB_INCLUDES,;t t -s,@DB_JAR@,$DB_JAR,;t t -s,@SYSTEM_LUCENE@,$SYSTEM_LUCENE,;t t -s,@LUCENE_CORE_JAR@,$LUCENE_CORE_JAR,;t t -s,@LUCENE_ANALYZERS_JAR@,$LUCENE_ANALYZERS_JAR,;t t -s,@ENABLE_MYSQLC@,$ENABLE_MYSQLC,;t t -s,@MYSQLCONFIG@,$MYSQLCONFIG,;t t -s,@SYSTEM_MYSQL@,$SYSTEM_MYSQL,;t t -s,@MYSQL_INC@,$MYSQL_INC,;t t -s,@MYSQL_LIB@,$MYSQL_LIB,;t t -s,@MYSQL_DEFINES@,$MYSQL_DEFINES,;t t -s,@LIBMYSQL_PATH@,$LIBMYSQL_PATH,;t t -s,@SYSTEM_MYSQL_CPPCONN@,$SYSTEM_MYSQL_CPPCONN,;t t -s,@SYSTEM_HSQLDB@,$SYSTEM_HSQLDB,;t t -s,@HSQLDB_JAR@,$HSQLDB_JAR,;t t -s,@SYSTEM_BSH@,$SYSTEM_BSH,;t t -s,@BSH_JAR@,$BSH_JAR,;t t -s,@SERIALIZER_JAR@,$SERIALIZER_JAR,;t t -s,@SYSTEM_SAXON@,$SYSTEM_SAXON,;t t -s,@SAXON_JAR@,$SAXON_JAR,;t t -s,@CURLCONFIG@,$CURLCONFIG,;t t -s,@SYSTEM_CURL@,$SYSTEM_CURL,;t t -s,@CURL_CFLAGS@,$CURL_CFLAGS,;t t -s,@CURL_LIBS@,$CURL_LIBS,;t t -s,@SYSTEM_MDDS@,$SYSTEM_MDDS,;t t -s,@SYSTEM_BOOST@,$SYSTEM_BOOST,;t t -s,@SYSTEM_VIGRA@,$SYSTEM_VIGRA,;t t -s,@SYSTEM_ODBC_HEADERS@,$SYSTEM_ODBC_HEADERS,;t t -s,@WITH_MOZILLA@,$WITH_MOZILLA,;t t -s,@WITH_LDAP@,$WITH_LDAP,;t t -s,@WITH_OPENLDAP@,$WITH_OPENLDAP,;t t -s,@MOZ_NSS_CFLAGS@,$MOZ_NSS_CFLAGS,;t t -s,@MOZ_NSS_LIBS@,$MOZ_NSS_LIBS,;t t -s,@NSS_LIB@,$NSS_LIB,;t t -s,@MOZ_NSPR_CFLAGS@,$MOZ_NSPR_CFLAGS,;t t -s,@MOZ_NSPR_LIBS@,$MOZ_NSPR_LIBS,;t t -s,@NSPR_LIB@,$NSPR_LIB,;t t -s,@MOZILLAXPCOM_CFLAGS@,$MOZILLAXPCOM_CFLAGS,;t t -s,@MOZILLAXPCOM_LIBS@,$MOZILLAXPCOM_LIBS,;t t -s,@MOZILLA_VERSION@,$MOZILLA_VERSION,;t t -s,@MOZILLA_TOOLKIT@,$MOZILLA_TOOLKIT,;t t -s,@MOZGTK2_CFLAGS@,$MOZGTK2_CFLAGS,;t t -s,@MOZGTK2_LIBS@,$MOZGTK2_LIBS,;t t -s,@MOZLIBREQ_CFLAGS@,$MOZLIBREQ_CFLAGS,;t t -s,@MOZLIBREQ_LIBS@,$MOZLIBREQ_LIBS,;t t -s,@BUILD_MOZAB@,$BUILD_MOZAB,;t t -s,@ENABLE_NSS_MODULE@,$ENABLE_NSS_MODULE,;t t -s,@MOZILLABUILD@,$MOZILLABUILD,;t t -s,@SYSTEM_MOZILLA@,$SYSTEM_MOZILLA,;t t -s,@MOZ_FLAVOUR@,$MOZ_FLAVOUR,;t t -s,@MOZ_INC@,$MOZ_INC,;t t -s,@MOZ_LIB@,$MOZ_LIB,;t t -s,@MOZ_LIB_XPCOM@,$MOZ_LIB_XPCOM,;t t -s,@MOZ_LDAP_CFLAGS@,$MOZ_LDAP_CFLAGS,;t t -s,@SYSTEM_SANE_HEADER@,$SYSTEM_SANE_HEADER,;t t -s,@SYSTEM_GENBRK@,$SYSTEM_GENBRK,;t t -s,@SYSTEM_GENCCODE@,$SYSTEM_GENCCODE,;t t -s,@SYSTEM_GENCMN@,$SYSTEM_GENCMN,;t t -s,@SYSTEM_ICU@,$SYSTEM_ICU,;t t -s,@GRAPHITE_CFLAGS@,$GRAPHITE_CFLAGS,;t t -s,@GRAPHITE_LIBS@,$GRAPHITE_LIBS,;t t -s,@ENABLE_GRAPHITE@,$ENABLE_GRAPHITE,;t t -s,@SYSTEM_GRAPHITE@,$SYSTEM_GRAPHITE,;t t -s,@X_CFLAGS@,$X_CFLAGS,;t t -s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t -s,@X_LIBS@,$X_LIBS,;t t -s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t -s,@XINC@,$XINC,;t t -s,@XLIB@,$XLIB,;t t -s,@XAU_LIBS@,$XAU_LIBS,;t t -s,@DISABLE_XAW@,$DISABLE_XAW,;t t -s,@SYSTEM_XRENDER_HEADERS@,$SYSTEM_XRENDER_HEADERS,;t t -s,@XRENDER_LINK@,$XRENDER_LINK,;t t -s,@XRANDR_CFLAGS@,$XRANDR_CFLAGS,;t t -s,@XRANDR_LIBS@,$XRANDR_LIBS,;t t -s,@XRANDR_DLOPEN@,$XRANDR_DLOPEN,;t t -s,@ENABLE_RANDR@,$ENABLE_RANDR,;t t -s,@DISABLE_NEON@,$DISABLE_NEON,;t t -s,@NEON_CFLAGS@,$NEON_CFLAGS,;t t -s,@NEON_LIBS@,$NEON_LIBS,;t t -s,@SYSTEM_NEON@,$SYSTEM_NEON,;t t -s,@NEON_VERSION@,$NEON_VERSION,;t t -s,@OPENSSL_CFLAGS@,$OPENSSL_CFLAGS,;t t -s,@OPENSSL_LIBS@,$OPENSSL_LIBS,;t t -s,@SYSTEM_OPENSSL@,$SYSTEM_OPENSSL,;t t -s,@ENABLE_AGG@,$ENABLE_AGG,;t t -s,@AGG_CFLAGS@,$AGG_CFLAGS,;t t -s,@AGG_LIBS@,$AGG_LIBS,;t t -s,@SYSTEM_AGG@,$SYSTEM_AGG,;t t -s,@AGG_VERSION@,$AGG_VERSION,;t t -s,@REDLAND_CFLAGS@,$REDLAND_CFLAGS,;t t -s,@REDLAND_LIBS@,$REDLAND_LIBS,;t t -s,@SYSTEM_REDLAND@,$SYSTEM_REDLAND,;t t -s,@HUNSPELL_CFLAGS@,$HUNSPELL_CFLAGS,;t t -s,@HUNSPELL_LIBS@,$HUNSPELL_LIBS,;t t -s,@SYSTEM_HUNSPELL@,$SYSTEM_HUNSPELL,;t t -s,@SYSTEM_HYPH@,$SYSTEM_HYPH,;t t -s,@HYPHEN_LIB@,$HYPHEN_LIB,;t t -s,@MYTHES_CFLAGS@,$MYTHES_CFLAGS,;t t -s,@MYTHES_LIBS@,$MYTHES_LIBS,;t t -s,@SYSTEM_MYTHES@,$SYSTEM_MYTHES,;t t -s,@SYSTEM_LPSOLVE@,$SYSTEM_LPSOLVE,;t t -s,@SYSTEM_LIBTEXTCAT@,$SYSTEM_LIBTEXTCAT,;t t -s,@SYSTEM_LIBTEXTCAT_DATA@,$SYSTEM_LIBTEXTCAT_DATA,;t t -s,@HAVE_GETOPT@,$HAVE_GETOPT,;t t -s,@HAVE_READDIR_R@,$HAVE_READDIR_R,;t t -s,@SYSTEM_LIBC@,$SYSTEM_LIBC,;t t -s,@PSDK_HOME@,$PSDK_HOME,;t t -s,@WINDOWS_VISTA_PSDK@,$WINDOWS_VISTA_PSDK,;t t -s,@DIRECTXSDK_HOME@,$DIRECTXSDK_HOME,;t t -s,@DIRECTXSDK_LIB@,$DIRECTXSDK_LIB,;t t -s,@NSIS_PATH@,$NSIS_PATH,;t t -s,@BISON@,$BISON,;t t -s,@FLEX@,$FLEX,;t t -s,@PATCH@,$PATCH,;t t -s,@GNUCP@,$GNUCP,;t t -s,@GNUPATCH@,$GNUPATCH,;t t -s,@CYGWIN_PATH@,$CYGWIN_PATH,;t t -s,@ML_EXE@,$ML_EXE,;t t -s,@ASM_HOME@,$ASM_HOME,;t t -s,@ZIP@,$ZIP,;t t -s,@UNZIP@,$UNZIP,;t t -s,@ZIP_HOME@,$ZIP_HOME,;t t -s,@ENABLE_GTK@,$ENABLE_GTK,;t t -s,@ENABLE_KDE@,$ENABLE_KDE,;t t -s,@ENABLE_KDE4@,$ENABLE_KDE4,;t t -s,@GCONF_CFLAGS@,$GCONF_CFLAGS,;t t -s,@GCONF_LIBS@,$GCONF_LIBS,;t t -s,@ENABLE_GCONF@,$ENABLE_GCONF,;t t -s,@GNOMEVFS_CFLAGS@,$GNOMEVFS_CFLAGS,;t t -s,@GNOMEVFS_LIBS@,$GNOMEVFS_LIBS,;t t -s,@ENABLE_GNOMEVFS@,$ENABLE_GNOMEVFS,;t t -s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t -s,@GTK_LIBS@,$GTK_LIBS,;t t -s,@DBUS_CFLAGS@,$DBUS_CFLAGS,;t t -s,@DBUS_LIBS@,$DBUS_LIBS,;t t -s,@GIO_CFLAGS@,$GIO_CFLAGS,;t t -s,@GIO_LIBS@,$GIO_LIBS,;t t -s,@ENABLE_GIO@,$ENABLE_GIO,;t t -s,@ENABLE_DBUS@,$ENABLE_DBUS,;t t -s,@ENABLE_SYSTRAY_GTK@,$ENABLE_SYSTRAY_GTK,;t t -s,@GSTREAMER_CFLAGS@,$GSTREAMER_CFLAGS,;t t -s,@GSTREAMER_LIBS@,$GSTREAMER_LIBS,;t t -s,@ENABLE_GSTREAMER@,$ENABLE_GSTREAMER,;t t -s,@CAIRO_CFLAGS@,$CAIRO_CFLAGS,;t t -s,@CAIRO_LIBS@,$CAIRO_LIBS,;t t -s,@ENABLE_CAIRO@,$ENABLE_CAIRO,;t t -s,@BUILD_PIXMAN@,$BUILD_PIXMAN,;t t -s,@SYSTEM_CAIRO@,$SYSTEM_CAIRO,;t t -s,@ENABLE_OPENGL@,$ENABLE_OPENGL,;t t -s,@ENABLE_PRESENTER_EXTRA_UI@,$ENABLE_PRESENTER_EXTRA_UI,;t t -s,@ENABLE_MINIMIZER@,$ENABLE_MINIMIZER,;t t -s,@ENABLE_PRESENTER_SCREEN@,$ENABLE_PRESENTER_SCREEN,;t t -s,@POPPLER_CFLAGS@,$POPPLER_CFLAGS,;t t -s,@POPPLER_LIBS@,$POPPLER_LIBS,;t t -s,@ENABLE_PDFIMPORT@,$ENABLE_PDFIMPORT,;t t -s,@SYSTEM_POPPLER@,$SYSTEM_POPPLER,;t t -s,@ENABLE_MEDIAWIKI@,$ENABLE_MEDIAWIKI,;t t -s,@SYSTEM_SERVLETAPI@,$SYSTEM_SERVLETAPI,;t t -s,@SERVLETAPI_JAR@,$SERVLETAPI_JAR,;t t -s,@ENABLE_REPORTBUILDER@,$ENABLE_REPORTBUILDER,;t t -s,@SYSTEM_JFREEREPORT@,$SYSTEM_JFREEREPORT,;t t -s,@SAC_JAR@,$SAC_JAR,;t t -s,@LIBXML_JAR@,$LIBXML_JAR,;t t -s,@FLUTE_JAR@,$FLUTE_JAR,;t t -s,@JFREEREPORT_JAR@,$JFREEREPORT_JAR,;t t -s,@LIBBASE_JAR@,$LIBBASE_JAR,;t t -s,@LIBLAYOUT_JAR@,$LIBLAYOUT_JAR,;t t -s,@LIBLOADER_JAR@,$LIBLOADER_JAR,;t t -s,@LIBFORMULA_JAR@,$LIBFORMULA_JAR,;t t -s,@LIBREPOSITORY_JAR@,$LIBREPOSITORY_JAR,;t t -s,@LIBFONTS_JAR@,$LIBFONTS_JAR,;t t -s,@LIBSERIALIZER_JAR@,$LIBSERIALIZER_JAR,;t t -s,@SYSTEM_APACHE_COMMONS@,$SYSTEM_APACHE_COMMONS,;t t -s,@COMMONS_CODEC_JAR@,$COMMONS_CODEC_JAR,;t t -s,@COMMONS_LANG_JAR@,$COMMONS_LANG_JAR,;t t -s,@COMMONS_HTTPCLIENT_JAR@,$COMMONS_HTTPCLIENT_JAR,;t t -s,@COMMONS_LOGGING_JAR@,$COMMONS_LOGGING_JAR,;t t -s,@MOC@,$MOC,;t t -s,@KDE_CFLAGS@,$KDE_CFLAGS,;t t -s,@KDE_LIBS@,$KDE_LIBS,;t t -s,@MOC4@,$MOC4,;t t -s,@KDE4_CFLAGS@,$KDE4_CFLAGS,;t t -s,@KDE4_LIBS@,$KDE4_LIBS,;t t -s,@ENABLE_LOCKDOWN@,$ENABLE_LOCKDOWN,;t t -s,@GOBJECT_CFLAGS@,$GOBJECT_CFLAGS,;t t -s,@GOBJECT_LIBS@,$GOBJECT_LIBS,;t t -s,@ENABLE_EVOAB2@,$ENABLE_EVOAB2,;t t -s,@ENABLE_KAB@,$ENABLE_KAB,;t t -s,@WITH_FONTS@,$WITH_FONTS,;t t -s,@WITHOUT_PPDS@,$WITHOUT_PPDS,;t t -s,@WITHOUT_AFMS@,$WITHOUT_AFMS,;t t -s,@SCPDEFS@,$SCPDEFS,;t t -s,@USE_XINERAMA@,$USE_XINERAMA,;t t -s,@XINERAMA_LINK@,$XINERAMA_LINK,;t t -s,@ANT@,$ANT,;t t -s,@ANT_HOME@,$ANT_HOME,;t t -s,@ANT_LIB@,$ANT_LIB,;t t -s,@OOO_JUNIT_JAR@,$OOO_JUNIT_JAR,;t t -s,@WITH_LANG@,$WITH_LANG,;t t -s,@WITH_POOR_HELP_LOCALIZATIONS@,$WITH_POOR_HELP_LOCALIZATIONS,;t t -s,@WITH_DICT@,$WITH_DICT,;t t -s,@INTRO_BITMAPS@,$INTRO_BITMAPS,;t t -s,@ABOUT_BITMAPS@,$ABOUT_BITMAPS,;t t -s,@OOO_VENDOR@,$OOO_VENDOR,;t t -s,@UNIXWRAPPERNAME@,$UNIXWRAPPERNAME,;t t -s,@ENABLE_STATIC_GTK@,$ENABLE_STATIC_GTK,;t t -s,@ENABLE_LAYOUT@,$ENABLE_LAYOUT,;t t -s,@VERBOSE@,$VERBOSE,;t t -s,@nodep@,$nodep,;t t -s,@LOCAL_SOLVER@,$LOCAL_SOLVER,;t t -s,@BUILD_TYPE@,$BUILD_TYPE,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +rm -f conf$$subs.sh +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF + + esac + +done # for ac_tag + { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -31551,6 +32991,10 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi chmod a+x set_soenv diff --git a/configure.in b/configure.in index 57b54a4fa12c..c60382e587be 100644 --- a/configure.in +++ b/configure.in @@ -4690,6 +4690,7 @@ if test -n "$with_system_icu" -o -n "$with_system_libs" && \ AC_LANG_PUSH([C++]) AC_MSG_CHECKING([for unicode/rbbi.h]) AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.])) + AC_LANG_POP([C++]) AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin]) if test -z "$SYSTEM_GENBRK"; then AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\]) @@ -4702,18 +4703,20 @@ if test -n "$with_system_icu" -o -n "$with_system_libs" && \ if test -z "$SYSTEM_GENCMN"; then AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\]) fi + + AC_PATH_PROG( ICUCONFIG, icu-config) AC_MSG_CHECKING([ICU version]) - AC_TRY_RUN([ -#include + ICU_VERSION=`$ICUCONFIG --version` + ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` + ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` + ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` + + if test "$ICU_MAJOR" -ge "4"; then + AC_MSG_RESULT([OK]) + else + AC_MSG_ERROR([not suitable, only >= 4.0 supported currently]) + fi -int main(int argc, char **argv) { - if(U_ICU_VERSION_MAJOR_NUM < 4) - return 1; - else - return 0; -} - ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])]) - AC_LANG_POP([C++]) else AC_MSG_RESULT([internal]) SYSTEM_ICU=NO @@ -4723,6 +4726,9 @@ AC_SUBST(SYSTEM_ICU) AC_SUBST(SYSTEM_GENBRK) AC_SUBST(SYSTEM_GENCCODE) AC_SUBST(SYSTEM_GENCMN) +AC_SUBST(ICU_MAJOR) +AC_SUBST(ICU_MINOR) +AC_SUBST(ICU_MICRO) dnl =================================================================== dnl Graphite diff --git a/set_soenv.in b/set_soenv.in index 8a99842291de..60cd140f5408 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1857,6 +1857,9 @@ if ($SYSTEM_PYTHON eq "NO") { ToFile( "HOME", "@HOME@", "e" ); } ToFile( "SYSTEM_ICU", "@SYSTEM_ICU@", "e" ); +ToFile( "ICU_MAJOR", "@ICU_MAJOR@", "e" ); +ToFile( "ICU_MINOR", "@ICU_MINOR@", "e" ); +ToFile( "ICU_MICRO", "@ICU_MICRO@", "e" ); ToFile( "SYSTEM_GENBRK", "@SYSTEM_GENBRK@", "e" ); ToFile( "SYSTEM_GENCCODE", "@SYSTEM_GENCCODE@", "e" ); ToFile( "SYSTEM_GENCMN", "@SYSTEM_GENCMN@", "e" ); -- cgit From fb960202307c70da2a57cd1abf26ef1a78069974 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 27 Jan 2011 23:56:24 +0100 Subject: locales34: #i112240# for system icu >=4.4 add Close_Parenthesis to $CL Close_Punctuation; patch from --- icu/icuversion.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icu/icuversion.mk b/icu/icuversion.mk index eedf6276e598..a170642b276c 100755 --- a/icu/icuversion.mk +++ b/icu/icuversion.mk @@ -25,9 +25,9 @@ # #************************************************************************* # major -ICU_MAJOR=4 +ICU_MAJOR*=4 # minor -ICU_MINOR=0 +ICU_MINOR*=0 # micro -ICU_MICRO=1 +ICU_MICRO*=1 -- cgit From 76a4d7a1fbfdab961e4cc936eb99c1db8bc41bb1 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 28 Jan 2011 11:24:21 +0100 Subject: gridsort: #164359# Fixed side pane broken due to inconsistent entries of tabwindowservice in fwl.component and Library_fwk.ml --- framework/util/fwk.component | 3 +++ framework/util/fwl.component | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/util/fwk.component b/framework/util/fwk.component index e6ceb91e8090..c460ecbccd70 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -139,4 +139,7 @@ + + + diff --git a/framework/util/fwl.component b/framework/util/fwl.component index aa124d1cdc4b..99c5ca7213e6 100644 --- a/framework/util/fwl.component +++ b/framework/util/fwl.component @@ -85,9 +85,6 @@ - - - -- cgit From ce8d03f28f40e9dacdd44028ff53ab6d31303381 Mon Sep 17 00:00:00 2001 From: Juergen Schmidt Date: Fri, 28 Jan 2011 11:36:11 +0100 Subject: gridsort: i116682: update UnoControlDialog to reflect XDialog --- offapi/com/sun/star/awt/UnoControlDialog.idl | 6 +++--- offapi/com/sun/star/awt/XDialog2.idl | 2 +- offapi/type_reference/typelibrary_history.txt | 4 ++++ offapi/type_reference/types.rdb | Bin 7307264 -> 7307264 bytes 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/offapi/com/sun/star/awt/UnoControlDialog.idl b/offapi/com/sun/star/awt/UnoControlDialog.idl index 443b0da18563..f2f1be2dc49c 100644 --- a/offapi/com/sun/star/awt/UnoControlDialog.idl +++ b/offapi/com/sun/star/awt/UnoControlDialog.idl @@ -35,8 +35,8 @@ #include #endif -#ifndef __com_sun_star_awt_XDialog_idl__ -#include +#ifndef __com_sun_star_awt_XDialog2_idl__ +#include #endif @@ -54,7 +54,7 @@ published service UnoControlDialog interface com::sun::star::awt::XTopWindow; - interface com::sun::star::awt::XDialog; + interface com::sun::star::awt::XDialog2; }; diff --git a/offapi/com/sun/star/awt/XDialog2.idl b/offapi/com/sun/star/awt/XDialog2.idl index fbc5313aeb47..e937dea9bb24 100644 --- a/offapi/com/sun/star/awt/XDialog2.idl +++ b/offapi/com/sun/star/awt/XDialog2.idl @@ -16,7 +16,7 @@ module com { module sun { module star { module awt { @since OOo 3.0 */ -interface XDialog2: com::sun::star::awt::XDialog +published interface XDialog2: com::sun::star::awt::XDialog { /** hides the dialog and then causes XDialog::execute to return with the given result value. diff --git a/offapi/type_reference/typelibrary_history.txt b/offapi/type_reference/typelibrary_history.txt index 7dcd438d5517..16745ab9f7eb 100644 --- a/offapi/type_reference/typelibrary_history.txt +++ b/offapi/type_reference/typelibrary_history.txt @@ -158,3 +158,7 @@ Update reference type library with the version of OOo 3.2.1. The new reference type library is taken from the release source tree OOO320 m19. +01/28/11 (JSC): TaskID=116682 + Update css.awt.UnoControlDialog to reflect the supported XDialog2 interface + additionally to XDialog + diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb index 6d9f761331f4..02cd79c9eb4f 100644 Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ -- cgit From 6875a4b2aad35aaa07906dfd7386cc519d0fd933 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 28 Jan 2011 11:58:57 +0100 Subject: sb138: #i115619# osl_setThreadName --- sal/inc/osl/thread.h | 12 ++++ sal/inc/osl/thread.hxx | 3 + sal/osl/os2/thread.c | 4 ++ sal/osl/unx/thread.c | 16 +++++ sal/osl/w32/thread.c | 21 ++++++ sal/prj/build.lst | 1 + sal/qa/osl/setthreadname/makefile.mk | 57 ++++++++++++++++ sal/qa/osl/setthreadname/test-setthreadname.cxx | 86 +++++++++++++++++++++++++ sal/qa/osl/setthreadname/version.map | 34 ++++++++++ sal/util/sal.map | 1 + 10 files changed, 235 insertions(+) mode change 100644 => 100755 sal/osl/w32/thread.c create mode 100644 sal/qa/osl/setthreadname/makefile.mk create mode 100755 sal/qa/osl/setthreadname/test-setthreadname.cxx create mode 100644 sal/qa/osl/setthreadname/version.map diff --git a/sal/inc/osl/thread.h b/sal/inc/osl/thread.h index 16860644d7a0..79db10f58097 100644 --- a/sal/inc/osl/thread.h +++ b/sal/inc/osl/thread.h @@ -159,6 +159,18 @@ sal_Bool SAL_CALL osl_scheduleThread(oslThread Thread); */ void SAL_CALL osl_yieldThread(void); +/** Attempts to set the name of the current thread. + + The name of a thread is usually evaluated for debugging purposes. Not all + platforms support this. On Linux, a set thread name can be observed with + "ps -L". On Windows, a thread name set while a debugger is attached can be + observed within the debugger. + + @param name the name of the thread; must not be null; on Linux, only the + first 16 characters are used +*/ +void SAL_CALL osl_setThreadName(char const * name); + /* Callback when data stored in a thread key is no longer needed */ typedef void (SAL_CALL *oslThreadKeyCallbackFunction)(void *); diff --git a/sal/inc/osl/thread.hxx b/sal/inc/osl/thread.hxx index 51fe059d2210..c3ca49926456 100644 --- a/sal/inc/osl/thread.hxx +++ b/sal/inc/osl/thread.hxx @@ -150,6 +150,9 @@ public: osl_yieldThread(); } + static inline void setName(char const * name) throw () { + osl_setThreadName(name); + } virtual sal_Bool SAL_CALL schedule() { diff --git a/sal/osl/os2/thread.c b/sal/osl/os2/thread.c index 313e67c0f925..0f0c396a407c 100644 --- a/sal/osl/os2/thread.c +++ b/sal/osl/os2/thread.c @@ -549,6 +549,10 @@ void SAL_CALL osl_yieldThread() DosSleep(0); } +void osl_setThreadName(char const * name) { + (void) name; +} + typedef struct _TLS { PULONG pulPtr; diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index fe53915b792f..18c4b033daf7 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -34,6 +34,10 @@ #include #endif +#if defined LINUX +#include +#endif + /**************************************************************************** * @@@ TODO @@@ * @@ -566,6 +570,18 @@ void SAL_CALL osl_yieldThread() sched_yield(); } +void SAL_CALL osl_setThreadName(char const * name) { +#if defined LINUX + if (prctl(PR_SET_NAME, (unsigned long) name, 0, 0, 0) != 0) { + OSL_TRACE( + "%s prctl(PR_SET_NAME) failed with errno %d", OSL_LOG_PREFIX, + errno); + } +#else + (void) name; +#endif +} + /*****************************************************************************/ /* osl_getThreadIdentifier @@@ see TODO @@@ */ /*****************************************************************************/ diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c old mode 100644 new mode 100755 index 88ce87cdf175..7506c078c536 --- a/sal/osl/w32/thread.c +++ b/sal/osl/w32/thread.c @@ -394,6 +394,27 @@ void SAL_CALL osl_yieldThread(void) Sleep(0); } +void SAL_CALL osl_setThreadName(char const * name) { + /* See : */ +#pragma pack(push, 8) + struct { + DWORD dwType; + LPCSTR szName; + DWORD dwThreadID; + DWORD dwFlags; + } info; +#pragma pack(pop) + info.dwType = 0x1000; + info.szName = name; + info.dwThreadID = (DWORD) -1; + info.dwFlags = 0; + __try { + RaiseException( + 0x406D1388, 0, sizeof info / sizeof (ULONG_PTR), + (ULONG_PTR *) &info); + } __except (EXCEPTION_EXECUTE_HANDLER) {} +} + typedef struct _TLS { DWORD dwIndex; diff --git a/sal/prj/build.lst b/sal/prj/build.lst index 06e3958443e9..b7786f604eaf 100644 --- a/sal/prj/build.lst +++ b/sal/prj/build.lst @@ -20,4 +20,5 @@ sa sal\qa\OStringBuffer nmake - all sa_qa_OStringBuffer sa_cppunittester sa_util sa sal\qa\osl\mutex nmake - all sa_qa_osl_mutex sa_cppunittester sa_util NULL sa sal\qa\osl\pipe nmake - all sa_qa_osl_pipe sa_cppunittester sa_util NULL sa sal\qa\osl\profile nmake - all sa_qa_osl_profile sa_cppunittester sa_util NULL +sa sal\qa\osl\setthreadname nmake - all sa_qa_osl_setthreadname sa_cppunittester sa_util NULL sa sal\qa\rtl\math nmake - all sa_qa_rtl_math sa_cppunittester sa_util NULL diff --git a/sal/qa/osl/setthreadname/makefile.mk b/sal/qa/osl/setthreadname/makefile.mk new file mode 100644 index 000000000000..f2d9da15c468 --- /dev/null +++ b/sal/qa/osl/setthreadname/makefile.mk @@ -0,0 +1,57 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ = ..$/..$/.. +PRJNAME = sal +TARGET = qa_osl_setthreadname + +ENABLE_EXCEPTIONS = TRUE + +.INCLUDE: settings.mk + +CFLAGSCXX += $(CPPUNIT_CFLAGS) + +DLLPRE = + +SHL1IMPLIB = i$(SHL1TARGET) +SHL1OBJS = $(SLO)/test-setthreadname.obj +SHL1RPATH = NONE +SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) +SHL1TARGET = test-setthreadname +SHL1VERSIONMAP = version.map +DEF1NAME = $(SHL1TARGET) + +SLOFILES = $(SHL1OBJS) + +.INCLUDE: target.mk +.INCLUDE: _cppunit.mk + +.END diff --git a/sal/qa/osl/setthreadname/test-setthreadname.cxx b/sal/qa/osl/setthreadname/test-setthreadname.cxx new file mode 100755 index 000000000000..b5c7e02cfaa7 --- /dev/null +++ b/sal/qa/osl/setthreadname/test-setthreadname.cxx @@ -0,0 +1,86 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2011 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +* 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). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "precompiled_sal.hxx" +#include "sal/config.h" + +#include +#include +#include + +#include "boost/noncopyable.hpp" +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" +#include "osl/thread.hxx" + +namespace { + +class TestThread: public osl::Thread, private boost::noncopyable { +private: + virtual void SAL_CALL run(); +}; + +void TestThread::run() { +#if defined WNT + if (std::getenv("URE_TEST_SETTHREADNAME") != 0) { + // On Windows, setting thread names appears to only take effect when the + // process is being debugged, so attach a debugger now: + std::cout << "set: "; + std::cin.ignore(std::numeric_limits< int >::max(), '\n'); + } +#endif + setName("TestThread"); + if (std::getenv("URE_TEST_SETTHREADNAME") != 0) { + // On Linux, the thread name can now be observed with "ps -L"; on + // Windows, the thread name can now be observed in a debugger. + std::cout << "stop: "; + std::cin.ignore(std::numeric_limits< int >::max(), '\n'); + } +} + +class Test: public CppUnit::TestFixture { +private: + CPPUNIT_TEST_SUITE(Test); + CPPUNIT_TEST(test); + CPPUNIT_TEST_SUITE_END(); + + void test(); +}; + +void Test::test() { + TestThread t; + t.create(); + t.join(); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(Test); + +} + +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sal/qa/osl/setthreadname/version.map b/sal/qa/osl/setthreadname/version.map new file mode 100644 index 000000000000..ef2ab497cb5e --- /dev/null +++ b/sal/qa/osl/setthreadname/version.map @@ -0,0 +1,34 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# 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. +# +# 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). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +UDK_3_0_0 { + global: + cppunitTestPlugIn; + + local: + *; +}; diff --git a/sal/util/sal.map b/sal/util/sal.map index 8b1c079ec899..73ae4431100e 100755 --- a/sal/util/sal.map +++ b/sal/util/sal.map @@ -602,6 +602,7 @@ UDK_3.11 { # OOo 3.4 global: osl_setEnvironment; osl_clearEnvironment; + osl_setThreadName; } UDK_3.10; PRIVATE_1.0 { -- cgit From f78c98fc9c62094aa4eff5494efc38f15a0fc1ec Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 28 Jan 2011 13:41:34 +0100 Subject: sb138: #i115619#, #i116038# use osl_setThreadName in binaryurp --- binaryurp/source/reader.cxx | 1 + binaryurp/source/writer.cxx | 1 + 2 files changed, 2 insertions(+) diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx index 7ffdb34fe89f..f622fb5b0c42 100755 --- a/binaryurp/source/reader.cxx +++ b/binaryurp/source/reader.cxx @@ -114,6 +114,7 @@ Reader::Reader(rtl::Reference< Bridge > const & bridge): bridge_(bridge) { Reader::~Reader() {} void Reader::run() { + setName("binaryurpReader"); try { bridge_->sendRequestChangeRequest(); css::uno::Reference< css::connection::XConnection > con( diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx index 439b7dba804a..97a60157eb6f 100755 --- a/binaryurp/source/writer.cxx +++ b/binaryurp/source/writer.cxx @@ -153,6 +153,7 @@ void Writer::stop() { Writer::~Writer() {} void Writer::run() { + setName("binaryurpWriter"); try { unblocked_.wait(); for (;;) { -- cgit From 78b0341d1b8590eb0b61d871ad22bbb9d7a252a3 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 30 Jan 2011 00:19:20 +0100 Subject: locales34: chmod -x --- i18npool/source/localedata/data/mr_IN.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 i18npool/source/localedata/data/mr_IN.xml diff --git a/i18npool/source/localedata/data/mr_IN.xml b/i18npool/source/localedata/data/mr_IN.xml old mode 100755 new mode 100644 -- cgit From 801b88c05053180d5ddc5d84c3f538cecd3164b2 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sun, 30 Jan 2011 00:23:00 +0100 Subject: locales34: #i116483# add Lojban [jbo] locale data; contributed by via it46, with corrections --- i18npool/source/localedata/data/jbo.xml | 358 +++++++++++++++++++++ .../source/localedata/data/localedata_others.map | 17 + i18npool/source/localedata/data/makefile.mk | 1 + i18npool/source/localedata/localedata.cxx | 3 +- 4 files changed, 378 insertions(+), 1 deletion(-) create mode 100644 i18npool/source/localedata/data/jbo.xml diff --git a/i18npool/source/localedata/data/jbo.xml b/i18npool/source/localedata/data/jbo.xml new file mode 100644 index 000000000000..403442638bd0 --- /dev/null +++ b/i18npool/source/localedata/data/jbo.xml @@ -0,0 +1,358 @@ + + + + + + jbo + Lojban + + + + + + + + + / + , + . + : + . + ; + , + , + + + + + + + + + + PDM + BDM + metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+00 + + + 0.00E+000 + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;-[CURRENCY]#,##0.00 + + + [CURRENCY]#,##0;[RED]-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00 + + + CCC#,##0.00 + + + [CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.-- + + + D/MM/YY + + + NNNNDD, MMMM YYYY + + + DD/MM/YY + + + DD/MM/YYYY + + + D, MMM YY + + + D, MMM YYYY + + + D, MMM YYYY + + + D, MMMM YYYY + + + D, MMMM YY + + + NN, DD/MMM/YY + + + NN, D, MMM YY + + + NN, D, MMMM YYYY + + + NNNND, MMMM YYYY + + + DD/MM + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + MM/YY + + + MMM/DD + + + MMMM + + + QQ YY + + + WW + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + DD/MM/YY HH:MM + + + DD/MM/YYYY HH:MM:SS AM/PM + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + A-Z + 0 + 1 + BP + BP + + + + + + sun + nondei + nondei + + + mon + pavdei + pavdei + + + tue + reldei + reldei + + + wed + cibdei + cibdei + + + thu + vondei + vondei + + + fri + mumdei + mumdei + + + sat + xavdei + xavdei + + + + + jan + pavma'i + pavmasti + + + feb + relma'i + relmasti + + + mar + cibma'i + cibmasti + + + apr + vonma'i + vonmasti + + + may + mumyma'i + mumymasti + + + jun + xavma'i + xavmasti + + + jul + zelma'i + zelmasti + + + aug + bivma'i + bivmasti + + + sep + sozma'i + sozmasti + + + oct + daurma'i + daurmasti + + + nov + feirma'i + feirmasti + + + dec + gairma'i + gairmasti + + + + + bc + PLK + purci la .kraist. + + + ad + NLK + nanca la .kraist. + + + + mon + + 1 + + + + + EUR + + EUR + jdini + 2 + + + + + + + + + + jetnu + jitfa + pa moi vo si'e + re moi vo si'e + ci moi vo si'e + vo moi vo si'e + gapru + cnita + 1MVS + 2MVS + 3MVS + 4MVS + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index 73188b45d749..46f4c4f74aea 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -32,6 +32,7 @@ getAllCalendars_hy_AM; getAllCalendars_ia; getAllCalendars_id_ID; getAllCalendars_ja_JP; +getAllCalendars_jbo; getAllCalendars_kk_KZ; getAllCalendars_km_KH; getAllCalendars_kn_IN; @@ -115,6 +116,7 @@ getAllCurrencies_hy_AM; getAllCurrencies_ia; getAllCurrencies_id_ID; getAllCurrencies_ja_JP; +getAllCurrencies_jbo; getAllCurrencies_kk_KZ; getAllCurrencies_km_KH; getAllCurrencies_kn_IN; @@ -198,6 +200,7 @@ getAllFormats0_hy_AM; getAllFormats0_ia; getAllFormats0_id_ID; getAllFormats0_ja_JP; +getAllFormats0_jbo; getAllFormats0_kk_KZ; getAllFormats0_km_KH; getAllFormats0_kn_IN; @@ -281,6 +284,7 @@ getBreakIteratorRules_hy_AM; getBreakIteratorRules_ia; getBreakIteratorRules_id_ID; getBreakIteratorRules_ja_JP; +getBreakIteratorRules_jbo; getBreakIteratorRules_kk_KZ; getBreakIteratorRules_km_KH; getBreakIteratorRules_kn_IN; @@ -364,6 +368,7 @@ getCollationOptions_hy_AM; getCollationOptions_ia; getCollationOptions_id_ID; getCollationOptions_ja_JP; +getCollationOptions_jbo; getCollationOptions_kk_KZ; getCollationOptions_km_KH; getCollationOptions_kn_IN; @@ -447,6 +452,7 @@ getCollatorImplementation_hy_AM; getCollatorImplementation_ia; getCollatorImplementation_id_ID; getCollatorImplementation_ja_JP; +getCollatorImplementation_jbo; getCollatorImplementation_kk_KZ; getCollatorImplementation_km_KH; getCollatorImplementation_kn_IN; @@ -530,6 +536,7 @@ getContinuousNumberingLevels_hy_AM; getContinuousNumberingLevels_ia; getContinuousNumberingLevels_id_ID; getContinuousNumberingLevels_ja_JP; +getContinuousNumberingLevels_jbo; getContinuousNumberingLevels_kk_KZ; getContinuousNumberingLevels_km_KH; getContinuousNumberingLevels_kn_IN; @@ -613,6 +620,7 @@ getFollowPageWords_hy_AM; getFollowPageWords_ia; getFollowPageWords_id_ID; getFollowPageWords_ja_JP; +getFollowPageWords_jbo; getFollowPageWords_kk_KZ; getFollowPageWords_km_KH; getFollowPageWords_kn_IN; @@ -696,6 +704,7 @@ getForbiddenCharacters_hy_AM; getForbiddenCharacters_ia; getForbiddenCharacters_id_ID; getForbiddenCharacters_ja_JP; +getForbiddenCharacters_jbo; getForbiddenCharacters_kk_KZ; getForbiddenCharacters_km_KH; getForbiddenCharacters_kn_IN; @@ -779,6 +788,7 @@ getIndexAlgorithm_hy_AM; getIndexAlgorithm_ia; getIndexAlgorithm_id_ID; getIndexAlgorithm_ja_JP; +getIndexAlgorithm_jbo; getIndexAlgorithm_kk_KZ; getIndexAlgorithm_km_KH; getIndexAlgorithm_kn_IN; @@ -862,6 +872,7 @@ getLCInfo_hy_AM; getLCInfo_ia; getLCInfo_id_ID; getLCInfo_ja_JP; +getLCInfo_jbo; getLCInfo_kk_KZ; getLCInfo_km_KH; getLCInfo_kn_IN; @@ -945,6 +956,7 @@ getLocaleItem_hy_AM; getLocaleItem_ia; getLocaleItem_id_ID; getLocaleItem_ja_JP; +getLocaleItem_jbo; getLocaleItem_kk_KZ; getLocaleItem_km_KH; getLocaleItem_kn_IN; @@ -1028,6 +1040,7 @@ getOutlineNumberingLevels_hy_AM; getOutlineNumberingLevels_ia; getOutlineNumberingLevels_id_ID; getOutlineNumberingLevels_ja_JP; +getOutlineNumberingLevels_jbo; getOutlineNumberingLevels_kk_KZ; getOutlineNumberingLevels_km_KH; getOutlineNumberingLevels_kn_IN; @@ -1111,6 +1124,7 @@ getReservedWords_hy_AM; getReservedWords_ia; getReservedWords_id_ID; getReservedWords_ja_JP; +getReservedWords_jbo; getReservedWords_kk_KZ; getReservedWords_km_KH; getReservedWords_kn_IN; @@ -1194,6 +1208,7 @@ getSearchOptions_hy_AM; getSearchOptions_ia; getSearchOptions_id_ID; getSearchOptions_ja_JP; +getSearchOptions_jbo; getSearchOptions_kk_KZ; getSearchOptions_km_KH; getSearchOptions_kn_IN; @@ -1277,6 +1292,7 @@ getTransliterations_hy_AM; getTransliterations_ia; getTransliterations_id_ID; getTransliterations_ja_JP; +getTransliterations_jbo; getTransliterations_kk_KZ; getTransliterations_km_KH; getTransliterations_kn_IN; @@ -1360,6 +1376,7 @@ getUnicodeScripts_hy_AM; getUnicodeScripts_ia; getUnicodeScripts_id_ID; getUnicodeScripts_ja_JP; +getUnicodeScripts_jbo; getUnicodeScripts_kk_KZ; getUnicodeScripts_km_KH; getUnicodeScripts_kn_IN; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index 0d9e186990d7..54b412d75205 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -272,6 +272,7 @@ SHL4OBJS= \ $(SLO)$/localedata_ia.obj \ $(SLO)$/localedata_id_ID.obj \ $(SLO)$/localedata_ja_JP.obj \ + $(SLO)$/localedata_jbo.obj \ $(SLO)$/localedata_kk_KZ.obj \ $(SLO)$/localedata_km_KH.obj \ $(SLO)$/localedata_kn_IN.obj \ diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 8e393c1c4624..8906a3433bea 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -256,7 +256,8 @@ static const struct { { "haw_US", lcl_DATA_OTHERS }, { "lif_NP", lcl_DATA_OTHERS }, { "ur_PK", lcl_DATA_OTHERS }, - { "ht_HT", lcl_DATA_OTHERS } + { "ht_HT", lcl_DATA_OTHERS }, + { "jbo", lcl_DATA_OTHERS } }; static const sal_Unicode under = sal_Unicode('_'); -- cgit From 2ad694bb69576aef08071889055eac57b2414a17 Mon Sep 17 00:00:00 2001 From: "Oliver Craemer [oc]" Date: Mon, 31 Jan 2011 11:08:57 +0100 Subject: #i116721# Autotests for new option in csv export --- testautomation/global/win/dial_d_h.win | 1 + .../required/includes/c_upd_filemenu.inc | 64 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) mode change 100644 => 100755 testautomation/global/win/dial_d_h.win diff --git a/testautomation/global/win/dial_d_h.win b/testautomation/global/win/dial_d_h.win old mode 100644 new mode 100755 index ba6673edb39d..01a2ac921041 --- a/testautomation/global/win/dial_d_h.win +++ b/testautomation/global/win/dial_d_h.win @@ -264,6 +264,7 @@ Synchronisieren sym:sw:PushButton:DLG_SYNC_BTN:BTN_SYNC Zeichensatzliste sym:sc:ListBox:RID_SCDLG_IMPORTOPT:LB_FONT Feldtrenner sym:sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_FIELDSEP Texttrenner sym:sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_TEXTSEP +QuoteAll sym:sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_QUOTEALL Zeichensatz sym:sc:ListBox:RID_SCDLG_IMPORTOPT:DDLB_FONT FixedWidth sym:sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH SaveAsShown sym:sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_SAVESHOWN diff --git a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc index 38c25d41bde5..33c52111c384 100644 --- a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc @@ -40,6 +40,7 @@ ' #1 tFileRecentDocuments ' #1 tFileClose ' #1 tFileSave +' #1 tFileSaveAsCSV ' #1 tFileSaveAsDBF ' #1 tFileVersions ' #1 tFilePagePreview @@ -59,6 +60,7 @@ sub c_upd_filemenu Call tFileRecentDocuments Call tFileClose Call tFileSave + Call tFileSaveAsCSV Call tFileSaveAsDBF Call tFileVersions Call tFilePagePreview @@ -547,6 +549,68 @@ endcase '----------------------------------------------------------- +testcase tFileSaveAsCSV + + Dim UIFilter as string + Dim bStatus as boolean + + Printlog " Open new Spreadsheet document" + Call hNewDocument + Printlog " Fill two cells (10, Test)" + Kontext "DocumentCalc" + DocumentCalc.Typekeys "10 Test " + Printlog " Open 'SaveAs' dialog" + FileSaveAs + Kontext "SpeichernDlg" + Printlog " Enter filename 'csv-Test_update'" + DateiName.SetText "csv-Test_update" + Printlog " Choose file typ CSV" + UIFilter = hGetUIFiltername ( "Text - txt - csv (StarCalc)" ) + bStatus = hSelectUIFilter ( UIFilter ) + if ( not bStatus ) then + warnlog "Filter not found" + SpeichernDlg.Cancel + Call hCloseDocument + goto endsub + end if + Printlog " Click on Save button" + Speichern.click + Printlog " Commit overwrite warning if file already exists" + Kontext + if Active.exists(2) then + Active.Yes + end if + Printlog " Check alien file format warning" + Kontext "AlienWarning" + if AlienWarning.exists(2) then + Printlog " Commit if exists" + AlienWarning.OK + else + warnlog "Alien file format warning is missing -> Check this out!" + end if + Printlog " Check existence of export encoding dialog" + Kontext "ExportCalc" + Call DialogTest (ExportCalc) + printlog " Verify that Quote All is disabled by default" + if QuoteAll.IsChecked then + warnlog " Option Quote All is checked but shouldn't" + end if + Printlog " Accept dialog by OK" + ExportCalc.OK + Kontext + if Active.exists(2) then + Printlog Active.GetText + Active.OK + else + warnlog " Messagebox that only the current sheet is saved is missing" + end if + Printlog " Close document" + Call hCloseDocument + +endcase + +'----------------------------------------------------------- + testcase tFileSaveAsDBF Dim UIFilter as string -- cgit From 6727dc5d9414e77975b9fd765993c6e207f872f3 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 31 Jan 2011 13:32:40 +0100 Subject: sb138: #i115619# fix for MinGW --- sal/inc/osl/thread.h | 4 ++-- sal/osl/w32/thread.c | 4 ++++ sal/qa/osl/setthreadname/test-setthreadname.cxx | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sal/inc/osl/thread.h b/sal/inc/osl/thread.h index 79db10f58097..4c53b001fcd6 100644 --- a/sal/inc/osl/thread.h +++ b/sal/inc/osl/thread.h @@ -163,8 +163,8 @@ void SAL_CALL osl_yieldThread(void); The name of a thread is usually evaluated for debugging purposes. Not all platforms support this. On Linux, a set thread name can be observed with - "ps -L". On Windows, a thread name set while a debugger is attached can be - observed within the debugger. + "ps -L". On Windows with the Microsoft compiler, a thread name set while a + debugger is attached can be observed within the debugger. @param name the name of the thread; must not be null; on Linux, only the first 16 characters are used diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c index 7506c078c536..8d85c8867b2d 100755 --- a/sal/osl/w32/thread.c +++ b/sal/osl/w32/thread.c @@ -395,6 +395,7 @@ void SAL_CALL osl_yieldThread(void) } void SAL_CALL osl_setThreadName(char const * name) { +#ifdef _MSC_VER /* See : */ #pragma pack(push, 8) struct { @@ -413,6 +414,9 @@ void SAL_CALL osl_setThreadName(char const * name) { 0x406D1388, 0, sizeof info / sizeof (ULONG_PTR), (ULONG_PTR *) &info); } __except (EXCEPTION_EXECUTE_HANDLER) {} +#else + (void) name; +#endif } typedef struct _TLS diff --git a/sal/qa/osl/setthreadname/test-setthreadname.cxx b/sal/qa/osl/setthreadname/test-setthreadname.cxx index b5c7e02cfaa7..0f0f618395a8 100755 --- a/sal/qa/osl/setthreadname/test-setthreadname.cxx +++ b/sal/qa/osl/setthreadname/test-setthreadname.cxx @@ -58,7 +58,8 @@ void TestThread::run() { setName("TestThread"); if (std::getenv("URE_TEST_SETTHREADNAME") != 0) { // On Linux, the thread name can now be observed with "ps -L"; on - // Windows, the thread name can now be observed in a debugger. + // Windows with the Microsoft compiler, the thread name can now be + // observed in a debugger. std::cout << "stop: "; std::cin.ignore(std::numeric_limits< int >::max(), '\n'); } -- cgit From 94a1eb82c3af528e7cc5fcb41837c5076f16a42a Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 31 Jan 2011 18:02:39 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 4 --- chart2/source/view/main/VLegend.cxx | 269 +++++++++++++++++++----------------- 1 file changed, 141 insertions(+), 128 deletions(-) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index ef6be843694e..292decdc6a10 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -36,6 +36,7 @@ #include "ShapeFactory.hxx" #include "RelativeSizeHelper.hxx" #include "LegendEntryProvider.hxx" +#include "chartview/DrawModelWrapper.hxx" #include #include #include @@ -45,7 +46,6 @@ #include #include #include -#include #include #include @@ -193,16 +193,10 @@ awt::Size lcl_createTextShapes( try { // create label shape - Reference< drawing::XShape > xGroupShapeForSingleEntry( - xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.GroupShape" )), uno::UNO_QUERY_THROW ); - Reference< drawing::XShape >xEntry( + Reference< drawing::XShape > xEntry( xShapeFactory->createInstance( C2U( "com.sun.star.drawing.TextShape" )), uno::UNO_QUERY_THROW ); - xTarget->add( xGroupShapeForSingleEntry ); - - Reference< drawing::XShapes > xGroup( xGroupShapeForSingleEntry, uno::UNO_QUERY_THROW ); - xGroup->add( xEntry ); + xTarget->add( xEntry ); // set label text Sequence< Reference< XFormattedString > > aLabelSeq = (*aIt).aLabel; @@ -230,7 +224,7 @@ awt::Size lcl_createTextShapes( aResult.Height = ::std::max( aResult.Height, aCurrSize.Height ); } - rOutTextShapes.push_back( xGroupShapeForSingleEntry ); + rOutTextShapes.push_back( xEntry ); } catch( uno::Exception & ex ) { @@ -241,9 +235,77 @@ awt::Size lcl_createTextShapes( return aResult; } +void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns, const ::std::vector< Reference< drawing::XShape > > aTextShapes + , const sal_Int32 nXOffset, const awt::Size& aMaxSymbolExtent ) +{ + rColumnWidths.clear(); + sal_Int32 nRow = 0; + sal_Int32 nColumn = 0; + sal_Int32 nNumberOfEntries = aTextShapes.size(); + for( ; nRow < nNumberOfRows; ++nRow ) + { + for( nColumn = 0; nColumn < nNumberOfColumns; ++nColumn ) + { + sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns); + if( nEntry < nNumberOfEntries ) + { + awt::Size aTextSize( aTextShapes[ nEntry ]->getSize() ); + sal_Int32 nWidth = nXOffset + aMaxSymbolExtent.Width + aTextSize.Width; + if( nColumn>0 ) + nWidth += nXOffset; + if( nRow==0 ) + rColumnWidths.push_back( nWidth ); + else + rColumnWidths[nColumn] = ::std::max( nWidth, rColumnWidths[nColumn] ); + } + } + } +} + +void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns, const ::std::vector< Reference< drawing::XShape > > aTextShapes + , const sal_Int32 nYOffset, const awt::Size& aMaxSymbolExtent ) +{ + // calculate maximum height for each row + // and collect column widths + rRowHeights.clear(); + sal_Int32 nRow = 0; + sal_Int32 nColumn = 0; + sal_Int32 nNumberOfEntries = aTextShapes.size(); + for( ; nRow < nNumberOfRows; ++nRow ) + { + sal_Int32 nCurrentRowHeight = 0; + for( nColumn = 0; nColumn < nNumberOfColumns; ++nColumn ) + { + sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns); + if( nEntry < nNumberOfEntries ) + { + awt::Size aTextSize( aTextShapes[ nEntry ]->getSize() ); + nCurrentRowHeight = ::std::max( nCurrentRowHeight, nYOffset + aTextSize.Height ); + } + } + rRowHeights.push_back( nCurrentRowHeight ); + } +} + +sal_Int32 lcl_getTextLineHeight( const std::vector< sal_Int32 >& aRowHeights, const sal_Int32 nNumberOfRows, const sal_Int32 nYOffset, double fViewFontSize ) +{ + const sal_Int32 nFontHeight = static_cast< sal_Int32 >( fViewFontSize ); + sal_Int32 nTextLineHeight = nFontHeight; + for( sal_Int32 nR=0; nR have real text height + break; + } + } + return nTextLineHeight; +} + //returns resulting legend size awt::Size lcl_placeLegendEntries( - const tViewLegendEntryContainer & rEntries, + tViewLegendEntryContainer & rEntries, ::com::sun::star::chart::ChartLegendExpansion eExpansion, bool bSymbolsLeftSide, const Reference< beans::XPropertySet > & xProperties, @@ -301,6 +363,9 @@ awt::Size lcl_placeLegendEntries( sal_Int32 nNumberOfColumns = 0, nNumberOfRows = 0; std::vector< sal_Int32 > aColumnWidths; + std::vector< sal_Int32 > aRowHeights; + + sal_Int32 nTextLineHeight = static_cast< sal_Int32 >( fViewFontSize ); // determine layout depending on LegendExpansion if( eExpansion == ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) @@ -373,11 +438,56 @@ awt::Size lcl_placeLegendEntries( nNumberOfColumns = aColumnWidths.size(); nNumberOfRows = nCurrentRow+1; - //check if some space is left an should be spread equally over all entries + //check if there is not enough space so that some entries must be removed + lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes, nYOffset, aMaxSymbolExtent ); + nTextLineHeight = lcl_getTextLineHeight( aRowHeights, nNumberOfRows, nYOffset, fViewFontSize ); + sal_Int32 nSumHeight = 0; + for( sal_Int32 nR=0; nR(aTextShapes.size()) ) + { + DrawModelWrapper::removeShape( aTextShapes[nEntry] ); + aTextShapes.pop_back(); + } + if( nEntry < static_cast(rEntries.size()) ) + { + DrawModelWrapper::removeShape( rEntries[ nEntry ].aSymbol ); + rEntries.pop_back(); + } + } + nSumHeight -= aRowHeights[nR]; + aRowHeights.pop_back(); + nRemainingSpace = rAvailableSpace.Height - nSumHeight; + if( nRemainingSpace>=0 ) + break; + } + nNumberOfRows = static_cast(aRowHeights.size()); + nRemainingSpace = (rAvailableSpace.Height - nSumHeight)/(nNumberOfRows+1); + } + + //check if there is some remaining space that should be spread equally over all rows + if( nRemainingSpace>0 ) + { + nYPadding += nRemainingSpace; + for( sal_Int32 nR=0; nR0 ) { nXPadding += nRemainingSpace; @@ -437,69 +547,11 @@ awt::Size lcl_placeLegendEntries( if(nNumberOfRows<=0) return aResultingLegendSize; - // calculate maximum height for each row - // and collect column widths - std::vector< sal_Int32 > aRowHeights( nNumberOfRows ); - sal_Int32 nRow = 0; - sal_Int32 nColumn = 0; - for( ; nRow < nNumberOfRows; ++nRow ) + if( eExpansion != ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) { - sal_Int32 nCurrentRowHeight = 0; - for( nColumn = 0; nColumn < nNumberOfColumns; ++nColumn ) - { - sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns); - if( nEntry < nNumberOfEntries ) - { - awt::Size aTextSize( aTextShapes[ nEntry ]->getSize() ); - nCurrentRowHeight = ::std::max( nCurrentRowHeight, nYOffset + aTextSize.Height ); - - //collect column widths - if( eExpansion != ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) - { - sal_Int32 nWidth = nXOffset + aMaxSymbolExtent.Width + aTextSize.Width; - if( nColumn>0 ) - nWidth += nXOffset; - if( nRow==0 ) - aColumnWidths.push_back( nWidth ); - else - aColumnWidths[nColumn] = ::std::max( nWidth, aColumnWidths[nColumn] ); - } - } - } - aRowHeights[ nRow ] = nCurrentRowHeight; - } - - const sal_Int32 nFontHeight = static_cast< sal_Int32 >( fViewFontSize ); - sal_Int32 nTextLineHeight = nFontHeight; - for( sal_Int32 nR=0; nR have real text height - break; - } - } - - //check if there is some remaining space that should be spread equally over all rows or whether some rows must be limited - bool bSetMaximumFrameHeight = false; - OUString aPropNameTextMaximumFrameHeight( C2U("TextMaximumFrameHeight") ); - if( eExpansion == ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) - { - sal_Int32 nSumHeight = 0; - for( sal_Int32 nR=0; nR0 ) - { - nYPadding += nRemainingSpace; - for( sal_Int32 nR=0; nR= nNumberOfEntries ) break; - bool bRemove = false; // text shape Reference< drawing::XShape > xTextShape( aTextShapes[nEntry] ); if( xTextShape.is() ) @@ -528,65 +581,25 @@ awt::Size lcl_placeLegendEntries( if( !bSymbolsLeftSide ) nTextXPos = nCurrentXPos - aMaxSymbolExtent.Width - aTextSize.Width; xTextShape->setPosition( awt::Point( nTextXPos, nCurrentYPos )); - - if( bSetMaximumFrameHeight ) - { - sal_Int32 nRemainingSpace = rAvailableSpace.Height - (nCurrentYPos + aTextSize.Height); - if( nRemainingSpace < 0 ) - { - Reference< beans::XPropertySet > xTextProp( xTextShape, uno::UNO_QUERY ); - if( xTextProp.is() ) - { - sal_Int32 nLimit = rAvailableSpace.Height - nCurrentYPos; - xTextShape->setSize( awt::Size( aTextSize.Width, nLimit ) ); - static bool bTest = false; - if( bTest ) - { - //todo - xTextProp->setPropertyValue( aPropNameTextMaximumFrameHeight, uno::makeAny(nLimit) ); - xTextProp->setPropertyValue( C2U("TextAutoGrowHeight"), uno::makeAny(sal_False) ); - } - } - bRemove = true; - } - } } // symbol Reference< drawing::XShape > xSymbol( rEntries[ nEntry ].aSymbol ); if( xSymbol.is() ) { - if( bRemove ) - { - uno::Reference< container::XChild > xChild( xSymbol, uno::UNO_QUERY ); - if( xChild.is() ) - { - uno::Reference xShapes( xChild->getParent(), uno::UNO_QUERY ); - if( xShapes.is() ) - { - xShapes->remove(xSymbol); - } - } - } - else - { - // Note: aspect ratio should always be 3:2 - // set symbol size to 75% of maximum space - awt::Size aSymbolSize( - aMaxSymbolExtent.Width * 75 / 100, - aMaxSymbolExtent.Height * 75 / 100 ); - xSymbol->setSize( aSymbolSize ); - sal_Int32 nSymbolXPos = nCurrentXPos + ((aMaxSymbolExtent.Width - aSymbolSize.Width) / 2); - if( !bSymbolsLeftSide ) - nSymbolXPos = nSymbolXPos - aMaxSymbolExtent.Width; - - sal_Int32 nSymbolYPos = nCurrentYPos + ( ( nTextLineHeight - aSymbolSize.Height ) / 2 ); - xSymbol->setPosition( awt::Point( nSymbolXPos, nSymbolYPos ) ); - } - } + // Note: aspect ratio should always be 3:2 + // set symbol size to 75% of maximum space + awt::Size aSymbolSize( + aMaxSymbolExtent.Width * 75 / 100, + aMaxSymbolExtent.Height * 75 / 100 ); + xSymbol->setSize( aSymbolSize ); + sal_Int32 nSymbolXPos = nCurrentXPos + ((aMaxSymbolExtent.Width - aSymbolSize.Width) / 2); + if( !bSymbolsLeftSide ) + nSymbolXPos = nSymbolXPos - aMaxSymbolExtent.Width; - if( bRemove ) - break; //-> next column + sal_Int32 nSymbolYPos = nCurrentYPos + ( ( nTextLineHeight - aSymbolSize.Height ) / 2 ); + xSymbol->setPosition( awt::Point( nSymbolXPos, nSymbolYPos ) ); + } nCurrentYPos += aRowHeights[ nRow ]; nMaxYPos = ::std::max( nMaxYPos, nCurrentYPos ); -- cgit From 7501edf4a53688cbaad55eaca307aa2603b84ad6 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 31 Jan 2011 20:11:28 +0100 Subject: dr79: crash when using push buttons in pivot table layout dialog --- sc/source/ui/dbgui/pvlaydlg.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index e5ca0ab71c41..dc5c7adce8c8 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -616,17 +616,24 @@ IMPL_LINK( ScPivotLayoutDlg, ClickHdl, PushButton *, pBtn ) { if( mpFocusWindow ) { + /* Raising sub dialogs (from the NotifyDoubleClick function) triggers + VCL child window focus events from this sub dialog which may + invalidate the member mpFocusWindow pointing to the target field + window. This would cause a crash with the following call to the + GrabFieldFocus function. */ + ScPivotFieldWindow& rTargetWindow = *mpFocusWindow; + if( pBtn == &maBtnRemove ) { mpFocusWindow->RemoveSelectedField(); // focus back to field window - GrabFieldFocus( *mpFocusWindow ); + GrabFieldFocus( rTargetWindow ); } else if( pBtn == &maBtnOptions ) { - NotifyDoubleClick( *mpFocusWindow ); + NotifyDoubleClick( rTargetWindow ); // focus back to field window - GrabFieldFocus( *mpFocusWindow ); + GrabFieldFocus( rTargetWindow ); } } return 0; -- cgit From db3074e3b6a67f25b6a2f3aa7ea1febf5710cba8 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Tue, 1 Feb 2011 10:36:41 +0100 Subject: dr79: ignore focus events from sub dialogs to prevent similar problems --- sc/source/ui/dbgui/pvlaydlg.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index dc5c7adce8c8..425a1ea29c27 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -620,12 +620,12 @@ IMPL_LINK( ScPivotLayoutDlg, ClickHdl, PushButton *, pBtn ) VCL child window focus events from this sub dialog which may invalidate the member mpFocusWindow pointing to the target field window. This would cause a crash with the following call to the - GrabFieldFocus function. */ + GrabFieldFocus function, if mpFocusWindow is used directly. */ ScPivotFieldWindow& rTargetWindow = *mpFocusWindow; if( pBtn == &maBtnRemove ) { - mpFocusWindow->RemoveSelectedField(); + rTargetWindow.RemoveSelectedField(); // focus back to field window GrabFieldFocus( rTargetWindow ); } @@ -903,10 +903,10 @@ IMPL_LINK( ScPivotLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG ) IMPL_LINK( ScPivotLayoutDlg, ChildEventListener, VclWindowEvent*, pEvent ) { - if( pEvent->GetId() == VCLEVENT_WINDOW_GETFOCUS ) + Window* pWindow = pEvent->GetWindow(); + // check that this dialog is the parent of the window, to ignore focus events from sub dialogs + if( (pEvent->GetId() == VCLEVENT_WINDOW_GETFOCUS) && pWindow && (pWindow->GetParent() == this) ) { - Window* pWindow = pEvent->GetWindow(); - // check if old window and/or new window are field windows ScPivotFieldWindow* pSourceWindow = mpFocusWindow; ScPivotFieldWindow* pTargetWindow = dynamic_cast< ScPivotFieldWindow* >( pWindow ); -- cgit From 57bd374bbd8726e763748d10b054acc0f0d8c0df Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Tue, 1 Feb 2011 13:40:28 +0100 Subject: native359: #i115669# fixing package description for solaris packages --- setup_native/source/packinfo/packinfo_office.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt index fb04b347fcdf..242507c59db9 100755 --- a/setup_native/source/packinfo/packinfo_office.txt +++ b/setup_native/source/packinfo/packinfo_office.txt @@ -566,7 +566,7 @@ linuxpatchrequires = "" copyright = "1999-2010 by Oracle" solariscopyright = "solariscopyrightfile" vendor = "Oracle" -description = "De-AT dictionary for %PACKAGENAME %PRODUCTVERSION" +description = "De-AT dictionary for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" End @@ -582,7 +582,7 @@ linuxpatchrequires = "" copyright = "1999-2010 by Oracle" solariscopyright = "solariscopyrightfile" vendor = "Oracle" -description = "De-CH dictionary for %PACKAGENAME %PRODUCTVERSION" +description = "De-CH dictionary for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" End @@ -598,7 +598,7 @@ linuxpatchrequires = "" copyright = "1999-2010 by Oracle" solariscopyright = "solariscopyrightfile" vendor = "Oracle" -description = "De-DE dictionary for %PACKAGENAME %PRODUCTVERSION" +description = "De-DE dictionary for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" End -- cgit From b772ab4055ab0cdf9f7d2cd41a659a6462e71ccc Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Tue, 1 Feb 2011 14:59:15 +0100 Subject: dr79: do not duplicate all fields when changing source range --- sc/source/core/data/dpobject.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index a00a3f2e9609..e9b53e34b332 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -1716,6 +1716,7 @@ void lcl_FillOldFields( ScPivotFieldVector& rFields, USHORT nOrient, SCCOL nColAdd, BOOL bAddData ) { BOOL bDataFound = FALSE; + rFields.clear(); //! merge multiple occurences (data field with different functions) //! force data field in one dimension -- cgit From 8d8daacbd486c62936fa524e5a893e3d0a975a66 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 1 Feb 2011 15:38:40 +0100 Subject: l10nmove: #i116586# Move l10n module into own repository --- solenv/bin/cws.pl | 47 +++++++++++------ solenv/bin/modules/CwsConfig.pm | 107 +++++++++++++------------------------- solenv/config/sdev300.ini | 2 +- solenv/gbuild/AllLangResTarget.mk | 2 +- solenv/inc/settings.mk | 2 +- 5 files changed, 71 insertions(+), 89 deletions(-) diff --git a/solenv/bin/cws.pl b/solenv/bin/cws.pl index bf9ce9508d38..60e4987c6aa8 100644 --- a/solenv/bin/cws.pl +++ b/solenv/bin/cws.pl @@ -49,6 +49,7 @@ BEGIN { use lib (@lib_dirs); use Cws; +print "I am cws.pl from cws!" #### script id ##### @@ -75,7 +76,7 @@ my %valid_options_hash = ( 'help' => ['help'], 'create' => ['help', 'milestone', 'migration', 'hg'], 'fetch' => ['help', 'milestone', 'childworkspace','platforms','noautocommon', - 'quiet', 'onlysolver'], + 'quiet', 'onlysolver', 'additionalrepositories'], 'query' => ['help', 'milestone','masterworkspace','childworkspace'], 'task' => ['help'], 'setcurrent' => ['help', 'milestone'], @@ -120,6 +121,7 @@ sub parse_command_line 'profile', 'commit|C', 'platforms|p=s', + 'additionalrepositories|r=s', 'noautocommon|x=s', 'onlysolver|o', 'quiet|q', @@ -399,16 +401,10 @@ sub hg_clone_cws_or_milestone my ($hg_local_source, $hg_lan_source, $hg_remote_source); my $config = CwsConfig->new(); - if ( $rep_type eq 'ooo') { - $hg_local_source = $config->get_ooo_hg_local_source(); - $hg_lan_source = $config->get_ooo_hg_lan_source(); - $hg_remote_source = $config->get_ooo_hg_remote_source(); - } - else { - $hg_local_source = $config->get_so_hg_local_source(); - $hg_lan_source = $config->get_so_hg_lan_source(); - $hg_remote_source = $config->get_so_hg_remote_source(); - } + + $hg_local_source = $config->get_hg_source(uc $rep_type, 'LOCAL'); + $hg_lan_source = $config->get_hg_source(uc $rep_type, 'LAN'); + $hg_remote_source = $config->get_hg_source(uc $rep_type, 'REMOTE'); my $masterws = $cws->master(); my $master_local_source = "$hg_local_source/" . $masterws; @@ -1456,10 +1452,10 @@ sub do_help } elsif ($arg eq 'fetch') { print STDERR "fetch: fetch a milestone or CWS\n"; - print STDERR "usage: fetch [-q] [-p platforms] [-o] <-m milestone> \n"; - print STDERR "usage: fetch [-q] [-p platforms] [-o] <-c cws> \n"; - print STDERR "usage: fetch [-q] [-x platforms] [-o] <-m milestone> \n"; - print STDERR "usage: fetch [-q] [-x platforms] [-o] <-c cws> \n"; + print STDERR "usage: fetch [-q] [-p platforms] [-r additionalrepositories] [-o] <-m milestone> \n"; + print STDERR "usage: fetch [-q] [-p platforms] [-r additionalrepositories] [-o] <-c cws> \n"; + print STDERR "usage: fetch [-q] [-x platforms] [-r additionalrepositories] [-o] <-m milestone> \n"; + print STDERR "usage: fetch [-q] [-x platforms] [-r additionalrepositories] [-o] <-c cws> \n"; print STDERR "usage: fetch [-q] <-m milestone> \n"; print STDERR "usage: fetch [-q] <-c cws> \n"; print STDERR "\t-m milestone: Checkout milestone to workspace \n"; @@ -1475,6 +1471,8 @@ sub do_help print STDERR "\t-x platform: Copy one or more prebuilt platforms 'platform'. \n"; print STDERR "\t Separate multiple platforms with commas.\n"; print STDERR "\t Does not automatically adds 'common[.pro]'.\n"; + print STDERR "\t-r additionalrepositories Checkout additional repositories. \n"; + print STDERR "\t Separate multiple repositories with commas.\n"; print STDERR "\t--noautocommon platform: Same as -x\n"; print STDERR "\t-o: Omit checkout of sources, copy only solver. \n"; print STDERR "\t--onlysolver: Same as -o\n"; @@ -1582,6 +1580,7 @@ sub do_fetch } my $milestone_opt = $options_ref->{'milestone'}; + my $additional_repositories_opt = $options_ref->{'additionalrepositories'}; my $child = $options_ref->{'childworkspace'}; my $platforms = $options_ref->{'platforms'}; my $noautocommon = $options_ref->{'noautocommon'}; @@ -1718,8 +1717,22 @@ sub do_fetch if ( !mkdir($work_master) ) { print_error("Can't create directory '$work_master': $!.", 8); } + hg_clone_cws_or_milestone('ooo', $cws, "$work_master/ooo", $clone_milestone_only); hg_clone_cws_or_milestone('so', $cws, "$work_master/sun", $clone_milestone_only); + + my %unique = map { $_ => 1 } split(/,/,$additional_repositories_opt); + my @unique_repo_list = keys %unique; + + if (defined($additional_repositories_opt)) + { + foreach my $repo(@unique_repo_list) + { + hg_clone_cws_or_milestone($repo, $cws, "$work_master/".$repo, $clone_milestone_only), if $repo ne "ooo" || $repo ne "sun"; + } + + } + if ( get_source_config_for_milestone($masterws, $milestone) ) { # write source_config file my $source_config_file = "$work_master/source_config"; @@ -1729,6 +1742,10 @@ sub do_fetch print SOURCE_CONFIG "[repositories]\n"; print SOURCE_CONFIG "ooo=active\n"; print SOURCE_CONFIG "sun=active\n"; + foreach my $repo(@unique_repo_list) + { + print SOURCE_CONFIG $repo."=active\n", if $repo ne "ooo" || $repo ne "sun"; + } close(SOURCE_CONFIG); } else { diff --git a/solenv/bin/modules/CwsConfig.pm b/solenv/bin/modules/CwsConfig.pm index 6121691e1e7f..7e9630ee1331 100644 --- a/solenv/bin/modules/CwsConfig.pm +++ b/solenv/bin/modules/CwsConfig.pm @@ -343,94 +343,59 @@ sub get_so_svn_server #### HG methods #### -sub get_ooo_hg_local_source +sub _get_hg_source { - my $self = shift; - - if ( !defined($self->{HG_LOCAL_SOURCE}) ) { + my $self = shift; + my $repository_source = shift; + if ( !defined($self->{$repository_source}) ) { my $config_file = $self->get_config_file(); - my $source = $config_file->{CWS_CONFIG}->{'HG_LOCAL_SOURCE'}; + my $source = $config_file->{CWS_CONFIG}->{$repository_source}; if ( !defined($source) ) { $source = ""; } - $self->{HG_LOCAL_SOURCE} = $source; + #print "result = ".$source."\n"; + $self->{$repository_source} = $source; } - return $self->{HG_LOCAL_SOURCE} ? $self->{HG_LOCAL_SOURCE} : undef; -} - -sub get_ooo_hg_lan_source -{ - my $self = shift; + return $self->{$repository_source} ? $self->{$repository_source} : undef; - if ( !defined($self->{HG_LAN_SOURCE}) ) { - my $config_file = $self->get_config_file(); - my $source = $config_file->{CWS_CONFIG}->{'HG_LAN_SOURCE'}; - if ( !defined($source) ) { - $source = ""; - } - $self->{HG_LAN_SOURCE} = $source; - } - return $self->{HG_LAN_SOURCE} ? $self->{HG_LAN_SOURCE} : undef; } -sub get_ooo_hg_remote_source +sub get_hg_source { - my $self = shift; + my $self = shift; + my $repository = shift; + my $location = shift; - if ( !defined($self->{HG_REMOTE_SOURCE}) ) { - my $config_file = $self->get_config_file(); - my $source = $config_file->{CWS_CONFIG}->{'HG_REMOTE_SOURCE'}; - if ( !defined($source) ) { - $source = ""; + if ($repository eq "OOO") + { + if ($location eq "LOCAL") + { + return $self->_get_hg_source('HG_LOCAL_SOURCE'); } - $self->{HG_REMOTE_SOURCE} = $source; - } - return $self->{HG_REMOTE_SOURCE} ? $self->{HG_REMOTE_SOURCE} : undef; -} - -sub get_so_hg_local_source -{ - my $self = shift; - - if ( !defined($self->{SO_HG_LOCAL_SOURCE}) ) { - my $config_file = $self->get_config_file(); - my $source = $config_file->{CWS_CONFIG}->{'SO_HG_LOCAL_SOURCE'}; - if ( !defined($source) ) { - $source = ""; + elsif ($location eq "LAN") + { + return $self->_get_hg_source('HG_LAN_SOURCE'); } - $self->{SO_HG_LOCAL_SOURCE} = $source; - } - return $self->{SO_HG_LOCAL_SOURCE} ? $self->{SO_HG_LOCAL_SOURCE} : undef; -} - -sub get_so_hg_lan_source -{ - my $self = shift; - - if ( !defined($self->{SO_HG_LAN_SOURCE}) ) { - my $config_file = $self->get_config_file(); - my $source = $config_file->{CWS_CONFIG}->{'SO_HG_LAN_SOURCE'}; - if ( !defined($source) ) { - $source = ""; + elsif ($location eq "REMOTE") + { + return $self->_get_hg_source('HG_REMOTE_SOURCE'); } - $self->{SO_HG_LAN_SOURCE} = $source; } - return $self->{SO_HG_LAN_SOURCE} ? $self->{SO_HG_LAN_SOURCE} : undef; -} - -sub get_so_hg_remote_source -{ - my $self = shift; - - if ( !defined($self->{SO_HG_REMOTE_SOURCE}) ) { - my $config_file = $self->get_config_file(); - my $source = $config_file->{CWS_CONFIG}->{'SO_HG_REMOTE_SOURCE'}; - if ( !defined($source) ) { - $source = ""; + else + { + if ($location eq "LOCAL") + { + return $self->_get_hg_source($repository.'_HG_LOCAL_SOURCE'); + } + elsif ($location eq "LAN") + { + return $self->_get_hg_source($repository.'_HG_LAN_SOURCE'); + } + elsif ($location eq "REMOTE") + { + return $self->_get_hg_source($repository.'_HG_REMOTE_SOURCE'); } - $self->{SO_HG_REMOTE_SOURCE} = $source; } - return $self->{SO_HG_REMOTE_SOURCE} ? $self->{SO_HG_REMOTE_SOURCE} : undef; } #### Prebuild binaries configuration #### diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index ce459e176b77..5f2125dbeae1 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -217,7 +217,7 @@ finish *o: cd %SOLARSRC% ALT_L10N_MODULE $expand(%SOLARSRC%/..)/sun/l10n_so TARFILE_LOCATION %SOURCE_ROOT_DIR%/ext_sources - gb_REPOS %SOURCE_ROOT_DIR%/ooo %SOURCE_ROOT_DIR%/sun + gb_REPOS %SOURCE_ROOT_DIR%/ooo %SOURCE_ROOT_DIR%/sun %SOURCE_ROOT_DIR%/loc gb_LOCALBUILDDIR %SOL_TMP%/gb_%CWS_WORK_STAMP%/%WORK_STAMP% } common_jre:0 IF %JREPATH% == diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk index b937ac7a35b5..8f3b883e75a1 100644 --- a/solenv/gbuild/AllLangResTarget.mk +++ b/solenv/gbuild/AllLangResTarget.mk @@ -32,7 +32,7 @@ gb_SrsPartMergeTarget_TRANSEXAUXDEPS := $(call gb_Library_get_target,tl) $(call # gb_SrsPartMergeTarget_TRANSEXPRECOMMAND is set by the platforms gb_SrsPartMergeTarget_TRANSEXCOMMAND := $(gb_SrsPartMergeTarget_TRANSEXPRECOMMAND) $(gb_SrsPartMergeTarget_TRANSEXTARGET) -gb_SrsPartMergeTarget_SDFLOCATION := $(SRCDIR)/l10n/$(INPATH)/misc/sdf/ +gb_SrsPartMergeTarget_SDFLOCATION := $(LOCDIR)/l10n/$(INPATH)/misc/sdf/ gb_SrsPartMergeTarget_REPOS := $(gb_REPOS) define gb_SrsPartMergeTarget__command diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index a4b02a9ed164..c66976b5b0ca 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -807,7 +807,7 @@ SOLARCOMMONSDFDIR=$(SOLARSDFDIR) .EXPORT : SOLARBINDIR -L10N_MODULE*=$(SOLARSRC)$/l10n +L10N_MODULE*=$(SOURCE_ROOT_DIR)/loc/l10n ALT_L10N_MODULE*=$(SOLARSRC)$/l10n_so .IF "$(WITH_LANG)"!="" -- cgit From 23be383f816a2676b3122ff2c3de7a7951e84357 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 1 Feb 2011 15:40:21 +0100 Subject: l10nmove: #i116586# Move l10n module into own repository --- l10ntools/scripts/localize.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl index 323f7fe549b6..59cba9879ace 100755 --- a/l10ntools/scripts/localize.pl +++ b/l10ntools/scripts/localize.pl @@ -175,7 +175,7 @@ sub splitfile{ exit( -1 ); } my $src_root = $ENV{SOURCE_ROOT_DIR}; - my $ooo_src_root = $ENV{SRC_ROOT}; + my $ooo_src_root = $src_root."/loc/l10n"; my $so_l10n_path = $src_root."/sun/l10n_so/source"; my $ooo_l10n_path = $ooo_src_root."/l10n/source"; -- cgit From 3da39398054c05de5b9b7edc54f769dafd687550 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 1 Feb 2011 15:43:35 +0100 Subject: l10nmove: #i116586# Move l10n module into own repository --- set_soenv.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/set_soenv.in b/set_soenv.in index 5061745103b1..d634be1834ad 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -78,7 +78,7 @@ my ( $USR, $ETC, $BIN, $LIB, $LIB64, $INC, $INCLUDE, $DEV, $OPT, $LOCAL, $SOLENV # Environment variables. my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL, - $UPD, $WORK_STAMP, $SOURCE_ROOT_DIR , + $UPD, $WORK_STAMP, $SOURCE_ROOT_DIR , $gb_REPOS, $SOLARSRC, $DEVROOT, $SOLARVER, $SOLARVERSION, $WORKDIR, $OUTDIR, $SOLARENV, $STAR_INIROOT, $STAR_INIROOTOLD, $STAR_STANDLST, $STAR_SSCOMMON, $STAR_SSOLARINI, $DMAKEROOT, $CLASSPATH, $XCLASSPATH, $COMPATH, @@ -983,6 +983,7 @@ $SOLARSRC = '$SRC_ROOT'; my @splitlist = split( /\//, $SRC_ROOT ); pop @splitlist; $SOURCE_ROOT_DIR = join("/", @splitlist); +$gb_REPOS = $SOURCE_ROOT_DIR."/ooo ".$SOURCE_ROOT_DIR."/sun ".$SOURCE_ROOT_DIR."/loc"; # default TARFILE_LOCATION if ('@TARFILE_LOCATION@' eq "DEFAULT") @@ -1964,6 +1965,8 @@ if ($platform !~ m/cygwin|os2/) { } ToFile( "SOLARSRC", $SOLARSRC, "e" ); ToFile( "SOURCE_ROOT_DIR", $SOURCE_ROOT_DIR, "e" ); +ToFile( "gb_REPOS", $gb_REPOS, "e" ); + if ( $platform =~ m/cygwin/ ) { ToFile( "ILIB", $ILIB, "e" ); -- cgit From 0cae34e7acd9e3d5d1720f84535729204f20e647 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Tue, 1 Feb 2011 15:56:50 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 5 --- chart2/source/view/main/VLegend.cxx | 87 +++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 292decdc6a10..c24e26bc9410 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -235,8 +235,8 @@ awt::Size lcl_createTextShapes( return aResult; } -void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns, const ::std::vector< Reference< drawing::XShape > > aTextShapes - , const sal_Int32 nXOffset, const awt::Size& aMaxSymbolExtent ) +void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns + , const ::std::vector< Reference< drawing::XShape > > aTextShapes, const awt::Size& aMaxSymbolExtent ) { rColumnWidths.clear(); sal_Int32 nRow = 0; @@ -250,9 +250,7 @@ void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal if( nEntry < nNumberOfEntries ) { awt::Size aTextSize( aTextShapes[ nEntry ]->getSize() ); - sal_Int32 nWidth = nXOffset + aMaxSymbolExtent.Width + aTextSize.Width; - if( nColumn>0 ) - nWidth += nXOffset; + sal_Int32 nWidth = aMaxSymbolExtent.Width + aTextSize.Width; if( nRow==0 ) rColumnWidths.push_back( nWidth ); else @@ -262,8 +260,8 @@ void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal } } -void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns, const ::std::vector< Reference< drawing::XShape > > aTextShapes - , const sal_Int32 nYOffset, const awt::Size& aMaxSymbolExtent ) +void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns + , const ::std::vector< Reference< drawing::XShape > > aTextShapes, const awt::Size& aMaxSymbolExtent ) { // calculate maximum height for each row // and collect column widths @@ -280,20 +278,20 @@ void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int3 if( nEntry < nNumberOfEntries ) { awt::Size aTextSize( aTextShapes[ nEntry ]->getSize() ); - nCurrentRowHeight = ::std::max( nCurrentRowHeight, nYOffset + aTextSize.Height ); + nCurrentRowHeight = ::std::max( nCurrentRowHeight, aTextSize.Height ); } } rRowHeights.push_back( nCurrentRowHeight ); } } -sal_Int32 lcl_getTextLineHeight( const std::vector< sal_Int32 >& aRowHeights, const sal_Int32 nNumberOfRows, const sal_Int32 nYOffset, double fViewFontSize ) +sal_Int32 lcl_getTextLineHeight( const std::vector< sal_Int32 >& aRowHeights, const sal_Int32 nNumberOfRows, double fViewFontSize ) { const sal_Int32 nFontHeight = static_cast< sal_Int32 >( fViewFontSize ); sal_Int32 nTextLineHeight = nFontHeight; for( sal_Int32 nR=0; nR have real text height @@ -331,8 +329,8 @@ awt::Size lcl_placeLegendEntries( sal_Int32 nXPadding = static_cast< sal_Int32 >( fViewFontSize * fXPadding ); sal_Int32 nYPadding = static_cast< sal_Int32 >( fViewFontSize * fYPadding ); - const sal_Int32 nXOffset = static_cast< sal_Int32 >( fViewFontSize * fXOffset ); - const sal_Int32 nYOffset = static_cast< sal_Int32 >( fViewFontSize * fYOffset ); + sal_Int32 nXOffset = static_cast< sal_Int32 >( fViewFontSize * fXOffset ); + sal_Int32 nYOffset = static_cast< sal_Int32 >( fViewFontSize * fYOffset ); // #i109336# Improve auto positioning in chart double fSymbolSizeFraction = 0.8; @@ -380,7 +378,7 @@ awt::Size lcl_placeLegendEntries( if( !xShape.is() ) continue; awt::Size aSize( xShape->getSize() ); - sal_Int32 nNewWidth = aSize.Width + aMaxSymbolExtent.Width + nXOffset; + sal_Int32 nNewWidth = aSize.Width + aMaxSymbolExtent.Width; sal_Int32 nCurrentColumnCount = aColumnWidths.size(); //are we allowed to add a new column? @@ -407,8 +405,6 @@ awt::Size lcl_placeLegendEntries( sal_Int32 nSumWidth = 0; for( sal_Int32 nC=0; nC 1) - nSumWidth += nXOffset*(nCurrentColumnCount-1); if( nSumWidth <= rAvailableSpace.Width || nCurrentColumnCount==1 ) { @@ -439,14 +435,14 @@ awt::Size lcl_placeLegendEntries( nNumberOfRows = nCurrentRow+1; //check if there is not enough space so that some entries must be removed - lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes, nYOffset, aMaxSymbolExtent ); - nTextLineHeight = lcl_getTextLineHeight( aRowHeights, nNumberOfRows, nYOffset, fViewFontSize ); + lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes, aMaxSymbolExtent ); + nTextLineHeight = lcl_getTextLineHeight( aRowHeights, nNumberOfRows, fViewFontSize ); sal_Int32 nSumHeight = 0; for( sal_Int32 nR=0; nR(aRowHeights.size()); - nRemainingSpace = (rAvailableSpace.Height - nSumHeight)/(nNumberOfRows+1); } - - //check if there is some remaining space that should be spread equally over all rows - if( nRemainingSpace>0 ) + if( nRemainingSpace > 0 ) { - nYPadding += nRemainingSpace; - for( sal_Int32 nR=0; nR0 ) { - nXPadding += nRemainingSpace; - for( sal_Int32 nC=0; nCsetPosition( awt::Point( nSymbolXPos, nSymbolYPos ) ); } - nCurrentYPos += aRowHeights[ nRow ]; + nCurrentYPos += aRowHeights[ nRow ] + nYOffset; nMaxYPos = ::std::max( nMaxYPos, nCurrentYPos ); } if( bSymbolsLeftSide ) - nCurrentXPos += aColumnWidths[nColumn]; + nCurrentXPos += ( aColumnWidths[nColumn] + nXOffset ); else - nCurrentXPos -= aColumnWidths[nColumn]; + nCurrentXPos -= ( aColumnWidths[nColumn] + nXOffset ); } if( !bIsCustomSize ) -- cgit From da7495384bf7cb1d574fc072f03a8d5e135ae108 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 1 Feb 2011 16:12:05 +0100 Subject: vcl118: #i65970# revert earlier changes --- vcl/source/gdi/pdfwriter_impl.hxx | 2 ++ vcl/source/gdi/pdfwriter_impl2.cxx | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 78b8c37d6fbe..cef25ee49f85 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1053,6 +1053,8 @@ i12626 bool prepareEncryption( const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >& ); // helper for playMetafile + void implWriteGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient, + VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx, VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index e2179bb9749f..3912d56959da 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -48,6 +48,8 @@ #include +#undef USE_PDFGRADIENTS + using namespace vcl; using namespace rtl; using namespace com::sun::star; @@ -56,6 +58,21 @@ using namespace com::sun::star::beans; // ----------------------------------------------------------------------------- +void PDFWriterImpl::implWriteGradient( const PolyPolygon& i_rPolyPoly, const Gradient& i_rGradient, + VirtualDevice* i_pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& i_rContext ) +{ + GDIMetaFile aTmpMtf; + + i_pDummyVDev->AddGradientActions( i_rPolyPoly.GetBoundRect(), i_rGradient, aTmpMtf ); + + m_rOuterFace.Push(); + m_rOuterFace.IntersectClipRegion( i_rPolyPoly.getB2DPolyPolygon() ); + playMetafile( aTmpMtf, NULL, i_rContext, i_pDummyVDev ); + m_rOuterFace.Pop(); +} + +// ----------------------------------------------------------------------------- + void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSize, const BitmapEx& i_rBitmapEx, VirtualDevice* i_pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& i_rContext ) { @@ -349,14 +366,23 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa case( META_GRADIENT_ACTION ): { const MetaGradientAction* pA = (const MetaGradientAction*) pAction; + #ifdef USE_PDFGRADIENTS m_rOuterFace.DrawGradient( pA->GetRect(), pA->GetGradient() ); + #else + const PolyPolygon aPolyPoly( pA->GetRect() ); + implWriteGradient( aPolyPoly, pA->GetGradient(), pDummyVDev, i_rContext ); + #endif } break; case( META_GRADIENTEX_ACTION ): { const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction; + #ifdef USE_PDFGRADIENTS m_rOuterFace.DrawGradient( pA->GetPolyPolygon(), pA->GetGradient() ); + #else + implWriteGradient( pA->GetPolyPolygon(), pA->GetGradient(), pDummyVDev, i_rContext ); + #endif } break; @@ -512,7 +538,11 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa if( pGradAction ) { + #if USE_PDFGRADIENTS m_rOuterFace.DrawGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient() ); + #else + implWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), pDummyVDev, i_rContext ); + #endif } } else -- cgit From a17d76c92f42c70ab1369e3ca3343859d9e9b413 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 1 Feb 2011 16:24:30 +0100 Subject: l10nmove: #i116586# Move l10n module into own repository --- set_soenv.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set_soenv.in b/set_soenv.in index d634be1834ad..edef85af7d3a 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -983,7 +983,7 @@ $SOLARSRC = '$SRC_ROOT'; my @splitlist = split( /\//, $SRC_ROOT ); pop @splitlist; $SOURCE_ROOT_DIR = join("/", @splitlist); -$gb_REPOS = $SOURCE_ROOT_DIR."/ooo ".$SOURCE_ROOT_DIR."/sun ".$SOURCE_ROOT_DIR."/loc"; +$gb_REPOS = $SOURCE_ROOT_DIR."/ooo ".$SOURCE_ROOT_DIR."/loc"; # default TARFILE_LOCATION if ('@TARFILE_LOCATION@' eq "DEFAULT") -- cgit From 689d5936b2b392d2d8ffad96acf361e42fe9c07d Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Tue, 1 Feb 2011 16:44:20 +0100 Subject: native359: #i114398# changing mac langpack icon --- setup_native/source/mac/ooo3_installer.icns | Bin 49809 -> 56605 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/setup_native/source/mac/ooo3_installer.icns b/setup_native/source/mac/ooo3_installer.icns index e064ad70479d..bacdd17d8470 100644 Binary files a/setup_native/source/mac/ooo3_installer.icns and b/setup_native/source/mac/ooo3_installer.icns differ -- cgit From dc8e53e3a26667df93dba87deb81b1b461490516 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Tue, 1 Feb 2011 17:20:47 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 6 --- chart2/source/view/main/VLegend.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index c24e26bc9410..988ea5ad8bb5 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -261,7 +261,7 @@ void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal } void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns - , const ::std::vector< Reference< drawing::XShape > > aTextShapes, const awt::Size& aMaxSymbolExtent ) + , const ::std::vector< Reference< drawing::XShape > > aTextShapes ) { // calculate maximum height for each row // and collect column widths @@ -435,7 +435,7 @@ awt::Size lcl_placeLegendEntries( nNumberOfRows = nCurrentRow+1; //check if there is not enough space so that some entries must be removed - lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes, aMaxSymbolExtent ); + lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes ); nTextLineHeight = lcl_getTextLineHeight( aRowHeights, nNumberOfRows, fViewFontSize ); sal_Int32 nSumHeight = 0; for( sal_Int32 nR=0; nR0 ) + if( nRemainingSpace>=0 ) { sal_Int32 nNormalSpacingWidth = 2*nXPadding+(nNumberOfColumns-1)*nXOffset; if( nRemainingSpace < nNormalSpacingWidth ) @@ -563,7 +563,7 @@ awt::Size lcl_placeLegendEntries( if( eExpansion != ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) { lcl_collectColumnWidths( aColumnWidths, nNumberOfRows, nNumberOfColumns, aTextShapes, aMaxSymbolExtent ); - lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes, aMaxSymbolExtent ); + lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes ); nTextLineHeight = lcl_getTextLineHeight( aRowHeights, nNumberOfRows, fViewFontSize ); } -- cgit From acd83aa7782fcdff32785fadb1c6b61dffd465ab Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 2 Feb 2011 10:51:17 +0100 Subject: gridsort: when cancelling a column sort by releasing the mouse outside the start column, properly recover the handler state --- svtools/source/table/mousefunction.cxx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index 6d37e35b7a4c..20d505e911e9 100755 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -296,22 +296,20 @@ namespace svt { namespace table return SkipFunction; TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) ); - if ( ( tableCell.nRow != ROW_COL_HEADERS ) || ( tableCell.nColumn != m_nActiveColumn ) ) - // mouse was pressed on a column header, but released outside of it. - // => just deactivate, without sorting - return DeactivateFunction; - - ITableDataSort* pSort = i_tableControl.getModel()->getSortAdapter(); - ENSURE_OR_RETURN( pSort != NULL, "ColumnSortHandler::handleMouseUp: somebody is mocking with us!", DeactivateFunction ); - // in handleMousButtonDown, the model claimed to have sort support ... + if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.nColumn == m_nActiveColumn ) ) + { + ITableDataSort* pSort = i_tableControl.getModel()->getSortAdapter(); + ENSURE_OR_RETURN( pSort != NULL, "ColumnSortHandler::handleMouseUp: somebody is mocking with us!", DeactivateFunction ); + // in handleMousButtonDown, the model claimed to have sort support ... - ColumnSortDirection eSortDirection = ColumnSortAscending; - ColumnSort const aCurrentSort = pSort->getCurrentSortOrder(); - if ( aCurrentSort.nColumnPos == m_nActiveColumn ) - // invert existing sort order - eSortDirection = ( aCurrentSort.eSortDirection == ColumnSortAscending ) ? ColumnSortDescending : ColumnSortAscending; + ColumnSortDirection eSortDirection = ColumnSortAscending; + ColumnSort const aCurrentSort = pSort->getCurrentSortOrder(); + if ( aCurrentSort.nColumnPos == m_nActiveColumn ) + // invert existing sort order + eSortDirection = ( aCurrentSort.eSortDirection == ColumnSortAscending ) ? ColumnSortDescending : ColumnSortAscending; - pSort->sortByColumn( m_nActiveColumn, eSortDirection ); + pSort->sortByColumn( m_nActiveColumn, eSortDirection ); + } m_nActiveColumn = COL_INVALID; return DeactivateFunction; -- cgit From 5404b53cab99fdd392ae4dd60e1472c5accfe30f Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Wed, 2 Feb 2011 11:03:16 +0100 Subject: Fix some changed constants --- .../framework/optional/includes/options_ooo_colors.inc | 10 ++++------ testautomation/math/optional/includes/m_105.inc | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/testautomation/framework/optional/includes/options_ooo_colors.inc b/testautomation/framework/optional/includes/options_ooo_colors.inc index f7c68095e198..92489ecb15fc 100644 --- a/testautomation/framework/optional/includes/options_ooo_colors.inc +++ b/testautomation/framework/optional/includes/options_ooo_colors.inc @@ -40,8 +40,8 @@ testcase tOOoColors dim currentColor(4) as String dim chColor(4) as String - const DEFAULT_COLOR_COUNT = 99 - const CHANGED_COLOR_COUNT = 100 + const DEFAULT_COLOR_COUNT = 100 + const CHANGED_COLOR_COUNT = DEFAULT_COLOR_COUNT +1 const USER_COLOR = "TT-Test-Color" myColor(1) = USER_COLOR @@ -66,10 +66,8 @@ testcase tOOoColors printlog( "Check the number of currently registered colors - cancel test on error" ) Kontext "TabFarben" if ( Farbe.GetItemCount() <> DEFAULT_COLOR_COUNT ) then - warnlog( "The number of colors has changed, stopping test" ) - printlog( "Expected: " & DEFAULT_COLOR_COUNT ) - printlog( "Found...: " & Farbe.getItemCount() ) - printlog( "Close the Tools/Options dialog with OK" ) + warnlog "The number of colors has changed, stopping test; Expected: " & DEFAULT_COLOR_COUNT & "; Found...: " & Farbe.getItemCount() + printlog "Close the Tools/Options dialog with OK" Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK WaitSlot( 2000 ) diff --git a/testautomation/math/optional/includes/m_105.inc b/testautomation/math/optional/includes/m_105.inc index 2f16f4247854..48e45c41e1cb 100644 --- a/testautomation/math/optional/includes/m_105.inc +++ b/testautomation/math/optional/includes/m_105.inc @@ -453,8 +453,8 @@ testcase tToolsCatalog next j next i - if (listCount(lAllSymbols()) <> 106) then - warnlog "There have to be 106 Symbols, but there are: " + listCount(lAllSymbols()) + if (listCount(lAllSymbols()) <> 108) then + warnlog "There have to be 108 Symbols, but there are: " + listCount(lAllSymbols()) endif ' TODO: check sAllSymbols for not allowed characters! listCopy(lAllSymbols(),lAllSymbolsSort()) -- cgit From 6ec41c445ec457e56149384eff6d05f7d802ac9d Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Wed, 2 Feb 2011 12:01:37 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 7 --- chart2/source/controller/main/SelectionHelper.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index d5b9784aa95a..d5dadcf1d800 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -276,10 +276,11 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* } //check wether the diagram was hit but not selected (e.g. because it has no filling): + rtl::OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, rtl::OUString::valueOf( sal_Int32(0) ) ); rtl::OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, rtl::OUString() ) );//@todo read CID from model - if ( m_aSelectedOID.getObjectCID().equals( aPageCID ) || m_aSelectedOID.getObjectCID().equals( aWallCID ) || !m_aSelectedOID.isAutoGeneratedObject() ) + bool bBackGroundHit = m_aSelectedOID.getObjectCID().equals( aPageCID ) || m_aSelectedOID.getObjectCID().equals( aWallCID ) || !m_aSelectedOID.isAutoGeneratedObject(); + if( bBackGroundHit ) { - rtl::OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, rtl::OUString::valueOf( sal_Int32(0) ) ); //todo: if more than one diagram is available in future do chack the list of all diagrams here SdrObject* pDiagram = pDrawViewWrapper->getNamedSdrObject( aDiagramCID ); if( pDiagram ) @@ -291,6 +292,20 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* } } } + //check wether the legend was hit but not selected (e.g. because it has no filling): + if( bBackGroundHit || m_aSelectedOID.getObjectCID().equals( aDiagramCID ) ) + { + rtl::OUString aLegendCID( ObjectIdentifier::createClassifiedIdentifierForParticle( ObjectIdentifier::createParticleForLegend(0,0) ) );//@todo read CID from model + SdrObject* pLegend = pDrawViewWrapper->getNamedSdrObject( aLegendCID ); + if( pLegend ) + { + if( pDrawViewWrapper->IsObjectHit( pLegend, rMousePos ) ) + { + m_aSelectedOID = ObjectIdentifier( aLegendCID ); + pNewObj = pLegend; + } + } + } } } -- cgit From a0d42cf895223fdc944d76744eea8126aa0c0926 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 2 Feb 2011 16:23:08 +0100 Subject: l10nmove: #i116586# Move l10n module into own repository --- set_soenv.in | 2 +- solenv/bin/cws.pl | 7 +++---- solenv/bin/modules/CwsConfig.pm | 1 - solenv/config/sdev300.ini | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/set_soenv.in b/set_soenv.in index edef85af7d3a..a07310634819 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -983,7 +983,7 @@ $SOLARSRC = '$SRC_ROOT'; my @splitlist = split( /\//, $SRC_ROOT ); pop @splitlist; $SOURCE_ROOT_DIR = join("/", @splitlist); -$gb_REPOS = $SOURCE_ROOT_DIR."/ooo ".$SOURCE_ROOT_DIR."/loc"; +$gb_REPOS = $SOURCE_ROOT_DIR."/ooo ".$SOURCE_ROOT_DIR."/l10n"; # default TARFILE_LOCATION if ('@TARFILE_LOCATION@' eq "DEFAULT") diff --git a/solenv/bin/cws.pl b/solenv/bin/cws.pl index 60e4987c6aa8..ec671d52884a 100644 --- a/solenv/bin/cws.pl +++ b/solenv/bin/cws.pl @@ -49,7 +49,6 @@ BEGIN { use lib (@lib_dirs); use Cws; -print "I am cws.pl from cws!" #### script id ##### @@ -1718,9 +1717,6 @@ sub do_fetch print_error("Can't create directory '$work_master': $!.", 8); } - hg_clone_cws_or_milestone('ooo', $cws, "$work_master/ooo", $clone_milestone_only); - hg_clone_cws_or_milestone('so', $cws, "$work_master/sun", $clone_milestone_only); - my %unique = map { $_ => 1 } split(/,/,$additional_repositories_opt); my @unique_repo_list = keys %unique; @@ -1733,6 +1729,9 @@ sub do_fetch } + hg_clone_cws_or_milestone('ooo', $cws, "$work_master/ooo", $clone_milestone_only); + hg_clone_cws_or_milestone('so', $cws, "$work_master/sun", $clone_milestone_only); + if ( get_source_config_for_milestone($masterws, $milestone) ) { # write source_config file my $source_config_file = "$work_master/source_config"; diff --git a/solenv/bin/modules/CwsConfig.pm b/solenv/bin/modules/CwsConfig.pm index 7e9630ee1331..dca09877654b 100644 --- a/solenv/bin/modules/CwsConfig.pm +++ b/solenv/bin/modules/CwsConfig.pm @@ -353,7 +353,6 @@ sub _get_hg_source if ( !defined($source) ) { $source = ""; } - #print "result = ".$source."\n"; $self->{$repository_source} = $source; } return $self->{$repository_source} ? $self->{$repository_source} : undef; diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index 5f2125dbeae1..bdbbcec6f5f6 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -217,7 +217,7 @@ finish *o: cd %SOLARSRC% ALT_L10N_MODULE $expand(%SOLARSRC%/..)/sun/l10n_so TARFILE_LOCATION %SOURCE_ROOT_DIR%/ext_sources - gb_REPOS %SOURCE_ROOT_DIR%/ooo %SOURCE_ROOT_DIR%/sun %SOURCE_ROOT_DIR%/loc + gb_REPOS %SOURCE_ROOT_DIR%/ooo %SOURCE_ROOT_DIR%/sun %SOURCE_ROOT_DIR%/l10n gb_LOCALBUILDDIR %SOL_TMP%/gb_%CWS_WORK_STAMP%/%WORK_STAMP% } common_jre:0 IF %JREPATH% == -- cgit From a9bf6471c2abcdaeb99957c33006beccb731b24f Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 2 Feb 2011 16:27:11 +0100 Subject: l10nmove: #i116586# Move l10n module into own repository --- solenv/inc/settings.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index c66976b5b0ca..349c44585380 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -807,7 +807,7 @@ SOLARCOMMONSDFDIR=$(SOLARSDFDIR) .EXPORT : SOLARBINDIR -L10N_MODULE*=$(SOURCE_ROOT_DIR)/loc/l10n +L10N_MODULE*=$(SOURCE_ROOT_DIR)/l10n/l10n ALT_L10N_MODULE*=$(SOLARSRC)$/l10n_so .IF "$(WITH_LANG)"!="" -- cgit From 0fd19afca7b8063a964032704a9ac6f4ee6e7911 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 2 Feb 2011 22:29:50 +0100 Subject: gridsort: disabled a test which currently fails on Linux --- toolkit/qa/complex/toolkit/makefile.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/toolkit/qa/complex/toolkit/makefile.mk b/toolkit/qa/complex/toolkit/makefile.mk index e912721739c4..ecb173f9bdac 100755 --- a/toolkit/qa/complex/toolkit/makefile.mk +++ b/toolkit/qa/complex/toolkit/makefile.mk @@ -66,10 +66,13 @@ JARTARGET = $(TARGET).jar JAVATESTFILES = \ GridControl.java \ UnitConversion.java \ - AccessibleStatusBar.java \ -# fails; no issue, yet (not sure this is worth it. Don't know who to give the issue to, and don't know whether the test really makes sense) -# AccessibleStatusBarItem.java \ + +# disabled for now - the tests fail on at least one platform +# no issue, yet (not sure this is worth it. Don't know who to give the issue to, and don't know whether the test really makes sense) +DISABLED_JAVA_TEST_FILES=\ + AccessibleStatusBar.java\ + AccessibleStatusBarItem.java # --- Targets ------------------------------------------------------ -- cgit From e5f1500177bf6d3a0bf1c0f9dd658a2ad19aaa94 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Thu, 3 Feb 2011 10:43:21 +0100 Subject: #i116587# - Workaround for IIS sending challenge without realm. --- neon/neon.patch | 57 +++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/neon/neon.patch b/neon/neon.patch index 51ec3a8d6d0b..473b88695ccc 100644 --- a/neon/neon.patch +++ b/neon/neon.patch @@ -1,5 +1,5 @@ ---- misc/neon-0.29.5/src/config.h 2010-12-07 15:53:32.000000000 +0100 -+++ misc/build/neon-0.29.5/src/config.h 2010-12-07 13:44:29.000000000 +0100 +--- misc/neon-0.29.5/src/config.h 2011-02-03 10:32:38.000000000 +0100 ++++ misc/build/neon-0.29.5/src/config.h 2011-02-03 10:26:19.000000000 +0100 @@ -1 +1,488 @@ -dummy + @@ -490,8 +490,8 @@ +#else +#define HAVE_NTLM 1 +#endif ---- misc/neon-0.29.5/src/makefile.mk 2010-12-07 15:53:32.000000000 +0100 -+++ misc/build/neon-0.29.5/src/makefile.mk 2010-12-07 13:44:29.000000000 +0100 +--- misc/neon-0.29.5/src/makefile.mk 2011-02-03 10:32:38.000000000 +0100 ++++ misc/build/neon-0.29.5/src/makefile.mk 2011-02-03 10:26:19.000000000 +0100 @@ -1 +1,102 @@ -dummy +PRJ=..$/..$/..$/..$/.. @@ -597,7 +597,7 @@ +DEF1NAME=$(SHL1TARGET) +.INCLUDE : target.mk --- misc/neon-0.29.5/src/ne_auth.c 2010-10-14 17:00:53.000000000 +0200 -+++ misc/build/neon-0.29.5/src/ne_auth.c 2010-12-07 15:39:56.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_auth.c 2011-02-03 10:31:22.000000000 +0100 @@ -367,7 +367,7 @@ static int get_credentials(auth_session *sess, ne_buffer **errmsg, int attempt, struct auth_challenge *chall, char *pwbuf) @@ -607,7 +607,28 @@ chall->handler->attempt++, sess->username, pwbuf) == 0) { return 0; } else { -@@ -610,10 +610,12 @@ +@@ -385,15 +385,19 @@ + { + char *tmp, password[NE_ABUFSIZ]; + ++#if 0 /* Workaround - IIS sends challenge without realm. */ ++ + /* Verify challenge... must have a realm */ + if (parms->realm == NULL) { + challenge_error(errmsg, _("missing realm in Basic challenge")); + return -1; + } ++#endif + + clean_session(sess); + +- sess->realm = ne_strdup(parms->realm); ++ if (parms->realm != NULL) ++ sess->realm = ne_strdup(parms->realm); + + if (get_credentials(sess, errmsg, attempt, parms, password)) { + /* Failed to get credentials */ +@@ -610,10 +614,12 @@ return NULL; } @@ -621,7 +642,7 @@ NE_DEBUG(NE_DBG_HTTPAUTH, "auth: SSPI challenge.\n"); -@@ -630,8 +632,17 @@ +@@ -630,8 +636,17 @@ return status; } } @@ -641,7 +662,7 @@ if (status) { return status; } -@@ -651,7 +662,7 @@ +@@ -651,7 +666,7 @@ { int ntlm = ne_strcasecmp(parms->protocol->name, "NTLM") == 0; @@ -650,7 +671,7 @@ } static int verify_sspi(struct auth_request *req, auth_session *sess, -@@ -674,7 +685,7 @@ +@@ -674,7 +689,7 @@ return NE_OK; } @@ -660,7 +681,7 @@ #endif --- misc/neon-0.29.5/src/ne_auth.h 2009-09-01 22:13:12.000000000 +0200 -+++ misc/build/neon-0.29.5/src/ne_auth.h 2010-12-07 13:44:30.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_auth.h 2011-02-03 10:26:20.000000000 +0100 @@ -47,8 +47,8 @@ * Hint: if you just wish to attempt authentication just once (even if * the user gets the username/password wrong), have the callback @@ -673,7 +694,7 @@ /* Set callbacks to provide credentials for server and proxy * authentication, using the default set of authentication protocols. --- misc/neon-0.29.5/src/ne_defs.h 2010-01-11 23:57:34.000000000 +0100 -+++ misc/build/neon-0.29.5/src/ne_defs.h 2010-12-07 13:44:30.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_defs.h 2011-02-03 10:26:20.000000000 +0100 @@ -41,7 +41,7 @@ #endif @@ -684,7 +705,7 @@ #endif --- misc/neon-0.29.5/src/ne_locks.c 2007-02-05 11:09:27.000000000 +0100 -+++ misc/build/neon-0.29.5/src/ne_locks.c 2010-12-07 13:44:30.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_locks.c 2011-02-03 10:26:21.000000000 +0100 @@ -579,6 +579,23 @@ const char *token = ne_get_response_header(ctx->req, "Lock-Token"); /* at the root element; retrieve the Lock-Token header, @@ -752,7 +773,7 @@ } } --- misc/neon-0.29.5/src/ne_locks.h 2006-01-02 12:43:19.000000000 +0100 -+++ misc/build/neon-0.29.5/src/ne_locks.h 2010-12-07 13:44:30.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_locks.h 2011-02-03 10:26:21.000000000 +0100 @@ -22,6 +22,10 @@ #ifndef NE_LOCKS_H #define NE_LOCKS_H @@ -765,7 +786,7 @@ #include "ne_uri.h" /* for ne_uri */ --- misc/neon-0.29.5/src/ne_sspi.c 2007-08-10 17:26:08.000000000 +0200 -+++ misc/build/neon-0.29.5/src/ne_sspi.c 2010-12-07 13:44:31.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_sspi.c 2011-02-03 10:26:21.000000000 +0100 @@ -206,6 +206,45 @@ } @@ -852,7 +873,7 @@ securityStatus = initializeSecurityContext(&sspiContext->credentials, NULL, --- misc/neon-0.29.5/src/ne_sspi.h 2006-02-12 13:05:14.000000000 +0100 -+++ misc/build/neon-0.29.5/src/ne_sspi.h 2010-12-07 13:44:31.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_sspi.h 2011-02-03 10:26:21.000000000 +0100 @@ -41,7 +41,7 @@ int ne_sspi_clear_context(void *context); @@ -863,7 +884,7 @@ #endif /* HAVE_SSPI */ --- misc/neon-0.29.5/src/ne_uri.c 2007-12-05 12:04:47.000000000 +0100 -+++ misc/build/neon-0.29.5/src/ne_uri.c 2010-12-07 13:44:31.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_uri.c 2011-02-03 10:26:21.000000000 +0100 @@ -42,7 +42,7 @@ #include "ne_alloc.h" #include "ne_uri.h" @@ -910,7 +931,7 @@ /* 4x */ AT, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, /* 5x */ AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, GD, OT, GD, OT, US, --- misc/neon-0.29.5/src/ne_utils.c 2006-03-07 10:36:43.000000000 +0100 -+++ misc/build/neon-0.29.5/src/ne_utils.c 2010-12-07 13:44:31.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_utils.c 2011-02-03 10:26:21.000000000 +0100 @@ -118,6 +118,9 @@ #ifdef HAVE_GNUTLS ", GNU TLS " LIBGNUTLS_VERSION @@ -941,7 +962,7 @@ #endif /* NE_HAVE_* */ default: --- misc/neon-0.29.5/src/ne_utils.h 2007-07-16 08:54:57.000000000 +0200 -+++ misc/build/neon-0.29.5/src/ne_utils.h 2010-12-07 13:44:31.000000000 +0100 ++++ misc/build/neon-0.29.5/src/ne_utils.h 2011-02-03 10:26:21.000000000 +0100 @@ -54,6 +54,7 @@ #define NE_FEATURE_SOCKS (5) /* SOCKSv5 support */ #define NE_FEATURE_TS_SSL (6) /* Thread-safe SSL/TLS support */ -- cgit From 005e0ad59cdfb9d0d33d74d956cc045d17b9f576 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 3 Feb 2011 16:29:29 +0100 Subject: l10nmove: #i116586# Move l10n module into own repository --- solenv/config/sdev300.ini | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index bdbbcec6f5f6..93ad57f34240 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -97,6 +97,7 @@ common PROEXT .pro PROFULLSWITCH product=full } + r_only { LU_RFLAG r_only @@ -117,7 +118,7 @@ common SRC_ROOT UPDATER } - order minorext common:2 common:3 pro:0 pro:1 common common:0 cwsname common:1 tmp crashdump maxproc hg r_only nosource + order minorext common:2 common:3 pro:0 pro:1 common common:0 cwsname common:1 tmp crashdump maxproc hg r_only nosource reset { ALT_L10N_MODULE @@ -217,9 +218,13 @@ finish *o: cd %SOLARSRC% ALT_L10N_MODULE $expand(%SOLARSRC%/..)/sun/l10n_so TARFILE_LOCATION %SOURCE_ROOT_DIR%/ext_sources - gb_REPOS %SOURCE_ROOT_DIR%/ooo %SOURCE_ROOT_DIR%/sun %SOURCE_ROOT_DIR%/l10n + gb_REPOS %SRC_ROOT% %SOURCE_ROOT_DIR%/sun gb_LOCALBUILDDIR %SOL_TMP%/gb_%CWS_WORK_STAMP%/%WORK_STAMP% } + common_setrepo:0 IF X%WITH_LANG%X != XX + { + gb_REPOS %gb_REPOS% %SOURCE_ROOT_DIR%/l10n + } common_jre:0 IF %JREPATH% == { HIER set @@ -300,7 +305,7 @@ finish JAVA_TARGET_FLAG -target 1.6 } } - order cwsname:0 cwsname:1 cwsname:2 common_0:0 common_0:1 common_0:2 common_0:3 jdk14 jdk15 ojdk16 common_1 common_2:0 l10n common_jre:0 common_jre:1 cax cap common_a + order cwsname:0 cwsname:1 cwsname:2 common_0:0 common_0:1 common_0:2 common_0:3 jdk14 jdk15 ojdk16 common_1 common_2:0 l10n common_jre:0 common_jre:1 cax cap common_a common_setrepo:0 switches { cwsname CWS_WORK_STAMP -- cgit From 6bb97c8b31d1eda069a560a82242cb6269a998b1 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 3 Feb 2011 16:29:56 +0100 Subject: l10nmove: #i116586# Move l10n module into own repository --- set_soenv.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/set_soenv.in b/set_soenv.in index a07310634819..f7c829145fbd 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -983,7 +983,6 @@ $SOLARSRC = '$SRC_ROOT'; my @splitlist = split( /\//, $SRC_ROOT ); pop @splitlist; $SOURCE_ROOT_DIR = join("/", @splitlist); -$gb_REPOS = $SOURCE_ROOT_DIR."/ooo ".$SOURCE_ROOT_DIR."/l10n"; # default TARFILE_LOCATION if ('@TARFILE_LOCATION@' eq "DEFAULT") @@ -1497,6 +1496,10 @@ else # print "done\n"; +if ('@WITH_LANG@' ne "") +{ + $gb_REPOS = $SRC_ROOT." ".$SOURCE_ROOT_DIR."/l10n"; +} # # F. Setting the different aliases. -- cgit From d6f76584544ae47b090528e94baff52d51b6f0ce Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Thu, 3 Feb 2011 17:26:57 +0100 Subject: dr79: change scrolling to entire rows/columns in all field windows --- sc/source/ui/dbgui/fieldwnd.cxx | 224 ++++++++++++++++------------------------ sc/source/ui/dbgui/pvlaydlg.cxx | 44 ++++---- sc/source/ui/inc/fieldwnd.hxx | 32 ++++-- 3 files changed, 137 insertions(+), 163 deletions(-) diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index 66aaf2603b45..82730b7cf503 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -51,10 +51,10 @@ using ::rtl::OUString; namespace { /** Line width for insertion cursor in pixels. */ -const long CURSOR_WIDTH = 3; +const long CURSOR_WIDTH = 3; /** Number of tracking events before auto scrolling starts. */ -const size_t TRACKING_DELAY = 20; +const size_t INITIAL_TRACKING_DELAY = 20; } // namespace @@ -119,10 +119,14 @@ ScPivotFieldWindow::ScPivotFieldWindow( ScPivotLayoutDlg* pDialog, const ResId& mnInsCursorIndex( PIVOTFIELD_INVALID ), mnOldFirstVisIndex( 0 ), mnAutoScrollDelay( 0 ), - mbVertical( eFieldType == PIVOTFIELDTYPE_SELECT ) + mbVertical( eFieldType == PIVOTFIELDTYPE_SELECT ), + mbIsTrackingSource( false ) { SetHelpId( pcHelpId ); + mnLineSize = mbVertical ? mnRowCount : mnColCount; + mnPageSize = mnColCount * mnRowCount; + // a single field is 36x12 appfont units maFieldSize = LogicToPixel( Size( 36, 12 ), MapMode( MAP_APPFONT ) ); maFieldSize.Width() *= nFieldWidthFactor; @@ -147,9 +151,9 @@ ScPivotFieldWindow::ScPivotFieldWindow( ScPivotLayoutDlg* pDialog, const ResId& aScrollBarSize.Width() = GetSettings().GetStyleSettings().GetScrollBarSize(); } mrScrollBar.SetPosSizePixel( aScrollBarPos, aScrollBarSize ); - mrScrollBar.SetLineSize( static_cast< long >( mbVertical ? mnRowCount : 1 ) ); - mrScrollBar.SetPageSize( static_cast< long >( mnColCount * mnRowCount ) ); - mrScrollBar.SetVisibleSize( static_cast< long >( mnColCount * mnRowCount ) ); + mrScrollBar.SetLineSize( 1 ); + mrScrollBar.SetPageSize( static_cast< long >( mbVertical ? mnColCount : mnRowCount ) ); + mrScrollBar.SetVisibleSize( static_cast< long >( mbVertical ? mnColCount : mnRowCount ) ); mrScrollBar.SetScrollHdl( LINK( this, ScPivotFieldWindow, ScrollHdl ) ); mrScrollBar.SetEndScrollHdl( LINK( this, ScPivotFieldWindow, ScrollHdl ) ); } @@ -336,13 +340,9 @@ bool ScPivotFieldWindow::RemoveField( size_t nRemoveIndex ) { // remove the field from the vector and notify accessibility object RemoveFieldUnchecked( nRemoveIndex ); - // adjust selection and scroll position + // adjust selection and scroll position, if last field is removed if( !maFields.empty() ) - { - size_t nSelectIndex = ::std::min< size_t >( mnSelectIndex, maFields.size() - 1 ); - size_t nFirstVisIndex = ::std::min< size_t >( mnFirstVisIndex, GetFirstVisibleIndex( maFields.size() - 1 ) ); - SetSelection( nSelectIndex, nFirstVisIndex ); - } + MoveSelection( (mnSelectIndex < maFields.size()) ? mnSelectIndex : (maFields.size() - 1) ); Invalidate(); return true; } @@ -398,67 +398,60 @@ bool ScPivotFieldWindow::MoveSelectedField( size_t nInsertIndex ) return MoveField( mnSelectIndex, nInsertIndex ); } -void ScPivotFieldWindow::NotifyTracking( const Point& rWindowPos ) +void ScPivotFieldWindow::NotifyStartTracking() { - /* Start tracking: rescue old scrolling index, to be able to restore it - when tracking is cancelled. */ - if( mnInsCursorIndex == PIVOTFIELD_INVALID ) - mnOldFirstVisIndex = mnFirstVisIndex; + // rescue old scrolling index, to be able to restore it when tracking is cancelled + mnOldFirstVisIndex = mnFirstVisIndex; +} +void ScPivotFieldWindow::NotifyTracking( const Point& rWindowPos ) +{ size_t nFieldIndex = GetDropIndex( rWindowPos ); - if( nFieldIndex == mnInsCursorIndex ) - { - // insertion cursor unchanged: auto scrolling - if( mnAutoScrollDelay < TRACKING_DELAY ) - { - ++mnAutoScrollDelay; - } - else - { - // check if tracking happens on first or last field - size_t nLastVisIndex = GetLastVisibleIndex( mnFirstVisIndex ); - long nScrollDelta = 0; - if( (mnFirstVisIndex > 0) && (mnInsCursorIndex == mnFirstVisIndex) ) - nScrollDelta = -1; - else if( (nLastVisIndex + 1 < maFields.size()) && (mnInsCursorIndex == nLastVisIndex + 1) ) - nScrollDelta = 1; - - if( nScrollDelta != 0 ) - { - // update mnInsCursorIndex, so it will be drawn at the same position after scrolling - mnInsCursorIndex += nScrollDelta; - mnFirstVisIndex += nScrollDelta; - mrScrollBar.SetThumbPos( static_cast< long >( mnFirstVisIndex ) ); - Invalidate(); - } - } - } - else + + // insertion index changed: draw new cursor and exit + if( nFieldIndex != mnInsCursorIndex ) { - // insertion index changed, draw new cursor mnInsCursorIndex = nFieldIndex; - mnAutoScrollDelay = 0; + mnAutoScrollDelay = INITIAL_TRACKING_DELAY; Invalidate(); + return; } -} -void ScPivotFieldWindow::NotifyEndTracking() -{ - if( mnInsCursorIndex != PIVOTFIELD_INVALID ) + // insertion index unchanged: countdown for auto scrolling + if( mnAutoScrollDelay > 0 ) { - mnInsCursorIndex = PIVOTFIELD_INVALID; - mnAutoScrollDelay = 0; + --mnAutoScrollDelay; + return; + } + + // check if tracking happens on first or last field + long nScrollDelta = 0; + if( (mnInsCursorIndex > 0) && (mnInsCursorIndex == mnFirstVisIndex) ) + nScrollDelta = -static_cast< long >( mnLineSize ); + else if( (mnInsCursorIndex < maFields.size()) && (mnInsCursorIndex == mnFirstVisIndex + mnPageSize) ) + nScrollDelta = static_cast< long >( mnLineSize ); + if( nScrollDelta != 0 ) + { + // update mnInsCursorIndex, so it will be drawn at the same position after scrolling + mnInsCursorIndex += nScrollDelta; + mnFirstVisIndex += nScrollDelta; + // delay auto scroll by line size, to slow down scrolling in column/page windows + mnAutoScrollDelay = mnLineSize - 1; Invalidate(); } } -void ScPivotFieldWindow::NotifyCancelTracking() +void ScPivotFieldWindow::NotifyEndTracking( ScPivotFieldEndTracking eEndType ) { - if( mnInsCursorIndex != PIVOTFIELD_INVALID ) - { + if( eEndType != ENDTRACKING_DROP ) mnFirstVisIndex = mnOldFirstVisIndex; - NotifyEndTracking(); + if( eEndType != ENDTRACKING_SUSPEND ) + { + mnOldFirstVisIndex = PIVOTFIELD_INVALID; + mbIsTrackingSource = false; } + mnInsCursorIndex = PIVOTFIELD_INVALID; + Invalidate(); } // protected ------------------------------------------------------------------ @@ -477,13 +470,13 @@ void ScPivotFieldWindow::Paint( const Rectangle& /*rRect*/ ) // draw the background and all fields DrawBackground( aVirDev ); - for( size_t nFieldIndex = mnFirstVisIndex, nLastIndex = GetLastVisibleIndex( mnFirstVisIndex ); nFieldIndex <= nLastIndex; ++nFieldIndex ) + for( size_t nFieldIndex = mnFirstVisIndex, nEndIndex = mnFirstVisIndex + mnPageSize; nFieldIndex < nEndIndex; ++nFieldIndex ) DrawField( aVirDev, nFieldIndex ); DrawInsertionCursor( aVirDev ); DrawBitmap( Point( 0, 0 ), aVirDev.GetBitmap( Point( 0, 0 ), GetSizePixel() ) ); // draw field text focus - if( HasFocus() && !maFields.empty() && (mnFirstVisIndex <= mnSelectIndex) && (mnSelectIndex <= GetLastVisibleIndex( mnFirstVisIndex )) ) + if( HasFocus() && (mnSelectIndex < maFields.size()) && (mnFirstVisIndex <= mnSelectIndex) && (mnSelectIndex < mnFirstVisIndex + mnPageSize) ) { long nFieldWidth = maFieldSize.Width(); long nSelectionWidth = Min( GetTextWidth( maFields[ mnSelectIndex ].maFieldName ) + 4, nFieldWidth - 6 ); @@ -495,16 +488,15 @@ void ScPivotFieldWindow::Paint( const Rectangle& /*rRect*/ ) // update scrollbar size_t nFieldCount = maFields.size(); - size_t nVisibleCount = mnColCount * mnRowCount; /* Already show the scrollbar if window is full but no fields are hidden (yet). This gives the user the hint that it is now possible to add more fields to the window. */ - mrScrollBar.Show( nFieldCount >= nVisibleCount ); - mrScrollBar.Enable( nFieldCount > nVisibleCount ); + mrScrollBar.Show( nFieldCount >= mnPageSize ); + mrScrollBar.Enable( nFieldCount > mnPageSize ); if( mrScrollBar.IsVisible() ) { - mrScrollBar.SetRange( Range( 0, static_cast< long >( nFieldCount ) ) ); - mrScrollBar.SetThumbPos( static_cast< long >( mnFirstVisIndex ) ); + mrScrollBar.SetRange( Range( 0, static_cast< long >( (nFieldCount - 1) / mnLineSize + 1 ) ) ); + mrScrollBar.SetThumbPos( static_cast< long >( mnFirstVisIndex / mnLineSize ) ); } /* Exclude empty fields from tab chain, but do not disable them. They need @@ -604,6 +596,8 @@ void ScPivotFieldWindow::MouseButtonDown( const MouseEvent& rMEvt ) if( rMEvt.GetClicks() == 1 ) { // one click: start tracking + mbIsTrackingSource = true; + mnOldFirstVisIndex = mnFirstVisIndex; mpDialog->NotifyStartTracking( *this ); } else @@ -660,18 +654,20 @@ uno::Reference< accessibility::XAccessible > ScPivotFieldWindow::CreateAccessibl // private -------------------------------------------------------------------- -size_t ScPivotFieldWindow::GetLastVisibleIndex( size_t nFirstVisIndex ) const +size_t ScPivotFieldWindow::RecalcVisibleIndex( size_t nSelectIndex ) const { - return maFields.empty() ? 0 : (::std::min< size_t >( nFirstVisIndex + mnColCount * mnRowCount, maFields.size() ) - 1); -} - -size_t ScPivotFieldWindow::GetFirstVisibleIndex( size_t nLastVisIndex ) const -{ - size_t nVisibleCount = mnColCount * mnRowCount; - return (nLastVisIndex >= nVisibleCount) ? (nLastVisIndex - nVisibleCount + 1) : 0; + // calculate a scrolling offset that shows the selected field + size_t nNewFirstVisIndex = mnFirstVisIndex; + if( nSelectIndex < nNewFirstVisIndex ) + nNewFirstVisIndex = static_cast< size_t >( (nSelectIndex / mnLineSize) * mnLineSize ); + else if( nSelectIndex >= nNewFirstVisIndex + mnPageSize ) + nNewFirstVisIndex = static_cast< size_t >( (nSelectIndex / mnLineSize + 1) * mnLineSize ) - mnPageSize; + // check if there are complete empty lines in the bottom/right + size_t nMaxFirstVisIndex = (maFields.size() <= mnPageSize) ? 0 : (((maFields.size() - 1) / mnLineSize + 1) * mnLineSize - mnPageSize); + return ::std::min( nNewFirstVisIndex, nMaxFirstVisIndex ); } -void ScPivotFieldWindow::SetSelection( size_t nSelectIndex, size_t nFirstVisIndex ) +void ScPivotFieldWindow::SetSelectionUnchecked( size_t nSelectIndex, size_t nFirstVisIndex ) { if( !maFields.empty() && (nSelectIndex < maFields.size()) ) { @@ -699,12 +695,8 @@ void ScPivotFieldWindow::SetSelection( size_t nSelectIndex, size_t nFirstVisInde void ScPivotFieldWindow::MoveSelection( size_t nSelectIndex ) { - size_t nNewFirstVisIndex = mnFirstVisIndex; - if( nSelectIndex < nNewFirstVisIndex ) - nNewFirstVisIndex = nSelectIndex; - else if( nSelectIndex > GetLastVisibleIndex( nNewFirstVisIndex ) ) - nNewFirstVisIndex = GetFirstVisibleIndex( nSelectIndex ); - SetSelection( nSelectIndex, nNewFirstVisIndex ); + if( nSelectIndex < maFields.size() ) + SetSelectionUnchecked( nSelectIndex, RecalcVisibleIndex( nSelectIndex ) ); } void ScPivotFieldWindow::MoveSelection( MoveType eMoveType ) @@ -712,80 +704,38 @@ void ScPivotFieldWindow::MoveSelection( MoveType eMoveType ) if( maFields.empty() ) return; - // maximum valid field index size_t nLastIndex = maFields.size() - 1; - // maximum valid scroll offset - size_t nMaxFirstVisIndex = GetFirstVisibleIndex( nLastIndex ); - - // size of a line - size_t nLineSize = mbVertical ? mnRowCount : mnColCount; - // size of a page - size_t nPageSize = mnColCount * mnRowCount; - - // takes the new selected field size_t nNewSelectIndex = mnSelectIndex; - // takes the new first visible field - size_t nNewFirstVisIndex = mnFirstVisIndex; - - /* Replace "move line" with "move field" if line size is 1. This will - prevent that the cursor moves to first or last visible field. */ - if( nLineSize == 1 ) switch( eMoveType ) - { - case PREV_LINE: eMoveType = PREV_FIELD; break; - case NEXT_LINE: eMoveType = NEXT_FIELD; break; - default:; - } - switch( eMoveType ) { case PREV_FIELD: nNewSelectIndex = (nNewSelectIndex > 0) ? (nNewSelectIndex - 1) : 0; - // adjust scrolling position: try to show one field before new selected field - if( nNewSelectIndex <= nNewFirstVisIndex ) - nNewFirstVisIndex = (nNewSelectIndex > 0) ? (nNewSelectIndex - 1) : 0; break; case NEXT_FIELD: nNewSelectIndex = (nNewSelectIndex < nLastIndex) ? (nNewSelectIndex + 1) : nLastIndex; - // adjust scrolling position: try to show one field after new selected field - if( nNewSelectIndex >= GetLastVisibleIndex( nNewFirstVisIndex ) ) - nNewFirstVisIndex = ::std::min< size_t >( GetFirstVisibleIndex( nNewSelectIndex + 1 ), nMaxFirstVisIndex ); break; case PREV_LINE: - nNewSelectIndex = (nNewSelectIndex > nLineSize) ? (nNewSelectIndex - nLineSize) : 0; - // adjust scrolling position: scroll entire lines until field is visible - while( nNewSelectIndex < nNewFirstVisIndex ) - nNewFirstVisIndex = (nNewFirstVisIndex > nLineSize) ? (nNewFirstVisIndex - nLineSize) : 0; + nNewSelectIndex = (nNewSelectIndex > mnLineSize) ? (nNewSelectIndex - mnLineSize) : 0; break; case NEXT_LINE: - nNewSelectIndex = (nNewSelectIndex + nLineSize < nLastIndex) ? (nNewSelectIndex + nLineSize) : nLastIndex; - // adjust scrolling position: scroll entire lines until field is visible - while( nNewSelectIndex > GetLastVisibleIndex( nNewFirstVisIndex ) ) - nNewFirstVisIndex = ::std::min< size_t >( nNewFirstVisIndex + nLineSize, nMaxFirstVisIndex ); + nNewSelectIndex = (nNewSelectIndex + mnLineSize < nLastIndex) ? (nNewSelectIndex + mnLineSize) : nLastIndex; break; case PREV_PAGE: - nNewSelectIndex = (nNewSelectIndex > nPageSize) ? (nNewSelectIndex - nPageSize) : 0; - // adjust scrolling position: scroll entire page until field is visible - while( nNewSelectIndex < nNewFirstVisIndex ) - nNewFirstVisIndex = (nNewFirstVisIndex > nPageSize) ? (nNewFirstVisIndex - nPageSize) : 0; + nNewSelectIndex = (nNewSelectIndex > mnPageSize) ? (nNewSelectIndex - mnPageSize) : 0; break; case NEXT_PAGE: - nNewSelectIndex = (nNewSelectIndex + nPageSize < nLastIndex) ? (nNewSelectIndex + nPageSize) : nLastIndex; - // adjust scrolling position: scroll entire pages until field is visible - while( nNewSelectIndex > GetLastVisibleIndex( nNewFirstVisIndex ) ) - nNewFirstVisIndex = ::std::min< size_t >( nNewFirstVisIndex + nPageSize, nMaxFirstVisIndex ); + nNewSelectIndex = (nNewSelectIndex + mnPageSize < nLastIndex) ? (nNewSelectIndex + mnPageSize) : nLastIndex; break; case FIRST_FIELD: nNewSelectIndex = 0; - nNewFirstVisIndex = 0; break; case LAST_FIELD: nNewSelectIndex = nLastIndex; - nNewFirstVisIndex = nMaxFirstVisIndex; break; } - // SetSelection() redraws the control and updates the scrollbar - SetSelection( nNewSelectIndex, nNewFirstVisIndex ); + // SetSelectionUnchecked() redraws the control and updates the scrollbar + SetSelectionUnchecked( nNewSelectIndex, RecalcVisibleIndex( nNewSelectIndex ) ); } void ScPivotFieldWindow::MoveSelectedField( MoveType eMoveType ) @@ -850,7 +800,7 @@ void ScPivotFieldWindow::DrawBackground( OutputDevice& rDev ) void ScPivotFieldWindow::DrawField( OutputDevice& rDev, size_t nFieldIndex ) { - if( (nFieldIndex < maFields.size()) && (mnFirstVisIndex <= nFieldIndex) && (nFieldIndex <= GetLastVisibleIndex( mnFirstVisIndex )) ) + if( (nFieldIndex < maFields.size()) && (mnFirstVisIndex <= nFieldIndex) && (nFieldIndex < mnFirstVisIndex + mnPageSize) ) { // draw the button Point aFieldPos = GetFieldPosition( nFieldIndex ); @@ -887,7 +837,8 @@ void ScPivotFieldWindow::DrawField( OutputDevice& rDev, size_t nFieldIndex ) void ScPivotFieldWindow::DrawInsertionCursor( OutputDevice& rDev ) { - if( (mnInsCursorIndex <= maFields.size()) && (mnFirstVisIndex <= mnInsCursorIndex) && (mnInsCursorIndex <= GetLastVisibleIndex( mnFirstVisIndex ) + 1) ) + if( (mnInsCursorIndex <= maFields.size()) && (mnFirstVisIndex <= mnInsCursorIndex) && (mnInsCursorIndex <= mnFirstVisIndex + mnPageSize) && + (!mbIsTrackingSource || (mnInsCursorIndex < mnSelectIndex) || (mnInsCursorIndex > mnSelectIndex + 1)) ) { Color aTextColor = GetSettings().GetStyleSettings().GetButtonTextColor(); rDev.SetLineColor( aTextColor ); @@ -896,7 +847,7 @@ void ScPivotFieldWindow::DrawInsertionCursor( OutputDevice& rDev ) bool bVerticalCursor = mnColCount > 1; long nCursorLength = bVerticalCursor ? maFieldSize.Height() : maFieldSize.Width(); - bool bEndOfLastField = mnInsCursorIndex == mnFirstVisIndex + mnColCount * mnRowCount; + bool bEndOfLastField = mnInsCursorIndex == mnFirstVisIndex + mnPageSize; Point aMainLinePos = GetFieldPosition( bEndOfLastField ? (mnInsCursorIndex - 1) : mnInsCursorIndex ); if( bEndOfLastField ) (bVerticalCursor ? aMainLinePos.X() : aMainLinePos.Y()) += ((bVerticalCursor ? maFieldSize.Width() : maFieldSize.Height()) - CURSOR_WIDTH); @@ -938,9 +889,16 @@ IMPL_LINK( ScPivotFieldWindow, ScrollHdl, ScrollBar*, pScrollBar ) long nThumbPos = pScrollBar->GetThumbPos(); if( nThumbPos >= 0 ) { - size_t nNewFirstVisIndex = static_cast< size_t >( pScrollBar->GetThumbPos() ); - size_t nNewSelectIndex = ::std::min( ::std::max( mnSelectIndex, nNewFirstVisIndex ), GetLastVisibleIndex( nNewFirstVisIndex ) ); - SetSelection( nNewSelectIndex, nNewFirstVisIndex ); + size_t nNewFirstVisIndex = static_cast< size_t >( nThumbPos * mnLineSize ); + // keep the selection index on same relative position inside row/column + size_t nSelectLineOffset = mnSelectIndex % mnLineSize; + size_t nNewSelectIndex = mnSelectIndex; + if( nNewSelectIndex < nNewFirstVisIndex ) + nNewSelectIndex = nNewFirstVisIndex + nSelectLineOffset; + else if( nNewSelectIndex >= nNewFirstVisIndex + mnPageSize ) + nNewSelectIndex = nNewFirstVisIndex + mnPageSize - mnLineSize + nSelectLineOffset; + nNewSelectIndex = ::std::min( nNewSelectIndex, maFields.size() - 1 ); + SetSelectionUnchecked( nNewSelectIndex, nNewFirstVisIndex ); } GrabFocus(); return 0; diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 425a1ea29c27..c9854ff95907 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -309,6 +309,8 @@ String ScPivotLayoutDlg::GetFuncString( USHORT& rnFuncMask, bool bIsValue ) void ScPivotLayoutDlg::NotifyStartTracking( ScPivotFieldWindow& rSourceWindow ) { mpTrackingWindow = &rSourceWindow; + mpDropWindow = 0; + rSourceWindow.NotifyStartTracking(); StartTracking( STARTTRACK_BUTTONREPEAT ); SetPointer( Pointer( rSourceWindow.GetDropPointerStyle() ) ); } @@ -397,42 +399,46 @@ void ScPivotLayoutDlg::Tracking( const TrackingEvent& rTEvt ) if( pTargetWindow && (pTargetWindow->GetType() == PIVOTFIELDTYPE_SELECT) ) pTargetWindow = 0; - // remove insertion cursor in old field window, if visible - if( mpDropWindow && (mpDropWindow != pTargetWindow) ) - mpDropWindow->NotifyCancelTracking(); - // draw insertion cursor in current field window - if( pTargetWindow ) - pTargetWindow->NotifyTracking( rDialogPos - pTargetWindow->GetPosPixel() ); - mpDropWindow = pTargetWindow; + // notify windows about tracking + if( mpDropWindow != pTargetWindow ) + { + // tracking window changed + if( mpDropWindow ) + mpDropWindow->NotifyEndTracking( ENDTRACKING_SUSPEND ); + if( pTargetWindow ) + pTargetWindow->NotifyStartTracking(); + mpDropWindow = pTargetWindow; + } + if( mpDropWindow ) + mpDropWindow->NotifyTracking( rDialogPos - pTargetWindow->GetPosPixel() ); // end tracking: move or remove field if( rTEvt.IsTrackingEnded() ) { - if( pTargetWindow ) + bool bCancelled = rTEvt.IsTrackingCanceled(); + if( mpDropWindow ) { - if( rTEvt.IsTrackingCanceled() ) - { - pTargetWindow->NotifyCancelTracking(); - } - else + mpDropWindow->NotifyEndTracking( bCancelled ? ENDTRACKING_CANCEL : ENDTRACKING_DROP ); + if( !bCancelled ) { - pTargetWindow->NotifyEndTracking(); - size_t nInsertIndex = pTargetWindow->GetDropIndex( rDialogPos - pTargetWindow->GetPosPixel() ); - bool bMoved = MoveField( *mpTrackingWindow, *pTargetWindow, nInsertIndex, true ); + size_t nInsertIndex = mpDropWindow->GetDropIndex( rDialogPos - mpDropWindow->GetPosPixel() ); + bool bMoved = MoveField( *mpTrackingWindow, *mpDropWindow, nInsertIndex, true ); // focus drop window, if move was successful, otherwise back to source window - GrabFieldFocus( bMoved ? *pTargetWindow : *mpTrackingWindow ); + GrabFieldFocus( bMoved ? *mpDropWindow : *mpTrackingWindow ); } } else { // drop target invalid (outside field windows): remove tracked field - if( !rTEvt.IsTrackingCanceled() ) + if( !bCancelled ) mpTrackingWindow->RemoveSelectedField(); // focus source window (or another window, if it is empty now) GrabFieldFocus( *mpTrackingWindow ); } eTargetPointer = POINTER_ARROW; - mpTrackingWindow = 0; + if( mpTrackingWindow != mpDropWindow ) + mpTrackingWindow->NotifyEndTracking( ENDTRACKING_CANCEL ); + mpTrackingWindow = mpDropWindow = 0; } SetPointer( eTargetPointer ); } diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx index 3918b6761081..65dd07d19e8a 100644 --- a/sc/source/ui/inc/fieldwnd.hxx +++ b/sc/source/ui/inc/fieldwnd.hxx @@ -58,6 +58,14 @@ enum ScPivotFieldType PIVOTFIELDTYPE_SELECT /// Selection window with all fields. }; +/** Type of an end tracking event. */ +enum ScPivotFieldEndTracking +{ + ENDTRACKING_SUSPEND, /// Stop tracking in this window, but tracking still active (in another window). + ENDTRACKING_CANCEL, /// Tracking has been cancelled. + ENDTRACKING_DROP /// Tracking has ended, a field has been dropped. +}; + // ============================================================================ typedef ::std::pair< const ScPivotFuncData*, size_t > ScPivotFuncDataEntry; @@ -145,12 +153,12 @@ public: /** Moves the selected field in front of the specified field. */ bool MoveSelectedField( size_t nInsertIndex ); - /** Inserts an insertion cursor used for field tracking. */ + /** Called from dialog when tracking starts in this field window. */ + void NotifyStartTracking(); + /** Called from dialog while tracking in this field window. */ void NotifyTracking( const Point& rWindowPos ); - /** Hides the insertion cursor used for field tracking. */ - void NotifyEndTracking(); - /** Hides the insertion cursor used for field tracking and restores original scroll position. */ - void NotifyCancelTracking(); + /** Called from dialog when tracking ends in this field window. */ + void NotifyEndTracking( ScPivotFieldEndTracking eEndType ); protected: virtual void Paint( const Rectangle& rRect ); @@ -180,13 +188,12 @@ private: /** Specifies how the selection cursor can move in the window. */ enum MoveType { PREV_FIELD, NEXT_FIELD, PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE, FIRST_FIELD, LAST_FIELD }; - /** Returns the index of the last existing and visible field for the passed scrolling offset. */ - size_t GetLastVisibleIndex( size_t nFirstVisIndex ) const; - /** Returns the scrolling offset needed to show the specified field as last field. */ - size_t GetFirstVisibleIndex( size_t nLastVisIndex ) const; + /** Calculates a scroll position to make the passed field visible. Tries to + stick to current scroll position if possible. */ + size_t RecalcVisibleIndex( size_t nSelectIndex ) const; - /** Sets selection to the specified field and adjusts scrolling position. */ - void SetSelection( size_t nSelectIndex, size_t nFirstVisIndex ); + /** Sets selection to the specified field and changes scrolling position. */ + void SetSelectionUnchecked( size_t nSelectIndex, size_t nFirstVisIndex ); /** Selects a field and adjusts scrolling position to make the field visible. */ void MoveSelection( size_t nSelectIndex ); /** Sets selection to a new position relative to current. */ @@ -229,12 +236,15 @@ private: PointerStyle meDropPointer; /// Mouse pointer style for tracking over this window. size_t mnColCount; /// Number of field columns. size_t mnRowCount; /// Number of field rows. + size_t mnLineSize; /// Number of fields per line (depending on scrolling orientation). + size_t mnPageSize; /// Number of visible fields. size_t mnFirstVisIndex; /// Index of first visible field (scrolling offset). size_t mnSelectIndex; /// Currently selected field. size_t mnInsCursorIndex; /// Position of the insertion cursor. size_t mnOldFirstVisIndex; /// Stores original scroll position during auto scrolling. size_t mnAutoScrollDelay; /// Initial counter before auto scrolling starts on tracking. bool mbVertical; /// True = sort fields vertically. + bool mbIsTrackingSource; /// True = this field window is the source while tracking. }; // ============================================================================ -- cgit From 44bc040a04d38b01ccf168443922a1f442238c07 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Fri, 4 Feb 2011 09:59:59 +0100 Subject: native359: #i116797# improve msi database --- solenv/bin/modules/installer/globals.pm | 4 + solenv/bin/modules/installer/windows/directory.pm | 69 +++++++ solenv/bin/modules/installer/windows/file.pm | 232 +++++++++++++++------- solenv/bin/modules/installer/windows/idtglobal.pm | 22 +- 4 files changed, 255 insertions(+), 72 deletions(-) diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 144cf4c88a4b..45cb30a94cab 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -374,6 +374,10 @@ BEGIN %spellcheckerlanguagehash = (); %spellcheckerfilehash = (); $registryrootcomponent = ""; + %allcomponents = (); + %allcomponents_in_this_database = (); + %allshortcomponents = (); + %alluniquedirectorynames = (); $installlocationdirectory = ""; $installlocationdirectoryset = 0; diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm index ba6f9a3b75bd..c1ddd95cbe99 100644 --- a/solenv/bin/modules/installer/windows/directory.pm +++ b/solenv/bin/modules/installer/windows/directory.pm @@ -76,6 +76,59 @@ sub overwrite_programfilesfolder } } +############################################################## +# Maximum length of directory name is 72. +# Taking care of underlines, which are the separator. +############################################################## + +sub make_short_dir_version +{ + my ($longstring, $length, $displayname) = @_; + + my $shortstring = ""; + my $infoline = ""; + my $savestring = $longstring; + + # Splitting the string at each "underline" and allowing only $length characters per directory name. + # Checking also uniqueness and length. + + my $stringarray = installer::converter::convert_stringlist_into_array_without_newline(\$longstring, "_"); + + foreach my $onestring ( @{$stringarray} ) + { + my $partstring = ""; + + if ( $onestring =~ /\-/ ) + { + my $localstringarray = installer::converter::convert_stringlist_into_array_without_newline(\$onestring, "-"); + foreach my $onelocalstring ( @{$localstringarray} ) + { + if ( length($onelocalstring) > $length ) { $onelocalstring = substr($onelocalstring, 0, $length); } + $partstring = $partstring . "-" . $onelocalstring; + } + $partstring =~ s/^\s*\-//; + } + else + { + if ( length($onestring) > $length ) { $partstring = substr($onestring, 0, $length); } + else { $partstring = $onestring; } + } + + $shortstring = $shortstring . "_" . $partstring; + } + + $shortstring =~ s/^\s*\_//; + + if ( length($shortstring) > 72 ) + { + my $shortlength = length($shortstring); + $infoline = "WARNING: Failed to create unique directory name with less than 72 characters: \"$displayname\" ($shortstring ($shortlength)).\n"; + push(@installer::globals::logfileinfo, $infoline); + } + + return $shortstring; +} + ############################################################## # Adding unique directory names to the directory collection ############################################################## @@ -101,6 +154,22 @@ sub create_unique_directorynames $uniquename =~ s/\_//g; # removing existing underlines $uniquename =~ s/\.//g; # removing dots in directoryname $uniquename =~ s/\Q$installer::globals::separator\E/\_/g; # replacing slash and backslash with underline + $uniquename =~ s/OpenOffice/OO/g; + $uniquename =~ s/_registry/_rgy/g; + $uniquename =~ s/_registration/_rgn/g; + $uniquename =~ s/_extension/_ext/g; + $uniquename =~ s/_frame/_frm/g; + $uniquename =~ s/_table/_tbl/g; + + my $startlength = 5; + $uniquename = make_short_dir_version($uniquename, $startlength, $hostname); # taking care of underlines! + + if ( exists($installer::globals::alluniquedirectorynames{$uniquename}) ) + { + installer::exiter::exit_program("ERROR: Failed to create unique directory name for \"$hostname\".", "create_unique_directorynames"); + } + + $installer::globals::alluniquedirectorynames{$uniquename} = 1; my $uniqueparentname = $uniquename; diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm index 10666be7460c..b679d8b46e2b 100644 --- a/solenv/bin/modules/installer/windows/file.pm +++ b/solenv/bin/modules/installer/windows/file.pm @@ -170,6 +170,40 @@ sub assign_sequencenumbers_to_files } } +######################################################### +# Create a shorter version of a long component name, +# because maximum length in msi database is 72. +# Attention: In multi msi installation sets, the short +# names have to be unique over all packages, because +# this string is used to create the globally unique id +# -> no resetting of +# %installer::globals::allshortcomponents +# after a package was created. +######################################################### + +sub generate_new_short_componentname +{ + my ($componentname) = @_; + + my $shortcomponentname = ""; + my $counter = 1; + + my $startversion = substr($componentname, 0, 60); # taking only the first 60 characters + $startversion = $startversion . "_"; + + $shortcomponentname = $startversion . $counter; + + while ( exists($installer::globals::allshortcomponents{$shortcomponentname}) ) + { + $counter++; + $shortcomponentname = $startversion . $counter; + } + + $installer::globals::allshortcomponents{$shortcomponentname} = 1; + + return $shortcomponentname; +} + ############################################### # Generating the component name from a file ############################################### @@ -178,77 +212,139 @@ sub get_file_component_name { my ($fileref, $filesref) = @_; - # In this function exists the rule to create components from files - # Rule: - # Two files get the same componentid, if: - # both have the same destination directory. - # both have the same "gid" -> both were packed in the same zip file - # All other files are included into different components! - - # my $componentname = $fileref->{'gid'} . "_" . $fileref->{'Dir'}; - - # $fileref->{'Dir'} is not sufficient! All files in a zip file have the same $fileref->{'Dir'}, - # but can be in different subdirectories. - # Solution: destination=share\Scripts\beanshell\Capitalise\capitalise.bsh - # in which the filename (capitalise.bsh) has to be removed and all backslashes (slashes) are - # converted into underline. - - my $destination = $fileref->{'destination'}; - installer::pathanalyzer::get_path_from_fullqualifiedname(\$destination); - $destination =~ s/\s//g; - $destination =~ s/\\/\_/g; - $destination =~ s/\//\_/g; - $destination =~ s/\_\s*$//g; # removing ending underline - - my $componentname = $fileref->{'gid'} . "__" . $destination; - - # Files with different languages, need to be packed into different components. - # Then the installation of the language specific component is determined by a language condition. - - if ( $fileref->{'ismultilingual'} ) - { - my $officelanguage = $fileref->{'specificlanguage'}; - $componentname = $componentname . "_" . $officelanguage; - } - - $componentname = lc($componentname); # componentnames always lowercase - - $componentname =~ s/\-/\_/g; # converting "-" to "_" - $componentname =~ s/\./\_/g; # converting "-" to "_" - - # Attention: Maximum length for the componentname is 72 - - $componentname =~ s/gid_file_/g_f_/g; - $componentname =~ s/_extra_/_e_/g; - $componentname =~ s/_config_/_c_/g; - $componentname =~ s/_org_openoffice_/_o_o_/g; - $componentname =~ s/_program_/_p_/g; - $componentname =~ s/_typedetection_/_td_/g; - $componentname =~ s/_linguistic_/_l_/g; - $componentname =~ s/_module_/_m_/g; - $componentname =~ s/_optional_/_opt_/g; - $componentname =~ s/_packages/_pack/g; - $componentname =~ s/_menubar/_mb/g; - $componentname =~ s/_common_/_cm_/g; - $componentname =~ s/_export_/_exp_/g; - $componentname =~ s/_table_/_tb_/g; - $componentname =~ s/_sofficecfg_/_sc_/g; - $componentname =~ s/_startmodulecommands_/_smc_/g; - $componentname =~ s/_drawimpresscommands_/_dic_/g; - $componentname =~ s/_basiccommands_/_bac_/g; - $componentname =~ s/_basicidecommands_/_baic_/g; - $componentname =~ s/_genericcommands_/_genc_/g; - $componentname =~ s/_bibliographycommands_/_bibc_/g; - $componentname =~ s/_share_/_s_/g; - $componentname =~ s/_modules_/_ms_/g; - $componentname =~ s/_uiconfig_zip_/_ucz_/g; - $componentname =~ s/_soffice_cfg_/_sc_/g; - - # All this is not necessary for files, which have the flag ASSIGNCOMPOMENT + my $componentname = ""; + + # Special handling for files with ASSIGNCOMPOMENT my $styles = ""; if ( $fileref->{'Styles'} ) { $styles = $fileref->{'Styles'}; } - if ( $styles =~ /\bASSIGNCOMPOMENT\b/ ) { $componentname = get_component_from_assigned_file($fileref->{'AssignComponent'}, $filesref); } + if ( $styles =~ /\bASSIGNCOMPOMENT\b/ ) + { + $componentname = get_component_from_assigned_file($fileref->{'AssignComponent'}, $filesref); + } + else + { + # In this function exists the rule to create components from files + # Rule: + # Two files get the same componentid, if: + # both have the same destination directory. + # both have the same "gid" -> both were packed in the same zip file + # All other files are included into different components! + + # my $componentname = $fileref->{'gid'} . "_" . $fileref->{'Dir'}; + + # $fileref->{'Dir'} is not sufficient! All files in a zip file have the same $fileref->{'Dir'}, + # but can be in different subdirectories. + # Solution: destination=share\Scripts\beanshell\Capitalise\capitalise.bsh + # in which the filename (capitalise.bsh) has to be removed and all backslashes (slashes) are + # converted into underline. + + my $destination = $fileref->{'destination'}; + installer::pathanalyzer::get_path_from_fullqualifiedname(\$destination); + $destination =~ s/\s//g; + $destination =~ s/\\/\_/g; + $destination =~ s/\//\_/g; + $destination =~ s/\_\s*$//g; # removing ending underline + + $componentname = $fileref->{'gid'} . "__" . $destination; + + # Files with different languages, need to be packed into different components. + # Then the installation of the language specific component is determined by a language condition. + + if ( $fileref->{'ismultilingual'} ) + { + my $officelanguage = $fileref->{'specificlanguage'}; + $componentname = $componentname . "_" . $officelanguage; + } + + $componentname = lc($componentname); # componentnames always lowercase + + $componentname =~ s/\-/\_/g; # converting "-" to "_" + $componentname =~ s/\./\_/g; # converting "-" to "_" + + # Attention: Maximum length for the componentname is 72 + # %installer::globals::allcomponents_in_this_database : resetted for each database + # %installer::globals::allcomponents : not resetted for each database + # Component strings must be unique for the complete product, because they are used for + # the creation of the globally unique identifier. + + my $fullname = $componentname; # This can be longer than 72 + + if (( exists($installer::globals::allcomponents{$fullname}) ) && ( ! exists($installer::globals::allcomponents_in_this_database{$fullname}) )) + { + # This is not allowed: One component cannot be installed with different packages. + installer::exiter::exit_program("ERROR: Component \"$fullname\" is already included into another package. This is not allowed.", "get_file_component_name"); + } + + if ( exists($installer::globals::allcomponents{$fullname}) ) + { + $componentname = $installer::globals::allcomponents{$fullname}; + } + else + { + if ( length($componentname) > 72 ) + { + # Using md5sum needs much time + # chomp(my $shorter = `echo $componentname | md5sum | sed -e "s/ .*//g"`); + # $componentname = "comp_$shorter"; + $componentname = generate_new_short_componentname($componentname); # This has to be unique for the complete product, not only one package + } + + $installer::globals::allcomponents{$fullname} = $componentname; + $installer::globals::allcomponents_in_this_database{$fullname} = 1; + } + + # $componentname =~ s/gid_file_/g_f_/g; + # $componentname =~ s/_extra_/_e_/g; + # $componentname =~ s/_config_/_c_/g; + # $componentname =~ s/_org_openoffice_/_o_o_/g; + # $componentname =~ s/_program_/_p_/g; + # $componentname =~ s/_typedetection_/_td_/g; + # $componentname =~ s/_linguistic_/_l_/g; + # $componentname =~ s/_module_/_m_/g; + # $componentname =~ s/_optional_/_opt_/g; + # $componentname =~ s/_packages/_pack/g; + # $componentname =~ s/_menubar/_mb/g; + # $componentname =~ s/_common_/_cm_/g; + # $componentname =~ s/_export_/_exp_/g; + # $componentname =~ s/_table_/_tb_/g; + # $componentname =~ s/_sofficecfg_/_sc_/g; + # $componentname =~ s/_soffice_cfg_/_sc_/g; + # $componentname =~ s/_startmodulecommands_/_smc_/g; + # $componentname =~ s/_drawimpresscommands_/_dic_/g; + # $componentname =~ s/_basiccommands_/_bac_/g; + # $componentname =~ s/_basicidecommands_/_baic_/g; + # $componentname =~ s/_genericcommands_/_genc_/g; + # $componentname =~ s/_bibliographycommands_/_bibc_/g; + # $componentname =~ s/_gentiumbookbasicbolditalic_/_gbbbi_/g; + # $componentname =~ s/_share_/_s_/g; + # $componentname =~ s/_extension_/_ext_/g; + # $componentname =~ s/_extensions_/_exs_/g; + # $componentname =~ s/_modules_/_ms_/g; + # $componentname =~ s/_uiconfig_zip_/_ucz_/g; + # $componentname =~ s/_productivity_/_pr_/g; + # $componentname =~ s/_wizard_/_wz_/g; + # $componentname =~ s/_import_/_im_/g; + # $componentname =~ s/_javascript_/_js_/g; + # $componentname =~ s/_template_/_tpl_/g; + # $componentname =~ s/_tplwizletter_/_twl_/g; + # $componentname =~ s/_beanshell_/_bs_/g; + # $componentname =~ s/_presentation_/_bs_/g; + # $componentname =~ s/_columns_/_cls_/g; + # $componentname =~ s/_python_/_py_/g; + + # $componentname =~ s/_tools/_ts/g; + # $componentname =~ s/_transitions/_trs/g; + # $componentname =~ s/_scriptbinding/_scrb/g; + # $componentname =~ s/_spreadsheet/_ssh/g; + # $componentname =~ s/_publisher/_pub/g; + # $componentname =~ s/_presenter/_pre/g; + # $componentname =~ s/_registry/_reg/g; + + # $componentname =~ s/screen/sc/g; + # $componentname =~ s/wordml/wm/g; + # $componentname =~ s/openoffice/oo/g; + } return $componentname; } diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm index 64dc2f34a12a..453464a3ae36 100644 --- a/solenv/bin/modules/installer/windows/idtglobal.pm +++ b/solenv/bin/modules/installer/windows/idtglobal.pm @@ -90,10 +90,8 @@ sub get_next_free_number } until (!($alreadyexists)); - if (( $counter > 9 ) && ( length($name) > 6 )) - { - $dontsave = 1; - } + if (( $counter > 9 ) && ( length($name) > 6 )) { $dontsave = 1; } + if (( $counter > 99 ) && ( length($name) > 5 )) { $dontsave = 1; } if (!($dontsave)) { @@ -192,6 +190,14 @@ sub make_eight_three_conform $name =~ s/\s*$//; # removing ending whitespaces $name = $name . "\~"; $number = get_next_free_number($name, $shortnamesref); + + if ( $number > 99 ) + { + $name = substr($name, 0, 4); # name, offset, length + $name =~ s/\s*$//; # removing ending whitespaces + $name = $name . "\~"; + $number = get_next_free_number($name, $shortnamesref); + } } $name = $name . "$number"; @@ -224,6 +230,14 @@ sub make_eight_three_conform $name =~ s/\s*$//; # removing ending whitespaces $name = $name . "\~"; $number = get_next_free_number($name, $shortnamesref); + + if ( $number > 99 ) + { + $name = substr($name, 0, 4); # name, offset, length + $name =~ s/\s*$//; # removing ending whitespaces + $name = $name . "\~"; + $number = get_next_free_number($name, $shortnamesref); + } } $name = $name . "$number"; -- cgit From ac2741f0361ea516ffe8ead57a6e43665ec99937 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Feb 2011 10:11:33 +0100 Subject: gridsort: need another include after the rebase to m99 --- svtools/source/table/tablecontrol_impl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index edf2dbd01491..5cad1526aac1 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -43,7 +43,7 @@ #include /** === end UNO includes === **/ -#include +#include #include #include #include -- cgit From 7bafb42bf101d13ab336221652124376661f1d05 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Fri, 4 Feb 2011 12:59:11 +0100 Subject: chart52: cleanup unused legend entry stuff in preparation of issue #i82802# --- chart2/source/model/main/Legend.cxx | 48 ------- chart2/source/model/main/Legend.hxx | 19 --- .../model/template/BubbleChartTypeTemplate.cxx | 2 - .../model/template/StockChartTypeTemplate.cxx | 1 - chart2/source/view/charttypes/AreaChart.cxx | 4 +- chart2/source/view/charttypes/AreaChart.hxx | 2 +- chart2/source/view/charttypes/BubbleChart.cxx | 2 +- chart2/source/view/charttypes/BubbleChart.hxx | 2 +- chart2/source/view/charttypes/CandleStickChart.cxx | 2 +- chart2/source/view/charttypes/CandleStickChart.hxx | 2 +- chart2/source/view/charttypes/VSeriesPlotter.cxx | 33 +---- chart2/source/view/inc/LegendEntryProvider.hxx | 59 +++++++-- chart2/source/view/inc/VLegendSymbolFactory.hxx | 4 +- chart2/source/view/inc/VSeriesPlotter.hxx | 24 +--- chart2/source/view/main/VLegend.cxx | 13 +- chart2/source/view/main/VLegendSymbolFactory.cxx | 140 +++++++-------------- 16 files changed, 112 insertions(+), 245 deletions(-) mode change 100644 => 100755 chart2/source/model/main/Legend.hxx diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index 64fb39f91b65..a7c2ab86f5c1 100755 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -207,58 +207,10 @@ Legend::Legend( const Legend & rOther ) : ::property::OPropertySet( rOther, m_aMutex ), m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()) { - CloneHelper::CloneRefVector< Reference< chart2::XLegendEntry > >( rOther.m_aLegendEntries, m_aLegendEntries ); - ModifyListenerHelper::addListenerToAllElements( m_aLegendEntries, m_xModifyEventForwarder ); } Legend::~Legend() { - try - { - ModifyListenerHelper::removeListenerFromAllElements( m_aLegendEntries, m_xModifyEventForwarder ); - } - catch( const uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); - } -} - -// ____ XLegend ____ -void SAL_CALL Legend::registerEntry( const Reference< chart2::XLegendEntry >& xEntry ) - throw (lang::IllegalArgumentException, - uno::RuntimeException) -{ - if( ::std::find( m_aLegendEntries.begin(), - m_aLegendEntries.end(), - xEntry ) != m_aLegendEntries.end()) - throw lang::IllegalArgumentException(); - - m_aLegendEntries.push_back( xEntry ); - ModifyListenerHelper::addListener( xEntry, m_xModifyEventForwarder ); - fireModifyEvent(); -} - -void SAL_CALL Legend::revokeEntry( const Reference< chart2::XLegendEntry >& xEntry ) - throw (container::NoSuchElementException, - uno::RuntimeException) -{ - tLegendEntries::iterator aIt( - ::std::find( m_aLegendEntries.begin(), - m_aLegendEntries.end(), - xEntry )); - - if( aIt == m_aLegendEntries.end()) - throw container::NoSuchElementException(); - - m_aLegendEntries.erase( aIt ); - ModifyListenerHelper::removeListener( xEntry, m_xModifyEventForwarder ); - fireModifyEvent(); -} - -Sequence< Reference< chart2::XLegendEntry > > SAL_CALL Legend::getEntries() - throw (uno::RuntimeException) -{ - return ContainerHelper::ContainerToSequence( m_aLegendEntries ); } // ____ XCloneable ____ diff --git a/chart2/source/model/main/Legend.hxx b/chart2/source/model/main/Legend.hxx old mode 100644 new mode 100755 index 6b645828f4c1..56c41db2e38a --- a/chart2/source/model/main/Legend.hxx +++ b/chart2/source/model/main/Legend.hxx @@ -97,20 +97,6 @@ protected: // const ::com::sun::star::uno::Any& rValue ) // throw (::com::sun::star::lang::IllegalArgumentException); - // ____ XLegend ____ - virtual void SAL_CALL registerEntry( const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XLegendEntry >& xEntry ) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL revokeEntry( const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XLegendEntry >& xEntry ) - throw (::com::sun::star::container::NoSuchElementException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XLegendEntry > > SAL_CALL getEntries() - throw (::com::sun::star::uno::RuntimeException); - // ____ XCloneable ____ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() throw (::com::sun::star::uno::RuntimeException); @@ -140,11 +126,6 @@ protected: void fireModifyEvent(); private: - typedef ::std::vector< - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XLegendEntry > > tLegendEntries; - - tLegendEntries m_aLegendEntries; ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder; }; diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx index e0e37e2c825a..bb7e4ab68d98 100755 --- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx +++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx @@ -36,8 +36,6 @@ #include "servicenames_charttypes.hxx" #include "ContainerHelper.hxx" #include "DataSeriesHelper.hxx" -#include -#include #include #include "PropertyHelper.hxx" #include diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx index b265561eca90..3f82f5b7bf68 100755 --- a/chart2/source/model/template/StockChartTypeTemplate.cxx +++ b/chart2/source/model/template/StockChartTypeTemplate.cxx @@ -39,7 +39,6 @@ #include "ContainerHelper.hxx" #include "AxisIndexDefines.hxx" #include -#include #include #include #include diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index 06e09d60fcf1..f07189615781 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -152,8 +152,8 @@ bool AreaChart::isSeperateStackingForDifferentSigns( sal_Int32 /*nDimensionIndex LegendSymbolStyle AreaChart::getLegendSymbolStyle() { if( m_bArea || m_nDimension == 3 ) - return chart2::LegendSymbolStyle_BOX; - return chart2::LegendSymbolStyle_LINE_WITH_SYMBOL; + return LegendSymbolStyle_BOX; + return LegendSymbolStyle_LINE_WITH_SYMBOL; } uno::Any AreaChart::getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex ) diff --git a/chart2/source/view/charttypes/AreaChart.hxx b/chart2/source/view/charttypes/AreaChart.hxx index 4b6ff3f45251..972d97fa75ac 100644 --- a/chart2/source/view/charttypes/AreaChart.hxx +++ b/chart2/source/view/charttypes/AreaChart.hxx @@ -71,7 +71,7 @@ public: //------------------------------------------------------------------------- - virtual ::com::sun::star::chart2::LegendSymbolStyle getLegendSymbolStyle(); + virtual LegendSymbolStyle getLegendSymbolStyle(); virtual ::com::sun::star::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex=-1/*-1 for series symbol*/ ); //------------------------------------------------------------------------- diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index 0cbcff33bfcd..3dbbc0eaf3e2 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -175,7 +175,7 @@ bool BubbleChart::isSeperateStackingForDifferentSigns( sal_Int32 /*nDimensionInd LegendSymbolStyle BubbleChart::getLegendSymbolStyle() { - return chart2::LegendSymbolStyle_CIRCLE; + return LegendSymbolStyle_CIRCLE; } drawing::Direction3D BubbleChart::getPreferredDiagramAspectRatio() const diff --git a/chart2/source/view/charttypes/BubbleChart.hxx b/chart2/source/view/charttypes/BubbleChart.hxx index ed3d9e051cc4..f94fe9e367e7 100644 --- a/chart2/source/view/charttypes/BubbleChart.hxx +++ b/chart2/source/view/charttypes/BubbleChart.hxx @@ -61,7 +61,7 @@ public: //------------------------------------------------------------------------- - virtual ::com::sun::star::chart2::LegendSymbolStyle getLegendSymbolStyle(); + virtual LegendSymbolStyle getLegendSymbolStyle(); //------------------------------------------------------------------------- //------------------------------------------------------------------------- diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx index 61c49c61d4a0..3ce3cf661d5d 100644 --- a/chart2/source/view/charttypes/CandleStickChart.cxx +++ b/chart2/source/view/charttypes/CandleStickChart.cxx @@ -86,7 +86,7 @@ bool CandleStickChart::isSeperateStackingForDifferentSigns( sal_Int32 /* nDimens LegendSymbolStyle CandleStickChart::getLegendSymbolStyle() { - return chart2::LegendSymbolStyle_VERTICAL_LINE; + return LegendSymbolStyle_VERTICAL_LINE; } //----------------------------------------------------------------- diff --git a/chart2/source/view/charttypes/CandleStickChart.hxx b/chart2/source/view/charttypes/CandleStickChart.hxx index 6fbf980058e7..df9531ec71bf 100644 --- a/chart2/source/view/charttypes/CandleStickChart.hxx +++ b/chart2/source/view/charttypes/CandleStickChart.hxx @@ -59,7 +59,7 @@ public: //------------------------------------------------------------------------- - virtual ::com::sun::star::chart2::LegendSymbolStyle getLegendSymbolStyle(); + virtual LegendSymbolStyle getLegendSymbolStyle(); //------------------------------------------------------------------------- //------------------------------------------------------------------------- diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 6d3562b10af9..85963fc46cb4 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1818,13 +1818,13 @@ bool VSeriesPlotter::shouldSnapRectToUsedArea() return true; } -Sequence< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntries( +std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries( ::com::sun::star::chart::ChartLegendExpansion eLegendExpansion , const Reference< beans::XPropertySet >& xTextProperties , const Reference< drawing::XShapes >& xTarget , const Reference< lang::XMultiServiceFactory >& xShapeFactory , const Reference< uno::XComponentContext >& xContext - ) throw (uno::RuntimeException) + ) { std::vector< ViewLegendEntry > aResult; @@ -1880,22 +1880,15 @@ Sequence< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntries( } } } - - //add charttype specific entries if any - { - std::vector< ViewLegendEntry > aChartTypeEntries( this->createLegendEntriesForChartType( - xTextProperties, xTarget, xShapeFactory, xContext ) ); - aResult.insert( aResult.end(), aChartTypeEntries.begin(), aChartTypeEntries.end() ); - } } - return ::chart::ContainerHelper::ContainerToSequence( aResult ); + return aResult; } LegendSymbolStyle VSeriesPlotter::getLegendSymbolStyle() { - return chart2::LegendSymbolStyle_BOX; + return LegendSymbolStyle_BOX; } @@ -1920,10 +1913,8 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForSeries( // legend-symbol type switch( eLegendSymbolStyle ) { - case LegendSymbolStyle_HORIZONTAL_LINE: case LegendSymbolStyle_VERTICAL_LINE: case LegendSymbolStyle_DIAGONAL_LINE: - case LegendSymbolStyle_LINE_WITH_BOX: case LegendSymbolStyle_LINE_WITH_SYMBOL: ePropType = VLegendSymbolFactory::PROP_TYPE_LINE_SERIES; break; @@ -1954,10 +1945,8 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint( // legend-symbol type switch( eLegendSymbolStyle ) { - case LegendSymbolStyle_HORIZONTAL_LINE: case LegendSymbolStyle_VERTICAL_LINE: case LegendSymbolStyle_DIAGONAL_LINE: - case LegendSymbolStyle_LINE_WITH_BOX: case LegendSymbolStyle_LINE_WITH_SYMBOL: ePropType = VLegendSymbolFactory::PROP_TYPE_LINE_SERIES; break; @@ -1995,7 +1984,7 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint( return xShape; } -std::vector< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntriesForSeries( +std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( const VDataSeries& rSeries , const Reference< beans::XPropertySet >& xTextProperties , const Reference< drawing::XShapes >& xTarget @@ -2098,7 +2087,7 @@ std::vector< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntriesForSe // create the symbol Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( - xSymbolGroup, chart2::LegendSymbolStyle_DIAGONAL_LINE, xShapeFactory, + xSymbolGroup, LegendSymbolStyle_DIAGONAL_LINE, xShapeFactory, Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ), VLegendSymbolFactory::PROP_TYPE_LINE, uno::Any() )); @@ -2127,16 +2116,6 @@ std::vector< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntriesForSe return aResult; } -std::vector< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntriesForChartType( - const Reference< beans::XPropertySet >& /* xTextProperties */, - const Reference< drawing::XShapes >& /* xTarget */, - const Reference< lang::XMultiServiceFactory >& /* xShapeFactory */, - const Reference< uno::XComponentContext >& /* xContext */ - ) -{ - return std::vector< ViewLegendEntry >(); -} - VSeriesPlotter* VSeriesPlotter::createSeriesPlotter( const uno::Reference& xChartTypeModel , sal_Int32 nDimensionCount diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx b/chart2/source/view/inc/LegendEntryProvider.hxx index ddd4226f3d59..74b731cd9e55 100644 --- a/chart2/source/view/inc/LegendEntryProvider.hxx +++ b/chart2/source/view/inc/LegendEntryProvider.hxx @@ -27,21 +27,63 @@ #ifndef CHART2_VIEW_LEGENDENTRYPROVIDER_HXX #define CHART2_VIEW_LEGENDENTRYPROVIDER_HXX +#include #include - -#ifndef _COM_SUN_STAR_CHART2_VIEWLEGENDENTRYP_HPP_ -#include -#endif +#include +#include +#include +#include #include +#include + namespace chart { +enum LegendSymbolStyle +{ + /** A square box with border. + */ + LegendSymbolStyle_BOX, + + /** A line extending from the top edge to the bottom edge + */ + LegendSymbolStyle_VERTICAL_LINE, + + /** A line spanning the diagonal of the box you would get with + BOX. + */ + LegendSymbolStyle_DIAGONAL_LINE, + + /** A line like with a symbol. + */ + LegendSymbolStyle_LINE_WITH_SYMBOL, + + /** A bordered circle which has the same bounding-box as the + BOX. + */ + LegendSymbolStyle_CIRCLE +}; + +struct ViewLegendEntry +{ + /** The legend symbol that represents a data series or other + information contained in the legend + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape > aSymbol; + + /** The descriptive text for a legend entry. + */ + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XFormattedString > > aLabel; +}; + class LegendEntryProvider { public: - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::chart2::ViewLegendEntry > SAL_CALL createLegendEntries( + virtual std::vector< ViewLegendEntry > createLegendEntries( ::com::sun::star::chart::ChartLegendExpansion eLegendExpansion, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xTextProperties, @@ -51,10 +93,7 @@ public: ::com::sun::star::lang::XMultiServiceFactory >& xShapeFactory, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext - ) - throw (::com::sun::star::uno::RuntimeException) = 0; - -private: + ) = 0; }; } // namespace chart diff --git a/chart2/source/view/inc/VLegendSymbolFactory.hxx b/chart2/source/view/inc/VLegendSymbolFactory.hxx index a568a9ef4a85..3dc42f7c207a 100644 --- a/chart2/source/view/inc/VLegendSymbolFactory.hxx +++ b/chart2/source/view/inc/VLegendSymbolFactory.hxx @@ -27,7 +27,7 @@ #ifndef CHART2_VLEGENDSYMBOLFACTORY_HXX #define CHART2_VLEGENDSYMBOLFACTORY_HXX -#include +#include "LegendEntryProvider.hxx" #include #include #include @@ -52,7 +52,7 @@ public: createSymbol( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > xSymbolContainer, - ::com::sun::star::chart2::LegendSymbolStyle eStyle, + LegendSymbolStyle eStyle, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xShapeFactory, const ::com::sun::star::uno::Reference< diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx index 232fc8663a77..cf4d5073b775 100644 --- a/chart2/source/view/inc/VSeriesPlotter.hxx +++ b/chart2/source/view/inc/VSeriesPlotter.hxx @@ -33,7 +33,6 @@ #include "MinimumAndMaximumSupplier.hxx" #include "LegendEntryProvider.hxx" #include "ExplicitCategoriesProvider.hxx" -#include #include #include @@ -207,8 +206,7 @@ public: //------------------------------------------------------------------------- //------------------------------------------------------------------------- - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::chart2::ViewLegendEntry > SAL_CALL createLegendEntries( + virtual std::vector< ViewLegendEntry > createLegendEntries( ::com::sun::star::chart::ChartLegendExpansion eLegendExpansion, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xTextProperties, @@ -218,11 +216,10 @@ public: ::com::sun::star::lang::XMultiServiceFactory >& xShapeFactory, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext - ) - throw (::com::sun::star::uno::RuntimeException); + ); - virtual ::com::sun::star::chart2::LegendSymbolStyle getLegendSymbolStyle(); + virtual LegendSymbolStyle getLegendSymbolStyle(); virtual ::com::sun::star::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex=-1/*-1 for series symbol*/ ); ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > createLegendSymbolForSeries( @@ -236,8 +233,7 @@ public: , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget , const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xShapeFactory ); - virtual std::vector< - ::com::sun::star::chart2::ViewLegendEntry > SAL_CALL createLegendEntriesForSeries( + virtual std::vector< ViewLegendEntry > createLegendEntriesForSeries( const VDataSeries& rSeries, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xTextProperties, @@ -249,18 +245,6 @@ public: ::com::sun::star::uno::XComponentContext >& xContext ); - virtual std::vector< - ::com::sun::star::chart2::ViewLegendEntry > SAL_CALL createLegendEntriesForChartType( - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet >& xTextProperties, - const ::com::sun::star::uno::Reference< - ::com::sun::star::drawing::XShapes >& xTarget, - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >& xShapeFactory, - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XComponentContext >& xContext - ); - //------------------------------------------------------------------------- //------------------------------------------------------------------------- diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index f78a102d50b1..4751d2ccd879 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -794,14 +794,6 @@ awt::Point lcl_calculatePositionAndRemainingSpace( return aResult; } -template< class T > -void lcl_appendSeqToVector( const Sequence< T > & rSource, ::std::vector< T > & rDest ) -{ - const sal_Int32 nCount = rSource.getLength(); - for( sal_Int32 i = 0; i < nCount; ++i ) - rDest.push_back( rSource[ i ] ); -} - bool lcl_shouldSymbolsBePlacedOnTheLeftSide( const Reference< beans::XPropertySet >& xLegendProp, sal_Int16 nDefaultWritingMode ) { bool bSymbolsLeftSide = true; @@ -962,9 +954,8 @@ void VLegend::createShapes( LegendEntryProvider* pLegendEntryProvider( *aIter ); if( pLegendEntryProvider ) { - lcl_appendSeqToVector< ViewLegendEntry >( - pLegendEntryProvider->createLegendEntries( eExpansion, xLegendProp, xLegendContainer, m_xShapeFactory, m_xContext ) - , aViewEntries ); + std::vector< ViewLegendEntry > aNewEntries = pLegendEntryProvider->createLegendEntries( eExpansion, xLegendProp, xLegendContainer, m_xShapeFactory, m_xContext ); + aViewEntries.insert( aViewEntries.end(), aNewEntries.begin(), aNewEntries.end() ); } } } diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index d29b28e8dbe9..633ecb768021 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -106,7 +106,7 @@ namespace chart Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( const Reference< drawing::XShapes > xSymbolContainer, - chart2::LegendSymbolStyle eStyle, + LegendSymbolStyle eStyle, const Reference< lang::XMultiServiceFactory > & xShapeFactory, const Reference< beans::XPropertySet > & xLegendEntryProperties, tPropertyType ePropertyType, const uno::Any& rExplicitSymbol ) @@ -131,23 +131,17 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( // add an invisible square box to maintain aspect ratio switch( eStyle ) { - case chart2::LegendSymbolStyle_BOX: - case chart2::LegendSymbolStyle_HORIZONTAL_LINE: - case chart2::LegendSymbolStyle_VERTICAL_LINE: - case chart2::LegendSymbolStyle_DIAGONAL_LINE: - case chart2::LegendSymbolStyle_LINE_WITH_BOX: - case chart2::LegendSymbolStyle_LINE_WITH_SYMBOL: - case chart2::LegendSymbolStyle_CIRCLE: + case LegendSymbolStyle_BOX: + case LegendSymbolStyle_VERTICAL_LINE: + case LegendSymbolStyle_DIAGONAL_LINE: + case LegendSymbolStyle_LINE_WITH_SYMBOL: + case LegendSymbolStyle_CIRCLE: { Reference< drawing::XShape > xBound( ShapeFactory(xShapeFactory).createInvisibleRectangle( xResultGroup, aBoundSize )); break; } - case chart2::LegendSymbolStyle_BAR: - case chart2::LegendSymbolStyle_RECTANGLE: - case chart2::LegendSymbolStyle_STRETCHED_RECTANGLE: - case chart2::LegendSymbolStyle_USER_DEFINED: default: break; } @@ -155,17 +149,14 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( // create symbol switch( eStyle ) { - case chart2::LegendSymbolStyle_BOX: - case chart2::LegendSymbolStyle_BAR: - case chart2::LegendSymbolStyle_RECTANGLE: - case chart2::LegendSymbolStyle_STRETCHED_RECTANGLE: - case chart2::LegendSymbolStyle_CIRCLE: + case LegendSymbolStyle_BOX: + case LegendSymbolStyle_CIRCLE: { try { Reference< drawing::XShape > xShape; - if( eStyle == chart2::LegendSymbolStyle_CIRCLE ) + if( eStyle == LegendSymbolStyle_CIRCLE ) xShape.set( xShapeFactory->createInstance( C2U( "com.sun.star.drawing.EllipseShape" )), uno::UNO_QUERY ); else @@ -175,8 +166,8 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( if( xShape.is()) { xResultGroup->add( xShape ); - if( eStyle == chart2::LegendSymbolStyle_BOX || - eStyle == chart2::LegendSymbolStyle_CIRCLE ) + if( eStyle == LegendSymbolStyle_BOX || + eStyle == LegendSymbolStyle_CIRCLE ) { xShape->setSize( awt::Size( 2000, 2000 )); xShape->setPosition( awt::Point( 500, 0 )); @@ -211,30 +202,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( break; } - case chart2::LegendSymbolStyle_HORIZONTAL_LINE: - { - try - { - Reference< drawing::XShape > xLine( - xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.LineShape" )), uno::UNO_QUERY ); - if( xLine.is()) - { - xResultGroup->add( xLine ); - xLine->setSize( awt::Size( 3000, 0 )); - xLine->setPosition( awt::Point( 0, 1000 )); - - lcl_setPropetiesToShape( xLegendEntryProperties, xLine, ePropertyType ); // PROP_TYPE_LINE_SERIES ); - } - } - catch( uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); - } - break; - } - - case chart2::LegendSymbolStyle_VERTICAL_LINE: + case LegendSymbolStyle_VERTICAL_LINE: { try { @@ -257,7 +225,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( break; } - case chart2::LegendSymbolStyle_DIAGONAL_LINE: + case LegendSymbolStyle_DIAGONAL_LINE: { try { @@ -280,10 +248,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( break; } - case chart2::LegendSymbolStyle_LINE_WITH_BOX: - bUseBox = true; - // fall-through intended - case chart2::LegendSymbolStyle_LINE_WITH_SYMBOL: + case LegendSymbolStyle_LINE_WITH_SYMBOL: try { Reference< drawing::XShape > xLine( @@ -300,56 +265,38 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( Reference< drawing::XShape > xSymbol; const sal_Int32 nSize = 1500; - if( bUseBox ) + chart2::Symbol aSymbol; + if( rExplicitSymbol >>= aSymbol ) { - xSymbol.set( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.RectangleShape" )), uno::UNO_QUERY ); - xResultGroup->add( xSymbol ); - - if( xSymbol.is()) + drawing::Direction3D aSymbolSize( nSize, nSize, 0 ); + drawing::Position3D aPos( 1500, 1000, 0 ); + ShapeFactory aFactory( xShapeFactory ); + if( aSymbol.Style == chart2::SymbolStyle_STANDARD ) { - xSymbol->setSize( awt::Size( nSize, nSize )); - xSymbol->setPosition( awt::Point( 1500 - nSize/2, 1000 - nSize/2 )); - - lcl_setPropetiesToShape( xLegendEntryProperties, xSymbol, ePropertyType ); + // take series color as fill color + xLegendEntryProperties->getPropertyValue( C2U("Color")) >>= aSymbol.FillColor; + // border of symbols always same as fill color + aSymbol.BorderColor = aSymbol.FillColor; + + xSymbol.set( aFactory.createSymbol2D( + xResultGroup, + aPos, + aSymbolSize, + aSymbol.StandardSymbol, + aSymbol.BorderColor, + aSymbol.FillColor )); } - } - else - { - chart2::Symbol aSymbol; - - if( rExplicitSymbol >>= aSymbol ) + else if( aSymbol.Style == chart2::SymbolStyle_GRAPHIC ) { - drawing::Direction3D aSymbolSize( nSize, nSize, 0 ); - drawing::Position3D aPos( 1500, 1000, 0 ); - ShapeFactory aFactory( xShapeFactory ); - if( aSymbol.Style == chart2::SymbolStyle_STANDARD ) - { - // take series color as fill color - xLegendEntryProperties->getPropertyValue( C2U("Color")) >>= aSymbol.FillColor; - // border of symbols always same as fill color - aSymbol.BorderColor = aSymbol.FillColor; - - xSymbol.set( aFactory.createSymbol2D( - xResultGroup, - aPos, - aSymbolSize, - aSymbol.StandardSymbol, - aSymbol.BorderColor, - aSymbol.FillColor )); - } - else if( aSymbol.Style == chart2::SymbolStyle_GRAPHIC ) - { - xSymbol.set( aFactory.createGraphic2D( - xResultGroup, - aPos, - aSymbolSize, - aSymbol.Graphic )); - } - else if( aSymbol.Style == chart2::SymbolStyle_AUTO ) - { - DBG_ERROR("the given parameter is not allowed to contain an automatic symbol style"); - } + xSymbol.set( aFactory.createGraphic2D( + xResultGroup, + aPos, + aSymbolSize, + aSymbol.Graphic )); + } + else if( aSymbol.Style == chart2::SymbolStyle_AUTO ) + { + DBG_ERROR("the given parameter is not allowed to contain an automatic symbol style"); } } } @@ -359,9 +306,6 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( } break; - case chart2::LegendSymbolStyle_USER_DEFINED: - break; - default: // just to remove warning (there is an auto-generated extra label) break; -- cgit From 05f7c9b0bac8a15200337f9b40775fec38a877ff Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Fri, 4 Feb 2011 12:59:11 +0100 Subject: chart52: cleanup unused legend entry stuff in preparation of issue #i82802# --- offapi/com/sun/star/chart2/CustomLegendEntry.idl | 50 ---------- offapi/com/sun/star/chart2/LegendSymbolStyle.idl | 107 --------------------- offapi/com/sun/star/chart2/ViewLegendEntry.idl | 58 ----------- offapi/com/sun/star/chart2/XLegend.idl | 33 ------- offapi/com/sun/star/chart2/XLegendEntry.idl | 30 ------ .../com/sun/star/chart2/XLegendSymbolProvider.idl | 35 ------- offapi/com/sun/star/chart2/makefile.mk | 4 - 7 files changed, 317 deletions(-) delete mode 100644 offapi/com/sun/star/chart2/CustomLegendEntry.idl delete mode 100644 offapi/com/sun/star/chart2/LegendSymbolStyle.idl delete mode 100644 offapi/com/sun/star/chart2/ViewLegendEntry.idl delete mode 100644 offapi/com/sun/star/chart2/XLegendEntry.idl delete mode 100644 offapi/com/sun/star/chart2/XLegendSymbolProvider.idl diff --git a/offapi/com/sun/star/chart2/CustomLegendEntry.idl b/offapi/com/sun/star/chart2/CustomLegendEntry.idl deleted file mode 100644 index 9668eaf90de4..000000000000 --- a/offapi/com/sun/star/chart2/CustomLegendEntry.idl +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef com_sun_star_chart_CustomLegendEntry_idl -#define com_sun_star_chart_CustomLegendEntry_idl - -#include -#include - -module com -{ -module sun -{ -module star -{ -module chart2 -{ - -/** A legend entry that does not depend on data series or other chart - objects. It may contain any text a user specifies. - */ -service CustomLegendEntry -{ - /** Is used to identify an object as one that may be shown in a - legend. - */ - interface XLegendEntry; - - /** Is used to display a legend text - */ - interface XTitled; - - /** If the legend entry should contain a user-defined symbol, you - have to implement this interface. - */ - [optional] interface XLegendSymbolProvider; - - /** must be supported, if properties are implemented - */ - [optional] service ::com::sun::star::beans::XPropertySet; - - /** determines what kind of symbol is displayed next to the entry - in the legend. - */ - [optional, property] LegendSymbolStyle SymbolStyle; -}; - -} ; // chart2 -} ; // com -} ; // sun -} ; // star - -#endif diff --git a/offapi/com/sun/star/chart2/LegendSymbolStyle.idl b/offapi/com/sun/star/chart2/LegendSymbolStyle.idl deleted file mode 100644 index 13d47ee3a7c9..000000000000 --- a/offapi/com/sun/star/chart2/LegendSymbolStyle.idl +++ /dev/null @@ -1,107 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef com_sun_star_chart_LegendSymbolStyle_idl -#define com_sun_star_chart_LegendSymbolStyle_idl - -#include - -#include - -module com -{ -module sun -{ -module star -{ -module chart2 -{ - -/** - */ -enum LegendSymbolStyle -{ - /** A square box with border. - */ - BOX, - - /** A rectangle that is wider than high with border. - */ - BAR, - - /** A square box with border, that may change its aspect ratio if - the layout of the legend requires this. - */ - RECTANGLE, - - /** A filled rectangle with no border that uses all the space - available for the legend entry's symbol, leaving no padding - space. This is especially useful for legends representing a - color-scale. - */ - STRETCHED_RECTANGLE, - - /** A line extending from the left edge to the right edge - */ - HORIZONTAL_LINE, - - /** A line extending from the top edge to the bottom edge - */ - VERTICAL_LINE, - - /** A line spanning the diagonal of the box you would get with - BOX. - */ - DIAGONAL_LINE, - - /** A line like with LINE, but with a small - bordered square box in the middle. - */ - LINE_WITH_BOX, - - /** A line like with LINE, but with the symbol - that is returned by XLegendEntry::getSymbol - (see also USER_DEFINED). - */ - LINE_WITH_SYMBOL, - - /** A bordered circle which has the same bounding-box as the - BOX. - */ - CIRCLE, - - /** Use the symbol that is returned by - XLegendEntry::getSymbol. - */ - USER_DEFINED -}; - -} ; // chart2 -} ; // com -} ; // sun -} ; // star - -#endif diff --git a/offapi/com/sun/star/chart2/ViewLegendEntry.idl b/offapi/com/sun/star/chart2/ViewLegendEntry.idl deleted file mode 100644 index 0e5ea231628c..000000000000 --- a/offapi/com/sun/star/chart2/ViewLegendEntry.idl +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - * 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). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef com_sun_star_chart2_ViewLegendEntry_idl -#define com_sun_star_chart2_ViewLegendEntry_idl - -#include -#include - -//============================================================================= - -module com { module sun { module star { module chart2 { - -//============================================================================= - -/** - */ -struct ViewLegendEntry -{ - /** The legend symbol that represents a data series or other - information contained in the legend - */ - ::com::sun::star::drawing::XShape aSymbol; - - /** The descriptive text for a legend entry. - */ - sequence< XFormattedString > aLabel; -}; - -//============================================================================= - -}; }; }; }; - -#endif - diff --git a/offapi/com/sun/star/chart2/XLegend.idl b/offapi/com/sun/star/chart2/XLegend.idl index 309aa148dd2a..1cc8666ef20d 100644 --- a/offapi/com/sun/star/chart2/XLegend.idl +++ b/offapi/com/sun/star/chart2/XLegend.idl @@ -3,15 +3,6 @@ #include -#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ -#include -#endif -#ifndef __com_sun_star_container_NoSuchElementException_idl__ -#include -#endif - -#include - module com { module sun @@ -25,30 +16,6 @@ module chart2 */ interface XLegend : ::com::sun::star::uno::XInterface { - /** The entry added is appended to the list, such that it appears - at the end of the legend. - - @param xEntry - - If it supports CustomLegendEntry, - the XTitle is used for displaying a text, and - the symbol is displayed according to the - CustomLegendEntry::SymbolStyle property. - */ - void registerEntry( [in] XLegendEntry xEntry ) - raises( com::sun::star::lang::IllegalArgumentException ); - - /** Removes an entry that was registered before - -

          (see registerEntry)

          - */ - void revokeEntry( [in] XLegendEntry xEntry ) - raises( com::sun::star::container::NoSuchElementException ); - - /** Returns a list of all legend entries in the order in which - they were registered. - */ - sequence< XLegendEntry > getEntries(); }; } ; // chart2 diff --git a/offapi/com/sun/star/chart2/XLegendEntry.idl b/offapi/com/sun/star/chart2/XLegendEntry.idl deleted file mode 100644 index 579c453dbd6a..000000000000 --- a/offapi/com/sun/star/chart2/XLegendEntry.idl +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef com_sun_star_chart_XLegendEntry_idl -#define com_sun_star_chart_XLegendEntry_idl - -#include - -#include "com/sun/star/chart2/XTitle.idl" -#include "com/sun/star/chart2/LegendSymbolStyle.idl" - -module com -{ -module sun -{ -module star -{ -module chart2 -{ - -/** Object type for Legend. - */ -interface XLegendEntry : ::com::sun::star::uno::XInterface -{ - // no methods, currently only used for type safety -}; - -} ; // chart2 -} ; // com -} ; // sun -} ; // star - -#endif diff --git a/offapi/com/sun/star/chart2/XLegendSymbolProvider.idl b/offapi/com/sun/star/chart2/XLegendSymbolProvider.idl deleted file mode 100644 index 56b2b082d317..000000000000 --- a/offapi/com/sun/star/chart2/XLegendSymbolProvider.idl +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef com_sun_star_chart_XLegendSymbolProvider_idl -#define com_sun_star_chart_XLegendSymbolProvider_idl - -#include -#include - -module com -{ -module sun -{ -module star -{ -module chart2 -{ - -/** - */ -interface XLegendSymbolProvider : ::com::sun::star::uno::XInterface -{ - /** The returned shape is used for display in the legend. It may - also be used for display at a data points. - -

          The shape returned here, will be resized using - XShape::setSize - to fit the available space in the legend.

          - */ - com::sun::star::drawing::XShape getSymbol(); -}; - -} ; // chart2 -} ; // com -} ; // sun -} ; // star - -#endif diff --git a/offapi/com/sun/star/chart2/makefile.mk b/offapi/com/sun/star/chart2/makefile.mk index 8017e187961c..873bb985d566 100644 --- a/offapi/com/sun/star/chart2/makefile.mk +++ b/offapi/com/sun/star/chart2/makefile.mk @@ -49,7 +49,6 @@ IDLFILES= \ IncrementData.idl \ InterpretedData.idl \ LegendPosition.idl \ - LegendSymbolStyle.idl \ LightSource.idl \ PieChartOffsetMode.idl \ RelativePosition.idl \ @@ -61,7 +60,6 @@ IDLFILES= \ SymbolStyle.idl \ TickmarkStyle.idl \ TransparencyStyle.idl \ - ViewLegendEntry.idl \ XAnyDescriptionAccess.idl\ XAxis.idl \ XCoordinateSystem.idl \ @@ -85,8 +83,6 @@ IDLFILES= \ XInternalDataProvider.idl \ XLabeled.idl \ XLegend.idl \ - XLegendEntry.idl \ - XLegendSymbolProvider.idl \ XRegressionCurve.idl \ XRegressionCurveCalculator.idl \ XRegressionCurveContainer.idl \ -- cgit From 68bcc92af3c308e9463799b5effbef09d54a9d62 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Fri, 4 Feb 2011 18:04:46 +0100 Subject: native359: #i116797# improve msi database --- instsetoo_native/util/openoffice.lst | 2 ++ solenv/bin/modules/installer/windows/directory.pm | 42 ++++++++++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst index eb036d6864ff..caf297c6c470 100644 --- a/instsetoo_native/util/openoffice.lst +++ b/instsetoo_native/util/openoffice.lst @@ -312,6 +312,7 @@ OpenOffice_SDK IGNOREDIRECTORYLAYER 1 NOVERSIONINDIRNAME 0 NOSPACEINDIRECTORYNAME 1 + NOSHORTDIRECTORYNAMES 1 CHANGETARGETDIR 1 DOWNLOADBANNER ooosdkbanner.bmp DOWNLOADBITMAP ooosdkbitmap.bmp @@ -364,6 +365,7 @@ OpenOffice_Dev_SDK IGNOREDIRECTORYLAYER 1 NOVERSIONINDIRNAME 0 NOSPACEINDIRECTORYNAME 1 + NOSHORTDIRECTORYNAMES 1 CHANGETARGETDIR 1 DOWNLOADBANNER ooosdkbanner.bmp DOWNLOADBITMAP ooosdkbitmap.bmp diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm index c1ddd95cbe99..f7b13747e3bf 100644 --- a/solenv/bin/modules/installer/windows/directory.pm +++ b/solenv/bin/modules/installer/windows/directory.pm @@ -135,14 +135,20 @@ sub make_short_dir_version sub create_unique_directorynames { - my ($directoryref) = @_; + my ($directoryref, $allvariables) = @_; $installer::globals::officeinstalldirectoryset = 0; + my %conversionhash = (); + my $infoline = ""; + my $errorcount = 0; + for ( my $i = 0; $i <= $#{$directoryref}; $i++ ) { my $onedir = ${$directoryref}[$i]; - my $uniquename = $onedir->{'HostName'}; + my $hostname = $onedir->{'HostName'}; + + my $uniquename = $hostname; my $styles = ""; if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; } # get_path_from_fullqualifiedname(\$uniqueparentname); @@ -160,17 +166,37 @@ sub create_unique_directorynames $uniquename =~ s/_extension/_ext/g; $uniquename =~ s/_frame/_frm/g; $uniquename =~ s/_table/_tbl/g; + $uniquename =~ s/_chart/_crt/g; my $startlength = 5; - $uniquename = make_short_dir_version($uniquename, $startlength, $hostname); # taking care of underlines! + + if ( ! $allvariables->{'NOSHORTDIRECTORYNAMES'} ) + { + # This process does not work for SDK, because of its long and similar pathes + $uniquename = make_short_dir_version($uniquename, $startlength, $hostname); # taking care of underlines! + } if ( exists($installer::globals::alluniquedirectorynames{$uniquename}) ) { - installer::exiter::exit_program("ERROR: Failed to create unique directory name for \"$hostname\".", "create_unique_directorynames"); + # This is an error, that must stop the packaging process + $errorcount++; + + $infoline = "$errorcount: Already existing unique directory: $uniquename\n"; + push( @installer::globals::logfileinfo, $infoline); + $infoline = "$errorcount: First full directory: $conversionhash{$uniquename}\n"; + push( @installer::globals::logfileinfo, $infoline); + $infoline = "$errorcount: Current full directory: $hostname\n"; + push( @installer::globals::logfileinfo, $infoline); } + $conversionhash{$uniquename} = $hostname; + $installer::globals::alluniquedirectorynames{$uniquename} = 1; + # Important: The unique parent is generated from the string $uniquename. Therefore counters + # like adding "_1" is not allowed to achive uniqueness, because this depends from other directories + # and does not deliver always the same result. + my $uniqueparentname = $uniquename; if ( $uniqueparentname =~ /^\s*(.*)\_(.*?)\s*$/ ) # the underline is now the separator @@ -216,6 +242,11 @@ sub create_unique_directorynames $installer::globals::vendordirectoryset = 1; } } + + if ( $errorcount > 0 ) + { + installer::exiter::exit_program("ERROR: Failed to create unique directory names.", "create_unique_directorynames"); + } } ##################################################### @@ -503,8 +534,9 @@ sub create_directory_table my $infoline; overwrite_programfilesfolder($allvariableshashref); - create_unique_directorynames($directoryref); if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1.log", $directoryref); } + create_unique_directorynames($directoryref, $allvariableshashref); + if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1a.log", $directoryref); } create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir! if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_2.log", $directoryref); } set_installlocation_directory($directoryref, $allvariableshashref); -- cgit From 34da9193218bfbbb036ffcc3fc3b26f2251403fb Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 7 Feb 2011 00:10:55 +0100 Subject: chart52: #i82802# bigger legend keys for lines and dashes --- chart2/source/view/charttypes/AreaChart.cxx | 4 +- chart2/source/view/charttypes/CandleStickChart.cxx | 2 +- chart2/source/view/charttypes/VSeriesPlotter.cxx | 167 +++++++++++---- chart2/source/view/inc/LegendEntryProvider.hxx | 14 +- chart2/source/view/inc/VLegendSymbolFactory.hxx | 8 +- chart2/source/view/inc/VSeriesPlotter.hxx | 14 +- chart2/source/view/main/VLegend.cxx | 117 ++++++----- chart2/source/view/main/VLegendSymbolFactory.cxx | 232 ++++++--------------- 8 files changed, 282 insertions(+), 276 deletions(-) mode change 100644 => 100755 chart2/source/view/charttypes/VSeriesPlotter.cxx diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index f07189615781..41bec1f9c331 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -48,9 +48,11 @@ #include #include #include + #include #include #include + #include #include #include @@ -153,7 +155,7 @@ LegendSymbolStyle AreaChart::getLegendSymbolStyle() { if( m_bArea || m_nDimension == 3 ) return LegendSymbolStyle_BOX; - return LegendSymbolStyle_LINE_WITH_SYMBOL; + return LegendSymbolStyle_LINE; } uno::Any AreaChart::getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex ) diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx index 3ce3cf661d5d..57d5a70e4080 100644 --- a/chart2/source/view/charttypes/CandleStickChart.cxx +++ b/chart2/source/view/charttypes/CandleStickChart.cxx @@ -86,7 +86,7 @@ bool CandleStickChart::isSeperateStackingForDifferentSigns( sal_Int32 /* nDimens LegendSymbolStyle CandleStickChart::getLegendSymbolStyle() { - return LegendSymbolStyle_VERTICAL_LINE; + return LegendSymbolStyle_LINE; } //----------------------------------------------------------------- diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx old mode 100644 new mode 100755 index 85963fc46cb4..4866191333ec --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -75,6 +75,7 @@ #include #include #include +#include #include #include @@ -107,7 +108,6 @@ VDataSeriesGroup::VDataSeriesGroup() , m_bMaxPointCountDirty(true) , m_nMaxPointCount(0) , m_aListOfCachedYValues() - { } @@ -461,13 +461,30 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re //------------------------------------------------ //prepare legend symbol + float fViewFontSize( 10.0 ); + { + uno::Reference< beans::XPropertySet > xProps( rDataSeries.getPropertiesOfPoint( nPointIndex ) ); + if( xProps.is() ) + xProps->getPropertyValue( C2U( "CharHeight" )) >>= fViewFontSize; + // pt -> 1/100th mm + fViewFontSize *= (2540.0 / 72.0); + } Reference< drawing::XShape > xSymbol; if(pLabel->ShowLegendSymbol) { + sal_Int32 nSymbolHeigth = static_cast< sal_Int32 >( fViewFontSize * 0.6 ); + awt::Size aCurrentRatio = this->getPreferredLegendKeyAspectRatio(); + sal_Int32 nSymbolWidth = aCurrentRatio.Width; + if( aCurrentRatio.Height > 0 ) + { + nSymbolWidth = nSymbolHeigth* aCurrentRatio.Width/aCurrentRatio.Height; + } + awt::Size aMaxSymbolExtent( nSymbolWidth, nSymbolHeigth ); + if( rDataSeries.isVaryColorsByPoint() ) - xSymbol.set( VSeriesPlotter::createLegendSymbolForPoint( rDataSeries, nPointIndex, xTarget_, m_xShapeFactory ) ); + xSymbol.set( VSeriesPlotter::createLegendSymbolForPoint( aMaxSymbolExtent, rDataSeries, nPointIndex, xTarget_, m_xShapeFactory ) ); else - xSymbol.set( VSeriesPlotter::createLegendSymbolForSeries( rDataSeries, xTarget_, m_xShapeFactory ) ); + xSymbol.set( VSeriesPlotter::createLegendSymbolForSeries( aMaxSymbolExtent, rDataSeries, xTarget_, m_xShapeFactory ) ); } //prepare text @@ -567,25 +584,14 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re const awt::Point aOldTextPos( xTextShape->getPosition() ); awt::Point aNewTextPos( aOldTextPos ); + awt::Point aSymbolPosition( aUnrotatedTextPos ); awt::Size aSymbolSize( xSymbol->getSize() ); awt::Size aTextSize( xTextShape->getSize() ); + sal_Int32 nXDiff = aSymbolSize.Width + static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.22 ) );//minimum 1mm if( !bMultiLineLabel || nLineCountForSymbolsize <= 0 ) nLineCountForSymbolsize = 1; - sal_Int32 nYDiff = aTextSize.Height/nLineCountForSymbolsize; - sal_Int32 nXDiff = aSymbolSize.Width * nYDiff/aSymbolSize.Height; - - // #i109336# Improve auto positioning in chart - nXDiff = nXDiff * 80 / 100; - nYDiff = nYDiff * 80 / 100; - - aSymbolSize.Width = nXDiff * 75/100; - aSymbolSize.Height = nYDiff * 75/100; - - awt::Point aSymbolPosition( aUnrotatedTextPos ); - - // #i109336# Improve auto positioning in chart - aSymbolPosition.Y += ( nYDiff / 4 ); + aSymbolPosition.Y += ((aTextSize.Height/nLineCountForSymbolsize)/4); if(LABEL_ALIGN_LEFT==eAlignment || LABEL_ALIGN_LEFT_TOP==eAlignment @@ -607,10 +613,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re aNewTextPos.X += nXDiff/2; } - xSymbol->setSize( aSymbolSize ); xSymbol->setPosition( aSymbolPosition ); - - //set position xTextShape->setPosition( aNewTextPos ); } } @@ -1819,7 +1822,8 @@ bool VSeriesPlotter::shouldSnapRectToUsedArea() } std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries( - ::com::sun::star::chart::ChartLegendExpansion eLegendExpansion + const awt::Size& rEntryKeyAspectRatio + , ::com::sun::star::chart::ChartLegendExpansion eLegendExpansion , const Reference< beans::XPropertySet >& xTextProperties , const Reference< drawing::XShapes >& xTarget , const Reference< lang::XMultiServiceFactory >& xShapeFactory @@ -1851,7 +1855,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries( if(!pSeries) continue; - std::vector< ViewLegendEntry > aSeriesEntries( this->createLegendEntriesForSeries( + std::vector< ViewLegendEntry > aSeriesEntries( this->createLegendEntriesForSeries( rEntryKeyAspectRatio, *pSeries, xTextProperties, xTarget, xShapeFactory, xContext ) ); //add series entries to the result now @@ -1885,12 +1889,102 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries( return aResult; } +::std::vector< VDataSeries* > VSeriesPlotter::getAllSeries() +{ + ::std::vector< VDataSeries* > aAllSeries; + ::std::vector< ::std::vector< VDataSeriesGroup > >::iterator aZSlotIter = m_aZSlots.begin(); + const ::std::vector< ::std::vector< VDataSeriesGroup > >::const_iterator aZSlotEnd = m_aZSlots.end(); + for( ; aZSlotIter != aZSlotEnd; aZSlotIter++ ) + { + ::std::vector< VDataSeriesGroup >::iterator aXSlotIter = aZSlotIter->begin(); + const ::std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = aZSlotIter->end(); + for( ; aXSlotIter != aXSlotEnd; aXSlotIter++ ) + { + ::std::vector< VDataSeries* > aSeriesList = aXSlotIter->m_aSeriesVector; + aAllSeries.insert( aAllSeries.end(), aSeriesList.begin(), aSeriesList.end() ); + } + } + return aAllSeries; +} + +bool VSeriesPlotter::HasDashedLines( const uno::Reference< beans::XPropertySet >& xProps ) +{ + bool bHasDashedLines = false; + drawing::LineStyle aLineStyle = drawing::LineStyle_NONE; + if( xProps.is() && ( xProps->getPropertyValue( C2U("LineStyle")) >>= aLineStyle ) && + ( aLineStyle == drawing::LineStyle_DASH ) ) + { + bHasDashedLines = true; + } + return bHasDashedLines; +} + +bool VSeriesPlotter::HasRegressionCurves( const VDataSeries& rSeries, bool& rbHasDashedLines ) +{ + bool bHasRegressionCurves = false; + Reference< XRegressionCurveContainer > xRegrCont( rSeries.getModel(), uno::UNO_QUERY ); + if( xRegrCont.is()) + { + Sequence< Reference< XRegressionCurve > > aCurves( xRegrCont->getRegressionCurves() ); + sal_Int32 i = 0, nCount = aCurves.getLength(); + for( i=0; i( aCurves[i], uno::UNO_QUERY ) ) ) + rbHasDashedLines = true; + } + } + } + return bHasRegressionCurves; +} LegendSymbolStyle VSeriesPlotter::getLegendSymbolStyle() { return LegendSymbolStyle_BOX; } +awt::Size VSeriesPlotter::getPreferredLegendKeyAspectRatio() +{ + awt::Size aRet(1000,1000); + if( m_nDimension==3 ) + return aRet; + + bool bSeriesHasLines = (getLegendSymbolStyle() == LegendSymbolStyle_LINE); + bool bHasLines = bSeriesHasLines; + bool bHasDashedLines = false; + ::std::vector< VDataSeries* > aAllSeries( getAllSeries() ); + ::std::vector< VDataSeries* >::const_iterator aSeriesIter = aAllSeries.begin(); + const ::std::vector< VDataSeries* >::const_iterator aSeriesEnd = aAllSeries.end(); + //iterate through all series + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + if( bSeriesHasLines && HasDashedLines( (*aSeriesIter)->getPropertiesOfSeries() ) ) + { + bHasDashedLines = true; + break; + } + bool bRegressionHasDashedLines=false; + if( VSeriesPlotter::HasRegressionCurves( **aSeriesIter, bRegressionHasDashedLines ) ) + { + bHasLines = true; + if( bRegressionHasDashedLines ) + { + bHasDashedLines = true; + break; + } + } + } + if( bHasLines ) + { + if( bHasDashedLines ) + aRet = awt::Size(1600,-1); + else + aRet = awt::Size(800,-1); + } + return aRet; +} uno::Any VSeriesPlotter::getExplicitSymbol( const VDataSeries& /*rSeries*/, sal_Int32 /*nPointIndex*/ ) { @@ -1898,7 +1992,8 @@ uno::Any VSeriesPlotter::getExplicitSymbol( const VDataSeries& /*rSeries*/, sal_ } Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForSeries( - const VDataSeries& rSeries + const awt::Size& rEntryKeyAspectRatio + , const VDataSeries& rSeries , const Reference< drawing::XShapes >& xTarget , const Reference< lang::XMultiServiceFactory >& xShapeFactory ) { @@ -1913,15 +2008,13 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForSeries( // legend-symbol type switch( eLegendSymbolStyle ) { - case LegendSymbolStyle_VERTICAL_LINE: - case LegendSymbolStyle_DIAGONAL_LINE: - case LegendSymbolStyle_LINE_WITH_SYMBOL: + case LegendSymbolStyle_LINE: ePropType = VLegendSymbolFactory::PROP_TYPE_LINE_SERIES; break; default: break; }; - Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( + Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, xTarget, eLegendSymbolStyle, xShapeFactory , rSeries.getPropertiesOfSeries(), ePropType, aExplicitSymbol )); @@ -1929,7 +2022,8 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForSeries( } Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint( - const VDataSeries& rSeries + const awt::Size& rEntryKeyAspectRatio + , const VDataSeries& rSeries , sal_Int32 nPointIndex , const Reference< drawing::XShapes >& xTarget , const Reference< lang::XMultiServiceFactory >& xShapeFactory ) @@ -1945,9 +2039,7 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint( // legend-symbol type switch( eLegendSymbolStyle ) { - case LegendSymbolStyle_VERTICAL_LINE: - case LegendSymbolStyle_DIAGONAL_LINE: - case LegendSymbolStyle_LINE_WITH_SYMBOL: + case LegendSymbolStyle_LINE: ePropType = VLegendSymbolFactory::PROP_TYPE_LINE_SERIES; break; default: @@ -1978,14 +2070,15 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint( } } - Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( + Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, xTarget, eLegendSymbolStyle, xShapeFactory, xPointSet, ePropType, aExplicitSymbol )); return xShape; } std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( - const VDataSeries& rSeries + const awt::Size& rEntryKeyAspectRatio + , const VDataSeries& rSeries , const Reference< beans::XPropertySet >& xTextProperties , const Reference< drawing::XShapes >& xTarget , const Reference< lang::XMultiServiceFactory >& xShapeFactory @@ -2014,7 +2107,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory(xShapeFactory).createGroup2D( xTarget )); // create the symbol - Reference< drawing::XShape > xShape( this->createLegendSymbolForPoint( + Reference< drawing::XShape > xShape( this->createLegendSymbolForPoint( rEntryKeyAspectRatio, rSeries, nIdx, xSymbolGroup, xShapeFactory ) ); // set CID to symbol for selection @@ -2044,7 +2137,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( // create the symbol Reference< drawing::XShape > xShape( this->createLegendSymbolForSeries( - rSeries, xSymbolGroup, xShapeFactory ) ); + rEntryKeyAspectRatio, rSeries, xSymbolGroup, xShapeFactory ) ); // set CID to symbol for selection if( xShape.is()) @@ -2086,8 +2179,8 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory(xShapeFactory).createGroup2D( xTarget )); // create the symbol - Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( - xSymbolGroup, LegendSymbolStyle_DIAGONAL_LINE, xShapeFactory, + Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio, + xSymbolGroup, LegendSymbolStyle_LINE, xShapeFactory, Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ), VLegendSymbolFactory::PROP_TYPE_LINE, uno::Any() )); diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx b/chart2/source/view/inc/LegendEntryProvider.hxx index 74b731cd9e55..1ecc78107d2b 100644 --- a/chart2/source/view/inc/LegendEntryProvider.hxx +++ b/chart2/source/view/inc/LegendEntryProvider.hxx @@ -46,18 +46,9 @@ enum LegendSymbolStyle */ LegendSymbolStyle_BOX, - /** A line extending from the top edge to the bottom edge - */ - LegendSymbolStyle_VERTICAL_LINE, - - /** A line spanning the diagonal of the box you would get with - BOX. - */ - LegendSymbolStyle_DIAGONAL_LINE, - /** A line like with a symbol. */ - LegendSymbolStyle_LINE_WITH_SYMBOL, + LegendSymbolStyle_LINE, /** A bordered circle which has the same bounding-box as the BOX. @@ -83,7 +74,10 @@ struct ViewLegendEntry class LegendEntryProvider { public: + virtual ::com::sun::star::awt::Size getPreferredLegendKeyAspectRatio()=0; + virtual std::vector< ViewLegendEntry > createLegendEntries( + const ::com::sun::star::awt::Size& rEntryKeyAspectRatio, ::com::sun::star::chart::ChartLegendExpansion eLegendExpansion, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xTextProperties, diff --git a/chart2/source/view/inc/VLegendSymbolFactory.hxx b/chart2/source/view/inc/VLegendSymbolFactory.hxx index 3dc42f7c207a..4ea3c67d5ece 100644 --- a/chart2/source/view/inc/VLegendSymbolFactory.hxx +++ b/chart2/source/view/inc/VLegendSymbolFactory.hxx @@ -50,6 +50,7 @@ public: static ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > createSymbol( + const ::com::sun::star::awt::Size& rEntryKeyAspectRatio, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > xSymbolContainer, LegendSymbolStyle eStyle, @@ -60,13 +61,6 @@ public: tPropertyType ePropertyType, const ::com::sun::star::uno::Any& rExplicitSymbol /*should contain a ::com::sun::star::chart2::Symbol without automatic symbol if the charttype does support symbols else empty*/); - enum tStockLineType - { - STOCK_LINE_TYPE_VERT, - STOCK_LINE_TYPE_OPEN, - STOCK_LINE_TYPE_CLOSE - }; - private: VLegendSymbolFactory(); }; diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx index cf4d5073b775..0360771ea606 100644 --- a/chart2/source/view/inc/VSeriesPlotter.hxx +++ b/chart2/source/view/inc/VSeriesPlotter.hxx @@ -207,6 +207,7 @@ public: //------------------------------------------------------------------------- virtual std::vector< ViewLegendEntry > createLegendEntries( + const ::com::sun::star::awt::Size& rEntryKeyAspectRatio, ::com::sun::star::chart::ChartLegendExpansion eLegendExpansion, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xTextProperties, @@ -220,20 +221,25 @@ public: virtual LegendSymbolStyle getLegendSymbolStyle(); + virtual com::sun::star::awt::Size getPreferredLegendKeyAspectRatio(); + virtual ::com::sun::star::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex=-1/*-1 for series symbol*/ ); ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > createLegendSymbolForSeries( - const VDataSeries& rSeries + const ::com::sun::star::awt::Size& rEntryKeyAspectRatio + , const VDataSeries& rSeries , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget , const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xShapeFactory ); ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > createLegendSymbolForPoint( - const VDataSeries& rSeries + const ::com::sun::star::awt::Size& rEntryKeyAspectRatio + , const VDataSeries& rSeries , sal_Int32 nPointIndex , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget , const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xShapeFactory ); virtual std::vector< ViewLegendEntry > createLegendEntriesForSeries( + const ::com::sun::star::awt::Size& rEntryKeyAspectRatio, const VDataSeries& rSeries, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xTextProperties, @@ -245,6 +251,10 @@ public: ::com::sun::star::uno::XComponentContext >& xContext ); + ::std::vector< VDataSeries* > getAllSeries(); + static bool HasDashedLines( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProps ); + static bool HasRegressionCurves( const VDataSeries& rSeries, bool& rbHasDashedLines ); + //------------------------------------------------------------------------- //------------------------------------------------------------------------- diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 4751d2ccd879..022de4f0305c 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -236,7 +236,7 @@ awt::Size lcl_createTextShapes( } void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns - , const ::std::vector< Reference< drawing::XShape > > aTextShapes, const awt::Size& aMaxSymbolExtent ) + , const ::std::vector< Reference< drawing::XShape > > aTextShapes, sal_Int32 nSymbolPlusDistanceWidth ) { rColumnWidths.clear(); sal_Int32 nRow = 0; @@ -250,7 +250,7 @@ void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal if( nEntry < nNumberOfEntries ) { awt::Size aTextSize( aTextShapes[ nEntry ]->getSize() ); - sal_Int32 nWidth = aMaxSymbolExtent.Width + aTextSize.Width; + sal_Int32 nWidth = nSymbolPlusDistanceWidth + aTextSize.Width; if( nRow==0 ) rColumnWidths.push_back( nWidth ); else @@ -306,38 +306,29 @@ awt::Size lcl_placeLegendEntries( tViewLegendEntryContainer & rEntries, ::com::sun::star::chart::ChartLegendExpansion eExpansion, bool bSymbolsLeftSide, - const Reference< beans::XPropertySet > & xProperties, + double fViewFontSize, + const awt::Size& rMaxSymbolExtent, tPropertyValues & rTextProperties, const Reference< drawing::XShapes > & xTarget, const Reference< lang::XMultiServiceFactory > & xShapeFactory, - const awt::Size & rAvailableSpace, - const awt::Size & rPageSize ) + const awt::Size & rAvailableSpace ) { bool bIsCustomSize = (eExpansion == ::com::sun::star::chart::ChartLegendExpansion_CUSTOM); awt::Size aResultingLegendSize(0,0); if( bIsCustomSize ) aResultingLegendSize = rAvailableSpace; - //todo - double fViewFontSize = lcl_CalcViewFontSize( xProperties, rPageSize ); - - // padding as percentage of the font height - // #i109336# Improve auto positioning in chart - double fXPadding = 0.1; - double fYPadding = 0.2; - double fXOffset = 0.15; - double fYOffset = 0.15; - - sal_Int32 nXPadding = static_cast< sal_Int32 >( fViewFontSize * fXPadding ); - sal_Int32 nYPadding = static_cast< sal_Int32 >( fViewFontSize * fYPadding ); - sal_Int32 nXOffset = static_cast< sal_Int32 >( fViewFontSize * fXOffset ); - sal_Int32 nYOffset = static_cast< sal_Int32 >( fViewFontSize * fYOffset ); // #i109336# Improve auto positioning in chart - double fSymbolSizeFraction = 0.8; - awt::Size aMaxSymbolExtent( static_cast< sal_Int32 >( fViewFontSize * fSymbolSizeFraction * 3.0 / 2.0 ), - static_cast< sal_Int32 >( fViewFontSize * fSymbolSizeFraction ) ); - - sal_Int32 nMaxTextWidth = rAvailableSpace.Width - (2 * nXOffset) - aMaxSymbolExtent.Width; + sal_Int32 nXPadding = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.33 ) ); + //sal_Int32 nXPadding = static_cast< sal_Int32 >( std::max( 200.0, fViewFontSize * 0.33 ) ); + sal_Int32 nXOffset = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.66 ) ); + sal_Int32 nYPadding = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.2 ) ); + sal_Int32 nYOffset = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.2 ) ); + //sal_Int32 nYOffset = static_cast< sal_Int32 >( std::max( 230.0, fViewFontSize * 0.45 ) ); + + const sal_Int32 nSymbolToTextDistance = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.22 ) );//minimum 1mm + const sal_Int32 nSymbolPlusDistanceWidth = rMaxSymbolExtent.Width + nSymbolToTextDistance; + sal_Int32 nMaxTextWidth = rAvailableSpace.Width - (2 * nXOffset) - nSymbolPlusDistanceWidth; rtl::OUString aPropNameTextMaximumFrameWidth( C2U("TextMaximumFrameWidth") ); uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, aPropNameTextMaximumFrameWidth); if(pFrameWidthAny) @@ -355,7 +346,7 @@ awt::Size lcl_placeLegendEntries( awt::Size aMaxEntryExtent = lcl_createTextShapes( rEntries, xShapeFactory, xTarget, aTextShapes, rTextProperties ); OSL_ASSERT( aTextShapes.size() == rEntries.size()); - sal_Int32 nMaxEntryWidth = 2 * nXOffset + aMaxSymbolExtent.Width + aMaxEntryExtent.Width; + sal_Int32 nMaxEntryWidth = 2 * nXOffset + nSymbolPlusDistanceWidth + aMaxEntryExtent.Width; sal_Int32 nMaxEntryHeight = nYOffset + aMaxEntryExtent.Height; sal_Int32 nNumberOfEntries = rEntries.size(); @@ -378,7 +369,7 @@ awt::Size lcl_placeLegendEntries( if( !xShape.is() ) continue; awt::Size aSize( xShape->getSize() ); - sal_Int32 nNewWidth = aSize.Width + aMaxSymbolExtent.Width; + sal_Int32 nNewWidth = aSize.Width + nSymbolPlusDistanceWidth; sal_Int32 nCurrentColumnCount = aColumnWidths.size(); //are we allowed to add a new column? @@ -562,7 +553,7 @@ awt::Size lcl_placeLegendEntries( if( eExpansion != ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) { - lcl_collectColumnWidths( aColumnWidths, nNumberOfRows, nNumberOfColumns, aTextShapes, aMaxSymbolExtent ); + lcl_collectColumnWidths( aColumnWidths, nNumberOfRows, nNumberOfColumns, aTextShapes, nSymbolPlusDistanceWidth ); lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes ); nTextLineHeight = lcl_getTextLineHeight( aRowHeights, nNumberOfRows, fViewFontSize ); } @@ -590,9 +581,9 @@ awt::Size lcl_placeLegendEntries( if( xTextShape.is() ) { awt::Size aTextSize( xTextShape->getSize() ); - sal_Int32 nTextXPos = nCurrentXPos + aMaxSymbolExtent.Width; + sal_Int32 nTextXPos = nCurrentXPos + nSymbolPlusDistanceWidth; if( !bSymbolsLeftSide ) - nTextXPos = nCurrentXPos - aMaxSymbolExtent.Width - aTextSize.Width; + nTextXPos = nCurrentXPos - nSymbolPlusDistanceWidth - aTextSize.Width; xTextShape->setPosition( awt::Point( nTextXPos, nCurrentYPos )); } @@ -600,27 +591,31 @@ awt::Size lcl_placeLegendEntries( Reference< drawing::XShape > xSymbol( rEntries[ nEntry ].aSymbol ); if( xSymbol.is() ) { - // Note: aspect ratio should always be 3:2 - // set symbol size to 75% of maximum space - awt::Size aSymbolSize( - aMaxSymbolExtent.Width * 75 / 100, - aMaxSymbolExtent.Height * 75 / 100 ); - xSymbol->setSize( aSymbolSize ); - sal_Int32 nSymbolXPos = nCurrentXPos + ((aMaxSymbolExtent.Width - aSymbolSize.Width) / 2); + awt::Size aSymbolSize( rMaxSymbolExtent ); + sal_Int32 nSymbolXPos = nCurrentXPos; if( !bSymbolsLeftSide ) - nSymbolXPos = nSymbolXPos - aMaxSymbolExtent.Width; - + nSymbolXPos = nCurrentXPos - rMaxSymbolExtent.Width; sal_Int32 nSymbolYPos = nCurrentYPos + ( ( nTextLineHeight - aSymbolSize.Height ) / 2 ); xSymbol->setPosition( awt::Point( nSymbolXPos, nSymbolYPos ) ); } - nCurrentYPos += aRowHeights[ nRow ] + nYOffset; + nCurrentYPos += aRowHeights[ nRow ]; + if( nRow+1 < nNumberOfRows ) + nCurrentYPos += nYOffset; nMaxYPos = ::std::max( nMaxYPos, nCurrentYPos ); } if( bSymbolsLeftSide ) - nCurrentXPos += ( aColumnWidths[nColumn] + nXOffset ); + { + nCurrentXPos += aColumnWidths[nColumn]; + if( nColumn+1 < nNumberOfColumns ) + nCurrentXPos += nXOffset; + } else - nCurrentXPos -= ( aColumnWidths[nColumn] + nXOffset ); + { + nCurrentXPos -= aColumnWidths[nColumn]; + if( nColumn+1 < nNumberOfColumns ) + nCurrentXPos -= nXOffset; + } } if( !bIsCustomSize ) @@ -945,27 +940,45 @@ void VLegend::createShapes( } // create entries - tViewLegendEntryContainer aViewEntries; + double fViewFontSize = lcl_CalcViewFontSize( xLegendProp, rPageSize );//todo + // #i109336# Improve auto positioning in chart + sal_Int32 nSymbolHeigth = static_cast< sal_Int32 >( fViewFontSize * 0.6 ); + sal_Int32 nSymbolWidth = static_cast< sal_Int32 >( nSymbolHeigth ); + + ::std::vector< LegendEntryProvider* >::const_iterator aIter = m_aLegendEntryProviderList.begin(); + const ::std::vector< LegendEntryProvider* >::const_iterator aEnd = m_aLegendEntryProviderList.end(); + for( aIter = m_aLegendEntryProviderList.begin(); aIter != aEnd; aIter++ ) { - ::std::vector< LegendEntryProvider* >::const_iterator aIter = m_aLegendEntryProviderList.begin(); - const ::std::vector< LegendEntryProvider* >::const_iterator aEnd = m_aLegendEntryProviderList.end(); - for( ; aIter != aEnd; aIter++ ) + LegendEntryProvider* pLegendEntryProvider( *aIter ); + if( pLegendEntryProvider ) { - LegendEntryProvider* pLegendEntryProvider( *aIter ); - if( pLegendEntryProvider ) + awt::Size aCurrentRatio = pLegendEntryProvider->getPreferredLegendKeyAspectRatio(); + sal_Int32 nCurrentWidth = aCurrentRatio.Width; + if( aCurrentRatio.Height > 0 ) { - std::vector< ViewLegendEntry > aNewEntries = pLegendEntryProvider->createLegendEntries( eExpansion, xLegendProp, xLegendContainer, m_xShapeFactory, m_xContext ); - aViewEntries.insert( aViewEntries.end(), aNewEntries.begin(), aNewEntries.end() ); + nCurrentWidth = nSymbolHeigth* aCurrentRatio.Width/aCurrentRatio.Height; } + nSymbolWidth = std::max( nSymbolWidth, nCurrentWidth ); + } + } + awt::Size aMaxSymbolExtent( nSymbolWidth, nSymbolHeigth ); + + tViewLegendEntryContainer aViewEntries; + for( aIter = m_aLegendEntryProviderList.begin(); aIter != aEnd; aIter++ ) + { + LegendEntryProvider* pLegendEntryProvider( *aIter ); + if( pLegendEntryProvider ) + { + std::vector< ViewLegendEntry > aNewEntries = pLegendEntryProvider->createLegendEntries( aMaxSymbolExtent, eExpansion, xLegendProp, xLegendContainer, m_xShapeFactory, m_xContext ); + aViewEntries.insert( aViewEntries.end(), aNewEntries.begin(), aNewEntries.end() ); } } bool bSymbolsLeftSide = lcl_shouldSymbolsBePlacedOnTheLeftSide( xLegendProp, m_nDefaultWritingMode ); // place entries - aLegendSize = lcl_placeLegendEntries( aViewEntries, eExpansion, bSymbolsLeftSide - , xLegendProp, aTextProperties, xLegendContainer, m_xShapeFactory - , aLegendSize, rPageSize ); + aLegendSize = lcl_placeLegendEntries( aViewEntries, eExpansion, bSymbolsLeftSide, fViewFontSize, aMaxSymbolExtent + , aTextProperties, xLegendContainer, m_xShapeFactory, aLegendSize ); if( xBorder.is() ) xBorder->setSize( aLegendSize ); diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 633ecb768021..35ad3b0234c8 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -38,9 +38,6 @@ // header for define DBG_ASSERT #include -// uncomment to disable line dashes at the border of boxes -// #define DISABLE_DASHES_AT_BORDER - using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -105,6 +102,7 @@ namespace chart { Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( + const awt::Size& rEntryKeyAspectRatio, const Reference< drawing::XShapes > xSymbolContainer, LegendSymbolStyle eStyle, const Reference< lang::XMultiServiceFactory > & xShapeFactory, @@ -113,8 +111,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( { Reference< drawing::XShape > xResult; - if( ! (xSymbolContainer.is() && - xShapeFactory.is())) + if( ! (xSymbolContainer.is() && xShapeFactory.is())) return xResult; xResult.set( xShapeFactory->createInstance( @@ -124,191 +121,94 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( if( ! xResultGroup.is()) return xResult; - // aspect ratio of symbols is always 3:2 - awt::Size aBoundSize( 3000, 2000 ); bool bUseBox = false; // add an invisible square box to maintain aspect ratio - switch( eStyle ) - { - case LegendSymbolStyle_BOX: - case LegendSymbolStyle_VERTICAL_LINE: - case LegendSymbolStyle_DIAGONAL_LINE: - case LegendSymbolStyle_LINE_WITH_SYMBOL: - case LegendSymbolStyle_CIRCLE: - { - Reference< drawing::XShape > xBound( ShapeFactory(xShapeFactory).createInvisibleRectangle( - xResultGroup, aBoundSize )); - break; - } - - default: - break; - } + Reference< drawing::XShape > xBound( ShapeFactory(xShapeFactory).createInvisibleRectangle( + xResultGroup, rEntryKeyAspectRatio )); // create symbol - switch( eStyle ) + try { - case LegendSymbolStyle_BOX: - case LegendSymbolStyle_CIRCLE: + if( eStyle == LegendSymbolStyle_LINE ) { - try + Reference< drawing::XShape > xLine( xShapeFactory->createInstance( + C2U( "com.sun.star.drawing.LineShape" )), uno::UNO_QUERY ); + if( xLine.is()) { - Reference< drawing::XShape > xShape; + xResultGroup->add( xLine ); + xLine->setSize( awt::Size( rEntryKeyAspectRatio.Width, 0 )); + xLine->setPosition( awt::Point( 0, rEntryKeyAspectRatio.Height/2 )); - if( eStyle == LegendSymbolStyle_CIRCLE ) - xShape.set( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.EllipseShape" )), uno::UNO_QUERY ); - else - xShape.set( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.RectangleShape" )), uno::UNO_QUERY ); + lcl_setPropetiesToShape( xLegendEntryProperties, xLine, ePropertyType ); + } - if( xShape.is()) + Reference< drawing::XShape > xSymbol; + const sal_Int32 nSize = std::min(rEntryKeyAspectRatio.Width,rEntryKeyAspectRatio.Height); + chart2::Symbol aSymbol; + if( rExplicitSymbol >>= aSymbol ) + { + drawing::Direction3D aSymbolSize( nSize, nSize, 0 ); + drawing::Position3D aPos( rEntryKeyAspectRatio.Width/2, rEntryKeyAspectRatio.Height/2, 0 ); + ShapeFactory aFactory( xShapeFactory ); + if( aSymbol.Style == chart2::SymbolStyle_STANDARD ) { - xResultGroup->add( xShape ); - if( eStyle == LegendSymbolStyle_BOX || - eStyle == LegendSymbolStyle_CIRCLE ) - { - xShape->setSize( awt::Size( 2000, 2000 )); - xShape->setPosition( awt::Point( 500, 0 )); - } - else - { - xShape->setSize( aBoundSize ); - } + // take series color as fill color + xLegendEntryProperties->getPropertyValue( C2U("Color")) >>= aSymbol.FillColor; + // border of symbols always same as fill color + aSymbol.BorderColor = aSymbol.FillColor; + + xSymbol.set( aFactory.createSymbol2D( + xResultGroup, + aPos, + aSymbolSize, + aSymbol.StandardSymbol, + aSymbol.BorderColor, + aSymbol.FillColor )); } - - lcl_setPropetiesToShape( xLegendEntryProperties, xShape, ePropertyType ); // PROP_TYPE_FILLED_SERIES ); - -#ifdef DISABLE_DASHES_AT_BORDER - // don't allow dashed border style - Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY ); - if( xShapeProp.is()) + else if( aSymbol.Style == chart2::SymbolStyle_GRAPHIC ) { - drawing::LineStyle aLineStyle; - if( ( xShapeProp->getPropertyValue( C2U("LineStyle")) >>= aLineStyle ) && - aLineStyle == drawing::LineStyle_DASH ) - { - aLineStyle = drawing::LineStyle_SOLID; - xShapeProp->setPropertyValue( C2U("LineStyle"), uno::makeAny( aLineStyle )); - } + xSymbol.set( aFactory.createGraphic2D( + xResultGroup, + aPos, + aSymbolSize, + aSymbol.Graphic )); } -#endif - } - catch( uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); - } - break; - } - - case LegendSymbolStyle_VERTICAL_LINE: - { - try - { - Reference< drawing::XShape > xLine( - xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.LineShape" )), uno::UNO_QUERY ); - if( xLine.is()) + else if( aSymbol.Style == chart2::SymbolStyle_AUTO ) { - xResultGroup->add( xLine ); - xLine->setSize( awt::Size( 0, 2000 )); - xLine->setPosition( awt::Point( 1500, 0 )); - - lcl_setPropetiesToShape( xLegendEntryProperties, xLine, ePropertyType ); // PROP_TYPE_LINE_SERIES ); + DBG_ERROR("the given parameter is not allowed to contain an automatic symbol style"); } } - catch( uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); - } - break; } - - case LegendSymbolStyle_DIAGONAL_LINE: + else if( eStyle == LegendSymbolStyle_CIRCLE ) { - try + Reference< drawing::XShape > xShape( xShapeFactory->createInstance( + C2U( "com.sun.star.drawing.EllipseShape" )), uno::UNO_QUERY ); + if( xShape.is() ) { - Reference< drawing::XShape > xLine( - xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.LineShape" )), uno::UNO_QUERY ); - if( xLine.is()) - { - xResultGroup->add( xLine ); - xLine->setSize( awt::Size( 2000, 2000 )); - xLine->setPosition( awt::Point( 500, 0 )); - - lcl_setPropetiesToShape( xLegendEntryProperties, xLine, ePropertyType ); // PROP_TYPE_LINE_SERIES ); - } - } - catch( uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); + xResultGroup->add( xShape ); + sal_Int32 nSize = std::min( rEntryKeyAspectRatio.Width, rEntryKeyAspectRatio.Height ); + xShape->setSize( awt::Size( nSize, nSize ) ); + xShape->setPosition( awt::Point( rEntryKeyAspectRatio.Width/2-nSize/2, rEntryKeyAspectRatio.Height/2-nSize/2 ) ); + lcl_setPropetiesToShape( xLegendEntryProperties, xShape, ePropertyType ); // PROP_TYPE_FILLED_SERIES ); } - break; } - - case LegendSymbolStyle_LINE_WITH_SYMBOL: - try - { - Reference< drawing::XShape > xLine( - xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.LineShape" )), uno::UNO_QUERY ); - if( xLine.is()) - { - xResultGroup->add( xLine ); - xLine->setSize( awt::Size( 3000, 0 )); - xLine->setPosition( awt::Point( 0, 1000 )); - - lcl_setPropetiesToShape( xLegendEntryProperties, xLine, ePropertyType ); - } - - Reference< drawing::XShape > xSymbol; - const sal_Int32 nSize = 1500; - chart2::Symbol aSymbol; - if( rExplicitSymbol >>= aSymbol ) - { - drawing::Direction3D aSymbolSize( nSize, nSize, 0 ); - drawing::Position3D aPos( 1500, 1000, 0 ); - ShapeFactory aFactory( xShapeFactory ); - if( aSymbol.Style == chart2::SymbolStyle_STANDARD ) - { - // take series color as fill color - xLegendEntryProperties->getPropertyValue( C2U("Color")) >>= aSymbol.FillColor; - // border of symbols always same as fill color - aSymbol.BorderColor = aSymbol.FillColor; - - xSymbol.set( aFactory.createSymbol2D( - xResultGroup, - aPos, - aSymbolSize, - aSymbol.StandardSymbol, - aSymbol.BorderColor, - aSymbol.FillColor )); - } - else if( aSymbol.Style == chart2::SymbolStyle_GRAPHIC ) - { - xSymbol.set( aFactory.createGraphic2D( - xResultGroup, - aPos, - aSymbolSize, - aSymbol.Graphic )); - } - else if( aSymbol.Style == chart2::SymbolStyle_AUTO ) - { - DBG_ERROR("the given parameter is not allowed to contain an automatic symbol style"); - } - } - } - catch( uno::Exception & ex ) + else // eStyle == LegendSymbolStyle_BOX + { + Reference< drawing::XShape > xShape( xShapeFactory->createInstance( + C2U( "com.sun.star.drawing.RectangleShape" )), uno::UNO_QUERY ); + if( xShape.is() ) { - ASSERT_EXCEPTION( ex ); + xResultGroup->add( xShape ); + xShape->setSize( rEntryKeyAspectRatio ); + xShape->setPosition( awt::Point( 0, 0 ) ); + lcl_setPropetiesToShape( xLegendEntryProperties, xShape, ePropertyType ); // PROP_TYPE_FILLED_SERIES ); } - break; - - default: - // just to remove warning (there is an auto-generated extra label) - break; + } + } + catch( uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); } return xResult; -- cgit From 7fd459f91a4cdba4b6e51b477a2d049a441b39e6 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 7 Feb 2011 00:46:14 +0100 Subject: chart52: #i68029# show mean value line in the legend --- chart2/source/tools/RegressionCurveHelper.cxx | 4 +--- chart2/source/view/charttypes/VSeriesPlotter.cxx | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index df9c4bdadd65..254fce22f5e7 100755 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -608,9 +608,7 @@ OUString RegressionCurveHelper::getUINameForRegressionCurve( const Reference< XR if( aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.MeanValueRegressionCurve" ))) { - OSL_ENSURE( false, "Meanvalue lines in legend not supported" ); - aResult = OUString(); - // aResult = ::chart::SchResId::getResString( STR_OBJECT_AVERAGE_LINE ); + aResult = ::chart::SchResId::getResString( STR_OBJECT_AVERAGE_LINE ); } else if( aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.LinearRegressionCurve" ))) diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 4866191333ec..669b034fa40b 100755 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1929,7 +1929,7 @@ bool VSeriesPlotter::HasRegressionCurves( const VDataSeries& rSeries, bool& rbHa sal_Int32 i = 0, nCount = aCurves.getLength(); for( i=0; i( aCurves[i], uno::UNO_QUERY ) ) ) @@ -2167,7 +2167,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( sal_Int32 i = 0, nCount = aCurves.getLength(); for( i=0; i VSeriesPlotter::createLegendEntriesForSeries( { aEntry.aSymbol = uno::Reference< drawing::XShape >( xSymbolGroup, uno::UNO_QUERY ); - bool bAverageLine = false;//@todo find out wether this is an average line or a regression curve + bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurves[i] ); ObjectType eObjectType = bAverageLine ? OBJECTTYPE_DATA_AVERAGE_LINE : OBJECTTYPE_DATA_CURVE; OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( eObjectType, i ) ); aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) ); -- cgit From c69fc95173abe406d95f6a9eb9bc9972e4b6256d Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 7 Feb 2011 01:21:44 +0100 Subject: chart52: #i89539# remove term 'Regression' from legend --- chart2/source/controller/dialogs/Strings_Statistic.src | 12 ++++++------ chart2/source/inc/Strings.hrc | 3 +-- chart2/source/tools/RegressionCurveHelper.cxx | 2 +- chart2/source/view/charttypes/VSeriesPlotter.cxx | 3 +-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/chart2/source/controller/dialogs/Strings_Statistic.src b/chart2/source/controller/dialogs/Strings_Statistic.src index f2dc4235f783..10c59a4c9b1d 100644 --- a/chart2/source/controller/dialogs/Strings_Statistic.src +++ b/chart2/source/controller/dialogs/Strings_Statistic.src @@ -51,22 +51,22 @@ String STR_CONTROLTEXT_ERROR_BARS_FROM_DATA String STR_REGRESSION_LINEAR { - Text [ en-US ] = "Linear Regression" ; + Text [ en-US ] = "Linear (%SERIESNAME)" ; }; String STR_REGRESSION_LOG { - Text [ en-US ] = "Logarithmic Regression" ; + Text [ en-US ] = "Logarithmic (%SERIESNAME)" ; }; String STR_REGRESSION_EXP { - Text [ en-US ] = "Exponential Regression" ; + Text [ en-US ] = "Exponential (%SERIESNAME)" ; }; String STR_REGRESSION_POWER { - Text [ en-US ] = "Power Regression" ; + Text [ en-US ] = "Power (%SERIESNAME)" ; }; -String STR_STATISTICS_IN_LEGEND +String STR_REGRESSION_MEAN { - Text [ en-US ] = "%REGRESSIONCURVE for %SERIESNAME" ; + Text [ en-US ] = "Mean (%SERIESNAME)" ; }; diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc index d7c490c1ca87..e1b29a8796e4 100644 --- a/chart2/source/inc/Strings.hrc +++ b/chart2/source/inc/Strings.hrc @@ -156,6 +156,7 @@ #define STR_REGRESSION_LOG (RID_APP_START + 136) #define STR_REGRESSION_EXP (RID_APP_START + 137) #define STR_REGRESSION_POWER (RID_APP_START + 138) +#define STR_REGRESSION_MEAN (RID_APP_START + 180) //----------------------------------------------------------------------------- //for scale tab page @@ -264,8 +265,6 @@ #define STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS (RID_APP_START + 265) #define STR_OBJECT_CURVE_EQUATION (RID_APP_START + 268) -#define STR_STATISTICS_IN_LEGEND (RID_APP_START + 180) - #define STR_OBJECT_SHAPE (RID_APP_START + 290) //----------------------------------------------------------------------------- diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index 254fce22f5e7..0d5ceb36199a 100755 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -608,7 +608,7 @@ OUString RegressionCurveHelper::getUINameForRegressionCurve( const Reference< XR if( aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.MeanValueRegressionCurve" ))) { - aResult = ::chart::SchResId::getResString( STR_OBJECT_AVERAGE_LINE ); + aResult = ::chart::SchResId::getResString( STR_REGRESSION_MEAN ); } else if( aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.LinearRegressionCurve" ))) diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 669b034fa40b..83db0c67ae6c 100755 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -2170,8 +2170,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( if( aCurves[i].is() ) { //label - OUString aResStr( SchResId::getResString( STR_STATISTICS_IN_LEGEND )); - replaceParamterInString( aResStr, C2U("%REGRESSIONCURVE"), RegressionCurveHelper::getUINameForRegressionCurve( aCurves[i] )); + OUString aResStr( RegressionCurveHelper::getUINameForRegressionCurve( aCurves[i] ) ); replaceParamterInString( aResStr, C2U("%SERIESNAME"), aLabelText ); aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aResStr, xTextProperties ); -- cgit From 4917ee9fc7569d46818310dfee6e8d5fdc7a7819 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 7 Feb 2011 11:39:00 +0100 Subject: dr79: #i116757# default name for pivot tables --- sc/source/core/data/dpobject.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index e9b53e34b332..082efdd6ea87 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2496,7 +2496,7 @@ ScDPObject* ScDPCollection::GetByName(const String& rName) const String ScDPCollection::CreateNewName( USHORT nMin ) const { - String aBase( RTL_CONSTASCII_USTRINGPARAM( "PivotTable" ) ); + String aBase( RTL_CONSTASCII_USTRINGPARAM( "Pivot" ) ); //! from Resource? for (USHORT nAdd=0; nAdd<=nCount; nAdd++) // nCount+1 tries -- cgit From fcad23d649fa143ec292f3775efd8d28d185286b Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 7 Feb 2011 12:39:47 +0100 Subject: chart52: compiler warning --- chart2/source/view/main/VLegendSymbolFactory.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 35ad3b0234c8..b7168bd7ee9f 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -121,8 +121,6 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( if( ! xResultGroup.is()) return xResult; - bool bUseBox = false; - // add an invisible square box to maintain aspect ratio Reference< drawing::XShape > xBound( ShapeFactory(xShapeFactory).createInvisibleRectangle( xResultGroup, rEntryKeyAspectRatio )); -- cgit From 5e069f674393ef2ce403f99bf3c6854991eb85e9 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 7 Feb 2011 14:03:29 +0100 Subject: chart52: #i82802# bigger legend keys for lines and dashes, but not for symbols without lines --- chart2/source/view/charttypes/VSeriesPlotter.cxx | 44 +++++++++++++++--------- chart2/source/view/inc/VSeriesPlotter.hxx | 2 -- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 83db0c67ae6c..1077591dfce8 100755 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1907,19 +1907,24 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries( return aAllSeries; } -bool VSeriesPlotter::HasDashedLines( const uno::Reference< beans::XPropertySet >& xProps ) +namespace { - bool bHasDashedLines = false; +bool lcl_HasVisibleLine( const uno::Reference< beans::XPropertySet >& xProps, bool& rbHasDashedLine ) +{ + bool bHasVisibleLine = false; + rbHasDashedLine = false; drawing::LineStyle aLineStyle = drawing::LineStyle_NONE; - if( xProps.is() && ( xProps->getPropertyValue( C2U("LineStyle")) >>= aLineStyle ) && - ( aLineStyle == drawing::LineStyle_DASH ) ) + if( xProps.is() && ( xProps->getPropertyValue( C2U("LineStyle")) >>= aLineStyle ) ) { - bHasDashedLines = true; + if( aLineStyle != drawing::LineStyle_NONE ) + bHasVisibleLine = true; + if( aLineStyle == drawing::LineStyle_DASH ) + rbHasDashedLine = true; } - return bHasDashedLines; + return bHasVisibleLine; } -bool VSeriesPlotter::HasRegressionCurves( const VDataSeries& rSeries, bool& rbHasDashedLines ) +bool lcl_HasRegressionCurves( const VDataSeries& rSeries, bool& rbHasDashedLine ) { bool bHasRegressionCurves = false; Reference< XRegressionCurveContainer > xRegrCont( rSeries.getModel(), uno::UNO_QUERY ); @@ -1932,14 +1937,13 @@ bool VSeriesPlotter::HasRegressionCurves( const VDataSeries& rSeries, bool& rbHa if( aCurves[i].is() ) { bHasRegressionCurves = true; - if( HasDashedLines( uno::Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ) ) ) - rbHasDashedLines = true; + lcl_HasVisibleLine( uno::Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ), rbHasDashedLine ); } } } return bHasRegressionCurves; } - +} LegendSymbolStyle VSeriesPlotter::getLegendSymbolStyle() { return LegendSymbolStyle_BOX; @@ -1951,8 +1955,8 @@ awt::Size VSeriesPlotter::getPreferredLegendKeyAspectRatio() if( m_nDimension==3 ) return aRet; - bool bSeriesHasLines = (getLegendSymbolStyle() == LegendSymbolStyle_LINE); - bool bHasLines = bSeriesHasLines; + bool bSeriesAllowsLines = (getLegendSymbolStyle() == LegendSymbolStyle_LINE); + bool bHasLines = false; bool bHasDashedLines = false; ::std::vector< VDataSeries* > aAllSeries( getAllSeries() ); ::std::vector< VDataSeries* >::const_iterator aSeriesIter = aAllSeries.begin(); @@ -1960,13 +1964,21 @@ awt::Size VSeriesPlotter::getPreferredLegendKeyAspectRatio() //iterate through all series for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) { - if( bSeriesHasLines && HasDashedLines( (*aSeriesIter)->getPropertiesOfSeries() ) ) + if( bSeriesAllowsLines ) { - bHasDashedLines = true; - break; + bool bCurrentDashed = false; + if( lcl_HasVisibleLine( (*aSeriesIter)->getPropertiesOfSeries(), bCurrentDashed ) ) + { + bHasLines = true; + if( bCurrentDashed ) + { + bHasDashedLines = true; + break; + } + } } bool bRegressionHasDashedLines=false; - if( VSeriesPlotter::HasRegressionCurves( **aSeriesIter, bRegressionHasDashedLines ) ) + if( lcl_HasRegressionCurves( **aSeriesIter, bRegressionHasDashedLines ) ) { bHasLines = true; if( bRegressionHasDashedLines ) diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx index 0360771ea606..9e427a5e2a81 100644 --- a/chart2/source/view/inc/VSeriesPlotter.hxx +++ b/chart2/source/view/inc/VSeriesPlotter.hxx @@ -252,8 +252,6 @@ public: ); ::std::vector< VDataSeries* > getAllSeries(); - static bool HasDashedLines( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProps ); - static bool HasRegressionCurves( const VDataSeries& rSeries, bool& rbHasDashedLines ); //------------------------------------------------------------------------- //------------------------------------------------------------------------- -- cgit From 5d81e7eace4a9fc6723fc367cae760c75e1f28ed Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 7 Feb 2011 14:19:53 +0100 Subject: chart52: #i68029# show mean value line in the legend - enable delete key --- chart2/source/controller/main/ChartController_Tools.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index af48936d33d9..0282abcefdf7 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -700,6 +700,11 @@ bool ChartController::executeDispatch_Delete() bReturn = lcl_deleteDataSeries( aCID, getModel(), m_xUndoManager ); else if( eParentObjectType == OBJECTTYPE_DATA_CURVE ) bReturn = lcl_deleteDataCurve( aCID, getModel(), m_xUndoManager ); + else if( eParentObjectType == OBJECTTYPE_DATA_AVERAGE_LINE ) + { + executeDispatch_DeleteMeanValue(); + bReturn = true; + } break; } -- cgit From a205833343811090811dea89801533ae41f78b0e Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 7 Feb 2011 17:08:58 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 8 --- chart2/source/view/main/VLegend.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 022de4f0305c..07a4e0437998 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -328,7 +328,7 @@ awt::Size lcl_placeLegendEntries( const sal_Int32 nSymbolToTextDistance = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.22 ) );//minimum 1mm const sal_Int32 nSymbolPlusDistanceWidth = rMaxSymbolExtent.Width + nSymbolToTextDistance; - sal_Int32 nMaxTextWidth = rAvailableSpace.Width - (2 * nXOffset) - nSymbolPlusDistanceWidth; + sal_Int32 nMaxTextWidth = rAvailableSpace.Width - (2 * nXPadding) - nSymbolPlusDistanceWidth; rtl::OUString aPropNameTextMaximumFrameWidth( C2U("TextMaximumFrameWidth") ); uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, aPropNameTextMaximumFrameWidth); if(pFrameWidthAny) @@ -346,7 +346,7 @@ awt::Size lcl_placeLegendEntries( awt::Size aMaxEntryExtent = lcl_createTextShapes( rEntries, xShapeFactory, xTarget, aTextShapes, rTextProperties ); OSL_ASSERT( aTextShapes.size() == rEntries.size()); - sal_Int32 nMaxEntryWidth = 2 * nXOffset + nSymbolPlusDistanceWidth + aMaxEntryExtent.Width; + sal_Int32 nMaxEntryWidth = nXOffset + nSymbolPlusDistanceWidth + aMaxEntryExtent.Width; sal_Int32 nMaxEntryHeight = nYOffset + aMaxEntryExtent.Height; sal_Int32 nNumberOfEntries = rEntries.size(); -- cgit From 0a7d5e540df38bbc931ec813881e8632075dec91 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 7 Feb 2011 19:03:22 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 9 --- chart2/source/view/main/VLegend.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 07a4e0437998..33e1d1f26aa4 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -446,10 +446,11 @@ awt::Size lcl_placeLegendEntries( DrawModelWrapper::removeShape( aTextShapes[nEntry] ); aTextShapes.pop_back(); } - if( nEntry < static_cast(rEntries.size()) ) + if( nEntry < nNumberOfEntries ) { DrawModelWrapper::removeShape( rEntries[ nEntry ].aSymbol ); rEntries.pop_back(); + nNumberOfEntries--; } } nSumHeight -= aRowHeights[nR]; -- cgit From 4cdb854219094904e033428006fbaed6221d74b5 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 8 Feb 2011 22:14:40 +0100 Subject: locales34: #i116701# display all digits of era year in era based calendars also for SHORT_YEAR --- i18npool/source/calendar/calendar_gregorian.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 727a6f601ba3..0ba91c0587d8 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -1003,9 +1003,11 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 sprintf(aStr, "%02d", value); // #100211# - checked break; case CalendarDisplayCode::SHORT_YEAR: - // Take last 2 digits, or only one if vallue<10, for example, + // Take last 2 digits, or only one if value<10, for example, // in case of the Gengou calendar. - if (value < 100) + // #i116701# For values in non-Gregorian era years use all + // digits. + if (value < 100 || eraArray) sprintf(aStr, "%d", value); // #100211# - checked else sprintf(aStr, "%02d", value % 100); // #100211# - checked -- cgit From d037f11447466890c9689345a12ccbb2c3e9c709 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Wed, 9 Feb 2011 18:43:37 +0100 Subject: locales34: back out change from autoreconf --- aclocal.m4 | 309 +++++++++++++++++++++---------------------------------------- 1 file changed, 104 insertions(+), 205 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index b68e3ef7774f..680f52ac3929 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10.2 -*- Autoconf -*- +# generated automatically by aclocal 1.9.1 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,208 +11,122 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant . -# + +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN(PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + + + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program 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 -# General Public License for more details. -# +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program 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 General Public License for more details. + # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# --------------------------------------------------------------------------- + # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. -# + # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. -# + # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). -# + # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. + AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 1.5 are not dnl supported because the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5. - m4_define_default([_AM_PYTHON_INTERPRETER_LIST], - [python python2 python2.5 python2.4 python2.3 python2.2 dnl + m4_define([_AM_PYTHON_INTERPRETER_LIST], + [python python2 python2.6 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0 python1.6 python1.5]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then - AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + PYTHON=: + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST) fi am_display_PYTHON=python ], [ @@ -283,21 +197,8 @@ python2.1 python2.0 python1.6 python1.5]) dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], - [if test "x$prefix" = xNONE - then - am_py_prefix=$ac_default_prefix - else - am_py_prefix=$prefix - fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || - echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` - case $am_cv_python_pythondir in - $am_py_prefix*) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` - ;; - esac - ]) + [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || + echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was @@ -313,21 +214,8 @@ python2.1 python2.0 python1.6 python1.5]) dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], - [if test "x$exec_prefix" = xNONE - then - am_py_exec_prefix=$am_py_prefix - else - am_py_exec_prefix=$exec_prefix - fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` - case $am_cv_python_pyexecdir in - $am_py_exec_prefix*) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; - esac - ]) + [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || + echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) @@ -359,11 +247,22 @@ for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -*- Autoconf -*- + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program 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 General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # AM_RUN_LOG(COMMAND) # ------------------- -- cgit From dd687af86d041fbd420be084e6a063fb41a1d86a Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 10 Feb 2011 18:36:18 +0100 Subject: locales34: have a matching configure as well --- configure | 5898 +++++++++++++++++++++++++++++-------------------------------- 1 file changed, 2835 insertions(+), 3063 deletions(-) diff --git a/configure b/configure index 4446843d177d..20ecaffc9a1d 100755 --- a/configure +++ b/configure @@ -1250,62 +1250,7 @@ CXX CXXFLAGS CCC CXXCPP -PKG_CONFIG -LIBWPD_CFLAGS -LIBWPD_LIBS -CPPUNIT_CFLAGS -CPPUNIT_LIBS -FREETYPE_CFLAGS -FREETYPE_LIBS -LIBXSLT_CFLAGS -LIBXSLT_LIBS -LIBXML_CFLAGS -LIBXML_LIBS -MOZ_NSS_CFLAGS -MOZ_NSS_LIBS -MOZ_NSPR_CFLAGS -MOZ_NSPR_LIBS -MOZILLAXPCOM_CFLAGS -MOZILLAXPCOM_LIBS -MOZGTK2_CFLAGS -MOZGTK2_LIBS -MOZLIBREQ_CFLAGS -MOZLIBREQ_LIBS -GRAPHITE_CFLAGS -GRAPHITE_LIBS -XMKMF -XRANDR_CFLAGS -XRANDR_LIBS -NEON_CFLAGS -NEON_LIBS -OPENSSL_CFLAGS -OPENSSL_LIBS -AGG_CFLAGS -AGG_LIBS -REDLAND_CFLAGS -REDLAND_LIBS -HUNSPELL_CFLAGS -HUNSPELL_LIBS -MYTHES_CFLAGS -MYTHES_LIBS -GCONF_CFLAGS -GCONF_LIBS -GNOMEVFS_CFLAGS -GNOMEVFS_LIBS -GTK_CFLAGS -GTK_LIBS -DBUS_CFLAGS -DBUS_LIBS -GIO_CFLAGS -GIO_LIBS -GSTREAMER_CFLAGS -GSTREAMER_LIBS -CAIRO_CFLAGS -CAIRO_LIBS -POPPLER_CFLAGS -POPPLER_LIBS -GOBJECT_CFLAGS -GOBJECT_LIBS' +XMKMF' # Initialize some variables set by options. @@ -2540,100 +2485,7 @@ Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - PKG_CONFIG path to pkg-config utility - LIBWPD_CFLAGS - C compiler flags for LIBWPD, overriding pkg-config - LIBWPD_LIBS linker flags for LIBWPD, overriding pkg-config - CPPUNIT_CFLAGS - C compiler flags for CPPUNIT, overriding pkg-config - CPPUNIT_LIBS - linker flags for CPPUNIT, overriding pkg-config - FREETYPE_CFLAGS - C compiler flags for FREETYPE, overriding pkg-config - FREETYPE_LIBS - linker flags for FREETYPE, overriding pkg-config - LIBXSLT_CFLAGS - C compiler flags for LIBXSLT, overriding pkg-config - LIBXSLT_LIBS - linker flags for LIBXSLT, overriding pkg-config - LIBXML_CFLAGS - C compiler flags for LIBXML, overriding pkg-config - LIBXML_LIBS linker flags for LIBXML, overriding pkg-config - MOZ_NSS_CFLAGS - C compiler flags for MOZ_NSS, overriding pkg-config - MOZ_NSS_LIBS - linker flags for MOZ_NSS, overriding pkg-config - MOZ_NSPR_CFLAGS - C compiler flags for MOZ_NSPR, overriding pkg-config - MOZ_NSPR_LIBS - linker flags for MOZ_NSPR, overriding pkg-config - MOZILLAXPCOM_CFLAGS - C compiler flags for MOZILLAXPCOM, overriding pkg-config - MOZILLAXPCOM_LIBS - linker flags for MOZILLAXPCOM, overriding pkg-config - MOZGTK2_CFLAGS - C compiler flags for MOZGTK2, overriding pkg-config - MOZGTK2_LIBS - linker flags for MOZGTK2, overriding pkg-config - MOZLIBREQ_CFLAGS - C compiler flags for MOZLIBREQ, overriding pkg-config - MOZLIBREQ_LIBS - linker flags for MOZLIBREQ, overriding pkg-config - GRAPHITE_CFLAGS - C compiler flags for GRAPHITE, overriding pkg-config - GRAPHITE_LIBS - linker flags for GRAPHITE, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System - XRANDR_CFLAGS - C compiler flags for XRANDR, overriding pkg-config - XRANDR_LIBS linker flags for XRANDR, overriding pkg-config - NEON_CFLAGS C compiler flags for NEON, overriding pkg-config - NEON_LIBS linker flags for NEON, overriding pkg-config - OPENSSL_CFLAGS - C compiler flags for OPENSSL, overriding pkg-config - OPENSSL_LIBS - linker flags for OPENSSL, overriding pkg-config - AGG_CFLAGS C compiler flags for AGG, overriding pkg-config - AGG_LIBS linker flags for AGG, overriding pkg-config - REDLAND_CFLAGS - C compiler flags for REDLAND, overriding pkg-config - REDLAND_LIBS - linker flags for REDLAND, overriding pkg-config - HUNSPELL_CFLAGS - C compiler flags for HUNSPELL, overriding pkg-config - HUNSPELL_LIBS - linker flags for HUNSPELL, overriding pkg-config - MYTHES_CFLAGS - C compiler flags for MYTHES, overriding pkg-config - MYTHES_LIBS linker flags for MYTHES, overriding pkg-config - GCONF_CFLAGS - C compiler flags for GCONF, overriding pkg-config - GCONF_LIBS linker flags for GCONF, overriding pkg-config - GNOMEVFS_CFLAGS - C compiler flags for GNOMEVFS, overriding pkg-config - GNOMEVFS_LIBS - linker flags for GNOMEVFS, overriding pkg-config - GTK_CFLAGS C compiler flags for GTK, overriding pkg-config - GTK_LIBS linker flags for GTK, overriding pkg-config - DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config - DBUS_LIBS linker flags for DBUS, overriding pkg-config - GIO_CFLAGS C compiler flags for GIO, overriding pkg-config - GIO_LIBS linker flags for GIO, overriding pkg-config - GSTREAMER_CFLAGS - C compiler flags for GSTREAMER, overriding pkg-config - GSTREAMER_LIBS - linker flags for GSTREAMER, overriding pkg-config - CAIRO_CFLAGS - C compiler flags for CAIRO, overriding pkg-config - CAIRO_LIBS linker flags for CAIRO, overriding pkg-config - POPPLER_CFLAGS - C compiler flags for POPPLER, overriding pkg-config - POPPLER_LIBS - linker flags for POPPLER, overriding pkg-config - GOBJECT_CFLAGS - C compiler flags for GOBJECT, overriding pkg-config - GOBJECT_LIBS - linker flags for GOBJECT, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -15199,11 +15051,11 @@ if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \ $as_echo "external" >&6; } SYSTEM_LIBWPD=YES + succeeded=no -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then @@ -15229,6 +15081,7 @@ done done IFS=$as_save_IFS + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi @@ -15242,19 +15095,92 @@ $as_echo "no" >&6; } fi + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for libwpd-0.8 " >&5 +$as_echo_n "checking for libwpd-0.8 ... " >&6; } + + if $PKG_CONFIG --exists "libwpd-0.8 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking LIBWPD_CFLAGS" >&5 +$as_echo_n "checking LIBWPD_CFLAGS... " >&6; } + LIBWPD_CFLAGS=`$PKG_CONFIG --cflags "libwpd-0.8 "` + { $as_echo "$as_me:$LINENO: result: $LIBWPD_CFLAGS" >&5 +$as_echo "$LIBWPD_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking LIBWPD_LIBS" >&5 +$as_echo_n "checking LIBWPD_LIBS... " >&6; } + LIBWPD_LIBS=`$PKG_CONFIG --libs "libwpd-0.8 "` + { $as_echo "$as_me:$LINENO: result: $LIBWPD_LIBS" >&5 +$as_echo "$LIBWPD_LIBS" >&6; } + else + LIBWPD_CFLAGS="" + LIBWPD_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBWPD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libwpd-0.8 "` + echo $LIBWPD_PKG_ERRORS + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { (exit 1); exit 1; }; } + fi + +else + { $as_echo "$as_me:$LINENO: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_LIBWPD=NO + BUILD_TYPE="$BUILD_TYPE LIBWPD" fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. + + + + +{ $as_echo "$as_me:$LINENO: checking which cppunit to use" >&5 +$as_echo_n "checking which cppunit to use... " >&6; } +if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ + test "$with_system_cppunit" != "no"; then + { $as_echo "$as_me:$LINENO: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_CPPUNIT=YES + # might work for earlier, too but go sure: + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else - case $ac_pt_PKG_CONFIG in + case $PKG_CONFIG in [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -15264,7 +15190,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -15272,419 +15198,187 @@ done done IFS=$as_save_IFS + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for LIBWPD" >&5 -$as_echo_n "checking for LIBWPD... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$LIBWPD_CFLAGS"; then - pkg_cv_LIBWPD_CFLAGS="$LIBWPD_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libwpd-0.8 \"") >&5 - ($PKG_CONFIG --exists --print-errors "libwpd-0.8 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_LIBWPD_CFLAGS=`$PKG_CONFIG --cflags "libwpd-0.8 " 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$LIBWPD_LIBS"; then - pkg_cv_LIBWPD_LIBS="$LIBWPD_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libwpd-0.8 \"") >&5 - ($PKG_CONFIG --exists --print-errors "libwpd-0.8 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_LIBWPD_LIBS=`$PKG_CONFIG --libs "libwpd-0.8 " 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for cppunit >= 1.12.0 " >&5 +$as_echo_n "checking for cppunit >= 1.12.0 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBWPD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libwpd-0.8 "` + if $PKG_CONFIG --exists "cppunit >= 1.12.0 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking CPPUNIT_CFLAGS" >&5 +$as_echo_n "checking CPPUNIT_CFLAGS... " >&6; } + CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.12.0 "` + { $as_echo "$as_me:$LINENO: result: $CPPUNIT_CFLAGS" >&5 +$as_echo "$CPPUNIT_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking CPPUNIT_LIBS" >&5 +$as_echo_n "checking CPPUNIT_LIBS... " >&6; } + CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.12.0 "` + { $as_echo "$as_me:$LINENO: result: $CPPUNIT_LIBS" >&5 +$as_echo "$CPPUNIT_LIBS" >&6; } else - LIBWPD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libwpd-0.8 "` + CPPUNIT_CFLAGS="" + CPPUNIT_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cppunit >= 1.12.0 "` + echo $CPPUNIT_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$LIBWPD_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (libwpd-0.8 ) were not met: -$LIBWPD_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables LIBWPD_CFLAGS -and LIBWPD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (libwpd-0.8 ) were not met: - -$LIBWPD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables LIBWPD_CFLAGS -and LIBWPD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables LIBWPD_CFLAGS -and LIBWPD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables LIBWPD_CFLAGS -and LIBWPD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - LIBWPD_CFLAGS=$pkg_cv_LIBWPD_CFLAGS - LIBWPD_LIBS=$pkg_cv_LIBWPD_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi else { $as_echo "$as_me:$LINENO: result: internal" >&5 $as_echo "internal" >&6; } - SYSTEM_LIBWPD=NO - BUILD_TYPE="$BUILD_TYPE LIBWPD" + SYSTEM_CPPUNIT=NO + BUILD_TYPE="$BUILD_TYPE CPPUNIT" fi -{ $as_echo "$as_me:$LINENO: checking which cppunit to use" >&5 -$as_echo_n "checking which cppunit to use... " >&6; } -if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ - test "$with_system_cppunit" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_CPPUNIT=YES - # might work for earlier, too but go sure: +if test "$test_freetype" = "yes"; then + { $as_echo "$as_me:$LINENO: checking whether freetype is available" >&5 +$as_echo_n "checking whether freetype is available... " >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for CPPUNIT" >&5 -$as_echo_n "checking for CPPUNIT... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$CPPUNIT_CFLAGS"; then - pkg_cv_CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.12.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "cppunit >= 1.12.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.12.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$CPPUNIT_LIBS"; then - pkg_cv_CPPUNIT_LIBS="$CPPUNIT_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.12.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "cppunit >= 1.12.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.12.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for freetype2 >= 2.0 " >&5 +$as_echo_n "checking for freetype2 >= 2.0 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cppunit >= 1.12.0 "` + if $PKG_CONFIG --exists "freetype2 >= 2.0 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5 +$as_echo_n "checking FREETYPE_CFLAGS... " >&6; } + FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.0 "` + { $as_echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5 +$as_echo "$FREETYPE_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5 +$as_echo_n "checking FREETYPE_LIBS... " >&6; } + FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.0 "` + { $as_echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5 +$as_echo "$FREETYPE_LIBS" >&6; } else - CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cppunit >= 1.12.0 "` + FREETYPE_CFLAGS="" + FREETYPE_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 2.0 "` + echo $FREETYPE_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$CPPUNIT_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (cppunit >= 1.12.0 ) were not met: -$CPPUNIT_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables CPPUNIT_CFLAGS -and CPPUNIT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (cppunit >= 1.12.0 ) were not met: - -$CPPUNIT_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables CPPUNIT_CFLAGS -and CPPUNIT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. + fi -Alternatively, you may set the environment variables CPPUNIT_CFLAGS -and CPPUNIT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables CPPUNIT_CFLAGS -and CPPUNIT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - CPPUNIT_CFLAGS=$pkg_cv_CPPUNIT_CFLAGS - CPPUNIT_LIBS=$pkg_cv_CPPUNIT_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi -else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_CPPUNIT=NO - BUILD_TYPE="$BUILD_TYPE CPPUNIT" -fi - - - - -if test "$test_freetype" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether freetype is available" >&5 -$as_echo_n "checking whether freetype is available... " >&6; } - -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for FREETYPE" >&5 -$as_echo_n "checking for FREETYPE... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$FREETYPE_CFLAGS"; then - pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$FREETYPE_LIBS"; then - pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 2.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "freetype2 >= 2.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2 >= 2.0 "` - else - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 2.0 "` - fi - # Put the nasty error message in config.log where it belongs - echo "$FREETYPE_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (freetype2 >= 2.0 ) were not met: - -$FREETYPE_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables FREETYPE_CFLAGS -and FREETYPE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (freetype2 >= 2.0 ) were not met: - -$FREETYPE_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables FREETYPE_CFLAGS -and FREETYPE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables FREETYPE_CFLAGS -and FREETYPE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables FREETYPE_CFLAGS -and FREETYPE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS - FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi -fi +fi @@ -15816,118 +15510,104 @@ $as_echo "$LIBXSLT_LIBS" >&6; } else -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for LIBXSLT" >&5 -$as_echo_n "checking for LIBXSLT... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$LIBXSLT_CFLAGS"; then - pkg_cv_LIBXSLT_CFLAGS="$LIBXSLT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxslt\"") >&5 - ($PKG_CONFIG --exists --print-errors "libxslt") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_LIBXSLT_CFLAGS=`$PKG_CONFIG --cflags "libxslt" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$LIBXSLT_LIBS"; then - pkg_cv_LIBXSLT_LIBS="$LIBXSLT_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxslt\"") >&5 - ($PKG_CONFIG --exists --print-errors "libxslt") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_LIBXSLT_LIBS=`$PKG_CONFIG --libs "libxslt" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBXSLT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxslt"` - else - LIBXSLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxslt"` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBXSLT_PKG_ERRORS" >&5 + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for libxslt" >&5 +$as_echo_n "checking for libxslt... " >&6; } - { { $as_echo "$as_me:$LINENO: error: Package requirements (libxslt) were not met: + if $PKG_CONFIG --exists "libxslt" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes -$LIBXSLT_PKG_ERRORS + { $as_echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 +$as_echo_n "checking LIBXSLT_CFLAGS... " >&6; } + LIBXSLT_CFLAGS=`$PKG_CONFIG --cflags "libxslt"` + { $as_echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 +$as_echo "$LIBXSLT_CFLAGS" >&6; } -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + { $as_echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 +$as_echo_n "checking LIBXSLT_LIBS... " >&6; } + LIBXSLT_LIBS=`$PKG_CONFIG --libs "libxslt"` + { $as_echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 +$as_echo "$LIBXSLT_LIBS" >&6; } + else + LIBXSLT_CFLAGS="" + LIBXSLT_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBXSLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxslt"` + echo $LIBXSLT_PKG_ERRORS + fi -Alternatively, you may set the environment variables LIBXSLT_CFLAGS -and LIBXSLT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (libxslt) were not met: -$LIBXSLT_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables LIBXSLT_CFLAGS -and LIBXSLT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables LIBXSLT_CFLAGS -and LIBXSLT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables LIBXSLT_CFLAGS -and LIBXSLT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - LIBXSLT_CFLAGS=$pkg_cv_LIBXSLT_CFLAGS - LIBXSLT_LIBS=$pkg_cv_LIBXSLT_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi fi @@ -16011,118 +15691,104 @@ $as_echo "$LIBXML_LIBS" >&6; } else -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for LIBXML" >&5 -$as_echo_n "checking for LIBXML... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$LIBXML_CFLAGS"; then - pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$LIBXML_LIBS"; then - pkg_cv_LIBXML_LIBS="$LIBXML_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0 >= 2.0"` - else - LIBXML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBXML_PKG_ERRORS" >&5 + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for libxml-2.0 >= 2.0" >&5 +$as_echo_n "checking for libxml-2.0 >= 2.0... " >&6; } - { { $as_echo "$as_me:$LINENO: error: Package requirements (libxml-2.0 >= 2.0) were not met: + if $PKG_CONFIG --exists "libxml-2.0 >= 2.0" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes -$LIBXML_PKG_ERRORS + { $as_echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 +$as_echo_n "checking LIBXML_CFLAGS... " >&6; } + LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0"` + { $as_echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 +$as_echo "$LIBXML_CFLAGS" >&6; } -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + { $as_echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 +$as_echo_n "checking LIBXML_LIBS... " >&6; } + LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0"` + { $as_echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 +$as_echo "$LIBXML_LIBS" >&6; } + else + LIBXML_CFLAGS="" + LIBXML_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBXML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.0"` + echo $LIBXML_PKG_ERRORS + fi -Alternatively, you may set the environment variables LIBXML_CFLAGS -and LIBXML_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (libxml-2.0 >= 2.0) were not met: -$LIBXML_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables LIBXML_CFLAGS -and LIBXML_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables LIBXML_CFLAGS -and LIBXML_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables LIBXML_CFLAGS -and LIBXML_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS - LIBXML_LIBS=$pkg_cv_LIBXML_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi fi BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" @@ -16187,7 +15853,7 @@ if test "${am_cv_pathless_PYTHON+set}" = set; then $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do + for am_cv_pathless_PYTHON in python python2 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros @@ -16302,21 +15968,8 @@ $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if test "${am_cv_python_pythondir+set}" = set; then $as_echo_n "(cached) " >&6 else - if test "x$prefix" = xNONE - then - am_py_prefix=$ac_default_prefix - else - am_py_prefix=$prefix - fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || + am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` - case $am_cv_python_pythondir in - $am_py_prefix*) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` - ;; - esac - fi { $as_echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } @@ -16332,21 +15985,8 @@ $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; if test "${am_cv_python_pyexecdir+set}" = set; then $as_echo_n "(cached) " >&6 else - if test "x$exec_prefix" = xNONE - then - am_py_exec_prefix=$am_py_prefix - else - am_py_exec_prefix=$exec_prefix - fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` - case $am_cv_python_pyexecdir in - $am_py_exec_prefix*) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; - esac - + am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || + echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` fi { $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } @@ -19357,190 +18997,202 @@ $as_echo_n "checking which Mozilla flavour to use... " >&6; } $as_echo "$tmp" >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZ_NSS" >&5 -$as_echo_n "checking for MOZ_NSS... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZ_NSS_CFLAGS"; then - pkg_cv_MOZ_NSS_CFLAGS="$MOZ_NSS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5 - ($PKG_CONFIG --exists --print-errors "nss") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$MOZ_NSS_LIBS"; then - pkg_cv_MOZ_NSS_LIBS="$MOZ_NSS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5 - ($PKG_CONFIG --exists --print-errors "nss") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZ_NSS_LIBS=`$PKG_CONFIG --libs "nss" 2>/dev/null` + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=yes -fi - fi + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for nss" >&5 +$as_echo_n "checking for nss... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nss"` + if $PKG_CONFIG --exists "nss" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 +$as_echo_n "checking MOZ_NSS_CFLAGS... " >&6; } + MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss"` + { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 +$as_echo "$MOZ_NSS_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 +$as_echo_n "checking MOZ_NSS_LIBS... " >&6; } + MOZ_NSS_LIBS=`$PKG_CONFIG --libs "nss"` + { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 +$as_echo "$MOZ_NSS_LIBS" >&6; } else - MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss"` + MOZ_NSS_CFLAGS="" + MOZ_NSS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss"` + fi - # Put the nasty error message in config.log where it belongs - echo "$MOZ_NSS_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - STANDALONENSS="" -elif test $pkg_failed = untried; then - STANDALONENSS="" -else - MOZ_NSS_CFLAGS=$pkg_cv_MOZ_NSS_CFLAGS - MOZ_NSS_LIBS=$pkg_cv_MOZ_NSS_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - STANDALONENSS="TRUE" -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + STANDALONENSS="TRUE" + else + STANDALONENSS="" + fi + if test -z "$STANDALONENSS"; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZ_NSS" >&5 -$as_echo_n "checking for MOZ_NSS... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZ_NSS_CFLAGS"; then - pkg_cv_MOZ_NSS_CFLAGS="$MOZ_NSS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-nss \"") >&5 - ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-nss ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nss " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZ_NSS_LIBS"; then - pkg_cv_MOZ_NSS_LIBS="$MOZ_NSS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-nss \"") >&5 - ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-nss ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZ_NSS_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nss " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nss " >&5 +$as_echo_n "checking for $MOZ_FLAVOUR-nss ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nss "` + if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nss " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 +$as_echo_n "checking MOZ_NSS_CFLAGS... " >&6; } + MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nss "` + { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 +$as_echo "$MOZ_NSS_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 +$as_echo_n "checking MOZ_NSS_LIBS... " >&6; } + MOZ_NSS_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nss "` + { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 +$as_echo "$MOZ_NSS_LIBS" >&6; } else - MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nss "` + MOZ_NSS_CFLAGS="" + MOZ_NSS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nss "` + echo $MOZ_NSS_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$MOZ_NSS_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements ($MOZ_FLAVOUR-nss ) were not met: -$MOZ_NSS_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables MOZ_NSS_CFLAGS -and MOZ_NSS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements ($MOZ_FLAVOUR-nss ) were not met: - -$MOZ_NSS_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables MOZ_NSS_CFLAGS -and MOZ_NSS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MOZ_NSS_CFLAGS -and MOZ_NSS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MOZ_NSS_CFLAGS -and MOZ_NSS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - MOZ_NSS_CFLAGS=$pkg_cv_MOZ_NSS_CFLAGS - MOZ_NSS_LIBS=$pkg_cv_MOZ_NSS_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi else NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`" @@ -19548,426 +19200,410 @@ fi if $PKG_CONFIG --exists nspr ; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZ_NSPR" >&5 -$as_echo_n "checking for MOZ_NSPR... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZ_NSPR_CFLAGS"; then - pkg_cv_MOZ_NSPR_CFLAGS="$MOZ_NSPR_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nspr \"") >&5 - ($PKG_CONFIG --exists --print-errors "nspr ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "nspr " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZ_NSPR_LIBS"; then - pkg_cv_MOZ_NSPR_LIBS="$MOZ_NSPR_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nspr \"") >&5 - ($PKG_CONFIG --exists --print-errors "nspr ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "nspr " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for nspr " >&5 +$as_echo_n "checking for nspr ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nspr "` + if $PKG_CONFIG --exists "nspr " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 +$as_echo_n "checking MOZ_NSPR_CFLAGS... " >&6; } + MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "nspr "` + { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 +$as_echo "$MOZ_NSPR_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 +$as_echo_n "checking MOZ_NSPR_LIBS... " >&6; } + MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "nspr "` + { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 +$as_echo "$MOZ_NSPR_LIBS" >&6; } else - MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nspr "` + MOZ_NSPR_CFLAGS="" + MOZ_NSPR_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nspr "` + echo $MOZ_NSPR_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$MOZ_NSPR_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (nspr ) were not met: -$MOZ_NSPR_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS -and MOZ_NSPR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (nspr ) were not met: - -$MOZ_NSPR_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS -and MOZ_NSPR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS -and MOZ_NSPR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS -and MOZ_NSPR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - MOZ_NSPR_CFLAGS=$pkg_cv_MOZ_NSPR_CFLAGS - MOZ_NSPR_LIBS=$pkg_cv_MOZ_NSPR_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`" else -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZ_NSPR" >&5 -$as_echo_n "checking for MOZ_NSPR... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZ_NSPR_CFLAGS"; then - pkg_cv_MOZ_NSPR_CFLAGS="$MOZ_NSPR_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-nspr \"") >&5 - ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-nspr ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nspr " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZ_NSPR_LIBS"; then - pkg_cv_MOZ_NSPR_LIBS="$MOZ_NSPR_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-nspr \"") >&5 - ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-nspr ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nspr " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nspr " >&5 +$as_echo_n "checking for $MOZ_FLAVOUR-nspr ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nspr "` + if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nspr " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 +$as_echo_n "checking MOZ_NSPR_CFLAGS... " >&6; } + MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nspr "` + { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 +$as_echo "$MOZ_NSPR_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 +$as_echo_n "checking MOZ_NSPR_LIBS... " >&6; } + MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nspr "` + { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 +$as_echo "$MOZ_NSPR_LIBS" >&6; } else - MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nspr "` + MOZ_NSPR_CFLAGS="" + MOZ_NSPR_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nspr "` + echo $MOZ_NSPR_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$MOZ_NSPR_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements ($MOZ_FLAVOUR-nspr ) were not met: - -$MOZ_NSPR_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS -and MOZ_NSPR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements ($MOZ_FLAVOUR-nspr ) were not met: -$MOZ_NSPR_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS -and MOZ_NSPR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS -and MOZ_NSPR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MOZ_NSPR_CFLAGS -and MOZ_NSPR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - MOZ_NSPR_CFLAGS=$pkg_cv_MOZ_NSPR_CFLAGS - MOZ_NSPR_LIBS=$pkg_cv_MOZ_NSPR_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi fi if test "$MOZ_FLAVOUR" != "libxul"; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZILLAXPCOM" >&5 -$as_echo_n "checking for MOZILLAXPCOM... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZILLAXPCOM_CFLAGS"; then - pkg_cv_MOZILLAXPCOM_CFLAGS="$MOZILLAXPCOM_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-xpcom\"") >&5 - ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-xpcom") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-xpcom" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZILLAXPCOM_LIBS"; then - pkg_cv_MOZILLAXPCOM_LIBS="$MOZILLAXPCOM_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$MOZ_FLAVOUR-xpcom\"") >&5 - ($PKG_CONFIG --exists --print-errors "$MOZ_FLAVOUR-xpcom") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-xpcom" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-xpcom" >&5 +$as_echo_n "checking for $MOZ_FLAVOUR-xpcom... " >&6; } + + if $PKG_CONFIG --exists "$MOZ_FLAVOUR-xpcom" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 +$as_echo_n "checking MOZILLAXPCOM_CFLAGS... " >&6; } + MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-xpcom"` + { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 +$as_echo "$MOZILLAXPCOM_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 +$as_echo_n "checking MOZILLAXPCOM_LIBS... " >&6; } + MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-xpcom"` + { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 +$as_echo "$MOZILLAXPCOM_LIBS" >&6; } + else + MOZILLAXPCOM_CFLAGS="" + MOZILLAXPCOM_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-xpcom"` + + fi + + -if test $pkg_failed = yes; then + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$MOZ_FLAVOUR-xpcom"` - else - MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-xpcom"` - fi - # Put the nasty error message in config.log where it belongs - echo "$MOZILLAXPCOM_PKG_ERRORS" >&5 + if test $succeeded = yes; then + HASXPCOM="TRUE" + else + HASXPCOM="" + fi - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - HASXPCOM="" -elif test $pkg_failed = untried; then - HASXPCOM="" -else - MOZILLAXPCOM_CFLAGS=$pkg_cv_MOZILLAXPCOM_CFLAGS - MOZILLAXPCOM_LIBS=$pkg_cv_MOZILLAXPCOM_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HASXPCOM="TRUE" -fi MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom` MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom` fi if test -z "$HASXPCOM"; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZILLAXPCOM" >&5 -$as_echo_n "checking for MOZILLAXPCOM... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZILLAXPCOM_CFLAGS"; then - pkg_cv_MOZILLAXPCOM_CFLAGS="$MOZILLAXPCOM_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxul \"") >&5 - ($PKG_CONFIG --exists --print-errors "libxul ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "libxul " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZILLAXPCOM_LIBS"; then - pkg_cv_MOZILLAXPCOM_LIBS="$MOZILLAXPCOM_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxul \"") >&5 - ($PKG_CONFIG --exists --print-errors "libxul ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "libxul " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for libxul " >&5 +$as_echo_n "checking for libxul ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxul "` + if $PKG_CONFIG --exists "libxul " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 +$as_echo_n "checking MOZILLAXPCOM_CFLAGS... " >&6; } + MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "libxul "` + { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 +$as_echo "$MOZILLAXPCOM_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 +$as_echo_n "checking MOZILLAXPCOM_LIBS... " >&6; } + MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "libxul "` + { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 +$as_echo "$MOZILLAXPCOM_LIBS" >&6; } else - MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxul "` + MOZILLAXPCOM_CFLAGS="" + MOZILLAXPCOM_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxul "` + echo $MOZILLAXPCOM_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$MOZILLAXPCOM_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (libxul ) were not met: -$MOZILLAXPCOM_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables MOZILLAXPCOM_CFLAGS -and MOZILLAXPCOM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (libxul ) were not met: - -$MOZILLAXPCOM_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables MOZILLAXPCOM_CFLAGS -and MOZILLAXPCOM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MOZILLAXPCOM_CFLAGS -and MOZILLAXPCOM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MOZILLAXPCOM_CFLAGS -and MOZILLAXPCOM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - MOZILLAXPCOM_CFLAGS=$pkg_cv_MOZILLAXPCOM_CFLAGS - MOZILLAXPCOM_LIBS=$pkg_cv_MOZILLAXPCOM_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi MOZ_INC=`$PKG_CONFIG --variable=includedir libxul` MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul` if ! test -e "$MOZ_LIB/libxul.so"; then @@ -20284,153 +19920,203 @@ $as_echo "ok" >&6; } { $as_echo "$as_me:$LINENO: checking whether mozilla can be built..." >&5 $as_echo "$as_me: checking whether mozilla can be built..." >&6;} -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZGTK2" >&5 -$as_echo_n "checking for MOZGTK2... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZGTK2_CFLAGS"; then - pkg_cv_MOZGTK2_CFLAGS="$MOZGTK2_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8\"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZGTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZGTK2_LIBS"; then - pkg_cv_MOZGTK2_LIBS="$MOZGTK2_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8\"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZGTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" >&5 +$as_echo_n "checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZGTK2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` + if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZGTK2_CFLAGS" >&5 +$as_echo_n "checking MOZGTK2_CFLAGS... " >&6; } + MOZGTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` + { $as_echo "$as_me:$LINENO: result: $MOZGTK2_CFLAGS" >&5 +$as_echo "$MOZGTK2_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZGTK2_LIBS" >&5 +$as_echo_n "checking MOZGTK2_LIBS... " >&6; } + MOZGTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` + { $as_echo "$as_me:$LINENO: result: $MOZGTK2_LIBS" >&5 +$as_echo "$MOZGTK2_LIBS" >&6; } else - MOZGTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` + MOZGTK2_CFLAGS="" + MOZGTK2_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZGTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` + fi - # Put the nasty error message in config.log where it belongs - echo "$MOZGTK2_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 -$as_echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + { $as_echo "$as_me:$LINENO: OK - can build mozilla" >&5 +$as_echo "$as_me: OK - can build mozilla" >&6;} + else + { { $as_echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 $as_echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} { (exit 1); exit 1; }; } -else - MOZGTK2_CFLAGS=$pkg_cv_MOZGTK2_CFLAGS - MOZGTK2_LIBS=$pkg_cv_MOZGTK2_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: OK - can build mozilla" >&5 -$as_echo "$as_me: OK - can build mozilla" >&6;} -fi + fi + else -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 -$as_echo_n "checking for MOZLIBREQ... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_CFLAGS"; then - pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libIDL-2.0 >= 0.6.3\"") >&5 - ($PKG_CONFIG --exists --print-errors "libIDL-2.0 >= 0.6.3") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.6.3" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_LIBS"; then - pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libIDL-2.0 >= 0.6.3\"") >&5 - ($PKG_CONFIG --exists --print-errors "libIDL-2.0 >= 0.6.3") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.6.3" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.6.3" >&5 +$as_echo_n "checking for libIDL-2.0 >= 0.6.3... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libIDL-2.0 >= 0.6.3"` + if $PKG_CONFIG --exists "libIDL-2.0 >= 0.6.3" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.6.3"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.6.3"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.6.3"` + MOZLIBREQ_CFLAGS="" + MOZLIBREQ_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.6.3"` + fi - # Put the nasty error message in config.log where it belongs - echo "$MOZLIBREQ_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - MOZIDL="" -elif test $pkg_failed = untried; then - MOZIDL="" -else - MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS - MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - MOZIDL="TRUE" -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + MOZIDL="TRUE" + else + MOZIDL="" + fi + if test -z "$MOZIDL"; then { { $as_echo "$as_me:$LINENO: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&5 $as_echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&2;} @@ -20441,152 +20127,204 @@ $as_echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with m # Generic Unix/Linux section if test "$MOZILLA_TOOLKIT" = "gtk2"; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 -$as_echo_n "checking for MOZLIBREQ... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_CFLAGS"; then - pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_LIBS"; then - pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gtk+-2.0" >&5 +$as_echo_n "checking for gtk+-2.0... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0"` + if $PKG_CONFIG --exists "gtk+-2.0" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+-2.0"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` + MOZLIBREQ_CFLAGS="" + MOZLIBREQ_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` + fi - # Put the nasty error message in config.log where it belongs - echo "$MOZLIBREQ_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - MOZGTK="" -elif test $pkg_failed = untried; then - MOZGTK="" -else - MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS - MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - MOZGTK="TRUE" -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + MOZGTK="TRUE" + else + MOZGTK="" + fi + if test -z "$MOZGTK"; then { { $as_echo "$as_me:$LINENO: error: GTK2 is needed to build mozilla." >&5 $as_echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} { (exit 1); exit 1; }; } fi -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 -$as_echo_n "checking for MOZLIBREQ... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_CFLAGS"; then - pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libIDL-2.0 >= 0.8.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "libIDL-2.0 >= 0.8.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_LIBS"; then - pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libIDL-2.0 >= 0.8.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "libIDL-2.0 >= 0.8.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.8.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.8.0" >&5 +$as_echo_n "checking for libIDL-2.0 >= 0.8.0... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"` + if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.8.0"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"` + MOZLIBREQ_CFLAGS="" + MOZLIBREQ_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"` + fi - # Put the nasty error message in config.log where it belongs - echo "$MOZLIBREQ_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - MOZIDL="" -elif test $pkg_failed = untried; then - MOZIDL="" -else - MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS - MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - MOZIDL="TRUE" -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + MOZIDL="TRUE" + else + MOZIDL="" + fi + if test -z "$MOZIDL"; then { { $as_echo "$as_me:$LINENO: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&5 $as_echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&2;} @@ -20594,152 +20332,204 @@ $as_echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozi fi else -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 -$as_echo_n "checking for MOZLIBREQ... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_CFLAGS"; then - pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+ >= 1.2.3\"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+ >= 1.2.3") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+ >= 1.2.3" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_LIBS"; then - pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+ >= 1.2.3\"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+ >= 1.2.3") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+ >= 1.2.3" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gtk+ >= 1.2.3" >&5 +$as_echo_n "checking for gtk+ >= 1.2.3... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+ >= 1.2.3"` + if $PKG_CONFIG --exists "gtk+ >= 1.2.3" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+ >= 1.2.3"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+ >= 1.2.3"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+ >= 1.2.3"` + MOZLIBREQ_CFLAGS="" + MOZLIBREQ_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+ >= 1.2.3"` + fi - # Put the nasty error message in config.log where it belongs - echo "$MOZLIBREQ_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - MOZGTK="" -elif test $pkg_failed = untried; then - MOZGTK="" -else - MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS - MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - MOZGTK="TRUE" -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + MOZGTK="TRUE" + else + MOZGTK="" + fi + if test -z "$MOZGTK"; then { { $as_echo "$as_me:$LINENO: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&5 $as_echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&2;} { (exit 1); exit 1; }; } fi -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MOZLIBREQ" >&5 -$as_echo_n "checking for MOZLIBREQ... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_CFLAGS"; then - pkg_cv_MOZLIBREQ_CFLAGS="$MOZLIBREQ_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libidl >= 0.6.3 libidl <= 0.6.8\"") >&5 - ($PKG_CONFIG --exists --print-errors "libidl >= 0.6.3 libidl <= 0.6.8") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libidl >= 0.6.3 libidl <= 0.6.8" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MOZLIBREQ_LIBS"; then - pkg_cv_MOZLIBREQ_LIBS="$MOZLIBREQ_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libidl >= 0.6.3 libidl <= 0.6.8\"") >&5 - ($PKG_CONFIG --exists --print-errors "libidl >= 0.6.3 libidl <= 0.6.8") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libidl >= 0.6.3 libidl <= 0.6.8" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for libidl >= 0.6.3 libidl <= 0.6.8" >&5 +$as_echo_n "checking for libidl >= 0.6.3 libidl <= 0.6.8... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libidl >= 0.6.3 libidl <= 0.6.8"` + if $PKG_CONFIG --exists "libidl >= 0.6.3 libidl <= 0.6.8" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libidl >= 0.6.3 libidl <= 0.6.8"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libidl >= 0.6.3 libidl <= 0.6.8"` + { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +$as_echo "$MOZLIBREQ_LIBS" >&6; } else - MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libidl >= 0.6.3 libidl <= 0.6.8"` + MOZLIBREQ_CFLAGS="" + MOZLIBREQ_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libidl >= 0.6.3 libidl <= 0.6.8"` + fi - # Put the nasty error message in config.log where it belongs - echo "$MOZLIBREQ_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - MOZIDL="" -elif test $pkg_failed = untried; then - MOZIDL="" -else - MOZLIBREQ_CFLAGS=$pkg_cv_MOZLIBREQ_CFLAGS - MOZLIBREQ_LIBS=$pkg_cv_MOZLIBREQ_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - MOZIDL="TRUE" -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + MOZIDL="TRUE" + else + MOZIDL="" + fi + if test -z "$MOZIDL"; then { { $as_echo "$as_me:$LINENO: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&5 $as_echo "$as_me: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&2;} @@ -21196,118 +20986,104 @@ $as_echo_n "checking which graphite to use... " >&6; } $as_echo "external" >&6; } SYSTEM_GRAPHITE=YES -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GRAPHITE" >&5 -$as_echo_n "checking for GRAPHITE... " >&6; } + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -if test -n "$PKG_CONFIG"; then - if test -n "$GRAPHITE_CFLAGS"; then - pkg_cv_GRAPHITE_CFLAGS="$GRAPHITE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"silgraphite \"") >&5 - ($PKG_CONFIG --exists --print-errors "silgraphite ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GRAPHITE_CFLAGS=`$PKG_CONFIG --cflags "silgraphite " 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$GRAPHITE_LIBS"; then - pkg_cv_GRAPHITE_LIBS="$GRAPHITE_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"silgraphite \"") >&5 - ($PKG_CONFIG --exists --print-errors "silgraphite ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GRAPHITE_LIBS=`$PKG_CONFIG --libs "silgraphite " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for silgraphite " >&5 +$as_echo_n "checking for silgraphite ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GRAPHITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "silgraphite "` + if $PKG_CONFIG --exists "silgraphite " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking GRAPHITE_CFLAGS" >&5 +$as_echo_n "checking GRAPHITE_CFLAGS... " >&6; } + GRAPHITE_CFLAGS=`$PKG_CONFIG --cflags "silgraphite "` + { $as_echo "$as_me:$LINENO: result: $GRAPHITE_CFLAGS" >&5 +$as_echo "$GRAPHITE_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking GRAPHITE_LIBS" >&5 +$as_echo_n "checking GRAPHITE_LIBS... " >&6; } + GRAPHITE_LIBS=`$PKG_CONFIG --libs "silgraphite "` + { $as_echo "$as_me:$LINENO: result: $GRAPHITE_LIBS" >&5 +$as_echo "$GRAPHITE_LIBS" >&6; } else - GRAPHITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "silgraphite "` + GRAPHITE_CFLAGS="" + GRAPHITE_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GRAPHITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "silgraphite "` + echo $GRAPHITE_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$GRAPHITE_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (silgraphite ) were not met: -$GRAPHITE_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables GRAPHITE_CFLAGS -and GRAPHITE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (silgraphite ) were not met: - -$GRAPHITE_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables GRAPHITE_CFLAGS -and GRAPHITE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GRAPHITE_CFLAGS -and GRAPHITE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GRAPHITE_CFLAGS -and GRAPHITE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - GRAPHITE_CFLAGS=$pkg_cv_GRAPHITE_CFLAGS - GRAPHITE_LIBS=$pkg_cv_GRAPHITE_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi else { $as_echo "$as_me:$LINENO: result: internal" >&5 $as_echo "internal" >&6; } @@ -23604,76 +23380,102 @@ $as_echo "resorting to dlopen libXrandr at runtime" >&6; } else XRANDR_DLOPEN="FALSE" -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for XRANDR" >&5 -$as_echo_n "checking for XRANDR... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$XRANDR_CFLAGS"; then - pkg_cv_XRANDR_CFLAGS="$XRANDR_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrandr >= 1.2\"") >&5 - ($PKG_CONFIG --exists --print-errors "xrandr >= 1.2") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_XRANDR_CFLAGS=`$PKG_CONFIG --cflags "xrandr >= 1.2" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$XRANDR_LIBS"; then - pkg_cv_XRANDR_LIBS="$XRANDR_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrandr >= 1.2\"") >&5 - ($PKG_CONFIG --exists --print-errors "xrandr >= 1.2") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_XRANDR_LIBS=`$PKG_CONFIG --libs "xrandr >= 1.2" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for xrandr >= 1.2" >&5 +$as_echo_n "checking for xrandr >= 1.2... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - XRANDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xrandr >= 1.2"` + if $PKG_CONFIG --exists "xrandr >= 1.2" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking XRANDR_CFLAGS" >&5 +$as_echo_n "checking XRANDR_CFLAGS... " >&6; } + XRANDR_CFLAGS=`$PKG_CONFIG --cflags "xrandr >= 1.2"` + { $as_echo "$as_me:$LINENO: result: $XRANDR_CFLAGS" >&5 +$as_echo "$XRANDR_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking XRANDR_LIBS" >&5 +$as_echo_n "checking XRANDR_LIBS... " >&6; } + XRANDR_LIBS=`$PKG_CONFIG --libs "xrandr >= 1.2"` + { $as_echo "$as_me:$LINENO: result: $XRANDR_LIBS" >&5 +$as_echo "$XRANDR_LIBS" >&6; } else - XRANDR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrandr >= 1.2"` + XRANDR_CFLAGS="" + XRANDR_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + XRANDR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrandr >= 1.2"` + fi - # Put the nasty error message in config.log where it belongs - echo "$XRANDR_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - ENABLE_RANDR="" -elif test $pkg_failed = untried; then - ENABLE_RANDR="" -else - XRANDR_CFLAGS=$pkg_cv_XRANDR_CFLAGS - XRANDR_LIBS=$pkg_cv_XRANDR_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - ENABLE_RANDR="TRUE" -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ENABLE_RANDR="TRUE" + else + ENABLE_RANDR="" + fi + if test "$ENABLE_RANDR" != "TRUE"; then if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 @@ -23924,80 +23726,104 @@ if test -n "$with_system_neon" -o -n "$with_system_libs" && \ { $as_echo "$as_me:$LINENO: result: external" >&5 $as_echo "external" >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for NEON" >&5 -$as_echo_n "checking for NEON... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$NEON_CFLAGS"; then - pkg_cv_NEON_CFLAGS="$NEON_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"neon >= 0.26.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "neon >= 0.26.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.26.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$NEON_LIBS"; then - pkg_cv_NEON_LIBS="$NEON_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"neon >= 0.26.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "neon >= 0.26.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.26.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for neon >= 0.26.0" >&5 +$as_echo_n "checking for neon >= 0.26.0... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - NEON_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "neon >= 0.26.0"` + if $PKG_CONFIG --exists "neon >= 0.26.0" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5 +$as_echo_n "checking NEON_CFLAGS... " >&6; } + NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.26.0"` + { $as_echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5 +$as_echo "$NEON_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking NEON_LIBS" >&5 +$as_echo_n "checking NEON_LIBS... " >&6; } + NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.26.0"` + { $as_echo "$as_me:$LINENO: result: $NEON_LIBS" >&5 +$as_echo "$NEON_LIBS" >&6; } else - NEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "neon >= 0.26.0"` + NEON_CFLAGS="" + NEON_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + NEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "neon >= 0.26.0"` + fi - # Put the nasty error message in config.log where it belongs - echo "$NEON_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 -$as_echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 $as_echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} { (exit 1); exit 1; }; } -else - NEON_CFLAGS=$pkg_cv_NEON_CFLAGS - NEON_LIBS=$pkg_cv_NEON_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi + fi + NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" SYSTEM_NEON=YES @@ -24031,118 +23857,104 @@ $as_echo "external" >&6; } OPENSSL_LIBS="-lssl -lcrypto" else -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for OPENSSL" >&5 -$as_echo_n "checking for OPENSSL... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$OPENSSL_CFLAGS"; then - pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"openssl \"") >&5 - ($PKG_CONFIG --exists --print-errors "openssl ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$OPENSSL_LIBS"; then - pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"openssl \"") >&5 - ($PKG_CONFIG --exists --print-errors "openssl ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for openssl " >&5 +$as_echo_n "checking for openssl ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl "` + if $PKG_CONFIG --exists "openssl " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking OPENSSL_CFLAGS" >&5 +$as_echo_n "checking OPENSSL_CFLAGS... " >&6; } + OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl "` + { $as_echo "$as_me:$LINENO: result: $OPENSSL_CFLAGS" >&5 +$as_echo "$OPENSSL_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking OPENSSL_LIBS" >&5 +$as_echo_n "checking OPENSSL_LIBS... " >&6; } + OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl "` + { $as_echo "$as_me:$LINENO: result: $OPENSSL_LIBS" >&5 +$as_echo "$OPENSSL_LIBS" >&6; } else - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl "` + OPENSSL_CFLAGS="" + OPENSSL_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl "` + echo $OPENSSL_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$OPENSSL_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (openssl ) were not met: - -$OPENSSL_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables OPENSSL_CFLAGS -and OPENSSL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (openssl ) were not met: - -$OPENSSL_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables OPENSSL_CFLAGS -and OPENSSL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. -Alternatively, you may set the environment variables OPENSSL_CFLAGS -and OPENSSL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables OPENSSL_CFLAGS -and OPENSSL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { (exit 1); exit 1; }; } + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS - OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi fi SYSTEM_OPENSSL=YES else @@ -24173,118 +23985,104 @@ $as_echo_n "checking which AGG to use... " >&6; } { $as_echo "$as_me:$LINENO: result: external" >&5 $as_echo "external" >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for AGG" >&5 -$as_echo_n "checking for AGG... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$AGG_CFLAGS"; then - pkg_cv_AGG_CFLAGS="$AGG_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libagg >= 2.3\"") >&5 - ($PKG_CONFIG --exists --print-errors "libagg >= 2.3") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$AGG_LIBS"; then - pkg_cv_AGG_LIBS="$AGG_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libagg >= 2.3\"") >&5 - ($PKG_CONFIG --exists --print-errors "libagg >= 2.3") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for libagg >= 2.3" >&5 +$as_echo_n "checking for libagg >= 2.3... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - AGG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libagg >= 2.3"` + if $PKG_CONFIG --exists "libagg >= 2.3" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking AGG_CFLAGS" >&5 +$as_echo_n "checking AGG_CFLAGS... " >&6; } + AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3"` + { $as_echo "$as_me:$LINENO: result: $AGG_CFLAGS" >&5 +$as_echo "$AGG_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking AGG_LIBS" >&5 +$as_echo_n "checking AGG_LIBS... " >&6; } + AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3"` + { $as_echo "$as_me:$LINENO: result: $AGG_LIBS" >&5 +$as_echo "$AGG_LIBS" >&6; } else - AGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libagg >= 2.3"` + AGG_CFLAGS="" + AGG_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + AGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libagg >= 2.3"` + echo $AGG_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$AGG_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (libagg >= 2.3) were not met: - -$AGG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables AGG_CFLAGS -and AGG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (libagg >= 2.3) were not met: -$AGG_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables AGG_CFLAGS -and AGG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables AGG_CFLAGS -and AGG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables AGG_CFLAGS -and AGG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - AGG_CFLAGS=$pkg_cv_AGG_CFLAGS - AGG_LIBS=$pkg_cv_AGG_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi { $as_echo "$as_me:$LINENO: checking agg version" >&5 $as_echo_n "checking agg version... " >&6; } # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway @@ -24331,118 +24129,104 @@ if test -n "$with_system_redland" -o -n "$with_system_libs" && \ $as_echo "external" >&6; } SYSTEM_REDLAND=YES -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for REDLAND" >&5 -$as_echo_n "checking for REDLAND... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$REDLAND_CFLAGS"; then - pkg_cv_REDLAND_CFLAGS="$REDLAND_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"redland >= 1.0.8\"") >&5 - ($PKG_CONFIG --exists --print-errors "redland >= 1.0.8") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_REDLAND_CFLAGS=`$PKG_CONFIG --cflags "redland >= 1.0.8" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$REDLAND_LIBS"; then - pkg_cv_REDLAND_LIBS="$REDLAND_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"redland >= 1.0.8\"") >&5 - ($PKG_CONFIG --exists --print-errors "redland >= 1.0.8") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_REDLAND_LIBS=`$PKG_CONFIG --libs "redland >= 1.0.8" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for redland >= 1.0.8" >&5 +$as_echo_n "checking for redland >= 1.0.8... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - REDLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "redland >= 1.0.8"` + if $PKG_CONFIG --exists "redland >= 1.0.8" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking REDLAND_CFLAGS" >&5 +$as_echo_n "checking REDLAND_CFLAGS... " >&6; } + REDLAND_CFLAGS=`$PKG_CONFIG --cflags "redland >= 1.0.8"` + { $as_echo "$as_me:$LINENO: result: $REDLAND_CFLAGS" >&5 +$as_echo "$REDLAND_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking REDLAND_LIBS" >&5 +$as_echo_n "checking REDLAND_LIBS... " >&6; } + REDLAND_LIBS=`$PKG_CONFIG --libs "redland >= 1.0.8"` + { $as_echo "$as_me:$LINENO: result: $REDLAND_LIBS" >&5 +$as_echo "$REDLAND_LIBS" >&6; } else - REDLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "redland >= 1.0.8"` + REDLAND_CFLAGS="" + REDLAND_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + REDLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "redland >= 1.0.8"` + echo $REDLAND_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$REDLAND_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (redland >= 1.0.8) were not met: - -$REDLAND_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables REDLAND_CFLAGS -and REDLAND_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (redland >= 1.0.8) were not met: -$REDLAND_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables REDLAND_CFLAGS -and REDLAND_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables REDLAND_CFLAGS -and REDLAND_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables REDLAND_CFLAGS -and REDLAND_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - REDLAND_CFLAGS=$pkg_cv_REDLAND_CFLAGS - REDLAND_LIBS=$pkg_cv_REDLAND_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi else { $as_echo "$as_me:$LINENO: result: internal" >&5 $as_echo "internal" >&6; } @@ -24467,76 +24251,102 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for HUNSPELL" >&5 -$as_echo_n "checking for HUNSPELL... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$HUNSPELL_CFLAGS"; then - pkg_cv_HUNSPELL_CFLAGS="$HUNSPELL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hunspell\"") >&5 - ($PKG_CONFIG --exists --print-errors "hunspell") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$HUNSPELL_LIBS"; then - pkg_cv_HUNSPELL_LIBS="$HUNSPELL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hunspell\"") >&5 - ($PKG_CONFIG --exists --print-errors "hunspell") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for hunspell" >&5 +$as_echo_n "checking for hunspell... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "hunspell"` + if $PKG_CONFIG --exists "hunspell" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking HUNSPELL_CFLAGS" >&5 +$as_echo_n "checking HUNSPELL_CFLAGS... " >&6; } + HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell"` + { $as_echo "$as_me:$LINENO: result: $HUNSPELL_CFLAGS" >&5 +$as_echo "$HUNSPELL_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking HUNSPELL_LIBS" >&5 +$as_echo_n "checking HUNSPELL_LIBS... " >&6; } + HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell"` + { $as_echo "$as_me:$LINENO: result: $HUNSPELL_LIBS" >&5 +$as_echo "$HUNSPELL_LIBS" >&6; } else - HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hunspell"` + HUNSPELL_CFLAGS="" + HUNSPELL_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hunspell"` + fi - # Put the nasty error message in config.log where it belongs - echo "$HUNSPELL_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - HUNSPELL_PC="" -elif test $pkg_failed = untried; then - HUNSPELL_PC="" -else - HUNSPELL_CFLAGS=$pkg_cv_HUNSPELL_CFLAGS - HUNSPELL_LIBS=$pkg_cv_HUNSPELL_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HUNSPELL_PC="TRUE" -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HUNSPELL_PC="TRUE" + else + HUNSPELL_PC="" + fi + if test "$HUNSPELL_PC" != "TRUE"; then if test "${ac_cv_header_hunspell_hxx+set}" = set; then { $as_echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 @@ -25393,76 +25203,102 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for MYTHES" >&5 -$as_echo_n "checking for MYTHES... " >&6; } + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -if test -n "$PKG_CONFIG"; then - if test -n "$MYTHES_CFLAGS"; then - pkg_cv_MYTHES_CFLAGS="$MYTHES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mythes\"") >&5 - ($PKG_CONFIG --exists --print-errors "mythes") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MYTHES_CFLAGS=`$PKG_CONFIG --cflags "mythes" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$MYTHES_LIBS"; then - pkg_cv_MYTHES_LIBS="$MYTHES_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mythes\"") >&5 - ($PKG_CONFIG --exists --print-errors "mythes") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_MYTHES_LIBS=`$PKG_CONFIG --libs "mythes" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for mythes" >&5 +$as_echo_n "checking for mythes... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MYTHES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mythes"` + if $PKG_CONFIG --exists "mythes" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking MYTHES_CFLAGS" >&5 +$as_echo_n "checking MYTHES_CFLAGS... " >&6; } + MYTHES_CFLAGS=`$PKG_CONFIG --cflags "mythes"` + { $as_echo "$as_me:$LINENO: result: $MYTHES_CFLAGS" >&5 +$as_echo "$MYTHES_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking MYTHES_LIBS" >&5 +$as_echo_n "checking MYTHES_LIBS... " >&6; } + MYTHES_LIBS=`$PKG_CONFIG --libs "mythes"` + { $as_echo "$as_me:$LINENO: result: $MYTHES_LIBS" >&5 +$as_echo "$MYTHES_LIBS" >&6; } else - MYTHES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mythes"` + MYTHES_CFLAGS="" + MYTHES_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + MYTHES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mythes"` + fi - # Put the nasty error message in config.log where it belongs - echo "$MYTHES_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - MYTHES_PKGCONFIG=no -elif test $pkg_failed = untried; then - MYTHES_PKGCONFIG=no -else - MYTHES_CFLAGS=$pkg_cv_MYTHES_CFLAGS - MYTHES_LIBS=$pkg_cv_MYTHES_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - MYTHES_PKGCONFIG=yes -fi + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + MYTHES_PKGCONFIG=yes + else + MYTHES_PKGCONFIG=no + fi + if test "$MYTHES_PKGCONFIG" = "no"; then if test "${ac_cv_header_mythes_hxx+set}" = set; then { $as_echo "$as_me:$LINENO: checking for mythes.hxx" >&5 @@ -27536,118 +27372,104 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_g { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GCONF" >&5 -$as_echo_n "checking for GCONF... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$GCONF_CFLAGS"; then - pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gconf-2.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$GCONF_LIBS"; then - pkg_cv_GCONF_LIBS="$GCONF_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gconf-2.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 +$as_echo_n "checking for gconf-2.0 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gconf-2.0 "` + if $PKG_CONFIG --exists "gconf-2.0 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 +$as_echo_n "checking GCONF_CFLAGS... " >&6; } + GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` + { $as_echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 +$as_echo "$GCONF_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 +$as_echo_n "checking GCONF_LIBS... " >&6; } + GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` + { $as_echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 +$as_echo "$GCONF_LIBS" >&6; } else - GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "` + GCONF_CFLAGS="" + GCONF_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "` + echo $GCONF_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$GCONF_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (gconf-2.0 ) were not met: - -$GCONF_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (gconf-2.0 ) were not met: -$GCONF_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS - GCONF_LIBS=$pkg_cv_GCONF_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } @@ -27663,232 +27485,204 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GNOMEVFS" >&5 -$as_echo_n "checking for GNOMEVFS... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$GNOMEVFS_CFLAGS"; then - pkg_cv_GNOMEVFS_CFLAGS="$GNOMEVFS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-vfs-2.0 >= 2.6.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gnome-vfs-2.0 >= 2.6.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$GNOMEVFS_LIBS"; then - pkg_cv_GNOMEVFS_LIBS="$GNOMEVFS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-vfs-2.0 >= 2.6.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gnome-vfs-2.0 >= 2.6.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GNOMEVFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gnome-vfs-2.0 >= 2.6.0 " >&5 +$as_echo_n "checking for gnome-vfs-2.0 >= 2.6.0 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GNOMEVFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnome-vfs-2.0 >= 2.6.0 "` + if $PKG_CONFIG --exists "gnome-vfs-2.0 >= 2.6.0 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking GNOMEVFS_CFLAGS" >&5 +$as_echo_n "checking GNOMEVFS_CFLAGS... " >&6; } + GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6.0 "` + { $as_echo "$as_me:$LINENO: result: $GNOMEVFS_CFLAGS" >&5 +$as_echo "$GNOMEVFS_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking GNOMEVFS_LIBS" >&5 +$as_echo_n "checking GNOMEVFS_LIBS... " >&6; } + GNOMEVFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6.0 "` + { $as_echo "$as_me:$LINENO: result: $GNOMEVFS_LIBS" >&5 +$as_echo "$GNOMEVFS_LIBS" >&6; } else - GNOMEVFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-vfs-2.0 >= 2.6.0 "` + GNOMEVFS_CFLAGS="" + GNOMEVFS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GNOMEVFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-vfs-2.0 >= 2.6.0 "` + echo $GNOMEVFS_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$GNOMEVFS_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (gnome-vfs-2.0 >= 2.6.0 ) were not met: - -$GNOMEVFS_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables GNOMEVFS_CFLAGS -and GNOMEVFS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (gnome-vfs-2.0 >= 2.6.0 ) were not met: -$GNOMEVFS_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables GNOMEVFS_CFLAGS -and GNOMEVFS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GNOMEVFS_CFLAGS -and GNOMEVFS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GNOMEVFS_CFLAGS -and GNOMEVFS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - GNOMEVFS_CFLAGS=$pkg_cv_GNOMEVFS_CFLAGS - GNOMEVFS_LIBS=$pkg_cv_GNOMEVFS_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi if test "$ENABLE_GCONF" != "TRUE"; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GCONF" >&5 -$as_echo_n "checking for GCONF... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$GCONF_CFLAGS"; then - pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gconf-2.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$GCONF_LIBS"; then - pkg_cv_GCONF_LIBS="$GCONF_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gconf-2.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 +$as_echo_n "checking for gconf-2.0 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gconf-2.0 "` + if $PKG_CONFIG --exists "gconf-2.0 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 +$as_echo_n "checking GCONF_CFLAGS... " >&6; } + GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` + { $as_echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 +$as_echo "$GCONF_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 +$as_echo_n "checking GCONF_LIBS... " >&6; } + GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` + { $as_echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 +$as_echo "$GCONF_LIBS" >&6; } else - GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "` + GCONF_CFLAGS="" + GCONF_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "` + echo $GCONF_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$GCONF_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (gconf-2.0 ) were not met: -$GCONF_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (gconf-2.0 ) were not met: - -$GCONF_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS - GCONF_LIBS=$pkg_cv_GCONF_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi fi else { $as_echo "$as_me:$LINENO: result: no" >&5 @@ -27905,80 +27699,104 @@ if test "$test_gtk" = "yes"; then if test "$ENABLE_GTK" = "TRUE" ; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GTK" >&5 -$as_echo_n "checking for GTK... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$GTK_CFLAGS"; then - pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$GTK_LIBS"; then - pkg_cv_GTK_LIBS="$GTK_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " >&5 +$as_echo_n "checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` + if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 +$as_echo_n "checking GTK_CFLAGS... " >&6; } + GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` + { $as_echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 +$as_echo "$GTK_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking GTK_LIBS" >&5 +$as_echo_n "checking GTK_LIBS... " >&6; } + GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` + { $as_echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 +$as_echo "$GTK_LIBS" >&6; } else - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` + GTK_CFLAGS="" + GTK_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` + fi - # Put the nasty error message in config.log where it belongs - echo "$GTK_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 -$as_echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 $as_echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} { (exit 1); exit 1; }; } -else - GTK_CFLAGS=$pkg_cv_GTK_CFLAGS - GTK_LIBS=$pkg_cv_GTK_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi + fi + BUILD_TYPE="$BUILD_TYPE GTK" if test "x$enable_systray" = "xyes"; then @@ -27993,118 +27811,104 @@ $as_echo_n "checking whether to enable DBUS support... " >&6; } { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for DBUS" >&5 -$as_echo_n "checking for DBUS... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$DBUS_CFLAGS"; then - pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.70 \"") >&5 - ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.70 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.70 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$DBUS_LIBS"; then - pkg_cv_DBUS_LIBS="$DBUS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.70 \"") >&5 - ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.70 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.70 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for dbus-glib-1 >= 0.70 " >&5 +$as_echo_n "checking for dbus-glib-1 >= 0.70 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-glib-1 >= 0.70 "` + if $PKG_CONFIG --exists "dbus-glib-1 >= 0.70 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5 +$as_echo_n "checking DBUS_CFLAGS... " >&6; } + DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.70 "` + { $as_echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5 +$as_echo "$DBUS_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking DBUS_LIBS" >&5 +$as_echo_n "checking DBUS_LIBS... " >&6; } + DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.70 "` + { $as_echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5 +$as_echo "$DBUS_LIBS" >&6; } else - DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= 0.70 "` + DBUS_CFLAGS="" + DBUS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= 0.70 "` + echo $DBUS_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$DBUS_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (dbus-glib-1 >= 0.70 ) were not met: - -$DBUS_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables DBUS_CFLAGS -and DBUS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (dbus-glib-1 >= 0.70 ) were not met: -$DBUS_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables DBUS_CFLAGS -and DBUS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables DBUS_CFLAGS -and DBUS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables DBUS_CFLAGS -and DBUS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS - DBUS_LIBS=$pkg_cv_DBUS_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } @@ -28122,118 +27926,104 @@ $as_echo "$as_me: error: please use --enable-gio only together with --disable-gn { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GIO" >&5 -$as_echo_n "checking for GIO... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$GIO_CFLAGS"; then - pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gio-2.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$GIO_LIBS"; then - pkg_cv_GIO_LIBS="$GIO_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gio-2.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gio-2.0 " >&5 +$as_echo_n "checking for gio-2.0 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gio-2.0 "` + if $PKG_CONFIG --exists "gio-2.0 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking GIO_CFLAGS" >&5 +$as_echo_n "checking GIO_CFLAGS... " >&6; } + GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 "` + { $as_echo "$as_me:$LINENO: result: $GIO_CFLAGS" >&5 +$as_echo "$GIO_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking GIO_LIBS" >&5 +$as_echo_n "checking GIO_LIBS... " >&6; } + GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 "` + { $as_echo "$as_me:$LINENO: result: $GIO_LIBS" >&5 +$as_echo "$GIO_LIBS" >&6; } else - GIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 "` + GIO_CFLAGS="" + GIO_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 "` + echo $GIO_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$GIO_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (gio-2.0 ) were not met: -$GIO_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables GIO_CFLAGS -and GIO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (gio-2.0 ) were not met: - -$GIO_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables GIO_CFLAGS -and GIO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GIO_CFLAGS -and GIO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GIO_CFLAGS -and GIO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - GIO_CFLAGS=$pkg_cv_GIO_CFLAGS - GIO_LIBS=$pkg_cv_GIO_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } @@ -28258,80 +28048,104 @@ if test "$test_gstreamer" = "yes"; then $as_echo_n "checking whether to build the GStreamer media backend... " >&6; } if test "x$enable_gstreamer" != "xno" ; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GSTREAMER" >&5 -$as_echo_n "checking for GSTREAMER... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$GSTREAMER_CFLAGS"; then - pkg_cv_GSTREAMER_CFLAGS="$GSTREAMER_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$GSTREAMER_LIBS"; then - pkg_cv_GSTREAMER_LIBS="$GSTREAMER_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 \"") >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GSTREAMER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 +$as_echo_n "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GSTREAMER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` + if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking GSTREAMER_CFLAGS" >&5 +$as_echo_n "checking GSTREAMER_CFLAGS... " >&6; } + GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` + { $as_echo "$as_me:$LINENO: result: $GSTREAMER_CFLAGS" >&5 +$as_echo "$GSTREAMER_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking GSTREAMER_LIBS" >&5 +$as_echo_n "checking GSTREAMER_LIBS... " >&6; } + GSTREAMER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` + { $as_echo "$as_me:$LINENO: result: $GSTREAMER_LIBS" >&5 +$as_echo "$GSTREAMER_LIBS" >&6; } else - GSTREAMER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` + GSTREAMER_CFLAGS="" + GSTREAMER_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GSTREAMER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` + fi - # Put the nasty error message in config.log where it belongs - echo "$GSTREAMER_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 -$as_echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 $as_echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} { (exit 1); exit 1; }; } -else - GSTREAMER_CFLAGS=$pkg_cv_GSTREAMER_CFLAGS - GSTREAMER_LIBS=$pkg_cv_GSTREAMER_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi + fi + ENABLE_GSTREAMER="TRUE" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -28367,118 +28181,104 @@ $as_echo "external" >&6; } SYSTEM_CAIRO=YES -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for CAIRO" >&5 -$as_echo_n "checking for CAIRO... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$CAIRO_CFLAGS"; then - pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.0.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "cairo >= 1.0.2 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.0.2 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$CAIRO_LIBS"; then - pkg_cv_CAIRO_LIBS="$CAIRO_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.0.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "cairo >= 1.0.2 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.0.2 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for cairo >= 1.0.2 " >&5 +$as_echo_n "checking for cairo >= 1.0.2 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.0.2 "` + if $PKG_CONFIG --exists "cairo >= 1.0.2 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking CAIRO_CFLAGS" >&5 +$as_echo_n "checking CAIRO_CFLAGS... " >&6; } + CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.0.2 "` + { $as_echo "$as_me:$LINENO: result: $CAIRO_CFLAGS" >&5 +$as_echo "$CAIRO_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking CAIRO_LIBS" >&5 +$as_echo_n "checking CAIRO_LIBS... " >&6; } + CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.0.2 "` + { $as_echo "$as_me:$LINENO: result: $CAIRO_LIBS" >&5 +$as_echo "$CAIRO_LIBS" >&6; } else - CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.0.2 "` + CAIRO_CFLAGS="" + CAIRO_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.0.2 "` + echo $CAIRO_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$CAIRO_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (cairo >= 1.0.2 ) were not met: - -$CAIRO_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables CAIRO_CFLAGS -and CAIRO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (cairo >= 1.0.2 ) were not met: -$CAIRO_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables CAIRO_CFLAGS -and CAIRO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables CAIRO_CFLAGS -and CAIRO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables CAIRO_CFLAGS -and CAIRO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS - CAIRO_LIBS=$pkg_cv_CAIRO_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then { { $as_echo "$as_me:$LINENO: error: Cairo library requires fontconfig." >&5 $as_echo "$as_me: error: Cairo library requires fontconfig." >&2;} @@ -28926,118 +28726,104 @@ $as_echo_n "checking which pdf backend to use... " >&6; } $as_echo "external" >&6; } SYSTEM_POPPLER=YES -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for POPPLER" >&5 -$as_echo_n "checking for POPPLER... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$POPPLER_CFLAGS"; then - pkg_cv_POPPLER_CFLAGS="$POPPLER_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.8.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "poppler >= 0.8.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.8.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$POPPLER_LIBS"; then - pkg_cv_POPPLER_LIBS="$POPPLER_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.8.0 \"") >&5 - ($PKG_CONFIG --exists --print-errors "poppler >= 0.8.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.8.0 " 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for poppler >= 0.8.0 " >&5 +$as_echo_n "checking for poppler >= 0.8.0 ... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - POPPLER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "poppler >= 0.8.0 "` + if $PKG_CONFIG --exists "poppler >= 0.8.0 " ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking POPPLER_CFLAGS" >&5 +$as_echo_n "checking POPPLER_CFLAGS... " >&6; } + POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.8.0 "` + { $as_echo "$as_me:$LINENO: result: $POPPLER_CFLAGS" >&5 +$as_echo "$POPPLER_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking POPPLER_LIBS" >&5 +$as_echo_n "checking POPPLER_LIBS... " >&6; } + POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.8.0 "` + { $as_echo "$as_me:$LINENO: result: $POPPLER_LIBS" >&5 +$as_echo "$POPPLER_LIBS" >&6; } else - POPPLER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "poppler >= 0.8.0 "` + POPPLER_CFLAGS="" + POPPLER_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + POPPLER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "poppler >= 0.8.0 "` + echo $POPPLER_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$POPPLER_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (poppler >= 0.8.0 ) were not met: -$POPPLER_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables POPPLER_CFLAGS -and POPPLER_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (poppler >= 0.8.0 ) were not met: - -$POPPLER_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables POPPLER_CFLAGS -and POPPLER_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables POPPLER_CFLAGS -and POPPLER_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables POPPLER_CFLAGS -and POPPLER_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - POPPLER_CFLAGS=$pkg_cv_POPPLER_CFLAGS - POPPLER_LIBS=$pkg_cv_POPPLER_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi else { $as_echo "$as_me:$LINENO: result: internal" >&5 $as_echo "internal" >&6; } @@ -30812,118 +30598,104 @@ if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GOBJECT" >&5 -$as_echo_n "checking for GOBJECT... " >&6; } + succeeded=no -if test -n "$PKG_CONFIG"; then - if test -n "$GOBJECT_CFLAGS"; then - pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 else - pkg_failed=untried + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - if test -n "$GOBJECT_LIBS"; then - pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - pkg_failed=untried + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi -if test $pkg_failed = yes; then + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:$LINENO: checking for gobject-2.0" >&5 +$as_echo_n "checking for gobject-2.0... " >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gobject-2.0"` + if $PKG_CONFIG --exists "gobject-2.0" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:$LINENO: checking GOBJECT_CFLAGS" >&5 +$as_echo_n "checking GOBJECT_CFLAGS... " >&6; } + GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0"` + { $as_echo "$as_me:$LINENO: result: $GOBJECT_CFLAGS" >&5 +$as_echo "$GOBJECT_CFLAGS" >&6; } + + { $as_echo "$as_me:$LINENO: checking GOBJECT_LIBS" >&5 +$as_echo_n "checking GOBJECT_LIBS... " >&6; } + GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0"` + { $as_echo "$as_me:$LINENO: result: $GOBJECT_LIBS" >&5 +$as_echo "$GOBJECT_LIBS" >&6; } else - GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0"` + GOBJECT_CFLAGS="" + GOBJECT_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0"` + echo $GOBJECT_PKG_ERRORS fi - # Put the nasty error message in config.log where it belongs - echo "$GOBJECT_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (gobject-2.0) were not met: -$GOBJECT_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GOBJECT_CFLAGS -and GOBJECT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (gobject-2.0) were not met: - -$GOBJECT_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi -Alternatively, you may set the environment variables GOBJECT_CFLAGS -and GOBJECT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} + if test $succeeded = yes; then + : + else + { { $as_echo "$as_me:$LINENO: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +$as_echo "$as_me: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GOBJECT_CFLAGS -and GOBJECT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GOBJECT_CFLAGS -and GOBJECT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - GOBJECT_CFLAGS=$pkg_cv_GOBJECT_CFLAGS - GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi ENABLE_EVOAB2="TRUE" else ENABLE_EVOAB2="" -- cgit From ef8e9d51cee9b439380c5fe3ecd4123ffc738b69 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 11 Feb 2011 15:06:12 +0100 Subject: ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300 ab77: #163789# Handle class module factories document specific ab77: #163732# Defer removal of documents until XCloseListener::notifyClosing ab77: #163808# make VBA symbols Application.ScreenUpdating and Application.Interactive work globally on all documents ab77: wae ab77: #163840# read UTF-8 BOM ab77: #163732# VBA UserForm_Terminate triggered too late while closing document ab77: minor correction ab77: assertion: do not call ::rtl::OUString::copy() with negative index ab77run2: #163869# do not call Class_Terminate VBA macros when document disposes dr77i: #163941# do not update drawing layer when pasting from clipboard after cut mib21: #163944# ignore trailing whitespace in Basic source lines mib21: #163948# allow to manually pack MSVC DLLs into extensions mib21: #163948# multiprocess build fix Authors: Andreas Bregas Daniel Rentz [dr] Eike Rathke [er] --- tools/inc/tools/stream.hxx | 17 +++++++++++++--- tools/source/stream/stream.cxx | 46 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index 61af361aa5b7..440eb2283f20 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -460,9 +460,20 @@ public: /// Switch to no endian swapping and write 0xfeff sal_Bool StartWritingUnicodeText(); - /// Read 16bit, if 0xfeff do nothing, if 0xfffe switch - /// endian swapping, if none of them put back - sal_Bool StartReadingUnicodeText(); + + /** If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit, + if 0xfeff do nothing (UTF-16), if 0xfffe switch endian + swapping (UTF-16), if 0xefbb or 0xbbef read another byte + and check for UTF-8. If no UTF-* BOM was detected put all + read bytes back. This means that if 2 bytes were read it + was an UTF-16 BOM, if 3 bytes were read it was an UTF-8 + BOM. There is no UTF-7, UTF-32 or UTF-EBCDIC BOM detection! + + If eReadBomCharSet!=RTL_TEXTENCODING_DONTKNOW: only read a + BOM of that encoding and switch endian swapping if UTF-16 + and 0xfffe. + */ + sal_Bool StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet ); /// Read a line of Unicode sal_Bool ReadUniStringLine( String& rStr ); diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 9fdef8436f1a..92ce4214dfc4 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1046,21 +1046,59 @@ sal_Bool SvStream::StartWritingUnicodeText() |* *************************************************************************/ -sal_Bool SvStream::StartReadingUnicodeText() +sal_Bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet ) { + if (!( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || + eReadBomCharSet == RTL_TEXTENCODING_UNICODE || + eReadBomCharSet == RTL_TEXTENCODING_UTF8)) + return sal_True; // nothing to read + + bool bTryUtf8 = false; sal_uInt16 nFlag; + sal_sSize nBack = sizeof(nFlag); *this >> nFlag; switch ( nFlag ) { case 0xfeff : - // native + // native UTF-16 + if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || + eReadBomCharSet == RTL_TEXTENCODING_UNICODE) + nBack = 0; break; case 0xfffe : - SetEndianSwap( !bSwap ); + // swapped UTF-16 + if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || + eReadBomCharSet == RTL_TEXTENCODING_UNICODE) + { + SetEndianSwap( !bSwap ); + nBack = 0; + } + break; + case 0xefbb : + if (nNumberFormatInt == NUMBERFORMAT_INT_BIGENDIAN && + (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || + eReadBomCharSet == RTL_TEXTENCODING_UTF8)) + bTryUtf8 = true; + break; + case 0xbbef : + if (nNumberFormatInt == NUMBERFORMAT_INT_LITTLEENDIAN && + (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || + eReadBomCharSet == RTL_TEXTENCODING_UTF8)) + bTryUtf8 = true; break; default: - SeekRel( -((sal_sSize)sizeof(nFlag)) ); // no BOM, pure data + ; // nothing + } + if (bTryUtf8) + { + sal_uChar nChar; + nBack += sizeof(nChar); + *this >> nChar; + if (nChar == 0xbf) + nBack = 0; // it is UTF-8 } + if (nBack) + SeekRel( -nBack ); // no BOM, pure data return nError == SVSTREAM_OK; } -- cgit From b2fb361af3f67dc79cf93cfaf7e7a7bcad4b801a Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 11 Feb 2011 15:06:12 +0100 Subject: ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300 ab77: #163789# Handle class module factories document specific ab77: #163732# Defer removal of documents until XCloseListener::notifyClosing ab77: #163808# make VBA symbols Application.ScreenUpdating and Application.Interactive work globally on all documents ab77: wae ab77: #163840# read UTF-8 BOM ab77: #163732# VBA UserForm_Terminate triggered too late while closing document ab77: minor correction ab77: assertion: do not call ::rtl::OUString::copy() with negative index ab77run2: #163869# do not call Class_Terminate VBA macros when document disposes dr77i: #163941# do not update drawing layer when pasting from clipboard after cut mib21: #163944# ignore trailing whitespace in Basic source lines mib21: #163948# allow to manually pack MSVC DLLs into extensions mib21: #163948# multiprocess build fix Authors: Andreas Bregas Daniel Rentz [dr] Eike Rathke [er] --- sw/source/filter/ascii/parasc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 64a261fc8ba0..eb4927a828f7 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -310,7 +310,7 @@ ULONG SwASCIIParser::ReadChars() } else if (pUseMe != &aEmpty) //Already successfully figured out type { - rInput.StartReadingUnicodeText(); + rInput.StartReadingUnicodeText( currentCharSet ); bSwapUnicode = rInput.IsEndianSwap(); } -- cgit From fcad8a5c8b77bfc6b3cb41d7465147ad157d0124 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 11 Feb 2011 15:06:12 +0100 Subject: ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300 ab77: #163789# Handle class module factories document specific ab77: #163732# Defer removal of documents until XCloseListener::notifyClosing ab77: #163808# make VBA symbols Application.ScreenUpdating and Application.Interactive work globally on all documents ab77: wae ab77: #163840# read UTF-8 BOM ab77: #163732# VBA UserForm_Terminate triggered too late while closing document ab77: minor correction ab77: assertion: do not call ::rtl::OUString::copy() with negative index ab77run2: #163869# do not call Class_Terminate VBA macros when document disposes dr77i: #163941# do not update drawing layer when pasting from clipboard after cut mib21: #163944# ignore trailing whitespace in Basic source lines mib21: #163948# allow to manually pack MSVC DLLs into extensions mib21: #163948# multiprocess build fix Authors: Andreas Bregas Daniel Rentz [dr] Eike Rathke [er] --- basic/inc/basic/sbstar.hxx | 2 + basic/source/basmgr/makefile.mk | 3 +- basic/source/classes/sb.cxx | 193 +++++++++++++++++++--- basic/source/classes/sbxmod.cxx | 103 ++++++++---- basic/source/comp/scanner.cxx | 20 ++- ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 105 ++++++++++-- ucb/source/ucp/tdoc/tdoc_docmgr.hxx | 34 +++- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 13 +- vbahelper/source/vbahelper/vbadocumentbase.cxx | 13 +- vbahelper/source/vbahelper/vbadocumentsbase.cxx | 61 ++++++- 10 files changed, 447 insertions(+), 100 deletions(-) diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index db67836890e9..00bfd4a9717b 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -48,6 +48,7 @@ class BasicLibInfo; // info block for basic manager class SbTextPortions; class SbMethod; class BasicManager; +class DocBasicItem; class StarBASICImpl; @@ -57,6 +58,7 @@ class StarBASIC : public SbxObject friend class SbiExpression; // Access to RTL friend class SbiInstance; friend class SbiRuntime; + friend class DocBasicItem; StarBASICImpl* mpStarBASICImpl; diff --git a/basic/source/basmgr/makefile.mk b/basic/source/basmgr/makefile.mk index e08e9cc753bd..d177379f32b8 100644 --- a/basic/source/basmgr/makefile.mk +++ b/basic/source/basmgr/makefile.mk @@ -39,7 +39,8 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/basmgr.obj \ - $(SLO)$/basicmanagerrepository.obj + $(SLO)$/basicmanagerrepository.obj \ + $(SLO)$/vbahelper.obj # --- Targets ------------------------------------------------------------- diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 30e01892fab9..87c26805b18f 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -55,8 +55,12 @@ #include "sb.hrc" #include #include +#include #include +#include +#include #include "errobject.hxx" +#include #include #include @@ -80,6 +84,143 @@ using com::sun::star::lang::XMultiServiceFactory; const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") ); const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); +// ============================================================================ + +class DocBasicItem : public ::cppu::WeakImplHelper1< util::XCloseListener > +{ +public: + explicit DocBasicItem( StarBASIC& rDocBasic ); + virtual ~DocBasicItem(); + + inline const SbxObjectRef& getClassModules() const { return mxClassModules; } + inline bool isDocClosed() const { return mbDocClosed; } + + void clearDependingVarsOnDelete( StarBASIC& rDeletedBasic ); + + void startListening(); + void stopListening(); + + virtual void SAL_CALL queryClosing( const lang::EventObject& rSource, sal_Bool bGetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException); + virtual void SAL_CALL notifyClosing( const lang::EventObject& rSource ) throw (uno::RuntimeException); + virtual void SAL_CALL disposing( const lang::EventObject& rSource ) throw (uno::RuntimeException); + +private: + StarBASIC& mrDocBasic; + SbxObjectRef mxClassModules; + bool mbDocClosed; + bool mbDisposed; +}; + +// ---------------------------------------------------------------------------- + +DocBasicItem::DocBasicItem( StarBASIC& rDocBasic ) : + mrDocBasic( rDocBasic ), + mxClassModules( new SbxObject( String() ) ), + mbDocClosed( false ), + mbDisposed( false ) +{ +} + +DocBasicItem::~DocBasicItem() +{ + stopListening(); +} + +void DocBasicItem::clearDependingVarsOnDelete( StarBASIC& rDeletedBasic ) +{ + mrDocBasic.implClearDependingVarsOnDelete( &rDeletedBasic ); +} + +void DocBasicItem::startListening() +{ + Any aThisComp; + mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp ); + Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY ); + if( xCloseBC.is() ) + try { xCloseBC->addCloseListener( this ); } catch( uno::Exception& ) {} +} + +void DocBasicItem::stopListening() +{ + if( mbDisposed ) return; + mbDisposed = true; + Any aThisComp; + mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp ); + Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY ); + if( xCloseBC.is() ) + try { xCloseBC->removeCloseListener( this ); } catch( uno::Exception& ) {} +} + +void SAL_CALL DocBasicItem::queryClosing( const lang::EventObject& /*rSource*/, sal_Bool /*bGetsOwnership*/ ) throw (util::CloseVetoException, uno::RuntimeException) +{ +} + +void SAL_CALL DocBasicItem::notifyClosing( const lang::EventObject& /*rEvent*/ ) throw (uno::RuntimeException) +{ + stopListening(); + mbDocClosed = true; +} + +void SAL_CALL DocBasicItem::disposing( const lang::EventObject& /*rEvent*/ ) throw (uno::RuntimeException) +{ + stopListening(); +} + +// ---------------------------------------------------------------------------- + +namespace { + +typedef ::rtl::Reference< DocBasicItem > DocBasicItemRef; +typedef std::map< const StarBASIC*, DocBasicItemRef > DocBasicItemMap; +static DocBasicItemMap GaDocBasicItems; + +const DocBasicItem* lclFindDocBasicItem( const StarBASIC* pDocBasic ) +{ + DocBasicItemMap::iterator it = GaDocBasicItems.find( pDocBasic ); + return (it != GaDocBasicItems.end()) ? it->second.get() : 0; +} + +void lclInsertDocBasicItem( StarBASIC& rDocBasic ) +{ + DocBasicItemRef& rxDocBasicItem = GaDocBasicItems[ &rDocBasic ]; + rxDocBasicItem.set( new DocBasicItem( rDocBasic ) ); + rxDocBasicItem->startListening(); +} + +void lclRemoveDocBasicItem( StarBASIC& rDocBasic ) +{ + DocBasicItemMap::iterator it = GaDocBasicItems.find( &rDocBasic ); + if( it != GaDocBasicItems.end() ) + { + it->second->stopListening(); + GaDocBasicItems.erase( it ); + } + DocBasicItemMap::iterator it_end = GaDocBasicItems.end(); + for( it = GaDocBasicItems.begin(); it != it_end; ++it ) + it->second->clearDependingVarsOnDelete( rDocBasic ); +} + +StarBASIC* lclGetDocBasicForModule( SbModule* pModule ) +{ + StarBASIC* pRetBasic = NULL; + SbxObject* pCurParent = pModule; + while( pCurParent->GetParent() != NULL ) + { + pCurParent = pCurParent->GetParent(); + StarBASIC* pDocBasic = PTR_CAST( StarBASIC, pCurParent ); + if( pDocBasic != NULL && pDocBasic->IsDocBasic() ) + { + pRetBasic = pDocBasic; + break; + } + } + return pRetBasic; +} + +} // namespace + +// ============================================================================ + SbxObject* StarBASIC::getVBAGlobals( ) { if ( !pVBAGlobals ) @@ -461,6 +602,7 @@ SbxObject* createUserTypeImpl( const String& rClassName ) return pRetObj; } + TYPEINIT1(SbClassModuleObject,SbModule) SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) @@ -610,8 +752,12 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) SbClassModuleObject::~SbClassModuleObject() { + // do not trigger termination event when document is already closed if( StarBASIC::IsRunning() ) - triggerTerminateEvent(); + if( StarBASIC* pDocBasic = lclGetDocBasicForModule( this ) ) + if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) ) + if( !pDocBasicItem->isDocClosed() ) + triggerTerminateEvent(); // Must be deleted by base class dtor because this data // is not owned by the SbClassModuleObject object @@ -699,8 +845,14 @@ SbClassFactory::~SbClassFactory() void SbClassFactory::AddClassModule( SbModule* pClassModule ) { + SbxObjectRef xToUseClassModules = xClassModules; + + if( StarBASIC* pDocBasic = lclGetDocBasicForModule( pClassModule ) ) + if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) ) + xToUseClassModules = pDocBasicItem->getClassModules(); + SbxObject* pParent = pClassModule->GetParent(); - xClassModules->Insert( pClassModule ); + xToUseClassModules->Insert( pClassModule ); pClassModule->SetParent( pParent ); } @@ -717,12 +869,19 @@ SbxBase* SbClassFactory::Create( UINT16, UINT32 ) SbxObject* SbClassFactory::CreateObject( const String& rClassName ) { - SbxVariable* pVar = xClassModules->Find( rClassName, SbxCLASS_DONTCARE ); + SbxObjectRef xToUseClassModules = xClassModules; + + if( SbModule* pMod = pMOD ) + if( StarBASIC* pDocBasic = lclGetDocBasicForModule( pMod ) ) + if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) ) + xToUseClassModules = pDocBasicItem->getClassModules(); + + SbxVariable* pVar = xToUseClassModules->Find( rClassName, SbxCLASS_OBJECT ); SbxObject* pRet = NULL; if( pVar ) { - SbModule* pMod = (SbModule*)pVar; - pRet = new SbClassModuleObject( pMod ); + SbModule* pVarMod = (SbModule*)pVar; + pRet = new SbClassModuleObject( pVarMod ); } return pRet; } @@ -734,9 +893,6 @@ SbModule* SbClassFactory::FindClass( const String& rClassName ) return pMod; } -typedef std::vector< StarBASIC* > DocBasicVector; -static DocBasicVector GaDocBasics; - StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic ) { @@ -768,7 +924,7 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) bQuit = FALSE; if( bDocBasic ) - GaDocBasics.push_back( this ); + lclInsertDocBasicItem( *this ); } // #51727 Override SetModified so that the modified state @@ -780,6 +936,9 @@ void StarBASIC::SetModified( BOOL b ) StarBASIC::~StarBASIC() { + // Needs to be first action as it can trigger events + disposeComVariablesForBasic( this ); + if( !--GetSbData()->nInst ) { RemoveFactory( pSBFAC ); @@ -812,20 +971,7 @@ StarBASIC::~StarBASIC() { SbxError eOld = SbxBase::GetError(); - DocBasicVector::iterator it; - for( it = GaDocBasics.begin() ; it != GaDocBasics.end() ; ++it ) - { - if( *it == this ) - { - GaDocBasics.erase( it ); - break; - } - } - for( it = GaDocBasics.begin() ; it != GaDocBasics.end() ; ++it ) - { - StarBASIC* pBasic = *it; - pBasic->implClearDependingVarsOnDelete( this ); - } + lclRemoveDocBasicItem( *this ); SbxBase::ResetError(); if( eOld != SbxERR_OK ) @@ -845,7 +991,6 @@ StarBASIC::~StarBASIC() } clearUnoMethodsForBasic( this ); - disposeComVariablesForBasic( this ); } // Override new() operator, so that everyone can create a new instance diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 0f807db7cf8f..541f3d8d6c82 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -54,11 +54,15 @@ #include #include #include -#include +#include +#include +#include #include #include #include #include +#include +#include using namespace com::sun::star; @@ -496,24 +500,18 @@ IMPL_LINK( AsyncQuitHandler, OnAsyncQuit, void*, /*pNull*/ ) return 0L; } -bool VBAUnlockControllers( StarBASIC* pBasic ) +void VBAUnlockDocuments( StarBASIC* pBasic ) { - bool bRes = false; if ( pBasic && pBasic->IsDocBasic() ) { SbUnoObject* pGlobs = dynamic_cast< SbUnoObject* >( pBasic->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ), SbxCLASS_DONTCARE ) ); - if ( pGlobs ) try - { - uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY_THROW ); - if ( xModel->hasControllersLocked() ) - xModel->unlockControllers(); - bRes = true; - } - catch( uno::Exception& ) + if ( pGlobs ) { + uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY ); + ::basic::vba::lockControllersOfAllDocuments( xModel, sal_False ); + ::basic::vba::enableContainerWindowsOfAllDocuments( xModel, sal_True ); } } - return bRes; } ///////////////////////////////////////////////////////////////////////////// @@ -1182,7 +1180,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) // VBA always ensures screenupdating is enabled after completing if ( mbVBACompat ) - VBAUnlockControllers( PTR_CAST( StarBASIC, GetParent() ) ); + VBAUnlockDocuments( PTR_CAST( StarBASIC, GetParent() ) ); #ifdef DBG_TRACE_BASIC dbg_DeInitTrace(); @@ -2162,22 +2160,27 @@ void SbObjModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, } -typedef ::cppu::WeakImplHelper2< awt::XTopWindowListener, awt::XWindowListener > FormObjEventListener_BASE; +typedef ::cppu::WeakImplHelper3< + awt::XTopWindowListener, + awt::XWindowListener, + document::XEventListener > FormObjEventListener_BASE; class FormObjEventListenerImpl : public FormObjEventListener_BASE { SbUserFormModule* mpUserForm; uno::Reference< lang::XComponent > mxComponent; + uno::Reference< frame::XModel > mxModel; bool mbDisposed; sal_Bool mbOpened; sal_Bool mbActivated; sal_Bool mbShowing; - FormObjEventListenerImpl(); // not defined + FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined + FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&); // not defined public: - FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : - mpUserForm( pUserForm ), mxComponent( xComponent) , + FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) : + mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ), mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False ) { if ( mxComponent.is() ) @@ -2194,6 +2197,15 @@ public: } catch( uno::Exception& ) {} } + + if ( mxModel.is() ) + { + try + { + uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->addEventListener( this ); + } + catch( uno::Exception& ) {} + } } virtual ~FormObjEventListenerImpl() @@ -2220,6 +2232,16 @@ public: catch( uno::Exception& ) {} } mxComponent.clear(); + + if ( mxModel.is() && !mbDisposed ) + { + try + { + uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->removeEventListener( this ); + } + catch( uno::Exception& ) {} + } + mxModel.clear(); } virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) @@ -2327,13 +2349,25 @@ public: { } + virtual void SAL_CALL notifyEvent( const document::EventObject& rEvent ) throw (uno::RuntimeException) + { + // early dosposing on document event "OnUnload", to be sure Basic still exists when calling VBA "UserForm_Terminate" + if( rEvent.EventName == GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ) ) + { + removeListener(); + mbDisposed = true; + if ( mpUserForm ) + mpUserForm->ResetApiObj(); // will trigger "UserForm_Terminate" + } + } + virtual void SAL_CALL disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException) { OSL_TRACE("** Userform/Dialog disposing"); + removeListener(); mbDisposed = true; - mxComponent.clear(); if ( mpUserForm ) - mpUserForm->ResetApiObj(); + mpUserForm->ResetApiObj( false ); // pass false (too late to trigger VBA events here) } }; @@ -2567,30 +2601,27 @@ void SbUserFormModule::InitObject() aArgs[ 2 ] <<= m_xModel; aArgs[ 3 ] <<= rtl::OUString( GetParent()->GetName() ); pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.UserForm")), aArgs ) ) ); - uno::Reference< lang::XComponent > xComponent( aArgs[ 1 ], uno::UNO_QUERY_THROW ); + + uno::Reference< lang::XComponent > xComponent( m_xDialog, uno::UNO_QUERY_THROW ); // the dialog must be disposed at the end! - if( xComponent.is() ) + StarBASIC* pParentBasic = NULL; + SbxObject* pCurObject = this; + do { - StarBASIC* pParentBasic = NULL; - SbxObject* pCurObject = this; - do - { - SbxObject* pObjParent = pCurObject->GetParent(); - pParentBasic = PTR_CAST( StarBASIC, pObjParent ); - pCurObject = pObjParent; - } - while( pParentBasic == NULL && pCurObject != NULL ); - - OSL_ASSERT( pParentBasic != NULL ); - registerComponentToBeDisposedForBasic( xComponent, pParentBasic ); + SbxObject* pObjParent = pCurObject->GetParent(); + pParentBasic = PTR_CAST( StarBASIC, pObjParent ); + pCurObject = pObjParent; } + while( pParentBasic == NULL && pCurObject != NULL ); + OSL_ASSERT( pParentBasic != NULL ); + registerComponentToBeDisposedForBasic( xComponent, pParentBasic ); - // remove old listener if it exists - if ( m_DialogListener.get() ) + // if old listener object exists, remove it from dialog and document model + if( m_DialogListener.is() ) m_DialogListener->removeListener(); - m_DialogListener = new FormObjEventListenerImpl( this, xComponent ); + m_DialogListener.set( new FormObjEventListenerImpl( this, xComponent, m_xModel ) ); triggerInitializeEvent(); } diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 26c6af53cc56..4b917e61e179 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -152,6 +152,16 @@ static SbxDataType GetSuffixType( sal_Unicode c ) // Returnwert ist FALSE bei EOF oder Fehlern #define BUF_SIZE 80 +namespace { + +/** Returns true, if the passed character is a white space character. */ +inline bool lclIsWhitespace( sal_Unicode cChar ) +{ + return (cChar == ' ') || (cChar == '\t') || (cChar == '\f'); +} + +} // namespace + BOOL SbiScanner::NextSym() { // Fuer den EOLN-Fall merken @@ -177,7 +187,11 @@ BOOL SbiScanner::NextSym() p2 += n; while( ( n < nLen ) && ( *p2 != '\n' ) && ( *p2 != '\r' ) ) p2++, n++; - aLine = aBuf.copy( nBufPos, n - nBufPos ); + // #163944# ignore trailing whitespace + sal_Int32 nCopyEndPos = n; + while( (nBufPos < nCopyEndPos) && lclIsWhitespace( aBuf[ nCopyEndPos - 1 ] ) ) + --nCopyEndPos; + aLine = aBuf.copy( nBufPos, nCopyEndPos - nBufPos ); if( n < nLen ) { if( *p2 == '\r' && *( p2+1 ) == '\n' ) @@ -193,7 +207,7 @@ BOOL SbiScanner::NextSym() } // Leerstellen weg: - while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) ) + while( lclIsWhitespace( *pLine ) ) pLine++, nCol++, bSpaces = TRUE; nCol1 = nCol; @@ -230,7 +244,7 @@ BOOL SbiScanner::NextSym() { const sal_Unicode* pTestLine = pLine; short nTestCol = nCol; - while( *pTestLine && (( *pTestLine == ' ' ) || ( *pTestLine == '\t' )) ) + while( lclIsWhitespace( *pTestLine ) ) { pTestLine++; nTestCol++; diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index 46aa1ae69ec3..5bd774d618d5 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -27,14 +27,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_ucb.hxx" + /************************************************************************** TODO ************************************************************************** - - filter unwanted models notified by global document event broadcaster - - help documents - - others, which I don't know yet - *************************************************************************/ #include "osl/diagnose.h" @@ -44,12 +41,13 @@ #include "comphelper/namedvaluecollection.hxx" #include "comphelper/documentinfo.hxx" +#include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/beans/XPropertySet.hpp" #include "com/sun/star/container/XEnumerationAccess.hpp" +#include "com/sun/star/document/XStorageBasedDocument.hpp" #include "com/sun/star/frame/XStorable.hpp" #include "com/sun/star/lang/DisposedException.hpp" -#include "com/sun/star/document/XStorageBasedDocument.hpp" -#include "com/sun/star/awt/XTopWindow.hpp" +#include "com/sun/star/util/XCloseBroadcaster.hpp" #include "tdoc_docmgr.hxx" @@ -57,6 +55,53 @@ using namespace com::sun::star; using namespace tdoc_ucp; using ::comphelper::DocumentInfo; +//========================================================================= +//========================================================================= +// +// OfficeDocumentsCloseListener Implementation. +// +//========================================================================= +//========================================================================= + +//========================================================================= +// +// util::XCloseListener +// +//========================================================================= + +// virtual +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::queryClosing( + const lang::EventObject& /*Source*/, sal_Bool /*GetsOwnership*/ ) + throw ( util::CloseVetoException, + uno::RuntimeException ) +{ +} + +//========================================================================= +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::notifyClosing( + const lang::EventObject& Source ) + throw ( uno::RuntimeException ) +{ + document::EventObject aDocEvent; + aDocEvent.Source = Source.Source; + aDocEvent.EventName = rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "OfficeDocumentsListener::notifyClosing" ) ); + m_pManager->notifyEvent( aDocEvent ); +} + +//========================================================================= +// +// lang::XEventListener (base of util::XCloseListener) +// +//========================================================================= + +// virtual +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::disposing( + const lang::EventObject& /*Source*/ ) + throw ( uno::RuntimeException ) +{ +} + //========================================================================= //========================================================================= // @@ -70,7 +115,8 @@ OfficeDocumentsManager::OfficeDocumentsManager( OfficeDocumentsEventListener * pDocEventListener ) : m_xSMgr( xSMgr ), m_xDocEvtNotifier( createDocumentEventNotifier( xSMgr ) ), - m_pDocEventListener( pDocEventListener ) + m_pDocEventListener( pDocEventListener ), + m_xDocCloseListener( new OfficeDocumentsCloseListener( this ) ) { if ( m_xDocEvtNotifier.is() ) { @@ -188,10 +234,19 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( OSL_ENSURE( xStorage.is(), "Got no document storage!" ); rtl:: OUString aDocId = getDocumentId( Event.Source ); - rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( + uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); m_aDocs[ aDocId ] = StorageInfo( aTitle, xStorage, xModel ); + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + Event.Source, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "OnLoadFinished/OnCreate event: got no close broadcaster!" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->addCloseListener( m_xDocCloseListener ); + // Propagate document closure. OSL_ENSURE( m_pDocEventListener, "OnLoadFinished/OnCreate event: no owner for insert event propagation!" ); @@ -202,12 +257,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( } } else if ( Event.EventName.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( "OnUnload" ) ) ) + RTL_CONSTASCII_STRINGPARAM( "OfficeDocumentsListener::notifyClosing" ) ) ) { if ( isOfficeDocument( Event.Source ) ) { // Document has been closed (unloaded) + // #163732# - Official event "OnUnload" does not work here. Event + // gets fired to early. Other OnUnload listeners called after this + // listener may still need TDOC access to the document. Remove the + // document from TDOC docs list on XCloseListener::notifyClosing. + // See OfficeDocumentsManager::OfficeDocumentsListener::notifyClosing. + osl::MutexGuard aGuard( m_aMtx ); uno::Reference< frame::XModel > @@ -228,8 +289,6 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( rtl::OUString aDocId( (*it).first ); m_pDocEventListener->notifyDocumentClosed( aDocId ); } - - break; } ++it; @@ -238,8 +297,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( OSL_ENSURE( it != m_aDocs.end(), "OnUnload event notified for unknown document!" ); - if( it != m_aDocs.end() ) + if ( it != m_aDocs.end() ) + { + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + Event.Source, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "OnUnload event: got no XCloseBroadcaster from XModel" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->removeCloseListener( m_xDocCloseListener ); + m_aDocs.erase( it ); + } } } else if ( Event.EventName.equalsAsciiL( @@ -307,7 +376,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( (*it).second.xStorage = xStorage; // Adjust title. - (*it).second.aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + (*it).second.aTitle = DocumentInfo::getDocumentTitle( xModel ); break; } ++it; @@ -334,7 +403,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( if ( (*it).second.xModel == xModel ) { // Adjust title. - rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( xModel ); (*it).second.aTitle = aTitle; // Adjust storage. @@ -475,6 +544,14 @@ void OfficeDocumentsManager::buildDocumentsList() m_aDocs[ aDocId ] = StorageInfo( aTitle, xStorage, xModel ); + + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + xModel, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "buildDocumentsList: got no close broadcaster!" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->addCloseListener( m_xDocCloseListener ); } } } diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx index 8f8b2fc117f0..b1c0ed41d9d9 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx @@ -39,6 +39,7 @@ #include "com/sun/star/embed/XStorage.hpp" #include "com/sun/star/frame/XModel.hpp" #include "com/sun/star/frame/XModuleManager.hpp" +#include "com/sun/star/util/XCloseListener.hpp" namespace tdoc_ucp { @@ -88,6 +89,33 @@ namespace tdoc_ucp { class OfficeDocumentsManager : public cppu::WeakImplHelper1< com::sun::star::document::XEventListener > { + class OfficeDocumentsCloseListener : + public cppu::WeakImplHelper1< com::sun::star::util::XCloseListener > + + { + public: + OfficeDocumentsCloseListener( OfficeDocumentsManager * pMgr ) + : m_pManager( pMgr ) {}; + + // util::XCloseListener + virtual void SAL_CALL queryClosing( + const ::com::sun::star::lang::EventObject& Source, + ::sal_Bool GetsOwnership ) + throw (::com::sun::star::util::CloseVetoException, + ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL notifyClosing( + const ::com::sun::star::lang::EventObject& Source ) + throw (::com::sun::star::uno::RuntimeException); + + // lang::XEventListener (base of util::XCloseListener) + virtual void SAL_CALL disposing( + const com::sun::star::lang::EventObject & Source ) + throw ( com::sun::star::uno::RuntimeException ); + private: + OfficeDocumentsManager * m_pManager; + }; + public: OfficeDocumentsManager( const com::sun::star::uno::Reference< @@ -131,7 +159,9 @@ namespace tdoc_ucp { createDocumentEventNotifier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rXSMgr ); + void buildDocumentsList(); + bool isOfficeDocument( const com::sun::star::uno::Reference< @@ -163,9 +193,11 @@ namespace tdoc_ucp { com::sun::star::uno::Reference< com::sun::star::document::XEventBroadcaster > m_xDocEvtNotifier; com::sun::star::uno::Reference< - com::sun::star::frame::XModuleManager > m_xModuleMgr; + com::sun::star::frame::XModuleManager > m_xModuleMgr; DocumentList m_aDocs; OfficeDocumentsEventListener * m_pDocEventListener; + com::sun::star::uno::Reference< + com::sun::star::util::XCloseListener > m_xDocCloseListener; }; } // namespace tdoc_ucp diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index bddd756f6836..54d280094f2c 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include "vbacommandbars.hxx" @@ -200,10 +201,8 @@ void SAL_CALL VbaApplicationBase::setScreenUpdating(sal_Bool bUpdate) throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); - if (bUpdate) - xModel->unlockControllers(); - else - xModel->lockControllers(); + // #163808# use helper from module "basic" to lock all documents of this application + ::basic::vba::lockControllersOfAllDocuments( xModel, !bUpdate ); } sal_Bool SAL_CALL @@ -262,10 +261,8 @@ void SAL_CALL VbaApplicationBase::setInteractive( ::sal_Bool bInteractive ) throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); - uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW ); - uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW ); - - xWindow->setEnable( bInteractive ); + // #163808# use helper from module "basic" to enable/disable all container windows of all documents of this application + ::basic::vba::enableContainerWindowsOfAllDocuments( xModel, bInteractive ); } sal_Bool SAL_CALL VbaApplicationBase::getVisible() throw (uno::RuntimeException) diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index 0df38b003556..087e7188c8f6 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -86,11 +86,14 @@ VbaDocumentBase::getName() throw (uno::RuntimeException) ::rtl::OUString VbaDocumentBase::getPath() throw (uno::RuntimeException) { - INetURLObject aURL( getModel()->getURL() ); - rtl::OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); - sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 ); - rtl::OUString sPath; - ::osl::File::getSystemPathFromFileURL( sURL, sPath ); + INetURLObject aURL( getModel()->getURL() ); + rtl::OUString sURL = aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ); + rtl::OUString sPath; + if( sURL.getLength() > 0 ) + { + sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 ); + ::osl::File::getSystemPathFromFileURL( sURL, sPath ); + } return sPath; } diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index f2b70ab231c7..b65a58542b92 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -24,7 +24,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include + +#include "vbahelper/vbadocumentsbase.hxx" + #include #include #include @@ -49,10 +51,12 @@ #include #include #include -#include #include #include +#include "vbahelper/vbahelper.hxx" +#include "vbahelper/vbaapplicationbase.hxx" + using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -213,8 +217,39 @@ VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xP { } +namespace { + +void lclSetupComponent( const uno::Reference< lang::XComponent >& rxComponent, sal_Bool bScreenUpdating, sal_Bool bInteractive ) +{ + if( !bScreenUpdating ) try + { + uno::Reference< frame::XModel >( rxComponent, uno::UNO_QUERY_THROW )->lockControllers(); + } + catch( uno::Exception& ) + { + } + + if( !bInteractive ) try + { + uno::Reference< frame::XModel > xModel( rxComponent, uno::UNO_QUERY_THROW ); + uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW ); + uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW ); + uno::Reference< awt::XWindow >( xFrame->getContainerWindow(), uno::UNO_SET_THROW )->setEnable( sal_False ); + } + catch( uno::Exception& ) + { + } +} + +} // namespace + uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException) { + // #163808# determine state of Application.ScreenUpdating and Application.Interactive symbols (before new document is opened) + uno::Reference< XApplicationBase > xApplication( Application(), uno::UNO_QUERY ); + sal_Bool bScreenUpdating = !xApplication.is() || xApplication->getScreenUpdating(); + sal_Bool bInteractive = !xApplication.is() || xApplication->getInteractive(); + uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); @@ -240,6 +275,10 @@ uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException) sURL , rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0, aMediaDesc.getAsConstPropertyValueList() ); + + // #163808# lock document controllers and container window if specified by application + lclSetupComponent( xComponent, bScreenUpdating, bInteractive ); + return uno::makeAny( xComponent ); } @@ -259,6 +298,11 @@ void VbaDocumentsBase::closeDocuments() throw (uno::RuntimeException) // #TODO# #FIXME# can any of the unused params below be used? uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) { + // #163808# determine state of Application.ScreenUpdating and Application.Interactive symbols (before new document is opened) + uno::Reference< XApplicationBase > xApplication( Application(), uno::UNO_QUERY ); + sal_Bool bScreenUpdating = !xApplication.is() || xApplication->getScreenUpdating(); + sal_Bool bInteractive = !xApplication.is() || xApplication->getInteractive(); + // we need to detect if this is a URL, if not then assume its a file path rtl::OUString aURL; INetURLObject aObj; @@ -282,19 +326,16 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u uno::Sequence< beans::PropertyValue > sProps( rProps ); sProps.realloc( sProps.getLength() + 1 ); sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode") ); - sProps[ sProps.getLength() - 1 ].Value <<= uno::makeAny( document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN ); - - sal_Int32 nIndex = sProps.getLength() - 1; + sProps[ sProps.getLength() - 1 ].Value <<= document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN; if ( ReadOnly.hasValue() ) { sal_Bool bIsReadOnly = sal_False; ReadOnly >>= bIsReadOnly; if ( bIsReadOnly ) { - static const rtl::OUString sReadOnly( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ); sProps.realloc( sProps.getLength() + 1 ); - sProps[ nIndex ].Name = sReadOnly; - sProps[ nIndex++ ].Value = uno::makeAny( (sal_Bool)sal_True ); + sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ); + sProps[ sProps.getLength() - 1 ].Value <<= true; } } @@ -302,6 +343,10 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_default") ), frame::FrameSearchFlag::CREATE, sProps); + + // #163808# lock document controllers and container window if specified by application + lclSetupComponent( xComponent, bScreenUpdating, bInteractive ); + return uno::makeAny( xComponent ); } -- cgit From d2cd8a9904142b8ae6b3a2b5ebbd7ecaeb2248b1 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 11 Feb 2011 15:06:12 +0100 Subject: ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300 ab77: #163789# Handle class module factories document specific ab77: #163732# Defer removal of documents until XCloseListener::notifyClosing ab77: #163808# make VBA symbols Application.ScreenUpdating and Application.Interactive work globally on all documents ab77: wae ab77: #163840# read UTF-8 BOM ab77: #163732# VBA UserForm_Terminate triggered too late while closing document ab77: minor correction ab77: assertion: do not call ::rtl::OUString::copy() with negative index ab77run2: #163869# do not call Class_Terminate VBA macros when document disposes dr77i: #163941# do not update drawing layer when pasting from clipboard after cut mib21: #163944# ignore trailing whitespace in Basic source lines mib21: #163948# allow to manually pack MSVC DLLs into extensions mib21: #163948# multiprocess build fix Authors: Andreas Bregas Daniel Rentz [dr] Eike Rathke [er] --- solenv/inc/extension_post.mk | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/solenv/inc/extension_post.mk b/solenv/inc/extension_post.mk index f221ff7ebe4a..7b8c99b37fe8 100644 --- a/solenv/inc/extension_post.mk +++ b/solenv/inc/extension_post.mk @@ -69,10 +69,22 @@ $(COMPONENT_JARFILES) : $(CLASSDIR)/$$(@:f) .ENDIF # "$(COMPONENT_JARFILES)"!="" .IF "$(COMPONENT_LIBRARIES)"!="" +PACK_RUNTIME!:=TRUE # TODO(Q3): strip the binary? $(COMPONENT_LIBRARIES) : $(DLLDEST)/$$(@:f) @@-$(MKDIRHIER) $(@:d) $(COMMAND_ECHO)$(COPY) $< $@ +.ENDIF # "$(COMPONENT_LIBRARIES)"!="" + +.IF "$(PACK_RUNTIME)"!="" +PACK_RUNTIME_FLAG:=$(MISC)/$(TARGET)_pack_runtime.flag +$(EXTENSION_TARGET) : $(PACK_RUNTIME_FLAG) + +$(EXTENSIONDIR) : + @@-$(MKDIRHIER) $(@:d) + +$(PACK_RUNTIME_FLAG) : $(EXTENSIONDIR) + @@-$(MKDIRHIER) $(@:d) .IF "$(OS)$(CPU)"=="WNTI" .IF "$(COM)"=="GCC" $(GNUCOPY) $(SOLARBINDIR)/mingwm10.dll $(EXTENSIONDIR) @@ -120,7 +132,8 @@ $(COMPONENT_LIBRARIES) : $(DLLDEST)/$$(@:f) .ENDIF # "$(PACKMS)"!="" .ENDIF #"$(COM)"=="GCC" .ENDIF # "$(OS)$(CPU)"=="WNTI" -.ENDIF # "$(COMPONENT_LIBRARIES)"!="" + @$(TOUCH) $@ +.ENDIF # "$(PACK_RUNTIME)"!="" IMPLEMENTATION_IDENTIFIER*="com.sun.star.$(EXTENSIONNAME)-$(PLATFORMID)" -- cgit From 282392f643d63a1b76e69821a4c19a4162808d21 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 11 Feb 2011 15:06:12 +0100 Subject: ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300 ab77: #163789# Handle class module factories document specific ab77: #163732# Defer removal of documents until XCloseListener::notifyClosing ab77: #163808# make VBA symbols Application.ScreenUpdating and Application.Interactive work globally on all documents ab77: wae ab77: #163840# read UTF-8 BOM ab77: #163732# VBA UserForm_Terminate triggered too late while closing document ab77: minor correction ab77: assertion: do not call ::rtl::OUString::copy() with negative index ab77run2: #163869# do not call Class_Terminate VBA macros when document disposes dr77i: #163941# do not update drawing layer when pasting from clipboard after cut mib21: #163944# ignore trailing whitespace in Basic source lines mib21: #163948# allow to manually pack MSVC DLLs into extensions mib21: #163948# multiprocess build fix Authors: Andreas Bregas Daniel Rentz [dr] Eike Rathke [er] --- sc/source/core/data/document.cxx | 2 +- sc/source/filter/dif/difimp.cxx | 3 +- sc/source/ui/dbgui/scuiasciiopt.cxx | 62 +++++++++++++++++++++---------------- sc/source/ui/docshell/impex.cxx | 6 ++-- 4 files changed, 40 insertions(+), 33 deletions(-) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 3711b1b68603..e2b876cfab01 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1983,7 +1983,7 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1, SetInsertingFromOtherDoc( TRUE); UpdateReference( URM_MOVE, nCol1, nRow1, i, nCol2, nRow2, i+nFollow, - nDx, nDy, nDz, pCBFCP->pRefUndoDoc ); + nDx, nDy, nDz, pCBFCP->pRefUndoDoc, FALSE ); SetInsertingFromOtherDoc( bOldInserting); } else diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index 2088cc84a791..f35a37eab0c6 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -263,8 +263,7 @@ DifParser::DifParser( SvStream& rNewIn, const UINT32 nOption, ScDocument& rDoc, DBG_ERRORFILE( "CharSet passed overrides and modifies StreamCharSet" ); rIn.SetStreamCharSet( eCharSet ); } - if ( eCharSet == RTL_TEXTENCODING_UNICODE ) - rIn.StartReadingUnicodeText(); + rIn.StartReadingUnicodeText( eCharSet ); bPlain = ( nOption == SC_DIFOPT_PLAIN ); diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 42f2a2d86933..89a7c9340a9c 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -316,34 +316,45 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, maFieldSeparators = GetSeparators(); // Clipboard is always Unicode, else detect. - bool bPreselectUnicode = !mbFileImport; + rtl_TextEncoding ePreselectUnicode = (mbFileImport ? + RTL_TEXTENCODING_DONTKNOW : RTL_TEXTENCODING_UNICODE); // Sniff for Unicode / not - if( !bPreselectUnicode && mpDatStream ) + if( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW && mpDatStream ) { Seek( 0 ); - mpDatStream->StartReadingUnicodeText(); + mpDatStream->StartReadingUnicodeText( RTL_TEXTENCODING_DONTKNOW ); ULONG nUniPos = mpDatStream->Tell(); - if ( nUniPos > 0 ) - bPreselectUnicode = TRUE; // read 0xfeff/0xfffe - else + switch (nUniPos) { - UINT16 n; - *mpDatStream >> n; - // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with - // control characters except CR,LF,TAB - if ( (n & 0xff00) < 0x2000 ) - { - switch ( n & 0xff00 ) + case 2: + ePreselectUnicode = RTL_TEXTENCODING_UNICODE; // UTF-16 + break; + case 3: + ePreselectUnicode = RTL_TEXTENCODING_UTF8; // UTF-8 + break; + case 0: { - case 0x0900 : - case 0x0a00 : - case 0x0d00 : - break; - default: - bPreselectUnicode = TRUE; + UINT16 n; + *mpDatStream >> n; + // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with + // control characters except CR,LF,TAB + if ( (n & 0xff00) < 0x2000 ) + { + switch ( n & 0xff00 ) + { + case 0x0900 : + case 0x0a00 : + case 0x0d00 : + break; + default: + ePreselectUnicode = RTL_TEXTENCODING_UNICODE; // UTF-16 + } + } + mpDatStream->Seek(0); } - } - mpDatStream->Seek(0); + break; + default: + ; // nothing } mnStreamPos = mpDatStream->Tell(); } @@ -373,10 +384,10 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, // Insert one "SYSTEM" entry for compatibility in AsciiOptions and system // independent document linkage. aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser ); - aLbCharSet.SelectTextEncoding( bPreselectUnicode ? - RTL_TEXTENCODING_UNICODE : gsl_getSystemTextEncoding() ); + aLbCharSet.SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ? + gsl_getSystemTextEncoding() : ePreselectUnicode ); - if( nCharSet >= 0 ) + if( nCharSet >= 0 && ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ) aLbCharSet.SelectEntryPos( static_cast(nCharSet) ); SetSelectedCharSet(); @@ -437,8 +448,7 @@ bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText ) memset( mpRowPosArray, 0, sizeof(mpRowPosArray[0]) * (ASCIIDLG_MAXROWS+2)); Seek(0); - if ( mpDatStream->GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) - mpDatStream->StartReadingUnicodeText(); + mpDatStream->StartReadingUnicodeText( mpDatStream->GetStreamCharSet() ); mnStreamPos = mpDatStream->Tell(); mpRowPosArray[mnRowPosCount] = mnStreamPos; diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index a17279f409a9..b9ce9a5b0e9c 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -826,8 +826,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm ) SCCOL nEndCol = aRange.aEnd.Col(); SCROW nEndRow = aRange.aEnd.Row(); ULONG nOldPos = rStrm.Tell(); - if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) - rStrm.StartReadingUnicodeText(); + rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() ); BOOL bData = BOOL( !bSingle ); if( !bSingle) bOk = StartPaste(); @@ -1167,8 +1166,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) ::std::auto_ptr xProgress( new ScProgress( pDocSh, ScGlobal::GetRscString( STR_LOAD_DOC ), rStrm.Tell() - nOldPos )); rStrm.Seek( nOldPos ); - if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) - rStrm.StartReadingUnicodeText(); + rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() ); BOOL bOld = ScColumn::bDoubleAlloc; ScColumn::bDoubleAlloc = TRUE; -- cgit -- cgit From e19fb157f15046b2482637812c3e9dcc651d4bbb Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 14 Feb 2011 17:42:00 +0100 Subject: fix a merge problem --- vcl/source/gdi/region.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 0f578804d16a..96e67aaabffa 100755 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1397,7 +1397,7 @@ sal_Bool Region::Union( const Rectangle& rRect ) basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationOr( aThisPolyPoly, aOtherPolyPoly ); *this = Region( aClip ); - return TRUE; + return sal_True; } ImplPolyPolyRegionToBandRegion(); @@ -1484,7 +1484,7 @@ sal_Bool Region::Intersect( const Rectangle& rRect ) basegfx::B2DRange( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ), true, false ); - return TRUE; + return sal_True; } else ImplPolyPolyRegionToBandRegion(); @@ -1576,7 +1576,7 @@ sal_Bool Region::Exclude( const Rectangle& rRect ) aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly ); if( aThisPolyPoly.count() == 0 ) - return TRUE; + return sal_True; // get the other B2DPolyPolygon basegfx::B2DPolygon aRectPoly( basegfx::tools::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) ); @@ -1585,7 +1585,7 @@ sal_Bool Region::Exclude( const Rectangle& rRect ) basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly ); *this = Region( aClip ); - return TRUE; + return sal_True; } ImplPolyPolyRegionToBandRegion(); @@ -1639,7 +1639,7 @@ sal_Bool Region::XOr( const Rectangle& rRect ) if( aThisPolyPoly.count() == 0 ) { *this = rRect; - return TRUE; + return sal_True; } // get the other B2DPolyPolygon @@ -1649,7 +1649,7 @@ sal_Bool Region::XOr( const Rectangle& rRect ) basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor( aThisPolyPoly, aOtherPolyPoly ); *this = Region( aClip ); - return TRUE; + return sal_True; } ImplPolyPolyRegionToBandRegion(); @@ -1714,7 +1714,7 @@ sal_Bool Region::Union( const Region& rRegion ) if( rRegion.HasPolyPolygon() || HasPolyPolygon() ) { ImplUnionPolyPolygon( rRegion ); - return TRUE; + return sal_True; } ImplPolyPolyRegionToBandRegion(); @@ -1946,7 +1946,7 @@ sal_Bool Region::Exclude( const Region& rRegion ) if( rRegion.HasPolyPolygon() || HasPolyPolygon() ) { ImplExcludePolyPolygon( rRegion ); - return TRUE; + return sal_True; } ImplPolyPolyRegionToBandRegion(); @@ -2023,7 +2023,7 @@ sal_Bool Region::XOr( const Region& rRegion ) if( rRegion.HasPolyPolygon() || HasPolyPolygon() ) { ImplXOrPolyPolygon( rRegion ); - return TRUE; + return sal_True; } ImplPolyPolyRegionToBandRegion(); -- cgit From d1183547b17616b71df686141caf012bf57d0d3b Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 14 Feb 2011 18:32:17 +0100 Subject: l10nmove: loc -> l10n --- l10ntools/scripts/localize.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl index 59cba9879ace..e432869d3a7b 100755 --- a/l10ntools/scripts/localize.pl +++ b/l10ntools/scripts/localize.pl @@ -175,7 +175,7 @@ sub splitfile{ exit( -1 ); } my $src_root = $ENV{SOURCE_ROOT_DIR}; - my $ooo_src_root = $src_root."/loc/l10n"; + my $ooo_src_root = $src_root."/l10n/l10n"; my $so_l10n_path = $src_root."/sun/l10n_so/source"; my $ooo_l10n_path = $ooo_src_root."/l10n/source"; -- cgit From a3a148c0be866cebc2e77f2e9b2b843e4176d2ad Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 14 Feb 2011 18:48:22 +0100 Subject: l10nmove: add l10n repo to gb_REPOS --- set_soenv.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/set_soenv.in b/set_soenv.in index f7c829145fbd..8ee09904d054 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1496,9 +1496,11 @@ else # print "done\n"; +$gb_REPOS = $SRC_ROOT; + if ('@WITH_LANG@' ne "") { - $gb_REPOS = $SRC_ROOT." ".$SOURCE_ROOT_DIR."/l10n"; + $gb_REPOS .= " ".$SOURCE_ROOT_DIR."/l10n"; } # -- cgit From 779f996a8c6039adbd2424b8dcc36219912f80b9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 15 Feb 2011 12:12:43 +0100 Subject: gridsort: post-rebase fixes --- accessibility/source/extended/AccessibleGridControlTable.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 accessibility/source/extended/AccessibleGridControlTable.cxx diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx old mode 100644 new mode 100755 index e070426f29a4..406baeb2973c --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -245,7 +245,7 @@ void SAL_CALL AccessibleGridControlTable::selectAccessibleChild( sal_Int32 nChil ensureIsValidIndex( nChildIndex ); sal_Int32 nColumns = m_aTable.GetColumnCount(); sal_Int32 nRow = (nChildIndex / nColumns); - m_aTable.SelectRow( nRow, TRUE ); + m_aTable.SelectRow( nRow, sal_True ); } sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) -- cgit From db8eb68761bee1f15efa5484c24ac8599fb5188b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 15 Feb 2011 12:12:43 +0100 Subject: gridsort: post-rebase fixes --- comphelper/Package_inc.mk | 1 + svtools/source/table/gridtablerenderer.cxx | 26 -------------------------- svtools/source/table/tabledatawindow.cxx | 4 ++-- svtools/source/table/tabledatawindow.hxx | 2 +- toolkit/prj/build.lst | 1 - 5 files changed, 4 insertions(+), 30 deletions(-) diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk index 724959947867..5794c56ab74d 100644 --- a/comphelper/Package_inc.mk +++ b/comphelper/Package_inc.mk @@ -111,6 +111,7 @@ $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/numbers.hxx,comp $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/evtlistenerhlp.hxx,comphelper/evtlistenerhlp.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/optional.hxx,comphelper/optional.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentbase.hxx,comphelper/componentbase.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentguard.hxx,comphelper/componentguard.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/InlineContainer.hxx,comphelper/InlineContainer.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertybag.hxx,comphelper/propertybag.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/embeddedobjectcontainer.hxx,comphelper/embeddedobjectcontainer.hxx)) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 56a99a69533d..1e230d372c24 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -491,35 +491,9 @@ namespace svt { namespace table break; } -<<<<<<< local } else imageSize.Width() = i_context.aContentArea.GetWidth(); -======= - Rectangle aRect( _rArea ); - ++aRect.Left(); --aRect.Right(); - aRect.Top(); aRect.Bottom(); - if(_bSelected) - _rDevice.SetTextColor(_rStyle.GetHighlightTextColor()); - else if(m_pImpl->rModel.getTextColor() != 0x000000) - _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); - else - _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); - sal_uLong nHorFlag = TEXT_DRAW_LEFT; - sal_uLong nVerFlag = TEXT_DRAW_TOP; - if(m_pImpl->rModel.getVerticalAlign() == 1) - nVerFlag = TEXT_DRAW_VCENTER; - else if(m_pImpl->rModel.getVerticalAlign() == 2) - nVerFlag = TEXT_DRAW_BOTTOM; - if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 1) - nHorFlag = TEXT_DRAW_CENTER; - else if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 2) - nHorFlag = TEXT_DRAW_RIGHT; - Rectangle textRect(_rArea); - textRect.Left()+=4; textRect.Right()-=4; - textRect.Bottom()-=2; - _rDevice.DrawText( textRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); ->>>>>>> other if ( i_context.aContentArea.GetHeight() > imageSize.Height() ) { diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 7f1515be8b73..11605e36c8b2 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -95,7 +95,7 @@ namespace svt { namespace table //------------------------------------------------------------------------------------------------------------------ void TableDataWindow::RequestHelp( const HelpEvent& rHEvt ) { - USHORT const nHelpMode = rHEvt.GetMode(); + sal_uInt16 const nHelpMode = rHEvt.GetMode(); if ( ( IsMouseCaptured() ) || ( ( nHelpMode & HELPMODE_QUICK ) == 0 ) ) @@ -105,7 +105,7 @@ namespace svt { namespace table } ::rtl::OUString sHelpText; - USHORT nHelpStyle = 0; + sal_uInt16 nHelpStyle = 0; Point const aMousePos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ); RowPos const hitRow = m_rTableControl.getRowAtPoint( aMousePos ); diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx index 68532fb71793..6f78ac49c44d 100644 --- a/svtools/source/table/tabledatawindow.hxx +++ b/svtools/source/table/tabledatawindow.hxx @@ -55,7 +55,7 @@ namespace svt { namespace table Link m_aMouseButtonDownHdl; Link m_aMouseButtonUpHdl; Link m_aSelectHdl; - ULONG m_nTipWindowHandle; + sal_uLong m_nTipWindowHandle; public: TableDataWindow( TableControl_Impl& _rTableControl ); diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index 2d0c54e6609c..e11d32c435bf 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -1,4 +1,3 @@ ti toolkit : LIBXSLT:libxslt vcl qadevOOo test NULL ti toolkit\prj nmake - all ti_prj NULL -ti toolkit\qa\unoapi nmake - all ti_qa_unoapi NULL ti toolkit\qa\complex\toolkit nmake - all ti_complex_toolkit NULL -- cgit From a168876bd948b68ecc89fefe4a6a0d98ca985ba8 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 15 Feb 2011 15:10:58 +0100 Subject: l10nmove: minor fixes --- solenv/bin/cws.pl | 15 ++++++++++++--- solenv/bin/modules/CwsConfig.pm | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/solenv/bin/cws.pl b/solenv/bin/cws.pl index ec671d52884a..4765fd05f051 100644 --- a/solenv/bin/cws.pl +++ b/solenv/bin/cws.pl @@ -429,7 +429,15 @@ sub hg_clone_cws_or_milestone my $pull_from_remote = 0; my $cws_remote_source; if ( !$clone_milestone_only ) { - $cws_remote_source = "$hg_remote_source/cws/" . $cws->child(); + if ($rep_type eq "ooo" || $rep_type eq "so") + { + $cws_remote_source = "$hg_remote_source/cws/" . $cws->child(); + } + # e.g. cws_l10n + else + { + $cws_remote_source = "$hg_remote_source/cws_".$rep_type."/" . $cws->child(); + } # The outgoing repository might not yet be available. Which is not # an error. Since pulling from the cws outgoing URL results in an ugly @@ -1717,14 +1725,15 @@ sub do_fetch print_error("Can't create directory '$work_master': $!.", 8); } - my %unique = map { $_ => 1 } split(/,/,$additional_repositories_opt); + my %unique = map { $_ => 1 } split(/","/,$additional_repositories_opt); my @unique_repo_list = keys %unique; if (defined($additional_repositories_opt)) { foreach my $repo(@unique_repo_list) { - hg_clone_cws_or_milestone($repo, $cws, "$work_master/".$repo, $clone_milestone_only), if $repo ne "ooo" || $repo ne "sun"; + # do not double clone ooo and sun + hg_clone_cws_or_milestone($repo, $cws, "$work_master/".$repo, $clone_milestone_only), if $repo ne "ooo" && $repo ne "sun"; } } diff --git a/solenv/bin/modules/CwsConfig.pm b/solenv/bin/modules/CwsConfig.pm index dca09877654b..1ba12fecac1d 100644 --- a/solenv/bin/modules/CwsConfig.pm +++ b/solenv/bin/modules/CwsConfig.pm @@ -365,6 +365,7 @@ sub get_hg_source my $repository = shift; my $location = shift; + #Special prefix handling, see cwsrc if ($repository eq "OOO") { if ($location eq "LOCAL") -- cgit From b4652058836bf95b01de2fd85a91d4a59985fba4 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 15 Feb 2011 17:20:40 +0100 Subject: l10nmove: fixed regex --- solenv/bin/cws.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solenv/bin/cws.pl b/solenv/bin/cws.pl index 4765fd05f051..44b1a6ee23c0 100644 --- a/solenv/bin/cws.pl +++ b/solenv/bin/cws.pl @@ -436,7 +436,7 @@ sub hg_clone_cws_or_milestone # e.g. cws_l10n else { - $cws_remote_source = "$hg_remote_source/cws_".$rep_type."/" . $cws->child(); + $cws_remote_source = "$hg_remote_source/cws_".$rep_type."/" . $cws->child(); } # The outgoing repository might not yet be available. Which is not @@ -1725,7 +1725,7 @@ sub do_fetch print_error("Can't create directory '$work_master': $!.", 8); } - my %unique = map { $_ => 1 } split(/","/,$additional_repositories_opt); + my %unique = map { $_ => 1 } split( /,/ , $additional_repositories_opt); my @unique_repo_list = keys %unique; if (defined($additional_repositories_opt)) -- cgit From bf3f4fe64712e3443b04caa8b9107ae5b47eb43a Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Tue, 15 Feb 2011 18:50:56 +0100 Subject: fixed compile errors after resync to m100 --- vcl/inc/vcl/window.h | 2 +- vcl/source/window/dlgctrl.cxx | 8 ++++---- vcl/source/window/window.cxx | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h index 9533822ea307..4011584890cf 100644 --- a/vcl/inc/vcl/window.h +++ b/vcl/inc/vcl/window.h @@ -216,7 +216,7 @@ struct ImplFrameData struct ImplAccessibleInfos { - USHORT nAccessibleRole; + sal_uInt16 nAccessibleRole; String* pAccessibleName; String* pAccessibleDescription; Window* pLabeledByWindow; diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 7d77e83796d4..32fc4755a62d 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -1263,7 +1263,7 @@ Window* Window::GetAccessibleRelationMemberOf() const // which are labeled only if the fixed line or group box // is directly before the control // get form start and form end and index of this control - USHORT nIndex, nFormStart, nFormEnd; + sal_uInt16 nIndex, nFormStart, nFormEnd; Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow, const_cast(this), nIndex, @@ -1278,13 +1278,13 @@ Window* Window::GetAccessibleRelationMemberOf() const { nFormStart = nIndex-1; } - for( USHORT nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- ) + for( sal_uInt16 nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- ) { - USHORT nFoundIndex = 0; + sal_uInt16 nFoundIndex = 0; pSWindow = ::ImplGetChildWindow( pFrameWindow, nSearchIndex, nFoundIndex, - FALSE ); + sal_False ); if( pSWindow && pSWindow->IsVisible() && ( pSWindow->GetType() == WINDOW_FIXEDLINE || pSWindow->GetType() == WINDOW_GROUPBOX ) ) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index b8859c7b94f2..f1bac57825a1 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -9297,7 +9297,8 @@ sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) return sal_False; } } -void Window::SetAccessibilityEventsSuppressed(BOOL bSuppressed) + +void Window::SetAccessibilityEventsSuppressed(sal_Bool bSuppressed) { mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed; } -- cgit From fbeb9eb3914df6478599d2e43ed2dcc91028a4b2 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 16 Feb 2011 12:33:30 +0100 Subject: fixed compile errors after resync to m100, part2 --- sc/source/ui/app/inputhdl.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 9e0703b8d0cd..fac3b1bb1a0f 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3445,10 +3445,10 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, } //IAccessibility2 Implementation 2009----- // Disable the accessible VALUE_CHANGE event - BOOL IsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(FALSE); - pInputWin->SetAccessibilityEventsSuppressed(TRUE); + sal_Bool bIsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(sal_False); + pInputWin->SetAccessibilityEventsSuppressed(sal_True); pInputWin->SetPosString(aPosStr); - pInputWin->SetAccessibilityEventsSuppressed(IsSuppressed); + pInputWin->SetAccessibilityEventsSuppressed(bIsSuppressed); //-----IAccessibility2 Implementation 2009 pInputWin->SetSumAssignMode(); } -- cgit From 34ca828e5a98e16be0c4d7f5f9096460284833b9 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 16 Feb 2011 12:33:30 +0100 Subject: fixed compile errors after resync to m100, part2 --- cui/source/tabpages/backgrnd.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 789d03359011..2c7dcd315f3f 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -354,7 +354,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, aBorderWin ( this, CUI_RES(CT_BORDER) ), aBackgroundColorSet ( &aBorderWin, CUI_RES( SET_BGDCOLOR ) ), aBackgroundColorBox ( this, CUI_RES( GB_BGDCOLOR ) ), - pPreviewWin1 ( new BackgroundPreviewImpl( this, CUI_RES( WIN_PREVIEW1 ), FALSE ) ), + pPreviewWin1 ( new BackgroundPreviewImpl( this, CUI_RES( WIN_PREVIEW1 ), sal_False ) ), aColTransFT ( this, CUI_RES( FT_COL_TRANS ) ), aColTransMF ( this, CUI_RES( MF_COL_TRANS ) ), @@ -371,7 +371,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, aGraphTransFL ( this, CUI_RES( FL_GRAPH_TRANS ) ), aGraphTransMF ( this, CUI_RES( MF_GRAPH_TRANS ) ), pPreviewWin2 ( new BackgroundPreviewImpl( - this, CUI_RES( WIN_PREVIEW2 ), TRUE ) ), + this, CUI_RES( WIN_PREVIEW2 ), sal_True ) ), nHtmlMode ( 0 ), bAllowShowSelector ( sal_True ), -- cgit From 123d6c5db95fb8cba82ade5d44f74bee8c8a01df Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 16 Feb 2011 16:24:42 +0100 Subject: l10nmove: adjust repository handling --- solenv/bin/cws.pl | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/solenv/bin/cws.pl b/solenv/bin/cws.pl index 44b1a6ee23c0..c613d13bcbb1 100644 --- a/solenv/bin/cws.pl +++ b/solenv/bin/cws.pl @@ -406,8 +406,17 @@ sub hg_clone_cws_or_milestone $hg_remote_source = $config->get_hg_source(uc $rep_type, 'REMOTE'); my $masterws = $cws->master(); - my $master_local_source = "$hg_local_source/" . $masterws; - my $master_lan_source = "$hg_lan_source/" . $masterws; + my ($master_local_source, $master_lan_source); + if ($rep_type eq "ooo" || $rep_type eq "so") + { + $master_local_source = "$hg_local_source/" . $masterws; + $master_lan_source = "$hg_lan_source/" . $masterws; + } + else + { + $master_local_source = "$hg_local_source/master_".$rep_type."/".$masterws; + $master_lan_source = "$hg_lan_source/master_".$rep_type."/".$masterws; + } my $milestone_tag; if ( $clone_milestone_only ) { @@ -449,7 +458,8 @@ sub hg_clone_cws_or_milestone require LWP::Simple; my $content = LWP::Simple::get($cws_remote_source); my $pattern = "cws/". $cws->child(); - if ( $content && $content =~ /$pattern/ ) { + my $pattern2 = "<title>cws_".$rep_type."/". $cws->child(); + if ( $content && ($content =~ /$pattern/ || $content =~ /$pattern2/) ) { $pull_from_remote = 1; } else { @@ -1588,6 +1598,7 @@ sub do_fetch my $milestone_opt = $options_ref->{'milestone'}; my $additional_repositories_opt = $options_ref->{'additionalrepositories'}; + $additional_repositories_opt = "", if ( !defined $additional_repositories_opt ); my $child = $options_ref->{'childworkspace'}; my $platforms = $options_ref->{'platforms'}; my $noautocommon = $options_ref->{'noautocommon'}; -- cgit From 7b37b8ec77f1311a737c32bfc58d08553786155d Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Wed, 16 Feb 2011 16:55:03 +0100 Subject: masterfix: #i10000# TRUE -> sal_True --- chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx | 4 ++-- chart2/source/view/main/ChartItemPool.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx index c9ce4dc7bff1..6fdf16bb73af 100644 --- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx @@ -116,7 +116,7 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe case SCHATTR_LEGEND_SHOW: { const SfxPoolItem* pPoolItem = NULL; - if( rInItemSet.GetItemState( SCHATTR_LEGEND_SHOW, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + if( rInItemSet.GetItemState( SCHATTR_LEGEND_SHOW, sal_True, &pPoolItem ) == SFX_ITEM_SET ) { sal_Bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); sal_Bool bWasShown = sal_True; @@ -133,7 +133,7 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe case SCHATTR_LEGEND_POS: { const SfxPoolItem* pPoolItem = NULL; - if( rInItemSet.GetItemState( SCHATTR_LEGEND_POS, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + if( rInItemSet.GetItemState( SCHATTR_LEGEND_POS, sal_True, &pPoolItem ) == SFX_ITEM_SET ) { chart2::LegendPosition eNewPos = static_cast<chart2::LegendPosition>(((const SfxInt32Item*)pPoolItem)->GetValue()); diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index 873e7829b7ac..c66044b9aa0d 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -72,7 +72,7 @@ ChartItemPool::ChartItemPool(): //legend ppPoolDefaults[SCHATTR_LEGEND_POS - SCHATTR_START] = new SfxInt32Item(SCHATTR_LEGEND_POS, ::com::sun::star::chart2::LegendPosition_LINE_END ); - ppPoolDefaults[SCHATTR_LEGEND_SHOW - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_SHOW, TRUE); + ppPoolDefaults[SCHATTR_LEGEND_SHOW - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_SHOW, sal_True); //text ppPoolDefaults[SCHATTR_TEXT_DEGREES - SCHATTR_START] = new SfxInt32Item(SCHATTR_TEXT_DEGREES, 0); -- cgit From 2c0dad4acd41464a6942c11d2ef6f23d29615e1f Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Thu, 17 Feb 2011 17:13:19 +0100 Subject: masterfix: #i10000# INT16 -> sal_Int16 --- extensions/source/ole/unoobjw.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 5452a95129ff..496ec6fea8db 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -915,7 +915,7 @@ HRESULT InterfaceOleWrapper_Impl::doInvoke( DISPPARAMS * pdispparams, VARIANT * HRESULT ret= S_OK; try { - Sequence<INT16> outIndex; + Sequence<sal_Int16> outIndex; Sequence<Any> outParams; Any returnValue; -- cgit From 90c354d0ec1023d81a3b8c398971c63f3802368f Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Thu, 17 Feb 2011 19:52:11 +0100 Subject: masterfix DEV300: #i10000# nawk -> awk --- solenv/gbuild/platform/solaris.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 22c264dbe4e7..f953dfbee599 100755 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -34,7 +34,7 @@ gb_CC := cc gb_CXX := CC gb_GCCP := cc gb_AR := ar -gb_AWK := nawk +gb_AWK := /usr/xpg4/bin/awk gb_CLASSPATHSEP := : # use CC/CXX if they are nondefaults -- cgit From 60b42a87ec54fef439122509d2599673a95e8cde Mon Sep 17 00:00:00 2001 From: Release Engineering <releng@openoffice.org> Date: Thu, 17 Feb 2011 19:57:45 +0100 Subject: DEV300 --- solenv/inc/minor.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk index 240547d98fa7..0a163f9e0128 100644 --- a/solenv/inc/minor.mk +++ b/solenv/inc/minor.mk @@ -1,5 +1,5 @@ RSCVERSION=300 -RSCREVISION=300m100(Build:9571) -BUILD=9571 -LAST_MINOR=m100 +RSCREVISION=300m101(Build:9573) +BUILD=9573 +LAST_MINOR=m101 SOURCEVERSION=DEV300 -- cgit From e5e1326484ae73223c18d2d069ab598de38dcf3a Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Fri, 18 Feb 2011 15:28:11 +0100 Subject: masterfix DEV300: #i10000# cxx removed --- basic/source/basmgr/makefile.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basic/source/basmgr/makefile.mk b/basic/source/basmgr/makefile.mk index d177379f32b8..b4855d5bb950 100644 --- a/basic/source/basmgr/makefile.mk +++ b/basic/source/basmgr/makefile.mk @@ -39,8 +39,8 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/basmgr.obj \ - $(SLO)$/basicmanagerrepository.obj \ - $(SLO)$/vbahelper.obj + $(SLO)$/basicmanagerrepository.obj +# $(SLO)$/vbahelper.obj # --- Targets ------------------------------------------------------------- -- cgit From fc6f2208c54e02008839d1289631898721878340 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Fri, 18 Feb 2011 15:28:53 +0100 Subject: masterfix DEV300: #i10000# include removed --- basic/source/classes/sbxmod.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 592d69c514a0..2cf098655d8f 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -54,7 +54,7 @@ #include <basic/basrdll.hxx> #include <vos/mutex.hxx> #include <basic/sbobjmod.hxx> -#include <basic/vbahelper.hxx> +//#include <basic/vbahelper.hxx> #include <cppuhelper/implbase3.hxx> #include <unotools/eventcfg.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> -- cgit From 76ddf029d967a8a4d30dc755a63d55ae1e4d9ade Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 12:25:19 +0100 Subject: masterfix DEV300: #i10000# new configure --- configure | 25330 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 12039 insertions(+), 13291 deletions(-) diff --git a/configure b/configure index 20ecaffc9a1d..d1883676f273 100755 --- a/configure +++ b/configure @@ -1,83 +1,26 @@ #! /bin/sh # From configure.in Revision: 1.290 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. +# Generated by GNU Autoconf 2.59. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -87,60 +30,33 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -148,391 +64,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then + +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -541,28 +223,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -571,27 +232,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 </dev/null 6>&1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -602,662 +275,46 @@ PACKAGE_BUGREPORT= # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include <sys/types.h> #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include <sys/stat.h> #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include <stdlib.h> # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include <strings.h> #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif #endif -#ifdef HAVE_STDINT_H -# include <stdint.h> -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include <unistd.h> #endif" -ac_subst_vars='LTLIBOBJS -LIBOBJS -BUILD_TYPE -LOCAL_SOLVER -nodep -VERBOSE -ENABLE_LAYOUT -ENABLE_STATIC_GTK -UNIXWRAPPERNAME -OOO_VENDOR -ABOUT_BITMAPS -INTRO_BITMAPS -WITH_DICT -WITH_POOR_HELP_LOCALIZATIONS -WITH_LANG -OOO_JUNIT_JAR -ANT_LIB -ANT_HOME -ANT -XINERAMA_LINK -USE_XINERAMA -SCPDEFS -WITHOUT_AFMS -WITHOUT_PPDS -WITH_FONTS -ENABLE_KAB -ENABLE_EVOAB2 -GOBJECT_LIBS -GOBJECT_CFLAGS -ENABLE_LOCKDOWN -KDE4_LIBS -KDE4_CFLAGS -MOC4 -KDE_LIBS -KDE_CFLAGS -MOC -COMMONS_LOGGING_JAR -COMMONS_HTTPCLIENT_JAR -COMMONS_LANG_JAR -COMMONS_CODEC_JAR -SYSTEM_APACHE_COMMONS -LIBSERIALIZER_JAR -LIBFONTS_JAR -LIBREPOSITORY_JAR -LIBFORMULA_JAR -LIBLOADER_JAR -LIBLAYOUT_JAR -LIBBASE_JAR -JFREEREPORT_JAR -FLUTE_JAR -LIBXML_JAR -SAC_JAR -SYSTEM_JFREEREPORT -ENABLE_REPORTBUILDER -SERVLETAPI_JAR -SYSTEM_SERVLETAPI -ENABLE_MEDIAWIKI -SYSTEM_POPPLER -ENABLE_PDFIMPORT -POPPLER_LIBS -POPPLER_CFLAGS -ENABLE_PRESENTER_SCREEN -ENABLE_MINIMIZER -ENABLE_PRESENTER_EXTRA_UI -ENABLE_OPENGL -SYSTEM_CAIRO -BUILD_PIXMAN -ENABLE_CAIRO -CAIRO_LIBS -CAIRO_CFLAGS -ENABLE_GSTREAMER -GSTREAMER_LIBS -GSTREAMER_CFLAGS -ENABLE_SYSTRAY_GTK -ENABLE_DBUS -ENABLE_GIO -GIO_LIBS -GIO_CFLAGS -DBUS_LIBS -DBUS_CFLAGS -GTK_LIBS -GTK_CFLAGS -ENABLE_GNOMEVFS -GNOMEVFS_LIBS -GNOMEVFS_CFLAGS -ENABLE_GCONF -GCONF_LIBS -GCONF_CFLAGS -ENABLE_KDE4 -ENABLE_KDE -ENABLE_GTK -ZIP_HOME -UNZIP -ZIP -ASM_HOME -ML_EXE -CYGWIN_PATH -GNUPATCH -GNUCP -PATCH -FLEX -BISON -NSIS_PATH -DIRECTXSDK_LIB -DIRECTXSDK_HOME -WINDOWS_VISTA_PSDK -PSDK_HOME -SYSTEM_LIBC -HAVE_READDIR_R -HAVE_GETOPT -SYSTEM_LIBTEXTCAT_DATA -SYSTEM_LIBTEXTCAT -SYSTEM_LPSOLVE -SYSTEM_MYTHES -MYTHES_LIBS -MYTHES_CFLAGS -HYPHEN_LIB -SYSTEM_HYPH -SYSTEM_HUNSPELL -HUNSPELL_LIBS -HUNSPELL_CFLAGS -SYSTEM_REDLAND -REDLAND_LIBS -REDLAND_CFLAGS -AGG_VERSION -SYSTEM_AGG -AGG_LIBS -AGG_CFLAGS -ENABLE_AGG -SYSTEM_OPENSSL -OPENSSL_LIBS -OPENSSL_CFLAGS -NEON_VERSION -SYSTEM_NEON -NEON_LIBS -NEON_CFLAGS -DISABLE_NEON -ENABLE_RANDR -XRANDR_DLOPEN -XRANDR_LIBS -XRANDR_CFLAGS -XRENDER_LINK -SYSTEM_XRENDER_HEADERS -DISABLE_XAW -XAU_LIBS -XLIB -XINC -X_EXTRA_LIBS -X_LIBS -X_PRE_LIBS -X_CFLAGS -XMKMF -SYSTEM_GRAPHITE -ENABLE_GRAPHITE -GRAPHITE_LIBS -GRAPHITE_CFLAGS -ICU_MICRO -ICU_MINOR -ICU_MAJOR -SYSTEM_ICU -ICUCONFIG -SYSTEM_GENCMN -SYSTEM_GENCCODE -SYSTEM_GENBRK -SYSTEM_SANE_HEADER -MOZ_LDAP_CFLAGS -MOZ_LIB_XPCOM -MOZ_LIB -MOZ_INC -MOZ_FLAVOUR -SYSTEM_MOZILLA -MOZILLABUILD -ENABLE_NSS_MODULE -BUILD_MOZAB -MOZLIBREQ_LIBS -MOZLIBREQ_CFLAGS -MOZGTK2_LIBS -MOZGTK2_CFLAGS -MOZILLA_TOOLKIT -MOZILLA_VERSION -MOZILLAXPCOM_LIBS -MOZILLAXPCOM_CFLAGS -NSPR_LIB -MOZ_NSPR_LIBS -MOZ_NSPR_CFLAGS -NSS_LIB -MOZ_NSS_LIBS -MOZ_NSS_CFLAGS -WITH_OPENLDAP -WITH_LDAP -WITH_MOZILLA -SYSTEM_ODBC_HEADERS -SYSTEM_VIGRA -SYSTEM_BOOST -SYSTEM_MDDS -CURL_LIBS -CURL_CFLAGS -SYSTEM_CURL -CURLCONFIG -SAXON_JAR -SYSTEM_SAXON -SERIALIZER_JAR -BSH_JAR -SYSTEM_BSH -HSQLDB_JAR -SYSTEM_HSQLDB -SYSTEM_MYSQL_CPPCONN -LIBMYSQL_PATH -MYSQL_DEFINES -MYSQL_LIB -MYSQL_INC -SYSTEM_MYSQL -MYSQLCONFIG -ENABLE_MYSQLC -LUCENE_ANALYZERS_JAR -LUCENE_CORE_JAR -SYSTEM_LUCENE -DB_JAR -DB_INCLUDES -DB_VERSION -SYSTEM_DB -HOME -PYTHON_LIBS -PYTHON_CFLAGS -SYSTEM_PYTHON -BZIP2 -pkgpyexecdir -pyexecdir -pkgpythondir -pythondir -PYTHON_PLATFORM -PYTHON_EXEC_PREFIX -PYTHON_PREFIX -PYTHON_VERSION -PYTHON -SYSTEM_LIBXML -LIBXML_LIBS -LIBXML_CFLAGS -SYSTEM_LIBXSLT -XSLTPROC -LIBXSLT_LIBS -LIBXSLT_CFLAGS -USE_FT_EMBOLDEN -FREETYPE_LIBS -FREETYPE_CFLAGS -SYSTEM_CPPUNIT -CPPUNIT_LIBS -CPPUNIT_CFLAGS -SYSTEM_LIBWPD -LIBWPD_LIBS -LIBWPD_CFLAGS -PKG_CONFIG -SYSTEM_EXPAT -SYSTEM_JPEG -SYSTEM_ZLIB -SYSTEM_STDLIBS -BUILD_UNOWINREG -MINGWSTRIP -MINGWCXX -BUILD_STAX -GPERF -PKGFORMAT -RPM -BUILD_EPM -PKGMK -DPKG -EPM -BUILD_DMAKE -DMAKE -JAVAIFLAGS -JAVAFLAGS -JDK -JAVA_HOME -JAVAAOTCOMPILER -AWTLIB -JAVADOC -JAVACISGCJ -JAVACOMPILER -JAVAINTERPRETER -SOLAR_JAVA -BUILD_VER_STRING -ALLOC -HAVE_GCC_VISIBILITY_FEATURE -CCACHE -USE_CCACHE -USE_SYSTEM_STL -STLPORT_VER -STLPORT4 -EXCEPTIONS -MINGW_GXXDLL -MINGW_GCCDLL -MINGW_SHARED_LIBSTDCPP -MINGW_SHARED_GXXLIB -MINGW_GCCLIB_EH -MINGW_SHARED_GCCLIB -MINGW_CLIB_DIR -MINGW_BACKWARD_INCLUDE_PATH -MINGW_LIB_INCLUDE_PATH -GXX_INCLUDE_PATH -CRYPT_LINK -PAM_LINK -NEW_SHADOW_API -PAM -VBA_EXTENSION -ENABLE_VBA -LFS_CFLAGS -WORDS_BIGENDIAN -SIZEOF_LONG -CXXCPP -ac_ct_CXX -CXXFLAGS -CXX -CPP -FRAME_HOME -CSC_PATH -MIDL_PATH -USE_MINGW -COMEX -MSPDB_PATH -PERL -HAVE_LD_HASH_STYLE -_cc -GNUMAKE -ENABLE_PCH -HAVE_LD_BSYMBOLIC_FUNCTIONS -GCCVER -COMPATH -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -GCC_HOME -SHELLPATH -WITH_MINGWIN -THES_SYSTEM_DIR -HYPH_SYSTEM_DIR -DICT_SYSTEM_DIR -SYSTEM_DICTS -WITH_MYSPELL_DICTS -ENABLE_RPATH -DISABLE_ATL -DISABLE_ACTIVEX -ENABLE_DIRECTX -WITH_BINFILTER -DO_FETCH_TARBALLS -TARFILE_LOCATION -ENABLE_FONTCONFIG -ENABLE_CUPS -DISABLE_STRIP -ENABLE_SYMBOLS -PROEXT -PROFULLSWITCH -PRODUCT -ENABLE_DEBUG -ENABLE_WERROR -VC_STANDARD -ENABLE_CRASHDUMP -PTHREAD_LIBS -PTHREAD_CFLAGS -OSVERSION -GNUTAR -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -SOURCEVERSION -UPD -_solenv -LOCAL_SOLENV -SED -AWK -EGREP -GREP -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG TARFILE_LOCATION DO_FETCH_TARBALLS WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_SHARED_LIBSTDCPP MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS JAVAIFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM RPM PKGFORMAT GPERF BUILD_STAX MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD CPPUNIT_CFLAGS CPPUNIT_LIBS SYSTEM_CPPUNIT FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR ENABLE_MYSQLC MYSQLCONFIG SYSTEM_MYSQL MYSQL_INC MYSQL_LIB MYSQL_DEFINES LIBMYSQL_PATH SYSTEM_MYSQL_CPPCONN SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_MDDS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN ICUCONFIG SYSTEM_ICU ICU_MAJOR ICU_MINOR ICU_MICRO GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB MYTHES_CFLAGS MYTHES_LIBS SYSTEM_MYTHES SYSTEM_LPSOLVE SYSTEM_LIBTEXTCAT SYSTEM_LIBTEXTCAT_DATA HAVE_GETOPT HAVE_READDIR_R SYSTEM_LIBC PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK GSTREAMER_CFLAGS GSTREAMER_LIBS ENABLE_GSTREAMER CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_PRESENTER_EXTRA_UI ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK ANT ANT_HOME ANT_LIB OOO_JUNIT_JAR WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE nodep LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_gnu_patch -with_agg -with_gnu_cp -enable_graphite -with_system_graphite -enable_ldap -enable_fetch_external -with_external_tar -with_openldap -enable_lockdown -enable_vba -with_vba_package_format -enable_pch -enable_mozilla -with_fonts -with_ppds -with_afms -enable_epm -with_epm -with_package_format -enable_odk -enable_mathmldtd -enable_evolution2 -with_system_stdlibs -enable_cups -enable_fontconfig -enable_directx -enable_activex -enable_atl -enable_symbols -enable_strip_solver -enable_werror -enable_debug -enable_dbgutil -enable_crashdump -enable_cl_standard -enable_gtk -enable_gstreamer -enable_systray -enable_cairo -with_system_cairo -enable_opengl -enable_dbus -enable_gconf -enable_gnome_vfs -enable_gio -enable_static_gtk -enable_layout -enable_build_mozilla -with_mozilla_version -with_mozilla_toolkit -enable_nss_module -enable_kde -enable_kdeab -enable_kde4 -enable_binfilter -enable_rpath -enable_pam -enable_pam_link -enable_crypt_link -enable_xrender_link -enable_randr -enable_randr_link -with_myspell_dicts -with_system_dicts -with_external_dict_dir -with_external_hyph_dir -with_external_thes_dir -with_system_libs -with_system_headers -with_system_jars -with_system_zlib -with_system_openssl -with_system_jpeg -with_system_expat -with_system_libwpd -with_system_libxml -with_system_python -with_system_icu -with_system_poppler -with_system_db -with_system_lucene -with_lucene_core_jar -with_lucene_analyzers_jar -enable_mysql_connector -with_system_mysql -with_libmysql_path -with_system_mysql_cppconn -with_system_hsqldb -with_hsqldb_jar -with_system_beanshell -with_beanshell_jar -enable_presenter_extra_ui -enable_minimizer -enable_presenter_console -enable_pdfimport -enable_wiki_publisher -with_commons_codec_jar -with_commons_lang_jar -with_commons_httpclient_jar -with_commons_logging_jar -with_servlet_api_jar -enable_report_builder -with_system_jfreereport -with_sac_jar -with_libxml_jar -with_flute_jar -with_jfreereport_jar -with_liblayout_jar -with_libloader_jar -with_libformula_jar -with_librepository_jar -with_libfonts_jar -with_libserializer_jar -with_libbase_jar -with_system_saxon -with_saxon_jar -with_system_libxslt -with_system_odbc -with_system_sane -with_system_xrender -with_system_curl -with_system_boost -with_system_mdds -with_system_vigra -enable_neon -enable_Xaw -with_system_neon -with_system_agg -with_system_hunspell -with_system_mythes -with_system_altlinuxhyph -with_system_lpsolve -with_system_libtextcat -with_external_libtextcat_data -with_system_cppunit -with_system_redland -with_system_mozilla -with_stlport -with_jdk_home -with_gxx_include_path -with_java -enable_gcjaot -with_ant_home -with_junit -with_perl_home -with_cl_home -with_mspdb_path -with_midl_path -with_csc_path -with_nsis_path -with_frame_home -with_psdk_home -with_directx_home -with_mozilla_build -with_local_solenv -with_local_solver -enable_check_only -enable_ccache_skip -with_lang -with_poor_help_localizations -with_dict -with_intro_bitmaps -with_about_bitmaps -with_vendor -with_unix_wrapper -with_asm_home -with_os_version -with_unzip_home -with_zip_home -with_mingwin -with_build_version -with_alloc -enable_verbose -enable_dependency_tracking -enable_largefile -with_x -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -XMKMF' - # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -1280,48 +337,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -1343,61 +386,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; esac - eval enable_$ac_useropt=\$ac_optarg ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1424,12 +439,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -1454,16 +463,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1528,16 +534,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1588,38 +584,26 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; esac - eval with_$ac_useropt=\$ac_optarg ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1639,7 +623,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option + -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1648,16 +632,17 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1666,39 +651,31 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var - # Remove trailing slashes. + eval ac_val=$`echo $ac_var` case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - # Be sure to have absolute directory names. +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1712,7 +689,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1725,76 +702,86 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP # # Report the --help message. @@ -1823,11 +810,14 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1837,25 +827,18 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1876,7 +859,6 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-graphite Enables the compilation of Graphite smart font rendering @@ -2478,101 +1460,129 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> - LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if - you have headers in a nonstandard directory <include dir> + CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have + headers in a nonstandard directory <include dir> CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -configure -generated by GNU Autoconf 2.63 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -2591,7 +1601,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -2603,9 +1613,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -2627,6 +1636,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -2637,8 +1647,8 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -2659,7 +1669,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -2670,8 +1682,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -2684,35 +1696,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -2723,28 +1720,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -2756,24 +1747,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -2803,24 +1796,18 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -2830,61 +1817,54 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2894,15 +1874,19 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -2919,1094 +1903,1089 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$@" >config.parms -# Check whether --with-gnu-patch was given. +# Check whether --with-gnu-patch or --without-gnu-patch was given. if test "${with_gnu_patch+set}" = set; then - withval=$with_gnu_patch; -fi + withval="$with_gnu_patch" +fi; -# Check whether --with-agg was given. +# Check whether --with-agg or --without-agg was given. if test "${with_agg+set}" = set; then - withval=$with_agg; + withval="$with_agg" + else with_agg=yes -fi - +fi; -# Check whether --with-gnu-cp was given. +# Check whether --with-gnu-cp or --without-gnu-cp was given. if test "${with_gnu_cp+set}" = set; then - withval=$with_gnu_cp; -fi + withval="$with_gnu_cp" -# Check whether --enable-graphite was given. +fi; +# Check whether --enable-graphite or --disable-graphite was given. if test "${enable_graphite+set}" = set; then - enableval=$enable_graphite; -fi + enableval="$enable_graphite" +fi; -# Check whether --with-system-graphite was given. +# Check whether --with-system-graphite or --without-system-graphite was given. if test "${with_system_graphite+set}" = set; then - withval=$with_system_graphite; -fi + withval="$with_system_graphite" -# Check whether --enable-ldap was given. +fi; +# Check whether --enable-ldap or --disable-ldap was given. if test "${enable_ldap+set}" = set; then - enableval=$enable_ldap; -fi + enableval="$enable_ldap" -# Check whether --enable-fetch-external was given. +fi; +# Check whether --enable-fetch-external or --disable-fetch-external was given. if test "${enable_fetch_external+set}" = set; then - enableval=$enable_fetch_external; -fi + enableval="$enable_fetch_external" +fi; -# Check whether --with-external-tar was given. +# Check whether --with-external-tar or --without-external-tar was given. if test "${with_external_tar+set}" = set; then - withval=$with_external_tar; TARFILE_LOCATION="$withval" - -fi + withval="$with_external_tar" + TARFILE_LOCATION="$withval" +fi; -# Check whether --with-openldap was given. +# Check whether --with-openldap or --without-openldap was given. if test "${with_openldap+set}" = set; then - withval=$with_openldap; -fi + withval="$with_openldap" -# Check whether --enable-lockdown was given. +fi; +# Check whether --enable-lockdown or --disable-lockdown was given. if test "${enable_lockdown+set}" = set; then - enableval=$enable_lockdown; -fi + enableval="$enable_lockdown" -# Check whether --enable-vba was given. +fi; +# Check whether --enable-vba or --disable-vba was given. if test "${enable_vba+set}" = set; then - enableval=$enable_vba; -fi + enableval="$enable_vba" +fi; -# Check whether --with-vba-package-format was given. +# Check whether --with-vba-package-format or --without-vba-package-format was given. if test "${with_vba_package_format+set}" = set; then - withval=$with_vba_package_format; -fi + withval="$with_vba_package_format" -# Check whether --enable-pch was given. +fi; +# Check whether --enable-pch or --disable-pch was given. if test "${enable_pch+set}" = set; then - enableval=$enable_pch; -fi + enableval="$enable_pch" -# Check whether --enable-mozilla was given. +fi; +# Check whether --enable-mozilla or --disable-mozilla was given. if test "${enable_mozilla+set}" = set; then - enableval=$enable_mozilla; + enableval="$enable_mozilla" + else enable_mozilla="yes" -fi +fi; - -# Check whether --with-fonts was given. +# Check whether --with-fonts or --without-fonts was given. if test "${with_fonts+set}" = set; then - withval=$with_fonts; -fi + withval="$with_fonts" +fi; -# Check whether --with-ppds was given. +# Check whether --with-ppds or --without-ppds was given. if test "${with_ppds+set}" = set; then - withval=$with_ppds; -fi + withval="$with_ppds" +fi; -# Check whether --with-afms was given. +# Check whether --with-afms or --without-afms was given. if test "${with_afms+set}" = set; then - withval=$with_afms; -fi + withval="$with_afms" -# Check whether --enable-epm was given. +fi; +# Check whether --enable-epm or --disable-epm was given. if test "${enable_epm+set}" = set; then - enableval=$enable_epm; + enableval="$enable_epm" + else enable_epm="yes" -fi +fi; - -# Check whether --with-epm was given. +# Check whether --with-epm or --without-epm was given. if test "${with_epm+set}" = set; then - withval=$with_epm; -fi + withval="$with_epm" +fi; -# Check whether --with-package-format was given. +# Check whether --with-package-format or --without-package-format was given. if test "${with_package_format+set}" = set; then - withval=$with_package_format; -fi + withval="$with_package_format" -# Check whether --enable-odk was given. +fi; +# Check whether --enable-odk or --disable-odk was given. if test "${enable_odk+set}" = set; then - enableval=$enable_odk; + enableval="$enable_odk" + else enable_odk="yes" -fi - -# Check whether --enable-mathmldtd was given. +fi; +# Check whether --enable-mathmldtd or --disable-mathmldtd was given. if test "${enable_mathmldtd+set}" = set; then - enableval=$enable_mathmldtd; + enableval="$enable_mathmldtd" + else enable_mathmldtd="yes" -fi - -# Check whether --enable-evolution2 was given. +fi; +# Check whether --enable-evolution2 or --disable-evolution2 was given. if test "${enable_evolution2+set}" = set; then - enableval=$enable_evolution2; -fi + enableval="$enable_evolution2" +fi; -# Check whether --with-system-stdlibs was given. +# Check whether --with-system-stdlibs or --without-system-stdlibs was given. if test "${with_system_stdlibs+set}" = set; then - withval=$with_system_stdlibs; -fi + withval="$with_system_stdlibs" -# Check whether --enable-cups was given. +fi; +# Check whether --enable-cups or --disable-cups was given. if test "${enable_cups+set}" = set; then - enableval=$enable_cups; + enableval="$enable_cups" + else enable_cups=yes -fi - -# Check whether --enable-fontconfig was given. +fi; +# Check whether --enable-fontconfig or --disable-fontconfig was given. if test "${enable_fontconfig+set}" = set; then - enableval=$enable_fontconfig; + enableval="$enable_fontconfig" + else enable_fontconfig=yes -fi - -# Check whether --enable-directx was given. +fi; +# Check whether --enable-directx or --disable-directx was given. if test "${enable_directx+set}" = set; then - enableval=$enable_directx; + enableval="$enable_directx" + else enable_directx=yes -fi - -# Check whether --enable-activex was given. +fi; +# Check whether --enable-activex or --disable-activex was given. if test "${enable_activex+set}" = set; then - enableval=$enable_activex; -fi + enableval="$enable_activex" +fi; -# Check whether --enable-atl was given. +# Check whether --enable-atl or --disable-atl was given. if test "${enable_atl+set}" = set; then - enableval=$enable_atl; -fi + enableval="$enable_atl" +fi; -# Check whether --enable-symbols was given. +# Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; -fi + enableval="$enable_symbols" -# Check whether --enable-strip-solver was given. +fi; +# Check whether --enable-strip-solver or --disable-strip-solver was given. if test "${enable_strip_solver+set}" = set; then - enableval=$enable_strip_solver; -fi + enableval="$enable_strip_solver" -# Check whether --enable-werror was given. +fi; +# Check whether --enable-werror or --disable-werror was given. if test "${enable_werror+set}" = set; then - enableval=$enable_werror; -fi + enableval="$enable_werror" -# Check whether --enable-debug was given. +fi; +# Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then - enableval=$enable_debug; -fi + enableval="$enable_debug" -# Check whether --enable-dbgutil was given. +fi; +# Check whether --enable-dbgutil or --disable-dbgutil was given. if test "${enable_dbgutil+set}" = set; then - enableval=$enable_dbgutil; -fi + enableval="$enable_dbgutil" -# Check whether --enable-crashdump was given. +fi; +# Check whether --enable-crashdump or --disable-crashdump was given. if test "${enable_crashdump+set}" = set; then - enableval=$enable_crashdump; -fi + enableval="$enable_crashdump" -# Check whether --enable-cl-standard was given. +fi; +# Check whether --enable-cl-standard or --disable-cl-standard was given. if test "${enable_cl_standard+set}" = set; then - enableval=$enable_cl_standard; -fi + enableval="$enable_cl_standard" -# Check whether --enable-gtk was given. +fi; +# Check whether --enable-gtk or --disable-gtk was given. if test "${enable_gtk+set}" = set; then - enableval=$enable_gtk; + enableval="$enable_gtk" + else enable_gtk=yes -fi - -# Check whether --enable-gstreamer was given. +fi; +# Check whether --enable-gstreamer or --disable-gstreamer was given. if test "${enable_gstreamer+set}" = set; then - enableval=$enable_gstreamer; + enableval="$enable_gstreamer" + else enable_gstreamer=yes -fi - -# Check whether --enable-systray was given. +fi; +# Check whether --enable-systray or --disable-systray was given. if test "${enable_systray+set}" = set; then - enableval=$enable_systray; + enableval="$enable_systray" + else enable_systray=yes -fi - -# Check whether --enable-cairo was given. +fi; +# Check whether --enable-cairo or --disable-cairo was given. if test "${enable_cairo+set}" = set; then - enableval=$enable_cairo; + enableval="$enable_cairo" + else enable_cairo=no -fi +fi; - -# Check whether --with-system-cairo was given. +# Check whether --with-system-cairo or --without-system-cairo was given. if test "${with_system_cairo+set}" = set; then - withval=$with_system_cairo; -fi + withval="$with_system_cairo" -# Check whether --enable-opengl was given. +fi; +# Check whether --enable-opengl or --disable-opengl was given. if test "${enable_opengl+set}" = set; then - enableval=$enable_opengl; + enableval="$enable_opengl" + else enable_opengl=no -fi - -# Check whether --enable-dbus was given. +fi; +# Check whether --enable-dbus or --disable-dbus was given. if test "${enable_dbus+set}" = set; then - enableval=$enable_dbus; + enableval="$enable_dbus" + else enable_dbus=no -fi - -# Check whether --enable-gconf was given. +fi; +# Check whether --enable-gconf or --disable-gconf was given. if test "${enable_gconf+set}" = set; then - enableval=$enable_gconf; + enableval="$enable_gconf" + else enable_gconf=yes -fi - -# Check whether --enable-gnome-vfs was given. +fi; +# Check whether --enable-gnome-vfs or --disable-gnome-vfs was given. if test "${enable_gnome_vfs+set}" = set; then - enableval=$enable_gnome_vfs; + enableval="$enable_gnome_vfs" + else enable_gnome_vfs=yes -fi - -# Check whether --enable-gio was given. +fi; +# Check whether --enable-gio or --disable-gio was given. if test "${enable_gio+set}" = set; then - enableval=$enable_gio; + enableval="$enable_gio" + else enable_gio=no -fi - -# Check whether --enable-static-gtk was given. +fi; +# Check whether --enable-static-gtk or --disable-static-gtk was given. if test "${enable_static_gtk+set}" = set; then - enableval=$enable_static_gtk; -fi + enableval="$enable_static_gtk" -# Check whether --enable-layout was given. +fi; +# Check whether --enable-layout or --disable-layout was given. if test "${enable_layout+set}" = set; then - enableval=$enable_layout; -fi + enableval="$enable_layout" -# Check whether --enable-build-mozilla was given. +fi; +# Check whether --enable-build-mozilla or --disable-build-mozilla was given. if test "${enable_build_mozilla+set}" = set; then - enableval=$enable_build_mozilla; -fi + enableval="$enable_build_mozilla" +fi; -# Check whether --with-mozilla-version was given. +# Check whether --with-mozilla-version or --without-mozilla-version was given. if test "${with_mozilla_version+set}" = set; then - withval=$with_mozilla_version; -fi + withval="$with_mozilla_version" +fi; -# Check whether --with-mozilla-toolkit was given. +# Check whether --with-mozilla-toolkit or --without-mozilla-toolkit was given. if test "${with_mozilla_toolkit+set}" = set; then - withval=$with_mozilla_toolkit; -fi + withval="$with_mozilla_toolkit" -# Check whether --enable-nss_module was given. +fi; +# Check whether --enable-nss_module or --disable-nss_module was given. if test "${enable_nss_module+set}" = set; then - enableval=$enable_nss_module; + enableval="$enable_nss_module" + else enable_nss_module=yes -fi - -# Check whether --enable-kde was given. +fi; +# Check whether --enable-kde or --disable-kde was given. if test "${enable_kde+set}" = set; then - enableval=$enable_kde; -fi + enableval="$enable_kde" -# Check whether --enable-kdeab was given. +fi; +# Check whether --enable-kdeab or --disable-kdeab was given. if test "${enable_kdeab+set}" = set; then - enableval=$enable_kdeab; + enableval="$enable_kdeab" + else if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi -fi - -# Check whether --enable-kde4 was given. +fi; +# Check whether --enable-kde4 or --disable-kde4 was given. if test "${enable_kde4+set}" = set; then - enableval=$enable_kde4; -fi + enableval="$enable_kde4" -# Check whether --enable-binfilter was given. +fi; +# Check whether --enable-binfilter or --disable-binfilter was given. if test "${enable_binfilter+set}" = set; then - enableval=$enable_binfilter; + enableval="$enable_binfilter" + else if ! test -d ./binfilter; then enable_binfilter=no; fi -fi - -# Check whether --enable-rpath was given. +fi; +# Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; -fi + enableval="$enable_rpath" -# Check whether --enable-pam was given. +fi; +# Check whether --enable-pam or --disable-pam was given. if test "${enable_pam+set}" = set; then - enableval=$enable_pam; -fi + enableval="$enable_pam" -# Check whether --enable-pam-link was given. +fi; +# Check whether --enable-pam-link or --disable-pam-link was given. if test "${enable_pam_link+set}" = set; then - enableval=$enable_pam_link; -fi + enableval="$enable_pam_link" -# Check whether --enable-crypt-link was given. +fi; +# Check whether --enable-crypt-link or --disable-crypt-link was given. if test "${enable_crypt_link+set}" = set; then - enableval=$enable_crypt_link; + enableval="$enable_crypt_link" + else enable_crypt_link=yes -fi - -# Check whether --enable-xrender-link was given. +fi; +# Check whether --enable-xrender-link or --disable-xrender-link was given. if test "${enable_xrender_link+set}" = set; then - enableval=$enable_xrender_link; -fi + enableval="$enable_xrender_link" -# Check whether --enable-randr was given. +fi; +# Check whether --enable-randr or --disable-randr was given. if test "${enable_randr+set}" = set; then - enableval=$enable_randr; + enableval="$enable_randr" + else enable_randr=yes -fi - -# Check whether --enable-randr-link was given. +fi; +# Check whether --enable-randr-link or --disable-randr-link was given. if test "${enable_randr_link+set}" = set; then - enableval=$enable_randr_link; + enableval="$enable_randr_link" + else enable_randr_link=yes -fi - +fi; -# Check whether --with-myspell-dicts was given. +# Check whether --with-myspell-dicts or --without-myspell-dicts was given. if test "${with_myspell_dicts+set}" = set; then - withval=$with_myspell_dicts; -fi + withval="$with_myspell_dicts" +fi; -# Check whether --with-system-dicts was given. +# Check whether --with-system-dicts or --without-system-dicts was given. if test "${with_system_dicts+set}" = set; then - withval=$with_system_dicts; -fi + withval="$with_system_dicts" +fi; -# Check whether --with-external-dict-dir was given. +# Check whether --with-external-dict-dir or --without-external-dict-dir was given. if test "${with_external_dict_dir+set}" = set; then - withval=$with_external_dict_dir; -fi + withval="$with_external_dict_dir" +fi; -# Check whether --with-external-hyph-dir was given. +# Check whether --with-external-hyph-dir or --without-external-hyph-dir was given. if test "${with_external_hyph_dir+set}" = set; then - withval=$with_external_hyph_dir; -fi + withval="$with_external_hyph_dir" +fi; -# Check whether --with-external-thes-dir was given. +# Check whether --with-external-thes-dir or --without-external-thes-dir was given. if test "${with_external_thes_dir+set}" = set; then - withval=$with_external_thes_dir; -fi + withval="$with_external_thes_dir" +fi; -# Check whether --with-system-libs was given. +# Check whether --with-system-libs or --without-system-libs was given. if test "${with_system_libs+set}" = set; then - withval=$with_system_libs; -fi + withval="$with_system_libs" +fi; -# Check whether --with-system-headers was given. +# Check whether --with-system-headers or --without-system-headers was given. if test "${with_system_headers+set}" = set; then - withval=$with_system_headers; -fi + withval="$with_system_headers" +fi; -# Check whether --with-system-jars was given. +# Check whether --with-system-jars or --without-system-jars was given. if test "${with_system_jars+set}" = set; then - withval=$with_system_jars; -fi + withval="$with_system_jars" +fi; -# Check whether --with-system-zlib was given. +# Check whether --with-system-zlib or --without-system-zlib was given. if test "${with_system_zlib+set}" = set; then - withval=$with_system_zlib; -fi + withval="$with_system_zlib" +fi; -# Check whether --with-system-openssl was given. +# Check whether --with-system-openssl or --without-system-openssl was given. if test "${with_system_openssl+set}" = set; then - withval=$with_system_openssl; -fi + withval="$with_system_openssl" +fi; -# Check whether --with-system-jpeg was given. +# Check whether --with-system-jpeg or --without-system-jpeg was given. if test "${with_system_jpeg+set}" = set; then - withval=$with_system_jpeg; -fi + withval="$with_system_jpeg" +fi; -# Check whether --with-system-expat was given. +# Check whether --with-system-expat or --without-system-expat was given. if test "${with_system_expat+set}" = set; then - withval=$with_system_expat; -fi + withval="$with_system_expat" +fi; -# Check whether --with-system-libwpd was given. +# Check whether --with-system-libwpd or --without-system-libwpd was given. if test "${with_system_libwpd+set}" = set; then - withval=$with_system_libwpd; -fi + withval="$with_system_libwpd" +fi; -# Check whether --with-system-libxml was given. +# Check whether --with-system-libxml or --without-system-libxml was given. if test "${with_system_libxml+set}" = set; then - withval=$with_system_libxml; -fi + withval="$with_system_libxml" +fi; -# Check whether --with-system-python was given. +# Check whether --with-system-python or --without-system-python was given. if test "${with_system_python+set}" = set; then - withval=$with_system_python; -fi + withval="$with_system_python" +fi; -# Check whether --with-system-icu was given. +# Check whether --with-system-icu or --without-system-icu was given. if test "${with_system_icu+set}" = set; then - withval=$with_system_icu; -fi + withval="$with_system_icu" +fi; -# Check whether --with-system-poppler was given. +# Check whether --with-system-poppler or --without-system-poppler was given. if test "${with_system_poppler+set}" = set; then - withval=$with_system_poppler; -fi + withval="$with_system_poppler" +fi; -# Check whether --with-system-db was given. +# Check whether --with-system-db or --without-system-db was given. if test "${with_system_db+set}" = set; then - withval=$with_system_db; -fi + withval="$with_system_db" +fi; -# Check whether --with-system-lucene was given. +# Check whether --with-system-lucene or --without-system-lucene was given. if test "${with_system_lucene+set}" = set; then - withval=$with_system_lucene; -fi + withval="$with_system_lucene" +fi; -# Check whether --with-lucene-core-jar was given. +# Check whether --with-lucene-core-jar or --without-lucene-core-jar was given. if test "${with_lucene_core_jar+set}" = set; then - withval=$with_lucene_core_jar; LUCENE_CORE_JAR="$withval" - -fi + withval="$with_lucene_core_jar" + LUCENE_CORE_JAR="$withval" +fi; -# Check whether --with-lucene-analyzers-jar was given. +# Check whether --with-lucene-analyzers-jar or --without-lucene-analyzers-jar was given. if test "${with_lucene_analyzers_jar+set}" = set; then - withval=$with_lucene_analyzers_jar; LUCENE_ANALYZERS_JAR="$withval" - -fi + withval="$with_lucene_analyzers_jar" + LUCENE_ANALYZERS_JAR="$withval" -# Check whether --enable-mysql-connector was given. +fi; +# Check whether --enable-mysql-connector or --disable-mysql-connector was given. if test "${enable_mysql_connector+set}" = set; then - enableval=$enable_mysql_connector; -fi + enableval="$enable_mysql_connector" +fi; -# Check whether --with-system-mysql was given. +# Check whether --with-system-mysql or --without-system-mysql was given. if test "${with_system_mysql+set}" = set; then - withval=$with_system_mysql; -fi + withval="$with_system_mysql" +fi; -# Check whether --with-libmysql-path was given. +# Check whether --with-libmysql-path or --without-libmysql-path was given. if test "${with_libmysql_path+set}" = set; then - withval=$with_libmysql_path; -fi + withval="$with_libmysql_path" +fi; -# Check whether --with-system-mysql-cppconn was given. +# Check whether --with-system-mysql-cppconn or --without-system-mysql-cppconn was given. if test "${with_system_mysql_cppconn+set}" = set; then - withval=$with_system_mysql_cppconn; -fi + withval="$with_system_mysql_cppconn" +fi; -# Check whether --with-system-hsqldb was given. +# Check whether --with-system-hsqldb or --without-system-hsqldb was given. if test "${with_system_hsqldb+set}" = set; then - withval=$with_system_hsqldb; -fi + withval="$with_system_hsqldb" +fi; -# Check whether --with-hsqldb-jar was given. +# Check whether --with-hsqldb-jar or --without-hsqldb-jar was given. if test "${with_hsqldb_jar+set}" = set; then - withval=$with_hsqldb_jar; HSQLDB_JAR="$withval" - -fi + withval="$with_hsqldb_jar" + HSQLDB_JAR="$withval" +fi; -# Check whether --with-system-beanshell was given. +# Check whether --with-system-beanshell or --without-system-beanshell was given. if test "${with_system_beanshell+set}" = set; then - withval=$with_system_beanshell; -fi + withval="$with_system_beanshell" +fi; -# Check whether --with-beanshell-jar was given. +# Check whether --with-beanshell-jar or --without-beanshell-jar was given. if test "${with_beanshell_jar+set}" = set; then - withval=$with_beanshell_jar; BSH_JAR="$withval" - -fi + withval="$with_beanshell_jar" + BSH_JAR="$withval" -# Check whether --enable-presenter-extra-ui was given. +fi; +# Check whether --enable-presenter-extra-ui or --disable-presenter-extra-ui was given. if test "${enable_presenter_extra_ui+set}" = set; then - enableval=$enable_presenter_extra_ui; + enableval="$enable_presenter_extra_ui" + else enable_presenter_extra_ui=no -fi - -# Check whether --enable-minimizer was given. +fi; +# Check whether --enable-minimizer or --disable-minimizer was given. if test "${enable_minimizer+set}" = set; then - enableval=$enable_minimizer; -fi + enableval="$enable_minimizer" -# Check whether --enable-presenter-console was given. +fi; +# Check whether --enable-presenter-console or --disable-presenter-console was given. if test "${enable_presenter_console+set}" = set; then - enableval=$enable_presenter_console; -fi + enableval="$enable_presenter_console" -# Check whether --enable-pdfimport was given. +fi; +# Check whether --enable-pdfimport or --disable-pdfimport was given. if test "${enable_pdfimport+set}" = set; then - enableval=$enable_pdfimport; -fi + enableval="$enable_pdfimport" -# Check whether --enable-wiki-publisher was given. +fi; +# Check whether --enable-wiki-publisher or --disable-wiki-publisher was given. if test "${enable_wiki_publisher+set}" = set; then - enableval=$enable_wiki_publisher; -fi + enableval="$enable_wiki_publisher" +fi; -# Check whether --with-commons-codec-jar was given. +# Check whether --with-commons-codec-jar or --without-commons-codec-jar was given. if test "${with_commons_codec_jar+set}" = set; then - withval=$with_commons_codec_jar; COMMONS_CODEC_JAR="$withval" - -fi + withval="$with_commons_codec_jar" + COMMONS_CODEC_JAR="$withval" +fi; -# Check whether --with-commons-lang-jar was given. +# Check whether --with-commons-lang-jar or --without-commons-lang-jar was given. if test "${with_commons_lang_jar+set}" = set; then - withval=$with_commons_lang_jar; COMMONS_LANG_JAR="$withval" - -fi + withval="$with_commons_lang_jar" + COMMONS_LANG_JAR="$withval" +fi; -# Check whether --with-commons-httpclient-jar was given. +# Check whether --with-commons-httpclient-jar or --without-commons-httpclient-jar was given. if test "${with_commons_httpclient_jar+set}" = set; then - withval=$with_commons_httpclient_jar; COMMONS_HTTPCLIENT_JAR="$withval" - -fi + withval="$with_commons_httpclient_jar" + COMMONS_HTTPCLIENT_JAR="$withval" +fi; -# Check whether --with-commons-logging-jar was given. +# Check whether --with-commons-logging-jar or --without-commons-logging-jar was given. if test "${with_commons_logging_jar+set}" = set; then - withval=$with_commons_logging_jar; COMMONS_LOGGING_JAR="$withval" - -fi + withval="$with_commons_logging_jar" + COMMONS_LOGGING_JAR="$withval" +fi; -# Check whether --with-servlet-api-jar was given. +# Check whether --with-servlet-api-jar or --without-servlet-api-jar was given. if test "${with_servlet_api_jar+set}" = set; then - withval=$with_servlet_api_jar; SERVLETAPI_JAR="$withval" - -fi + withval="$with_servlet_api_jar" + SERVLETAPI_JAR="$withval" -# Check whether --enable-report-builder was given. +fi; +# Check whether --enable-report-builder or --disable-report-builder was given. if test "${enable_report_builder+set}" = set; then - enableval=$enable_report_builder; -fi + enableval="$enable_report_builder" +fi; -# Check whether --with-system-jfreereport was given. +# Check whether --with-system-jfreereport or --without-system-jfreereport was given. if test "${with_system_jfreereport+set}" = set; then - withval=$with_system_jfreereport; -fi + withval="$with_system_jfreereport" +fi; -# Check whether --with-sac-jar was given. +# Check whether --with-sac-jar or --without-sac-jar was given. if test "${with_sac_jar+set}" = set; then - withval=$with_sac_jar; SAC_JAR="$withval" - -fi + withval="$with_sac_jar" + SAC_JAR="$withval" +fi; -# Check whether --with-libxml-jar was given. +# Check whether --with-libxml-jar or --without-libxml-jar was given. if test "${with_libxml_jar+set}" = set; then - withval=$with_libxml_jar; LIBXML_JAR="$withval" - -fi + withval="$with_libxml_jar" + LIBXML_JAR="$withval" +fi; -# Check whether --with-flute-jar was given. +# Check whether --with-flute-jar or --without-flute-jar was given. if test "${with_flute_jar+set}" = set; then - withval=$with_flute_jar; FLUTE_JAR="$withval" - -fi + withval="$with_flute_jar" + FLUTE_JAR="$withval" +fi; -# Check whether --with-jfreereport-jar was given. +# Check whether --with-jfreereport-jar or --without-jfreereport-jar was given. if test "${with_jfreereport_jar+set}" = set; then - withval=$with_jfreereport_jar; JFREEREPORT_JAR="$withval" - -fi + withval="$with_jfreereport_jar" + JFREEREPORT_JAR="$withval" +fi; -# Check whether --with-liblayout-jar was given. +# Check whether --with-liblayout-jar or --without-liblayout-jar was given. if test "${with_liblayout_jar+set}" = set; then - withval=$with_liblayout_jar; LIBLAYOUT_JAR="$withval" - -fi + withval="$with_liblayout_jar" + LIBLAYOUT_JAR="$withval" +fi; -# Check whether --with-libloader-jar was given. +# Check whether --with-libloader-jar or --without-libloader-jar was given. if test "${with_libloader_jar+set}" = set; then - withval=$with_libloader_jar; LIBLOADER_JAR="$withval" - -fi + withval="$with_libloader_jar" + LIBLOADER_JAR="$withval" +fi; -# Check whether --with-libloader-jar was given. +# Check whether --with-libloader-jar or --without-libloader-jar was given. if test "${with_libloader_jar+set}" = set; then - withval=$with_libloader_jar; LIBLOADER_JAR="$withval" - -fi + withval="$with_libloader_jar" + LIBLOADER_JAR="$withval" +fi; -# Check whether --with-libformula-jar was given. +# Check whether --with-libformula-jar or --without-libformula-jar was given. if test "${with_libformula_jar+set}" = set; then - withval=$with_libformula_jar; LIBFORMULA_JAR="$withval" - -fi + withval="$with_libformula_jar" + LIBFORMULA_JAR="$withval" +fi; -# Check whether --with-librepository-jar was given. +# Check whether --with-librepository-jar or --without-librepository-jar was given. if test "${with_librepository_jar+set}" = set; then - withval=$with_librepository_jar; LIBREPOSITORY_JAR="$withval" - -fi + withval="$with_librepository_jar" + LIBREPOSITORY_JAR="$withval" +fi; -# Check whether --with-libfonts-jar was given. +# Check whether --with-libfonts-jar or --without-libfonts-jar was given. if test "${with_libfonts_jar+set}" = set; then - withval=$with_libfonts_jar; LIBFONTS_JAR="$withval" - -fi + withval="$with_libfonts_jar" + LIBFONTS_JAR="$withval" +fi; -# Check whether --with-libserializer-jar was given. +# Check whether --with-libserializer-jar or --without-libserializer-jar was given. if test "${with_libserializer_jar+set}" = set; then - withval=$with_libserializer_jar; LIBSERIALIZER_JAR="$withval" - -fi + withval="$with_libserializer_jar" + LIBSERIALIZER_JAR="$withval" +fi; -# Check whether --with-libbase-jar was given. +# Check whether --with-libbase-jar or --without-libbase-jar was given. if test "${with_libbase_jar+set}" = set; then - withval=$with_libbase_jar; LIBBASE_JAR="$withval" - -fi + withval="$with_libbase_jar" + LIBBASE_JAR="$withval" +fi; -# Check whether --with-system-saxon was given. +# Check whether --with-system-saxon or --without-system-saxon was given. if test "${with_system_saxon+set}" = set; then - withval=$with_system_saxon; -fi + withval="$with_system_saxon" +fi; -# Check whether --with-saxon-jar was given. +# Check whether --with-saxon-jar or --without-saxon-jar was given. if test "${with_saxon_jar+set}" = set; then - withval=$with_saxon_jar; SAXON_JAR="$withval" - -fi + withval="$with_saxon_jar" + SAXON_JAR="$withval" +fi; -# Check whether --with-system-libxslt was given. +# Check whether --with-system-libxslt or --without-system-libxslt was given. if test "${with_system_libxslt+set}" = set; then - withval=$with_system_libxslt; -fi + withval="$with_system_libxslt" +fi; -# Check whether --with-system-odbc was given. +# Check whether --with-system-odbc or --without-system-odbc was given. if test "${with_system_odbc+set}" = set; then - withval=$with_system_odbc; -fi + withval="$with_system_odbc" +fi; -# Check whether --with-system-sane was given. +# Check whether --with-system-sane or --without-system-sane was given. if test "${with_system_sane+set}" = set; then - withval=$with_system_sane; -fi + withval="$with_system_sane" +fi; -# Check whether --with-system-xrender was given. +# Check whether --with-system-xrender or --without-system-xrender was given. if test "${with_system_xrender+set}" = set; then - withval=$with_system_xrender; -fi + withval="$with_system_xrender" +fi; -# Check whether --with-system-curl was given. +# Check whether --with-system-curl or --without-system-curl was given. if test "${with_system_curl+set}" = set; then - withval=$with_system_curl; -fi + withval="$with_system_curl" +fi; -# Check whether --with-system-boost was given. +# Check whether --with-system-boost or --without-system-boost was given. if test "${with_system_boost+set}" = set; then - withval=$with_system_boost; -fi + withval="$with_system_boost" +fi; -# Check whether --with-system-mdds was given. +# Check whether --with-system-mdds or --without-system-mdds was given. if test "${with_system_mdds+set}" = set; then - withval=$with_system_mdds; -fi + withval="$with_system_mdds" +fi; -# Check whether --with-system-vigra was given. +# Check whether --with-system-vigra or --without-system-vigra was given. if test "${with_system_vigra+set}" = set; then - withval=$with_system_vigra; -fi + withval="$with_system_vigra" -# Check whether --enable-neon was given. +fi; +# Check whether --enable-neon or --disable-neon was given. if test "${enable_neon+set}" = set; then - enableval=$enable_neon; -fi + enableval="$enable_neon" -# Check whether --enable-Xaw was given. +fi; +# Check whether --enable-Xaw or --disable-Xaw was given. if test "${enable_Xaw+set}" = set; then - enableval=$enable_Xaw; -fi + enableval="$enable_Xaw" +fi; -# Check whether --with-system-neon was given. +# Check whether --with-system-neon or --without-system-neon was given. if test "${with_system_neon+set}" = set; then - withval=$with_system_neon; -fi + withval="$with_system_neon" +fi; -# Check whether --with-system-agg was given. +# Check whether --with-system-agg or --without-system-agg was given. if test "${with_system_agg+set}" = set; then - withval=$with_system_agg; -fi + withval="$with_system_agg" +fi; -# Check whether --with-system-hunspell was given. +# Check whether --with-system-hunspell or --without-system-hunspell was given. if test "${with_system_hunspell+set}" = set; then - withval=$with_system_hunspell; -fi + withval="$with_system_hunspell" +fi; -# Check whether --with-system-mythes was given. +# Check whether --with-system-mythes or --without-system-mythes was given. if test "${with_system_mythes+set}" = set; then - withval=$with_system_mythes; -fi + withval="$with_system_mythes" +fi; -# Check whether --with-system-altlinuxhyph was given. +# Check whether --with-system-altlinuxhyph or --without-system-altlinuxhyph was given. if test "${with_system_altlinuxhyph+set}" = set; then - withval=$with_system_altlinuxhyph; -fi + withval="$with_system_altlinuxhyph" +fi; -# Check whether --with-system-lpsolve was given. +# Check whether --with-system-lpsolve or --without-system-lpsolve was given. if test "${with_system_lpsolve+set}" = set; then - withval=$with_system_lpsolve; -fi + withval="$with_system_lpsolve" +fi; -# Check whether --with-system-libtextcat was given. +# Check whether --with-system-libtextcat or --without-system-libtextcat was given. if test "${with_system_libtextcat+set}" = set; then - withval=$with_system_libtextcat; -fi + withval="$with_system_libtextcat" +fi; -# Check whether --with-external-libtextcat-data was given. +# Check whether --with-external-libtextcat-data or --without-external-libtextcat-data was given. if test "${with_external_libtextcat_data+set}" = set; then - withval=$with_external_libtextcat_data; -fi + withval="$with_external_libtextcat_data" +fi; -# Check whether --with-system-cppunit was given. +# Check whether --with-system-cppunit or --without-system-cppunit was given. if test "${with_system_cppunit+set}" = set; then - withval=$with_system_cppunit; -fi + withval="$with_system_cppunit" +fi; -# Check whether --with-system-redland was given. +# Check whether --with-system-redland or --without-system-redland was given. if test "${with_system_redland+set}" = set; then - withval=$with_system_redland; -fi + withval="$with_system_redland" +fi; -# Check whether --with-system-mozilla was given. +# Check whether --with-system-mozilla or --without-system-mozilla was given. if test "${with_system_mozilla+set}" = set; then - withval=$with_system_mozilla; WITH_SYSTEM_MOZILLA=$withval + withval="$with_system_mozilla" + WITH_SYSTEM_MOZILLA=$withval else WITH_SYSTEM_MOZILLA=no -fi +fi; - -# Check whether --with-stlport was given. +# Check whether --with-stlport or --without-stlport was given. if test "${with_stlport+set}" = set; then - withval=$with_stlport; WITH_STLPORT=$withval + withval="$with_stlport" + WITH_STLPORT=$withval else WITH_STLPORT=auto -fi +fi; - -# Check whether --with-jdk-home was given. +# Check whether --with-jdk-home or --without-jdk-home was given. if test "${with_jdk_home+set}" = set; then - withval=$with_jdk_home; -fi + withval="$with_jdk_home" +fi; -# Check whether --with-gxx_include_path was given. +# Check whether --with-gxx_include_path or --without-gxx_include_path was given. if test "${with_gxx_include_path+set}" = set; then - withval=$with_gxx_include_path; -fi + withval="$with_gxx_include_path" +fi; -# Check whether --with-java was given. +# Check whether --with-java or --without-java was given. if test "${with_java+set}" = set; then - withval=$with_java; if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi + withval="$with_java" + if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi else WITH_JAVA=java -fi - -# Check whether --enable-gcjaot was given. +fi; +# Check whether --enable-gcjaot or --disable-gcjaot was given. if test "${enable_gcjaot+set}" = set; then - enableval=$enable_gcjaot; -fi + enableval="$enable_gcjaot" +fi; -# Check whether --with-ant-home was given. +# Check whether --with-ant-home or --without-ant-home was given. if test "${with_ant_home+set}" = set; then - withval=$with_ant_home; -fi + withval="$with_ant_home" +fi; -# Check whether --with-junit was given. +# Check whether --with-junit or --without-junit was given. if test "${with_junit+set}" = set; then - withval=$with_junit; + withval="$with_junit" + else with_junit=yes -fi - +fi; -# Check whether --with-perl-home was given. +# Check whether --with-perl-home or --without-perl-home was given. if test "${with_perl_home+set}" = set; then - withval=$with_perl_home; -fi + withval="$with_perl_home" +fi; -# Check whether --with-cl-home was given. +# Check whether --with-cl-home or --without-cl-home was given. if test "${with_cl_home+set}" = set; then - withval=$with_cl_home; -fi + withval="$with_cl_home" +fi; -# Check whether --with-mspdb-path was given. +# Check whether --with-mspdb-path or --without-mspdb-path was given. if test "${with_mspdb_path+set}" = set; then - withval=$with_mspdb_path; -fi + withval="$with_mspdb_path" +fi; -# Check whether --with-midl-path was given. +# Check whether --with-midl-path or --without-midl-path was given. if test "${with_midl_path+set}" = set; then - withval=$with_midl_path; -fi + withval="$with_midl_path" +fi; -# Check whether --with-csc-path was given. +# Check whether --with-csc-path or --without-csc-path was given. if test "${with_csc_path+set}" = set; then - withval=$with_csc_path; -fi + withval="$with_csc_path" +fi; -# Check whether --with-nsis-path was given. +# Check whether --with-nsis-path or --without-nsis-path was given. if test "${with_nsis_path+set}" = set; then - withval=$with_nsis_path; -fi + withval="$with_nsis_path" +fi; -# Check whether --with-frame-home was given. +# Check whether --with-frame-home or --without-frame-home was given. if test "${with_frame_home+set}" = set; then - withval=$with_frame_home; -fi + withval="$with_frame_home" +fi; -# Check whether --with-psdk-home was given. +# Check whether --with-psdk-home or --without-psdk-home was given. if test "${with_psdk_home+set}" = set; then - withval=$with_psdk_home; -fi + withval="$with_psdk_home" +fi; -# Check whether --with-directx-home was given. +# Check whether --with-directx-home or --without-directx-home was given. if test "${with_directx_home+set}" = set; then - withval=$with_directx_home; -fi + withval="$with_directx_home" +fi; -# Check whether --with-mozilla-build was given. +# Check whether --with-mozilla-build or --without-mozilla-build was given. if test "${with_mozilla_build+set}" = set; then - withval=$with_mozilla_build; MOZILLABUILD=$withval -fi + withval="$with_mozilla_build" + MOZILLABUILD=$withval +fi; - -# Check whether --with-local-solenv was given. +# Check whether --with-local-solenv or --without-local-solenv was given. if test "${with_local_solenv+set}" = set; then - withval=$with_local_solenv; -fi + withval="$with_local_solenv" +fi; -# Check whether --with-local-solver was given. +# Check whether --with-local-solver or --without-local-solver was given. if test "${with_local_solver+set}" = set; then - withval=$with_local_solver; -fi + withval="$with_local_solver" -# Check whether --enable-check-only was given. +fi; +# Check whether --enable-check-only or --disable-check-only was given. if test "${enable_check_only+set}" = set; then - enableval=$enable_check_only; -fi + enableval="$enable_check_only" -# Check whether --enable-ccache-skip was given. +fi; +# Check whether --enable-ccache-skip or --disable-ccache-skip was given. if test "${enable_ccache_skip+set}" = set; then - enableval=$enable_ccache_skip; + enableval="$enable_ccache_skip" + else enable_ccache_skip=auto -fi +fi; - -# Check whether --with-lang was given. +# Check whether --with-lang or --without-lang was given. if test "${with_lang+set}" = set; then - withval=$with_lang; -fi + withval="$with_lang" +fi; -# Check whether --with-poor-help-localizations was given. +# Check whether --with-poor-help-localizations or --without-poor-help-localizations was given. if test "${with_poor_help_localizations+set}" = set; then - withval=$with_poor_help_localizations; -fi + withval="$with_poor_help_localizations" +fi; -# Check whether --with-dict was given. +# Check whether --with-dict or --without-dict was given. if test "${with_dict+set}" = set; then - withval=$with_dict; -fi + withval="$with_dict" +fi; -# Check whether --with-intro-bitmaps was given. +# Check whether --with-intro-bitmaps or --without-intro-bitmaps was given. if test "${with_intro_bitmaps+set}" = set; then - withval=$with_intro_bitmaps; -fi + withval="$with_intro_bitmaps" +fi; -# Check whether --with-about-bitmaps was given. +# Check whether --with-about-bitmaps or --without-about-bitmaps was given. if test "${with_about_bitmaps+set}" = set; then - withval=$with_about_bitmaps; -fi + withval="$with_about_bitmaps" +fi; -# Check whether --with-vendor was given. +# Check whether --with-vendor or --without-vendor was given. if test "${with_vendor+set}" = set; then - withval=$with_vendor; -fi + withval="$with_vendor" +fi; -# Check whether --with-unix-wrapper was given. +# Check whether --with-unix-wrapper or --without-unix-wrapper was given. if test "${with_unix_wrapper+set}" = set; then - withval=$with_unix_wrapper; -fi + withval="$with_unix_wrapper" +fi; -# Check whether --with-asm-home was given. +# Check whether --with-asm-home or --without-asm-home was given. if test "${with_asm_home+set}" = set; then - withval=$with_asm_home; -fi + withval="$with_asm_home" +fi; -# Check whether --with-os-version was given. +# Check whether --with-os-version or --without-os-version was given. if test "${with_os_version+set}" = set; then - withval=$with_os_version; -fi + withval="$with_os_version" +fi; -# Check whether --with-unzip-home was given. +# Check whether --with-unzip-home or --without-unzip-home was given. if test "${with_unzip_home+set}" = set; then - withval=$with_unzip_home; -fi + withval="$with_unzip_home" +fi; -# Check whether --with-zip-home was given. +# Check whether --with-zip-home or --without-zip-home was given. if test "${with_zip_home+set}" = set; then - withval=$with_zip_home; -fi + withval="$with_zip_home" +fi; -# Check whether --with-mingwin was given. +# Check whether --with-mingwin or --without-mingwin was given. if test "${with_mingwin+set}" = set; then - withval=$with_mingwin; WITH_MINGWIN=$withval + withval="$with_mingwin" + WITH_MINGWIN=$withval else WITH_MINGWIN=0 -fi - +fi; -# Check whether --with-build-version was given. +# Check whether --with-build-version or --without-build-version was given. if test "${with_build_version+set}" = set; then - withval=$with_build_version; with_build_version=$withval -fi - + withval="$with_build_version" + with_build_version=$withval +fi; -# Check whether --with-alloc was given. +# Check whether --with-alloc or --without-alloc was given. if test "${with_alloc+set}" = set; then - withval=$with_alloc; -fi + withval="$with_alloc" -# Check whether --enable-verbose was given. +fi; +# Check whether --enable-verbose or --disable-verbose was given. if test "${enable_verbose+set}" = set; then - enableval=$enable_verbose; -fi + enableval="$enable_verbose" -# Check whether --enable-dependency-tracking was given. +fi; +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi + enableval="$enable_dependency_tracking" +fi; BUILD_TYPE="OOo" @@ -4033,148 +3012,29 @@ echo "* *" echo "********************************************************************" echo "" cat /dev/null > warn -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -4185,36 +3045,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$AWK" && break done # Extract the first word of "$AWK", so it can be a program name with args. set dummy $AWK; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $AWK in [\\/]* | ?:[\\/]*) @@ -4227,31 +3085,30 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi AWK=$ac_cv_path_AWK + if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$AWK"; then - { { $as_echo "$as_me:$LINENO: error: install awk to run this script" >&5 -$as_echo "$as_me: error: install awk to run this script" >&2;} + { { echo "$as_me:$LINENO: error: install awk to run this script" >&5 +echo "$as_me: error: install awk to run this script" >&2;} { (exit 1); exit 1; }; } fi @@ -4259,10 +3116,10 @@ for ac_prog in sed do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SED+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SED in [\\/]* | ?:[\\/]*) @@ -4275,47 +3132,46 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi SED=$ac_cv_path_SED + if test -n "$SED"; then - { $as_echo "$as_me:$LINENO: result: $SED" >&5 -$as_echo "$SED" >&6; } + echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$SED" && break done if test -z "$SED"; then - { { $as_echo "$as_me:$LINENO: error: install sed to run this script" >&5 -$as_echo "$as_me: error: install sed to run this script" >&2;} + { { echo "$as_me:$LINENO: error: install sed to run this script" >&5 +echo "$as_me: error: install sed to run this script" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for solenv environment" >&5 -$as_echo_n "checking for solenv environment... " >&6; } +echo "$as_me:$LINENO: checking for solenv environment" >&5 +echo $ECHO_N "checking for solenv environment... $ECHO_C" >&6 if test -z "$with_local_solenv"; then LOCAL_SOLENV="DEFAULT" - { $as_echo "$as_me:$LINENO: result: default" >&5 -$as_echo "default" >&6; } + echo "$as_me:$LINENO: result: default" >&5 +echo "${ECHO_T}default" >&6 else LOCAL_SOLENV=$with_local_solenv - { $as_echo "$as_me:$LINENO: result: $with_local_solenv" >&5 -$as_echo "$with_local_solenv" >&6; } + echo "$as_me:$LINENO: result: $with_local_solenv" >&5 +echo "${ECHO_T}$with_local_solenv" >&6 fi @@ -4333,160 +3189,110 @@ if test -e $_solenv/inc/minor.mk; then SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" else - { { $as_echo "$as_me:$LINENO: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&5 -$as_echo "$as_me: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&2;} + { { echo "$as_me:$LINENO: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&5 +echo "$as_me: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&2;} { (exit 1); exit 1; }; } fi ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f "$ac_dir/install.sh"; then + elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f "$ac_dir/shtool"; then + elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } -fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } -fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -$as_echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; -esac +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # The aliases save the names the user supplied, while $host etc. @@ -4497,20 +3303,20 @@ test -n "$target_alias" && program_prefix=${target_alias}- if test "$build" != "$host" -o "$build" != "$target" \ -o "$host" != "$target"; then - { $as_echo "$as_me:$LINENO: WARNING: cross-compiling by any means is not supported (yet)!" >&5 -$as_echo "$as_me: WARNING: cross-compiling by any means is not supported (yet)!" >&2;} + { echo "$as_me:$LINENO: WARNING: cross-compiling by any means is not supported (yet)!" >&5 +echo "$as_me: WARNING: cross-compiling by any means is not supported (yet)!" >&2;} echo "cross-compiling by any means is not supported (yet)!" >> warn fi if echo "$build_os" | grep cygwin; then - { $as_echo "$as_me:$LINENO: checking Cygwin version" >&5 -$as_echo_n "checking Cygwin version... " >&6; } + echo "$as_me:$LINENO: checking Cygwin version" >&5 +echo $ECHO_N "checking Cygwin version... $ECHO_C" >&6 CygwinVer=`uname -r` - { $as_echo "$as_me:$LINENO: result: $CygwinVer" >&5 -$as_echo "$CygwinVer" >&6; } + echo "$as_me:$LINENO: result: $CygwinVer" >&5 +echo "${ECHO_T}$CygwinVer" >&6 if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then - { { $as_echo "$as_me:$LINENO: error: You need at least Cygwin V1.5.x" >&5 -$as_echo "$as_me: error: You need at least Cygwin V1.5.x" >&2;} + { { echo "$as_me:$LINENO: error: You need at least Cygwin V1.5.x" >&5 +echo "$as_me: error: You need at least Cygwin V1.5.x" >&2;} { (exit 1); exit 1; }; } fi else @@ -4529,10 +3335,10 @@ case "$build_os" in _os=SunOS # Extract the first word of "gtar", so it can be a program name with args. set dummy gtar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GNUTAR+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GNUTAR in [\\/]* | ?:[\\/]*) @@ -4546,55 +3352,54 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GNUTAR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi GNUTAR=$ac_cv_path_GNUTAR + if test -n "$GNUTAR"; then - { $as_echo "$as_me:$LINENO: result: $GNUTAR" >&5 -$as_echo "$GNUTAR" >&6; } + echo "$as_me:$LINENO: result: $GNUTAR" >&5 +echo "${ECHO_T}$GNUTAR" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$GNUTAR"; then - { { $as_echo "$as_me:$LINENO: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&5 -$as_echo "$as_me: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&2;} + { { echo "$as_me:$LINENO: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&5 +echo "$as_me: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking the Solaris operating system release" >&5 -$as_echo_n "checking the Solaris operating system release... " >&6; } + echo "$as_me:$LINENO: checking the Solaris operating system release" >&5 +echo $ECHO_N "checking the Solaris operating system release... $ECHO_C" >&6 _os_release=`echo $build_os | $SED -e s/solaris2\.//` if test "$_os_release" -lt "6"; then - { { $as_echo "$as_me:$LINENO: error: use solaris >= 6 to build OpenOffice.org" >&5 -$as_echo "$as_me: error: use solaris >= 6 to build OpenOffice.org" >&2;} + { { echo "$as_me:$LINENO: error: use solaris >= 6 to build OpenOffice.org" >&5 +echo "$as_me: error: use solaris >= 6 to build OpenOffice.org" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: ok ($_os_release)" >&5 -$as_echo "ok ($_os_release)" >&6; } + echo "$as_me:$LINENO: result: ok ($_os_release)" >&5 +echo "${ECHO_T}ok ($_os_release)" >&6 fi - { $as_echo "$as_me:$LINENO: checking the processor type" >&5 -$as_echo_n "checking the processor type... " >&6; } + echo "$as_me:$LINENO: checking the processor type" >&5 +echo $ECHO_N "checking the processor type... $ECHO_C" >&6 if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then - { $as_echo "$as_me:$LINENO: result: ok ($build_cpu)" >&5 -$as_echo "ok ($build_cpu)" >&6; } + echo "$as_me:$LINENO: result: ok ($build_cpu)" >&5 +echo "${ECHO_T}ok ($build_cpu)" >&6 else - { { $as_echo "$as_me:$LINENO: error: only sparc and i386 processors are supported" >&5 -$as_echo "$as_me: error: only sparc and i386 processors are supported" >&2;} + { { echo "$as_me:$LINENO: error: only sparc and i386 processors are supported" >&5 +echo "$as_me: error: only sparc and i386 processors are supported" >&2;} { (exit 1); exit 1; }; } fi ;; @@ -4629,8 +3434,8 @@ $as_echo "$as_me: error: only sparc and i386 processors are supported" >&2;} test_gstreamer=no _os=Darwin if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then - { $as_echo "$as_me:$LINENO: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&5 -$as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&2;} + { echo "$as_me:$LINENO: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&5 +echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&2;} echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn enable_systray=no fi @@ -4653,17 +3458,17 @@ $as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Us test_randr=yes test_freetype=yes test_gstreamer=yes - { $as_echo "$as_me:$LINENO: checking the FreeBSD operating system release" >&5 -$as_echo_n "checking the FreeBSD operating system release... " >&6; } + echo "$as_me:$LINENO: checking the FreeBSD operating system release" >&5 +echo $ECHO_N "checking the FreeBSD operating system release... $ECHO_C" >&6 if test -n "$with_os_version"; then OSVERSION="$with_os_version" else OSVERSION=`/sbin/sysctl -n kern.osreldate` fi - { $as_echo "$as_me:$LINENO: result: found OSVERSION=$OSVERSION" >&5 -$as_echo "found OSVERSION=$OSVERSION" >&6; } - { $as_echo "$as_me:$LINENO: checking which thread library to use" >&5 -$as_echo_n "checking which thread library to use... " >&6; } + echo "$as_me:$LINENO: result: found OSVERSION=$OSVERSION" >&5 +echo "${ECHO_T}found OSVERSION=$OSVERSION" >&6 + echo "$as_me:$LINENO: checking which thread library to use" >&5 +echo $ECHO_N "checking which thread library to use... $ECHO_C" >&6 if test "$OSVERSION" -lt "500016"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-pthread" @@ -4674,8 +3479,8 @@ $as_echo_n "checking which thread library to use... " >&6; } PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" fi - { $as_echo "$as_me:$LINENO: result: $PTHREAD_LIBS" >&5 -$as_echo "$PTHREAD_LIBS" >&6; } + echo "$as_me:$LINENO: result: $PTHREAD_LIBS" >&5 +echo "${ECHO_T}$PTHREAD_LIBS" >&6 _os=FreeBSD ;; osf) @@ -4706,8 +3511,8 @@ $as_echo "$PTHREAD_LIBS" >&6; } _os=AIX ;; *) - { { $as_echo "$as_me:$LINENO: error: $_os operating system is not suitable to build OpenOffice.org!" >&5 -$as_echo "$as_me: error: $_os operating system is not suitable to build OpenOffice.org!" >&2;} + { { echo "$as_me:$LINENO: error: $_os operating system is not suitable to build OpenOffice.org!" >&5 +echo "$as_me: error: $_os operating system is not suitable to build OpenOffice.org!" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -4716,17 +3521,17 @@ esac -{ $as_echo "$as_me:$LINENO: checking whether to enable crashdump feature" >&5 -$as_echo_n "checking whether to enable crashdump feature... " >&6; } +echo "$as_me:$LINENO: checking whether to enable crashdump feature" >&5 +echo $ECHO_N "checking whether to enable crashdump feature... $ECHO_C" >&6 if test "$enable_crashdump" = "yes"; then ENABLE_CRASHDUMP="TRUE" BUILD_TYPE="$BUILD_TYPE CRASHREP" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else ENABLE_CRASHDUMP="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -4735,89 +3540,89 @@ if test "$_os" = "WINNT"; then fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking whether to use the standard non-optimizing compiler" >&5 -$as_echo_n "checking whether to use the standard non-optimizing compiler... " >&6; } + echo "$as_me:$LINENO: checking whether to use the standard non-optimizing compiler" >&5 +echo $ECHO_N "checking whether to use the standard non-optimizing compiler... $ECHO_C" >&6 if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then VC_STANDARD="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else VC_STANDARD="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi fi -{ $as_echo "$as_me:$LINENO: checking whether to turn warnings to errors" >&5 -$as_echo_n "checking whether to turn warnings to errors... " >&6; } +echo "$as_me:$LINENO: checking whether to turn warnings to errors" >&5 +echo $ECHO_N "checking whether to turn warnings to errors... $ECHO_C" >&6 if test -n "$enable_werror" && test "$enable_werror" != "no"; then ENABLE_WERROR="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: WARNING: Turning warnings to errors has no effect in modules or" >&5 -$as_echo "$as_me: WARNING: Turning warnings to errors has no effect in modules or" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: on platforms where it has been disabled explicitely" >&5 -$as_echo "$as_me: WARNING: on platforms where it has been disabled explicitely" >&2;} + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: WARNING: Turning warnings to errors has no effect in modules or" >&5 +echo "$as_me: WARNING: Turning warnings to errors has no effect in modules or" >&2;} + { echo "$as_me:$LINENO: WARNING: on platforms where it has been disabled explicitely" >&5 +echo "$as_me: WARNING: on platforms where it has been disabled explicitely" >&2;} echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn else ENABLE_WERROR="FALSE" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to do a debug build" >&5 -$as_echo_n "checking whether to do a debug build... " >&6; } +echo "$as_me:$LINENO: checking whether to do a debug build" >&5 +echo $ECHO_N "checking whether to do a debug build... $ECHO_C" >&6 if test -n "$enable_debug" && test "$enable_debug" != "no"; then ENABLE_DEBUG="TRUE" if test -z "$enable_symbols"; then enable_symbols="yes" fi - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else ENABLE_DEBUG="FALSE" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to build with additional debug utilities" >&5 -$as_echo_n "checking whether to build with additional debug utilities... " >&6; } +echo "$as_me:$LINENO: checking whether to build with additional debug utilities" >&5 +echo $ECHO_N "checking whether to build with additional debug utilities... $ECHO_C" >&6 if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then PROEXT="" PRODUCT="" PROFULLSWITCH="" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else PRODUCT="full" PROFULLSWITCH="product=full" PROEXT=".pro" - { $as_echo "$as_me:$LINENO: result: no, full product build" >&5 -$as_echo "no, full product build" >&6; } + echo "$as_me:$LINENO: result: no, full product build" >&5 +echo "${ECHO_T}no, full product build" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to include symbols into final build" >&5 -$as_echo_n "checking whether to include symbols into final build... " >&6; } +echo "$as_me:$LINENO: checking whether to include symbols into final build" >&5 +echo $ECHO_N "checking whether to include symbols into final build... $ECHO_C" >&6 if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then ENABLE_SYMBOLS="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then ENABLE_SYMBOLS="SMALL" - { $as_echo "$as_me:$LINENO: result: yes, small ones" >&5 -$as_echo "yes, small ones" >&6; } + echo "$as_me:$LINENO: result: yes, small ones" >&5 +echo "${ECHO_T}yes, small ones" >&6 else if test "$enable_symbols" != "no" ; then echo enable symbols is: $enable_symbols - { { $as_echo "$as_me:$LINENO: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&5 -$as_echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&2;} + { { echo "$as_me:$LINENO: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&5 +echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&2;} { (exit 1); exit 1; }; } else ENABLE_SYMBOLS= @@ -4826,21 +3631,21 @@ $as_echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as par fi else ENABLE_SYMBOLS= - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to strip the solver or not." >&5 -$as_echo_n "checking whether to strip the solver or not.... " >&6; } +echo "$as_me:$LINENO: checking whether to strip the solver or not." >&5 +echo $ECHO_N "checking whether to strip the solver or not.... $ECHO_C" >&6 if test -n "$enable_strip_solver"; then if test "$enable_strip_solver" = "yes"; then DISABLE_STRIP= else if test "$enable_strip_solver" = "no"; then DISABLE_STRIP="TRUE" else - { { $as_echo "$as_me:$LINENO: error: --disable-strip-solver only accepts yes or no as parameter." >&5 -$as_echo "$as_me: error: --disable-strip-solver only accepts yes or no as parameter." >&2;} + { { echo "$as_me:$LINENO: error: --disable-strip-solver only accepts yes or no as parameter." >&5 +echo "$as_me: error: --disable-strip-solver only accepts yes or no as parameter." >&2;} { (exit 1); exit 1; }; } fi fi @@ -4853,29 +3658,29 @@ else fi -{ $as_echo "$as_me:$LINENO: checking whether to enable native CUPS support" >&5 -$as_echo_n "checking whether to enable native CUPS support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable native CUPS support" >&5 +echo $ECHO_N "checking whether to enable native CUPS support... $ECHO_C" >&6 if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then ENABLE_CUPS="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else ENABLE_CUPS="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to enable fontconfig support" >&5 -$as_echo_n "checking whether to enable fontconfig support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable fontconfig support" >&5 +echo $ECHO_N "checking whether to enable fontconfig support... $ECHO_C" >&6 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then ENABLE_FONTCONFIG="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else ENABLE_FONTCONFIG="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -4890,124 +3695,124 @@ if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \ fi -{ $as_echo "$as_me:$LINENO: checking whether to enable filters for legacy binary file formats (StarOffice 5.2)" >&5 -$as_echo_n "checking whether to enable filters for legacy binary file formats (StarOffice 5.2)... " >&6; } +echo "$as_me:$LINENO: checking whether to enable filters for legacy binary file formats (StarOffice 5.2)" >&5 +echo $ECHO_N "checking whether to enable filters for legacy binary file formats (StarOffice 5.2)... $ECHO_C" >&6 if test "$enable_binfilter" = "no"; then WITH_BINFILTER="NO" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else WITH_BINFILTER="YES" BUILD_TYPE="$BUILD_TYPE BINFILTER" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking whether to use DirectX" >&5 -$as_echo_n "checking whether to use DirectX... " >&6; } + echo "$as_me:$LINENO: checking whether to use DirectX" >&5 +echo $ECHO_N "checking whether to use DirectX... $ECHO_C" >&6 if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then ENABLE_DIRECTX="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else ENABLE_DIRECTX="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - { $as_echo "$as_me:$LINENO: checking whether to use ActiveX" >&5 -$as_echo_n "checking whether to use ActiveX... " >&6; } + echo "$as_me:$LINENO: checking whether to use ActiveX" >&5 +echo $ECHO_N "checking whether to use ActiveX... $ECHO_C" >&6 if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then DISABLE_ACTIVEX="" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else DISABLE_ACTIVEX="TRUE" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - { $as_echo "$as_me:$LINENO: checking whether to use ATL" >&5 -$as_echo_n "checking whether to use ATL... " >&6; } + echo "$as_me:$LINENO: checking whether to use ATL" >&5 +echo $ECHO_N "checking whether to use ATL... $ECHO_C" >&6 if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then DISABLE_ATL="" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else DISABLE_ATL="TRUE" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi -{ $as_echo "$as_me:$LINENO: checking whether to use RPATH in shared libraries" >&5 -$as_echo_n "checking whether to use RPATH in shared libraries... " >&6; } +echo "$as_me:$LINENO: checking whether to use RPATH in shared libraries" >&5 +echo $ECHO_N "checking whether to use RPATH in shared libraries... $ECHO_C" >&6 if test "$enable_rpath" = "no"; then ENABLE_RPATH="no" else ENABLE_RPATH="yes" fi -{ $as_echo "$as_me:$LINENO: result: $ENABLE_RPATH" >&5 -$as_echo "$ENABLE_RPATH" >&6; } +echo "$as_me:$LINENO: result: $ENABLE_RPATH" >&5 +echo "${ECHO_T}$ENABLE_RPATH" >&6 -{ $as_echo "$as_me:$LINENO: checking whether to include MySpell dictionaries" >&5 -$as_echo_n "checking whether to include MySpell dictionaries... " >&6; } +echo "$as_me:$LINENO: checking whether to include MySpell dictionaries" >&5 +echo $ECHO_N "checking whether to include MySpell dictionaries... $ECHO_C" >&6 if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 WITH_MYSPELL_DICTS=YES BUILD_TYPE="$BUILD_TYPE DICTIONARIES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 WITH_MYSPELL_DICTS=NO fi if test "$WITH_MYSPELL_DICTS" = "NO"; then - { $as_echo "$as_me:$LINENO: checking whether to use dicts from external paths" >&5 -$as_echo_n "checking whether to use dicts from external paths... " >&6; } + echo "$as_me:$LINENO: checking whether to use dicts from external paths" >&5 +echo $ECHO_N "checking whether to use dicts from external paths... $ECHO_C" >&6 if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SYSTEM_DICTS=YES - { $as_echo "$as_me:$LINENO: checking for spelling dictionary directory" >&5 -$as_echo_n "checking for spelling dictionary directory... " >&6; } + echo "$as_me:$LINENO: checking for spelling dictionary directory" >&5 +echo $ECHO_N "checking for spelling dictionary directory... $ECHO_C" >&6 if test -n "$with_external_dict_dir"; then DICT_SYSTEM_DIR=file://$with_external_dict_dir else DICT_SYSTEM_DIR=file:///usr/share/hunspell fi - { $as_echo "$as_me:$LINENO: result: $DICT_SYSTEM_DIR" >&5 -$as_echo "$DICT_SYSTEM_DIR" >&6; } - { $as_echo "$as_me:$LINENO: checking for hyphenation patterns directory" >&5 -$as_echo_n "checking for hyphenation patterns directory... " >&6; } + echo "$as_me:$LINENO: result: $DICT_SYSTEM_DIR" >&5 +echo "${ECHO_T}$DICT_SYSTEM_DIR" >&6 + echo "$as_me:$LINENO: checking for hyphenation patterns directory" >&5 +echo $ECHO_N "checking for hyphenation patterns directory... $ECHO_C" >&6 if test -n "$with_external_hyph_dir"; then HYPH_SYSTEM_DIR=file://$with_external_hyph_dir else HYPH_SYSTEM_DIR=file:///usr/share/hyphen fi - { $as_echo "$as_me:$LINENO: result: $HYPH_SYSTEM_DIR" >&5 -$as_echo "$HYPH_SYSTEM_DIR" >&6; } - { $as_echo "$as_me:$LINENO: checking for thesaurus directory" >&5 -$as_echo_n "checking for thesaurus directory... " >&6; } + echo "$as_me:$LINENO: result: $HYPH_SYSTEM_DIR" >&5 +echo "${ECHO_T}$HYPH_SYSTEM_DIR" >&6 + echo "$as_me:$LINENO: checking for thesaurus directory" >&5 +echo $ECHO_N "checking for thesaurus directory... $ECHO_C" >&6 if test -n "$with_external_thes_dir"; then THES_SYSTEM_DIR=file://$with_external_thes_dir else THES_SYSTEM_DIR=file:///usr/share/mythes fi - { $as_echo "$as_me:$LINENO: result: $THES_SYSTEM_DIR" >&5 -$as_echo "$THES_SYSTEM_DIR" >&6; } + echo "$as_me:$LINENO: result: $THES_SYSTEM_DIR" >&5 +echo "${ECHO_T}$THES_SYSTEM_DIR" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SYSTEM_DICTS=NO fi fi @@ -5017,13 +3822,13 @@ fi if test $_os = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking Windows build environment sanity" >&5 -$as_echo_n "checking Windows build environment sanity... " >&6; } + echo "$as_me:$LINENO: checking Windows build environment sanity" >&5 +echo $ECHO_N "checking Windows build environment sanity... $ECHO_C" >&6 if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then - { { $as_echo "$as_me:$LINENO: error: $AWK, awk, tar or gunzip is a cygwin symlink! + { { echo "$as_me:$LINENO: error: $AWK, awk, tar or gunzip is a cygwin symlink! Native windows programs cannot use cygwin symlinks. Remove the symbolic link, and copy the program to the name of the link." >&5 -$as_echo "$as_me: error: $AWK, awk, tar or gunzip is a cygwin symlink! +echo "$as_me: error: $AWK, awk, tar or gunzip is a cygwin symlink! Native windows programs cannot use cygwin symlinks. Remove the symbolic link, and copy the program to the name of the link." >&2;} { (exit 1); exit 1; }; } @@ -5041,20 +3846,20 @@ link, and copy the program to the name of the link." >&2;} CXX="g++ -mno-cygwin" fi fi - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 fi if test "$_os" = "WINNT" ; then - { $as_echo "$as_me:$LINENO: checking for cygwin gcc/g++" >&5 -$as_echo_n "checking for cygwin gcc/g++... " >&6; } + echo "$as_me:$LINENO: checking for cygwin gcc/g++" >&5 +echo $ECHO_N "checking for cygwin gcc/g++... $ECHO_C" >&6 if which gcc > /dev/null && which g++ > /dev/null ; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { { $as_echo "$as_me:$LINENO: error: cygwin gcc and g++ are needed, please install them." >&5 -$as_echo "$as_me: error: cygwin gcc and g++ are needed, please install them." >&2;} + { { echo "$as_me:$LINENO: error: cygwin gcc and g++ are needed, please install them." >&5 +echo "$as_me: error: cygwin gcc and g++ are needed, please install them." >&2;} { (exit 1); exit 1; }; } fi fi @@ -5062,10 +3867,10 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SHELLPATH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SHELLPATH in [\\/]* | ?:[\\/]*) @@ -5078,46 +3883,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SHELLPATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi SHELLPATH=$ac_cv_path_SHELLPATH + if test -n "$SHELLPATH"; then - { $as_echo "$as_me:$LINENO: result: $SHELLPATH" >&5 -$as_echo "$SHELLPATH" >&6; } + echo "$as_me:$LINENO: result: $SHELLPATH" >&5 +echo "${ECHO_T}$SHELLPATH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$SHELLPATH"; then - { { $as_echo "$as_me:$LINENO: error: bash not found in \$PATH" >&5 -$as_echo "$as_me: error: bash not found in \$PATH" >&2;} + { { echo "$as_me:$LINENO: error: bash not found in \$PATH" >&5 +echo "$as_me: error: bash not found in \$PATH" >&2;} { (exit 1); exit 1; }; } else SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"` fi -{ $as_echo "$as_me:$LINENO: checking gcc home" >&5 -$as_echo_n "checking gcc home... " >&6; } +echo "$as_me:$LINENO: checking gcc home" >&5 +echo $ECHO_N "checking gcc home... $ECHO_C" >&6 if test -z "$with_gcc_home"; then GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` else GCC_HOME="$with_gcc_home" fi -{ $as_echo "$as_me:$LINENO: result: $GCC_HOME" >&5 -$as_echo "$GCC_HOME" >&6; } +echo "$as_me:$LINENO: result: $GCC_HOME" >&5 +echo "${ECHO_T}$GCC_HOME" >&6 save_CC=$CC @@ -5138,10 +3942,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5152,36 +3956,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -5192,49 +3994,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5245,36 +4036,76 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5286,18 +4117,17 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -5315,25 +4145,24 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5344,40 +4173,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -5388,90 +4215,58 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -5490,150 +4285,111 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link_default") 2>&5 +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables +echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. +echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi fi fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -5642,33 +4398,32 @@ $as_echo "$ac_try_echo") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5686,48 +4441,39 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5748,54 +4494,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -5811,252 +4553,311 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -int -main () +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; { - - ; - return 0; + return p[i]; } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +$ac_declaration +#include <stdlib.h> int main () { - +exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi +continue fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; +$ac_declaration int main () { -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; +exit (42); ; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done -rm -f conftest.$ac_ext -CC=$ac_save_CC - +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6071,10 +4872,10 @@ if test "$COMPATH" = "." ; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_COMPATH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $COMPATH in [\\/]* | ?:[\\/]*) @@ -6087,28 +4888,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_COMPATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi COMPATH=$ac_cv_path_COMPATH + if test -n "$COMPATH"; then - { $as_echo "$as_me:$LINENO: result: $COMPATH" >&5 -$as_echo "$COMPATH" >&6; } + echo "$as_me:$LINENO: result: $COMPATH" >&5 +echo "${ECHO_T}$COMPATH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$COMPATH" && break done @@ -6118,21 +4918,21 @@ COMPATH=`echo $COMPATH | $SED "s@/[Bb][Ii][Nn]\\\$@@"`; GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then - { $as_echo "$as_me:$LINENO: checking the GNU gcc compiler version" >&5 -$as_echo_n "checking the GNU gcc compiler version... " >&6; } + echo "$as_me:$LINENO: checking the GNU gcc compiler version" >&5 +echo $ECHO_N "checking the GNU gcc compiler version... $ECHO_C" >&6 _gcc_version=`$CC -dumpversion` _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_gcc_major" -lt "3"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&5 -$as_echo "$as_me: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&2;} + { { echo "$as_me:$LINENO: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&5 +echo "$as_me: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&2;} { (exit 1); exit 1; }; } else if test "$GCCVER" -eq "030203"; then if test "$ENABLE_SYMBOLS" = "SMALL"; then - { { $as_echo "$as_me:$LINENO: error: version \"$_gcc_version\" gives internal error with small." >&5 -$as_echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." >&2;} + { { echo "$as_me:$LINENO: error: version \"$_gcc_version\" gives internal error with small." >&5 +echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." >&2;} { (exit 1); exit 1; }; } fi fi @@ -6146,35 +4946,35 @@ $as_echo "$as_me: error: version \"$_gcc_version\" gives internal error with sma fi fi if test "$GCCVER" -ge "040100" ; then - { { $as_echo "$as_me:$LINENO: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&5 -$as_echo "$as_me: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&2;} + { { echo "$as_me:$LINENO: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&5 +echo "$as_me: error: You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: implicitly using CC=$CC" >&5 -$as_echo "implicitly using CC=$CC" >&6; } + echo "$as_me:$LINENO: result: implicitly using CC=$CC" >&5 +echo "${ECHO_T}implicitly using CC=$CC" >&6 fi else - { $as_echo "$as_me:$LINENO: result: checked (gcc $_gcc_version)" >&5 -$as_echo "checked (gcc $_gcc_version)" >&6; } + echo "$as_me:$LINENO: result: checked (gcc $_gcc_version)" >&5 +echo "${ECHO_T}checked (gcc $_gcc_version)" >&6 fi if test "$_os" = "SunOS"; then - { $as_echo "$as_me:$LINENO: checking gcc linker" >&5 -$as_echo_n "checking gcc linker... " >&6; } + echo "$as_me:$LINENO: checking gcc linker" >&5 +echo $ECHO_N "checking gcc linker... $ECHO_C" >&6 if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then - { { $as_echo "$as_me:$LINENO: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&5 -$as_echo "$as_me: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&2;} + { { echo "$as_me:$LINENO: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&5 +echo "$as_me: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: result: ok (GNU ld)" >&5 -$as_echo "ok (GNU ld)" >&6; } + echo "$as_me:$LINENO: result: ok (GNU ld)" >&5 +echo "${ECHO_T}ok (GNU ld)" >&6 fi fi HAVE_LD_BSYMBOLIC_FUNCTIONS= if test "$GCC" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for -Bsymbolic-functions linker support " >&5 -$as_echo_n "checking for -Bsymbolic-functions linker support ... " >&6; } + echo "$as_me:$LINENO: checking for -Bsymbolic-functions linker support " >&5 +echo $ECHO_N "checking for -Bsymbolic-functions linker support ... $ECHO_C" >&6 bsymbolic_functions_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" @@ -6198,73 +4998,71 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then - { $as_echo "$as_me:$LINENO: result: found " >&5 -$as_echo "found " >&6; } + echo "$as_me:$LINENO: result: found " >&5 +echo "${ECHO_T}found " >&6 else - { $as_echo "$as_me:$LINENO: result: not found " >&5 -$as_echo "not found " >&6; } + echo "$as_me:$LINENO: result: not found " >&5 +echo "${ECHO_T}not found " >&6 fi LDFLAGS=$bsymbolic_functions_ldflags_save fi -{ $as_echo "$as_me:$LINENO: checking whether to enable pch feature" >&5 -$as_echo_n "checking whether to enable pch feature... " >&6; } +echo "$as_me:$LINENO: checking whether to enable pch feature" >&5 +echo $ECHO_N "checking whether to enable pch feature... $ECHO_C" >&6 if test -n "$enable_pch" && test "$enable_pch" != "no"; then if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then ENABLE_PCH="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then ENABLE_PCH="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else ENABLE_PCH="" - { $as_echo "$as_me:$LINENO: WARNING: Precompiled header not yet supported for your platform/compiler" >&5 -$as_echo "$as_me: WARNING: Precompiled header not yet supported for your platform/compiler" >&2;} + { echo "$as_me:$LINENO: WARNING: Precompiled header not yet supported for your platform/compiler" >&5 +echo "$as_me: WARNING: Precompiled header not yet supported for your platform/compiler" >&2;} fi else ENABLE_PCH="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking for GNU make" >&5 -$as_echo_n "checking for GNU make... " >&6; } +echo "$as_me:$LINENO: checking for GNU make" >&5 +echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 for a in "$MAKE" $GNUMAKE make gmake gnumake; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null if test $? -eq 0; then @@ -6272,30 +5070,30 @@ for a in "$MAKE" $GNUMAKE make gmake gnumake; do break fi done -{ $as_echo "$as_me:$LINENO: result: $GNUMAKE" >&5 -$as_echo "$GNUMAKE" >&6; } +echo "$as_me:$LINENO: result: $GNUMAKE" >&5 +echo "${ECHO_T}$GNUMAKE" >&6 if test -z "$GNUMAKE"; then - { { $as_echo "$as_me:$LINENO: error: not found. install GNU make." >&5 -$as_echo "$as_me: error: not found. install GNU make." >&2;} + { { echo "$as_me:$LINENO: error: not found. install GNU make." >&5 +echo "$as_me: error: not found. install GNU make." >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking the GNU make version" >&5 -$as_echo_n "checking the GNU make version... " >&6; } +echo "$as_me:$LINENO: checking the GNU make version" >&5 +echo $ECHO_N "checking the GNU make version... $ECHO_C" >&6 _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_make_longver" -ge "038100" ; then - { $as_echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5 -$as_echo "$GNUMAKE $_make_version" >&6; } + echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5 +echo "${ECHO_T}$GNUMAKE $_make_version" >&6 else - { { $as_echo "$as_me:$LINENO: error: failed ($GNUMAKE version >= 3.81 needed" >&5 -$as_echo "$as_me: error: failed ($GNUMAKE version >= 3.81 needed" >&2;} + { { echo "$as_me:$LINENO: error: failed ($GNUMAKE version >= 3.81 needed" >&5 +echo "$as_me: error: failed ($GNUMAKE version >= 3.81 needed" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for GNU tar" >&5 -$as_echo_n "checking for GNU tar... " >&6; } +echo "$as_me:$LINENO: checking for GNU tar" >&5 +echo $ECHO_N "checking for GNU tar... $ECHO_C" >&6 for a in $GNUTAR gtar gnutar tar; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null if test $? -eq 0; then @@ -6303,11 +5101,11 @@ for a in $GNUTAR gtar gnutar tar; do break fi done -{ $as_echo "$as_me:$LINENO: result: $GNUTAR" >&5 -$as_echo "$GNUTAR" >&6; } +echo "$as_me:$LINENO: result: $GNUTAR" >&5 +echo "${ECHO_T}$GNUTAR" >&6 if test -z "$GNUTAR"; then - { { $as_echo "$as_me:$LINENO: error: not found. install GNU tar." >&5 -$as_echo "$as_me: error: not found. install GNU tar." >&2;} + { { echo "$as_me:$LINENO: error: not found. install GNU tar." >&5 +echo "$as_me: error: not found. install GNU tar." >&2;} { (exit 1); exit 1; }; } fi @@ -6319,10 +5117,10 @@ if test "$_os" = "SunOS"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path__cc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $_cc in [\\/]* | ?:[\\/]*) @@ -6335,58 +5133,57 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi _cc=$ac_cv_path__cc + if test -n "$_cc"; then - { $as_echo "$as_me:$LINENO: result: $_cc" >&5 -$as_echo "$_cc" >&6; } + echo "$as_me:$LINENO: result: $_cc" >&5 +echo "${ECHO_T}$_cc" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$_cc" && break done COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` - { $as_echo "$as_me:$LINENO: checking the SunStudio C/C++ compiler version" >&5 -$as_echo_n "checking the SunStudio C/C++ compiler version... " >&6; } + echo "$as_me:$LINENO: checking the SunStudio C/C++ compiler version" >&5 +echo $ECHO_N "checking the SunStudio C/C++ compiler version... $ECHO_C" >&6 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'` _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` if test "$_sunstudio_major" != "5"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 -$as_echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} + { { echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 +echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} { (exit 1); exit 1; }; } else _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'` if test "$_sunstudio_minor" = "false"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 -$as_echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} + { { echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 +echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 fi fi fi fi if test "$GCC" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for --hash-style=both linker support " >&5 -$as_echo_n "checking for --hash-style=both linker support ... " >&6; } + echo "$as_me:$LINENO: checking for --hash-style=both linker support " >&5 +echo $ECHO_N "checking for --hash-style=both linker support ... $ECHO_C" >&6 hash_style_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,--hash-style=both" cat >conftest.$ac_ext <<_ACEOF @@ -6409,43 +5206,42 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then HAVE_LD_HASH_STYLE=TRUE else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - HAVE_LD_HASH_STYLE=FALSE +HAVE_LD_HASH_STYLE=FALSE fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then - { $as_echo "$as_me:$LINENO: result: found " >&5 -$as_echo "found " >&6; } + echo "$as_me:$LINENO: result: found " >&5 +echo "${ECHO_T}found " >&6 else - { $as_echo "$as_me:$LINENO: result: not found " >&5 -$as_echo "not found " >&6; } + echo "$as_me:$LINENO: result: not found " >&5 +echo "${ECHO_T}not found " >&6 fi LDFLAGS=$hash_style_ldflags_save fi @@ -6457,10 +5253,10 @@ if test "$_os" = "OSF1"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path__cc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $_cc in [\\/]* | ?:[\\/]*) @@ -6473,45 +5269,44 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi _cc=$ac_cv_path__cc + if test -n "$_cc"; then - { $as_echo "$as_me:$LINENO: result: $_cc" >&5 -$as_echo "$_cc" >&6; } + echo "$as_me:$LINENO: result: $_cc" >&5 +echo "${ECHO_T}$_cc" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$_cc" && break done COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` - { $as_echo "$as_me:$LINENO: WARNING: ******* $_cc , $COMPATH" >&5 -$as_echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;} - { $as_echo "$as_me:$LINENO: checking the Compaq C compiler version" >&5 -$as_echo_n "checking the Compaq C compiler version... " >&6; } + { echo "$as_me:$LINENO: WARNING: ******* $_cc , $COMPATH" >&5 +echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;} + echo "$as_me:$LINENO: checking the Compaq C compiler version" >&5 +echo $ECHO_N "checking the Compaq C compiler version... $ECHO_C" >&6 _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'` _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` if test "$_compaqc_major" != "T6"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&5 -$as_echo "$as_me: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&2;} + { { echo "$as_me:$LINENO: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&5 +echo "$as_me: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 fi fi fi @@ -6519,10 +5314,10 @@ fi if test -z "$with_perl_home"; then # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PERL+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PERL in [\\/]* | ?:[\\/]*) @@ -6535,28 +5330,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL + if test -n "$PERL"; then - { $as_echo "$as_me:$LINENO: result: $PERL" >&5 -$as_echo "$PERL" >&6; } + echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - else if test "$_os" = "WINNT"; then with_perl_home=`cygpath -u "$with_perl_home"` @@ -6565,46 +5359,46 @@ else if test -x "$_perl_path"; then PERL=$_perl_path else - { { $as_echo "$as_me:$LINENO: error: $_perl_path not found" >&5 -$as_echo "$as_me: error: $_perl_path not found" >&2;} + { { echo "$as_me:$LINENO: error: $_perl_path not found" >&5 +echo "$as_me: error: $_perl_path not found" >&2;} { (exit 1); exit 1; }; } fi fi if test "$PERL"; then - { $as_echo "$as_me:$LINENO: checking the Perl version" >&5 -$as_echo_n "checking the Perl version... " >&6; } + echo "$as_me:$LINENO: checking the Perl version" >&5 +echo $ECHO_N "checking the Perl version... $ECHO_C" >&6 ${PERL} -e "exit($]);" _perl_version=$? if test "$_perl_version" -lt 5; then - { { $as_echo "$as_me:$LINENO: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&5 -$as_echo "$as_me: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&2;} + { { echo "$as_me:$LINENO: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&5 +echo "$as_me: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: result: checked (perl $_perl_version)" >&5 -$as_echo "checked (perl $_perl_version)" >&6; } + echo "$as_me:$LINENO: result: checked (perl $_perl_version)" >&5 +echo "${ECHO_T}checked (perl $_perl_version)" >&6 else - { { $as_echo "$as_me:$LINENO: error: Perl not found, install version 5 of Perl" >&5 -$as_echo "$as_me: error: Perl not found, install version 5 of Perl" >&2;} + { { echo "$as_me:$LINENO: error: Perl not found, install version 5 of Perl" >&5 +echo "$as_me: error: Perl not found, install version 5 of Perl" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for required Perl modules" >&5 -$as_echo_n "checking for required Perl modules... " >&6; } +echo "$as_me:$LINENO: checking for required Perl modules" >&5 +echo $ECHO_N "checking for required Perl modules... $ECHO_C" >&6 if `$PERL -e 'use Archive::Zip;'`; then - { $as_echo "$as_me:$LINENO: result: all modules found" >&5 -$as_echo "all modules found" >&6; } + echo "$as_me:$LINENO: result: all modules found" >&5 +echo "${ECHO_T}all modules found" >&6 else - { { $as_echo "$as_me:$LINENO: error: Failed to find some modules" >&5 -$as_echo "$as_me: error: Failed to find some modules" >&2;} + { { echo "$as_me:$LINENO: error: Failed to find some modules" >&5 +echo "$as_me: error: Failed to find some modules" >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" != "yes"; then - { $as_echo "$as_me:$LINENO: checking for friendly registry keys" >&5 -$as_echo_n "checking for friendly registry keys... " >&6; } + echo "$as_me:$LINENO: checking for friendly registry keys" >&5 +echo $ECHO_N "checking for friendly registry keys... $ECHO_C" >&6 # VS.Net 2003, VS.Net 2005 if test -z "$with_cl_home"; then vctest=`./oowintool --msvc-productdir`; @@ -6614,8 +5408,8 @@ $as_echo_n "checking for friendly registry keys... " >&6; } else with_cl_home=`cygpath -u "$with_cl_home"` fi - { $as_echo "$as_me:$LINENO: result: done" >&5 -$as_echo "done" >&6; } + echo "$as_me:$LINENO: result: done" >&5 +echo "${ECHO_T}done" >&6 if test -n "$with_mspdb_path";then with_mspdb_path=`cygpath -u "$with_mspdb_path"` @@ -6636,10 +5430,10 @@ $as_echo "done" >&6; } if test -z "$MSPDB_PATH";then # Extract the first word of "mspdb80.dll", so it can be a program name with args. set dummy mspdb80.dll; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSPDB_PATH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSPDB_PATH in [\\/]* | ?:[\\/]*) @@ -6652,34 +5446,33 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH + if test -n "$MSPDB_PATH"; then - { $as_echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 -$as_echo "$MSPDB_PATH" >&6; } + echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 +echo "${ECHO_T}$MSPDB_PATH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "mspdb71.dll", so it can be a program name with args. set dummy mspdb71.dll; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSPDB_PATH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSPDB_PATH in [\\/]* | ?:[\\/]*) @@ -6692,51 +5485,50 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH + if test -n "$MSPDB_PATH"; then - { $as_echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 -$as_echo "$MSPDB_PATH" >&6; } + echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 +echo "${ECHO_T}$MSPDB_PATH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - MSPDB_PATH=`dirname "$MSPDB_PATH"` fi if test -z "$MSPDB_PATH"; then - { { $as_echo "$as_me:$LINENO: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&5 -$as_echo "$as_me: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&2;} + { { echo "$as_me:$LINENO: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&5 +echo "$as_me: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&2;} { (exit 1); exit 1; }; } fi MSPDB_PATH=`cygpath -d "$MSPDB_PATH"` MSPDB_PATH=`cygpath -u "$MSPDB_PATH"` PATH="$MSPDB_PATH:$PATH" - { $as_echo "$as_me:$LINENO: checking the Microsoft C/C++ Compiler" >&5 -$as_echo_n "checking the Microsoft C/C++ Compiler... " >&6; } + echo "$as_me:$LINENO: checking the Microsoft C/C++ Compiler" >&5 +echo $ECHO_N "checking the Microsoft C/C++ Compiler... $ECHO_C" >&6 if test -x "$with_cl_home/bin/cl.exe"; then CC="$with_cl_home/bin/cl.exe" else # Extract the first word of "cl.exe", so it can be a program name with args. set dummy cl.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CC in [\\/]* | ?:[\\/]*) @@ -6749,40 +5541,39 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi CC=$ac_cv_path_CC + if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -e "$CC"; then # This gives us a posix path with 8.3 filename restrictions CC=`cygpath -d "$CC"` CC=`cygpath -u "$CC"` # Remove /cl.exe from CC case insensitive - { $as_echo "$as_me:$LINENO: result: found ($CC)" >&5 -$as_echo "found ($CC)" >&6; } + echo "$as_me:$LINENO: result: found ($CC)" >&5 +echo "${ECHO_T}found ($CC)" >&6 COMPATH=`echo $CC | $SED 's@\/[Bb][Ii][Nn]\/[cC][lL]\.[eE][xX][eE]@@'` export INCLUDE=`cygpath -d "$COMPATH/Include"` - { $as_echo "$as_me:$LINENO: checking the Version of Microsoft C/C++ Compiler" >&5 -$as_echo_n "checking the Version of Microsoft C/C++ Compiler... " >&6; } + echo "$as_me:$LINENO: checking the Version of Microsoft C/C++ Compiler" >&5 +echo $ECHO_N "checking the Version of Microsoft C/C++ Compiler... $ECHO_C" >&6 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ { x = match( \\\$0, /..\\...\\...../ ) CCversion = substr( \\\$0, RSTART, RLENGTH) @@ -6791,47 +5582,47 @@ $as_echo_n "checking the Version of Microsoft C/C++ Compiler... " >&6; } printf (\"%04d\",vertoken[i] ) } }"` - { $as_echo "$as_me:$LINENO: result: found Compiler version $CCNUMVER." >&5 -$as_echo "found Compiler version $CCNUMVER." >&6; } + echo "$as_me:$LINENO: result: found Compiler version $CCNUMVER." >&5 +echo "${ECHO_T}found Compiler version $CCNUMVER." >&6 if test "$CCNUMVER" -ge "001500000000"; then COMEX=12 MSVSVER=2008 - { $as_echo "$as_me:$LINENO: result: found .NET 2008 / VS 9.0." >&5 -$as_echo "found .NET 2008 / VS 9.0." >&6; } + echo "$as_me:$LINENO: result: found .NET 2008 / VS 9.0." >&5 +echo "${ECHO_T}found .NET 2008 / VS 9.0." >&6 elif test "$CCNUMVER" -ge "001400000000"; then COMEX=11 MSVSVER=2005 - { $as_echo "$as_me:$LINENO: result: found .NET 2005." >&5 -$as_echo "found .NET 2005." >&6; } + echo "$as_me:$LINENO: result: found .NET 2005." >&5 +echo "${ECHO_T}found .NET 2005." >&6 elif test "$CCNUMVER" -ge "001300102240"; then COMEX=10 MSVSVER=2003 - { $as_echo "$as_me:$LINENO: result: found .NET 2003." >&5 -$as_echo "found .NET 2003." >&6; } + echo "$as_me:$LINENO: result: found .NET 2003." >&5 +echo "${ECHO_T}found .NET 2003." >&6 else - { { $as_echo "$as_me:$LINENO: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&5 -$as_echo "$as_me: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&2;} + { { echo "$as_me:$LINENO: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&5 +echo "$as_me: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&2;} { (exit 1); exit 1; }; } fi else - { { $as_echo "$as_me:$LINENO: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&5 -$as_echo "$as_me: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&2;} + { { echo "$as_me:$LINENO: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&5 +echo "$as_me: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: checking the Mingwin32 C++ Compiler" >&5 -$as_echo_n "checking the Mingwin32 C++ Compiler... " >&6; } + echo "$as_me:$LINENO: checking the Mingwin32 C++ Compiler" >&5 +echo $ECHO_N "checking the Mingwin32 C++ Compiler... $ECHO_C" >&6 if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then - { $as_echo "$as_me:$LINENO: result: found." >&5 -$as_echo "found." >&6; } + echo "$as_me:$LINENO: result: found." >&5 +echo "${ECHO_T}found." >&6 if $CC -dumpspecs | grep -q "mno-cygwin"; then USE_MINGW="cygwin" else USE_MINGW="pure-mingw" fi else - { { $as_echo "$as_me:$LINENO: error: Mingwin32 C++ Compiler not found." >&5 -$as_echo "$as_me: error: Mingwin32 C++ Compiler not found." >&2;} + { { echo "$as_me:$LINENO: error: Mingwin32 C++ Compiler not found." >&5 +echo "$as_me: error: Mingwin32 C++ Compiler not found." >&2;} { (exit 1); exit 1; }; } fi fi @@ -6844,10 +5635,10 @@ if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then # Extract the first word of "midl.exe", so it can be a program name with args. set dummy midl.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MIDL_PATH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MIDL_PATH in [\\/]* | ?:[\\/]*) @@ -6860,28 +5651,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MIDL_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi MIDL_PATH=$ac_cv_path_MIDL_PATH + if test -n "$MIDL_PATH"; then - { $as_echo "$as_me:$LINENO: result: $MIDL_PATH" >&5 -$as_echo "$MIDL_PATH" >&6; } + echo "$as_me:$LINENO: result: $MIDL_PATH" >&5 +echo "${ECHO_T}$MIDL_PATH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -n "$MIDL_PATH";then MIDL_PATH=`dirname "$MIDL_PATH"` fi @@ -6907,8 +5697,8 @@ fi fi fi if test ! -x "$MIDL_PATH/midl.exe"; then - { { $as_echo "$as_me:$LINENO: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&5 -$as_echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&2;} + { { echo "$as_me:$LINENO: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&5 +echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&2;} { (exit 1); exit 1; }; } fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) @@ -6917,10 +5707,10 @@ $as_echo "$as_me: error: midl.exe not found. Make sure it's in the path or use - # Extract the first word of "csc.exe", so it can be a program name with args. set dummy csc.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CSC_PATH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CSC_PATH in [\\/]* | ?:[\\/]*) @@ -6933,28 +5723,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CSC_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi CSC_PATH=$ac_cv_path_CSC_PATH + if test -n "$CSC_PATH"; then - { $as_echo "$as_me:$LINENO: result: $CSC_PATH" >&5 -$as_echo "$CSC_PATH" >&6; } + echo "$as_me:$LINENO: result: $CSC_PATH" >&5 +echo "${ECHO_T}$CSC_PATH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -n "$CSC_PATH";then CSC_PATH=`dirname "$CSC_PATH"` fi @@ -6970,16 +5759,16 @@ fi fi fi if test ! -x "$CSC_PATH/csc.exe"; then - { { $as_echo "$as_me:$LINENO: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&5 -$as_echo "$as_me: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&2;} + { { echo "$as_me:$LINENO: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&5 +echo "$as_me: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&2;} { (exit 1); exit 1; }; } fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) CSC_PATH=`cygpath -d "$CSC_PATH"` CSC_PATH=`cygpath -u "$CSC_PATH"` - { $as_echo "$as_me:$LINENO: checking .NET Framework" >&5 -$as_echo_n "checking .NET Framework... " >&6; } + echo "$as_me:$LINENO: checking .NET Framework" >&5 +echo $ECHO_N "checking .NET Framework... $ECHO_C" >&6 if test -n "$with_frame_home"; then with_frame_home=`cygpath -u "$with_frame_home"` fi @@ -7001,12 +5790,12 @@ $as_echo_n "checking .NET Framework... " >&6; } fi fi if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then - { { $as_echo "$as_me:$LINENO: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&5 -$as_echo "$as_me: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&2;} + { { echo "$as_me:$LINENO: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&5 +echo "$as_me: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 # Convert to posix path with 8.3 filename restrictions ( No spaces ) FRAME_HOME=`cygpath -d "$FRAME_HOME"` FRAME_HOME=`cygpath -u "$FRAME_HOME"` @@ -7022,15 +5811,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -7057,35 +5846,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7095,34 +5884,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -7140,8 +5929,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -7164,35 +5953,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7202,34 +5991,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -7238,13 +6027,11 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi ac_ext=c @@ -7254,10 +6041,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7279,32 +6066,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -7360,7 +6150,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ctype.h> -#include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -7380,50 +6169,36 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -7435,24 +6210,20 @@ fi fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -7463,40 +6234,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -7507,87 +6276,57 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CXX" && break done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi + CXX=$ac_ct_CXX fi - fi -fi + # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7608,54 +6347,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7671,152 +6406,175 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext +ac_cv_prog_cxx_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +$ac_declaration +#include <stdlib.h> int main () { - +exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +$ac_declaration int main () { - +exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=cpp +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" @@ -7843,35 +6601,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7881,34 +6639,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -7926,8 +6684,8 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do @@ -7950,35 +6708,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7988,34 +6746,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -8024,13 +6782,11 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi ac_ext=c @@ -8048,15 +6804,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -8083,35 +6839,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8121,34 +6877,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -8166,8 +6922,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -8190,35 +6946,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8228,34 +6984,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -8264,13 +7020,11 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi ac_ext=c @@ -8295,11 +7049,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8312,42 +7066,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -8355,15 +7108,73 @@ fi done -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } +echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 + +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -8376,7 +7187,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; test_array [0] = 0 ; @@ -8384,23 +7195,27 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -8413,7 +7228,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8421,43 +7236,46 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8467,7 +7285,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; test_array [0] = 0 ; @@ -8475,23 +7293,27 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -8504,7 +7326,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8512,49 +7334,50 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_lo=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= +ac_lo= ac_hi= fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -8568,7 +7391,7 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8576,47 +7399,51 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` +ac_lo=`expr '(' $ac_mid ')' + 1` fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) +echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi ;; + { (exit 1); exit 1; }; } ;; esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8625,8 +7452,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long)); } +long longval () { return (long) (sizeof (long)); } +unsigned long ulongval () { return (long) (sizeof (long)); } #include <stdio.h> #include <stdlib.h> int @@ -8635,80 +7462,61 @@ main () FILE *f = fopen ("conftest.val", "w"); if (! f) - return 1; - if (((long int) (sizeof (long))) < 0) + exit (1); + if (((long) (sizeof (long))) < 0) { - long int i = longval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%ld", i); + long i = longval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%ld\n", i); } else { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%lu", i); + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%lu\n", i); } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; + exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) +echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val +else + ac_cv_sizeof_long=0 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF @@ -8716,324 +7524,172 @@ _ACEOF SIZEOF_LONG=$ac_cv_sizeof_long - - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - # Check for potential -arch flags. It is not universal unless - # there are some -arch flags. Note that *ppc* also matches - # ppc64. This check is also rather less than ideal. - case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( - *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; - esac + echo $ECHO_N "(cached) $ECHO_C" >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat >conftest.$ac_ext <<_ACEOF + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sys/types.h> - #include <sys/param.h> +#include <sys/param.h> int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sys/types.h> - #include <sys/param.h> +#include <sys/param.h> int main () { #if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif + not big endian +#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat >conftest.$ac_ext <<_ACEOF +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <limits.h> - +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - + _ascii (); _ebcdic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <limits.h> - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then - # Try to guess by grepping values from an object file. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9041,108 +7697,84 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF -;; #( - no) - ;; #( - universal) +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) cat >>confdefs.h <<\_ACEOF -#define AC_APPLE_UNIVERSAL_BUILD 1 +#define WORDS_BIGENDIAN 1 _ACEOF - - ;; #( - *) - { { $as_echo "$as_me:$LINENO: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -$as_echo "$as_me: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; - esac +esac WORDS_BIGENDIAN=$ac_cv_c_bigendian -# Check whether --enable-largefile was given. +# Check whether --enable-largefile or --disable-largefile was given. if test "${enable_largefile+set}" = set; then - enableval=$enable_largefile; -fi + enableval="$enable_largefile" +fi; if test "$enable_largefile" != no; then - { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } + echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_largefile_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9166,79 +7798,84 @@ main () return 0; } _ACEOF - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +rm -f conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_sys_largefile_CC=' -n32'; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext +rm -f conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } + echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_file_offset_bits+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do + ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9263,32 +7900,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_sys_file_offset_bits=no; break -else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9314,54 +7953,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_sys_file_offset_bits=64; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) +echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 +if test "$ac_cv_sys_file_offset_bits" != no; then + cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } + +fi +rm -f conftest* + echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_large_files+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do + ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9386,32 +8025,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_sys_large_files=no; break -else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9437,48 +8078,47 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_sys_large_files=1; break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) +echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6 +if test "$ac_cv_sys_large_files" != no; then + cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF -;; -esac -rm -rf conftest* - fi + +fi +rm -f conftest* fi if test -n "$ac_cv_sys_file_offset_bits"; then @@ -9489,65 +8129,19 @@ if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; th fi -{ $as_echo "$as_me:$LINENO: checking whether to disable vba feature" >&5 -$as_echo_n "checking whether to disable vba feature... " >&6; } -if test -n "$enable_vba" && test "$enable_vba" = "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - ENABLE_VBA=NO -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - ENABLE_VBA=YES -fi - - -if test "$ENABLE_VBA" = "YES"; then - { $as_echo "$as_me:$LINENO: checking how to package the vba compatibility api" >&5 -$as_echo_n "checking how to package the vba compatibility api... " >&6; } - if test -n "$with_vba_package_format"; then - if test "$with_vba_package_format" = "extn"; then - VBA_EXTENSION=YES - { $as_echo "$as_me:$LINENO: result: uno extension" >&5 -$as_echo "uno extension" >&6; } - { $as_echo "$as_me:$LINENO: WARNING: --with-vba-package-format=extn can cause problems" >&5 -$as_echo "$as_me: WARNING: --with-vba-package-format=extn can cause problems" >&2;} - else if test "$with_vba_package_format" = "builtin"; then - VBA_EXTENSION=NO - { $as_echo "$as_me:$LINENO: result: build into installset" >&5 -$as_echo "build into installset" >&6; } - else - { { $as_echo "$as_me:$LINENO: error: unknown packaging method" >&5 -$as_echo "$as_me: error: unknown packaging method" >&2;} - { (exit 1); exit 1; }; } - fi - fi - - else - VBA_EXTENSION=NO - { $as_echo "$as_me:$LINENO: result: defaulting to build into installset" >&5 -$as_echo "defaulting to build into installset" >&6; } - fi -else - VBA_EXTENSION=NO -fi - - - - if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then if test "${ac_cv_header_cups_cups_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for cups/cups.h" >&5 -$as_echo_n "checking for cups/cups.h... " >&6; } + echo "$as_me:$LINENO: checking for cups/cups.h" >&5 +echo $ECHO_N "checking for cups/cups.h... $ECHO_C" >&6 if test "${ac_cv_header_cups_cups_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 -$as_echo "$ac_cv_header_cups_cups_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 +echo "${ECHO_T}$ac_cv_header_cups_cups_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking cups/cups.h usability" >&5 -$as_echo_n "checking cups/cups.h usability... " >&6; } +echo "$as_me:$LINENO: checking cups/cups.h usability" >&5 +echo $ECHO_N "checking cups/cups.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9558,38 +8152,41 @@ $ac_includes_default #include <cups/cups.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking cups/cups.h presence" >&5 -$as_echo_n "checking cups/cups.h presence... " >&6; } +echo "$as_me:$LINENO: checking cups/cups.h presence" >&5 +echo $ECHO_N "checking cups/cups.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9598,76 +8195,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <cups/cups.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: cups/cups.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: cups/cups.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: cups/cups.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: cups/cups.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: cups/cups.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: cups/cups.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: cups/cups.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for cups/cups.h" >&5 -$as_echo_n "checking for cups/cups.h... " >&6; } +echo "$as_me:$LINENO: checking for cups/cups.h" >&5 +echo $ECHO_N "checking for cups/cups.h... $ECHO_C" >&6 if test "${ac_cv_header_cups_cups_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_cups_cups_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 -$as_echo "$ac_cv_header_cups_cups_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 +echo "${ECHO_T}$ac_cv_header_cups_cups_h" >&6 fi -if test "x$ac_cv_header_cups_cups_h" = x""yes; then +if test $ac_cv_header_cups_cups_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&5 -$as_echo "$as_me: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&2;} + { { echo "$as_me:$LINENO: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&5 +echo "$as_me: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&2;} { (exit 1); exit 1; }; } fi @@ -9675,24 +8279,24 @@ fi fi if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then - { $as_echo "$as_me:$LINENO: checking whether to enable pam support" >&5 -$as_echo_n "checking whether to enable pam support... " >&6; } + echo "$as_me:$LINENO: checking whether to enable pam support" >&5 +echo $ECHO_N "checking whether to enable pam support... $ECHO_C" >&6 if test -z "$enable_pam" || test "$enable_pam" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 PAM=YES if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -$as_echo_n "checking for security/pam_appl.h... " >&6; } + echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 +echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6 if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -$as_echo "$ac_cv_header_security_pam_appl_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 +echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 -$as_echo_n "checking security/pam_appl.h usability... " >&6; } +echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 +echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9703,38 +8307,41 @@ $ac_includes_default #include <security/pam_appl.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5 -$as_echo_n "checking security/pam_appl.h presence... " >&6; } +echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5 +echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9743,91 +8350,98 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <security/pam_appl.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -$as_echo_n "checking for security/pam_appl.h... " >&6; } +echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 +echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6 if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_security_pam_appl_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -$as_echo "$ac_cv_header_security_pam_appl_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 +echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6 fi -if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then +if test $ac_cv_header_security_pam_appl_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&5 -$as_echo "$as_me: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&2;} + { { echo "$as_me:$LINENO: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&5 +echo "$as_me: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking whether to link to libpam" >&5 -$as_echo_n "checking whether to link to libpam... " >&6; } + echo "$as_me:$LINENO: checking whether to link to libpam" >&5 +echo $ECHO_N "checking whether to link to libpam... $ECHO_C" >&6 if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 PAM_LINK=YES -{ $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 -$as_echo_n "checking for pam_start in -lpam... " >&6; } +echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 +echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6 if test "${ac_cv_lib_pam_pam_start+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpam $LIBS" @@ -9838,58 +8452,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pam_start (); int main () { -return pam_start (); +pam_start (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pam_pam_start=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pam_pam_start=no +ac_cv_lib_pam_pam_start=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 -$as_echo "$ac_cv_lib_pam_pam_start" >&6; } -if test "x$ac_cv_lib_pam_pam_start" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 +echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6 +if test $ac_cv_lib_pam_pam_start = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPAM 1 _ACEOF @@ -9897,19 +8510,19 @@ _ACEOF LIBS="-lpam $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libpam not found or functional" >&5 -$as_echo "$as_me: error: libpam not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: libpam not found or functional" >&5 +echo "$as_me: error: libpam not found or functional" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -$as_echo "no, dynamically open it" >&6; } + echo "$as_me:$LINENO: result: no, dynamically open it" >&5 +echo "${ECHO_T}no, dynamically open it" >&6 PAM_LINK=NO fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 PAM=NO PAM_LINK=NO @@ -9920,11 +8533,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:$LINENO: checking how many arguments getspnam_r() takes" >&5 -$as_echo_n "checking how many arguments getspnam_r() takes... " >&6; } + echo "$as_me:$LINENO: checking how many arguments getspnam_r() takes" >&5 +echo $ECHO_N "checking how many arguments getspnam_r() takes... $ECHO_C" >&6 if test "${ac_cv_func_which_getspnam_r+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9963,32 +8576,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_which_getspnam_r=no else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # # FIVE ARGUMENTS @@ -10020,32 +8635,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_which_getspnam_r=five else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -10079,32 +8696,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_which_getspnam_r=four else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -10115,29 +8734,29 @@ fi case "$ac_cv_func_which_getspnam_r" in five) - { $as_echo "$as_me:$LINENO: result: five" >&5 -$as_echo "five" >&6; } + echo "$as_me:$LINENO: result: five" >&5 +echo "${ECHO_T}five" >&6 NEW_SHADOW_API=YES ;; four) - { $as_echo "$as_me:$LINENO: result: four" >&5 -$as_echo "four" >&6; } + echo "$as_me:$LINENO: result: four" >&5 +echo "${ECHO_T}four" >&6 ;; no) - { $as_echo "$as_me:$LINENO: result: cannot find function declaration in shadow.h" >&5 -$as_echo "cannot find function declaration in shadow.h" >&6; } + echo "$as_me:$LINENO: result: cannot find function declaration in shadow.h" >&5 +echo "${ECHO_T}cannot find function declaration in shadow.h" >&6 ;; unknown) - { $as_echo "$as_me:$LINENO: result: can't tell" >&5 -$as_echo "can't tell" >&6; } + echo "$as_me:$LINENO: result: can't tell" >&5 +echo "${ECHO_T}can't tell" >&6 ;; *) - { { $as_echo "$as_me:$LINENO: error: internal error" >&5 -$as_echo "$as_me: error: internal error" >&2;} + { { echo "$as_me:$LINENO: error: internal error" >&5 +echo "$as_me: error: internal error" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -10157,17 +8776,17 @@ fi if test "$_os" = "Linux"; then - { $as_echo "$as_me:$LINENO: checking whether to link to libcrypt" >&5 -$as_echo_n "checking whether to link to libcrypt... " >&6; } + echo "$as_me:$LINENO: checking whether to link to libcrypt" >&5 +echo $ECHO_N "checking whether to link to libcrypt... $ECHO_C" >&6 if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 CRYPT_LINK=YES -{ $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 -$as_echo_n "checking for crypt in -lcrypt... " >&6; } +echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 +echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 if test "${ac_cv_lib_crypt_crypt+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" @@ -10178,58 +8797,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char crypt (); int main () { -return crypt (); +crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_crypt_crypt=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_crypt_crypt=no +ac_cv_lib_crypt_crypt=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 -$as_echo "$ac_cv_lib_crypt_crypt" >&6; } -if test "x$ac_cv_lib_crypt_crypt" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 +echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 +if test $ac_cv_lib_crypt_crypt = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF @@ -10237,14 +8855,14 @@ _ACEOF LIBS="-lcrypt $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libcrypt not found or functional" >&5 -$as_echo "$as_me: error: libcrypt not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: libcrypt not found or functional" >&5 +echo "$as_me: error: libcrypt not found or functional" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -$as_echo "no, dynamically open it" >&6; } + echo "$as_me:$LINENO: result: no, dynamically open it" >&5 +echo "${ECHO_T}no, dynamically open it" >&6 CRYPT_LINK=NO fi fi @@ -10263,24 +8881,20 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -10291,40 +8905,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -10335,87 +8947,57 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CXX" && break done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi + CXX=$ac_ct_CXX fi - fi -fi + # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10436,54 +9018,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10499,136 +9077,159 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF +ac_cv_prog_cxx_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +$ac_declaration +#include <stdlib.h> int main () { - +exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +$ac_declaration int main () { - +exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -10638,8 +9239,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "$GXX" = "yes"; then - { $as_echo "$as_me:$LINENO: checking the GNU C++ compiler version" >&5 -$as_echo_n "checking the GNU C++ compiler version... " >&6; } + echo "$as_me:$LINENO: checking the GNU C++ compiler version" >&5 +echo $ECHO_N "checking the GNU C++ compiler version... $ECHO_C" >&6 _gpp_version=`$CXX -dumpversion` _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` @@ -10653,29 +9254,27 @@ $as_echo_n "checking the GNU C++ compiler version... " >&6; } fi fi if test "$_gpp_majmin" -ge "401" ; then - { { $as_echo "$as_me:$LINENO: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&5 -$as_echo "$as_me: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&2;} + { { echo "$as_me:$LINENO: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&5 +echo "$as_me: error: You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: implicitly using CXX=$CXX" >&5 -$as_echo "implicitly using CXX=$CXX" >&6; } + echo "$as_me:$LINENO: result: implicitly using CXX=$CXX" >&5 +echo "${ECHO_T}implicitly using CXX=$CXX" >&6 fi else - { $as_echo "$as_me:$LINENO: result: checked (g++ $_gpp_version)" >&5 -$as_echo "checked (g++ $_gpp_version)" >&6; } + echo "$as_me:$LINENO: result: checked (g++ $_gpp_version)" >&5 +echo "${ECHO_T}checked (g++ $_gpp_version)" >&6 fi if test "$_gpp_majmin" = "304"; then - { $as_echo "$as_me:$LINENO: checking whether $CXX has the enum bug" >&5 -$as_echo_n "checking whether $CXX has the enum bug... " >&6; } + echo "$as_me:$LINENO: checking whether $CXX has the enum bug" >&5 +echo $ECHO_N "checking whether $CXX has the enum bug... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10707,52 +9306,38 @@ main (void) _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { { $as_echo "$as_me:$LINENO: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&5 -$as_echo "$as_me: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&2;} + { { echo "$as_me:$LINENO: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&5 +echo "$as_me: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&2;} { (exit 1); exit 1; }; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path # often contains an i386 which is expanded as a macro. Solved in stlport. if test "$GXX" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for g++ include path" >&5 -$as_echo_n "checking for g++ include path... " >&6; } + echo "$as_me:$LINENO: checking for g++ include path" >&5 +echo $ECHO_N "checking for g++ include path... $ECHO_C" >&6 if test -z "$with_gxx_include_path"; then with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then @@ -10770,18 +9355,18 @@ $as_echo_n "checking for g++ include path... " >&6; } fi if test -z "$with_gxx_include_path"; then with_gxx_include_path="NO_GXX_INCLUDE" - { $as_echo "$as_me:$LINENO: result: no g++ includes" >&5 -$as_echo "no g++ includes" >&6; } + echo "$as_me:$LINENO: result: no g++ includes" >&5 +echo "${ECHO_T}no g++ includes" >&6 else - { $as_echo "$as_me:$LINENO: result: $with_gxx_include_path" >&5 -$as_echo "$with_gxx_include_path" >&6; } + echo "$as_me:$LINENO: result: $with_gxx_include_path" >&5 +echo "${ECHO_T}$with_gxx_include_path" >&6 fi GXX_INCLUDE_PATH="$with_gxx_include_path" if test "$WITH_MINGWIN" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for mingwin runtime include path" >&5 -$as_echo_n "checking for mingwin runtime include path... " >&6; } + echo "$as_me:$LINENO: checking for mingwin runtime include path" >&5 +echo $ECHO_N "checking for mingwin runtime include path... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #include <stddef.h> #include <bits/c++config.h> @@ -10799,16 +9384,16 @@ _ACEOF fi if test -z "$_mingw_lib_include_path"; then _mingw_lib_include_path="NO_LIB_INCLUDE" - { $as_echo "$as_me:$LINENO: result: no mingwin runtime includes" >&5 -$as_echo "no mingwin runtime includes" >&6; } + echo "$as_me:$LINENO: result: no mingwin runtime includes" >&5 +echo "${ECHO_T}no mingwin runtime includes" >&6 else - { $as_echo "$as_me:$LINENO: result: $_mingw_lib_include_path" >&5 -$as_echo "$_mingw_lib_include_path" >&6; } + echo "$as_me:$LINENO: result: $_mingw_lib_include_path" >&5 +echo "${ECHO_T}$_mingw_lib_include_path" >&6 fi MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" - { $as_echo "$as_me:$LINENO: checking for mingwin c++ backward include path" >&5 -$as_echo_n "checking for mingwin c++ backward include path... " >&6; } + echo "$as_me:$LINENO: checking for mingwin c++ backward include path" >&5 +echo $ECHO_N "checking for mingwin c++ backward include path... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #include <hash_set> _ACEOF @@ -10817,41 +9402,41 @@ _ACEOF if test -n "$_mingw_backward_include_path"; then _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` - { $as_echo "$as_me:$LINENO: result: $_mingw_backward_include_path" >&5 -$as_echo "$_mingw_backward_include_path" >&6; } + echo "$as_me:$LINENO: result: $_mingw_backward_include_path" >&5 +echo "${ECHO_T}$_mingw_backward_include_path" >&6 else _mingw_backward_include_path="NO_BACKWARD_INCLUDE" - { $as_echo "$as_me:$LINENO: result: no mingwin c++ backward includes" >&5 -$as_echo "no mingwin c++ backward includes" >&6; } + echo "$as_me:$LINENO: result: no mingwin c++ backward includes" >&5 +echo "${ECHO_T}no mingwin c++ backward includes" >&6 fi MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" mingw_crtbegin=`$CC -print-file-name=crtbegin.o` MINGW_CLIB_DIR=`dirname $mingw_crtbegin` - { $as_echo "$as_me:$LINENO: checking whether to use dynamic libgcc" >&5 -$as_echo_n "checking whether to use dynamic libgcc... " >&6; } + echo "$as_me:$LINENO: checking whether to use dynamic libgcc" >&5 +echo $ECHO_N "checking whether to use dynamic libgcc... $ECHO_C" >&6 if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then - { $as_echo "$as_me:$LINENO: checking dynamic libgcc name" >&5 -$as_echo_n "checking dynamic libgcc name... " >&6; } + echo "$as_me:$LINENO: checking dynamic libgcc name" >&5 +echo $ECHO_N "checking dynamic libgcc name... $ECHO_C" >&6 MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` if test -n "$MINGW_GCCDLL"; then MINGW_SHARED_GCCLIB=YES - { $as_echo "$as_me:$LINENO: result: use $MINGW_GCCDLL" >&5 -$as_echo "use $MINGW_GCCDLL" >&6; } + echo "$as_me:$LINENO: result: use $MINGW_GCCDLL" >&5 +echo "${ECHO_T}use $MINGW_GCCDLL" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then MINGW_GCCLIB_EH=YES fi - { $as_echo "$as_me:$LINENO: checking whether to use dynamic libstdc++" >&5 -$as_echo_n "checking whether to use dynamic libstdc++... " >&6; } + echo "$as_me:$LINENO: checking whether to use dynamic libstdc++" >&5 +echo $ECHO_N "checking whether to use dynamic libstdc++... $ECHO_C" >&6 MINGW_SHARED_LIBSTDCPP= if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then MINGW_SHARED_LIBSTDCPP=stdc++_s @@ -10860,23 +9445,23 @@ $as_echo_n "checking whether to use dynamic libstdc++... " >&6; } MINGW_SHARED_LIBSTDCPP=stdc++.dll fi if test -n "$MINGW_SHARED_LIBSTDCPP" ; then - { $as_echo "$as_me:$LINENO: checking dynamic libstdc++ name" >&5 -$as_echo_n "checking dynamic libstdc++ name... " >&6; } + echo "$as_me:$LINENO: checking dynamic libstdc++ name" >&5 +echo $ECHO_N "checking dynamic libstdc++ name... $ECHO_C" >&6 MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` if test -n "$MINGW_GXXDLL"; then MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP MINGW_SHARED_GXXLIB=YES - { $as_echo "$as_me:$LINENO: result: use $MINGW_GXXDLL" >&5 -$as_echo "use $MINGW_GXXDLL" >&6; } + echo "$as_me:$LINENO: result: use $MINGW_GXXDLL" >&5 +echo "${ECHO_T}use $MINGW_GXXDLL" >&6 else MINGW_SHARED_LIBSTDCPP= - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` @@ -10890,36 +9475,36 @@ fi if test "$_os" = "SunOS"; then if test "$CC" = "cc"; then - { $as_echo "$as_me:$LINENO: checking SunStudio C++ Compiler" >&5 -$as_echo_n "checking SunStudio C++ Compiler... " >&6; } + echo "$as_me:$LINENO: checking SunStudio C++ Compiler" >&5 +echo $ECHO_N "checking SunStudio C++ Compiler... $ECHO_C" >&6 if test "$CXX" != "CC"; then - { $as_echo "$as_me:$LINENO: WARNING: SunStudio C++ was not found" >&5 -$as_echo "$as_me: WARNING: SunStudio C++ was not found" >&2;} + { echo "$as_me:$LINENO: WARNING: SunStudio C++ was not found" >&5 +echo "$as_me: WARNING: SunStudio C++ was not found" >&2;} echo "SunStudio C++ was not found" >> warn else - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 fi fi fi if test "$_os" = "OSF1"; then - { $as_echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5 -$as_echo_n "checking Compaq C++ compiler version... " >&6; } + echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5 +echo $ECHO_N "checking Compaq C++ compiler version... $ECHO_C" >&6 _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'` if test "$_compaqcxx_major" != "V6"; then - { $as_echo "$as_me:$LINENO: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&5 -$as_echo "$as_me: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&2;} + { echo "$as_me:$LINENO: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&5 +echo "$as_me: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&2;} echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn else - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 fi fi -{ $as_echo "$as_me:$LINENO: checking exception type" >&5 -$as_echo_n "checking exception type... " >&6; } -ac_ext=cpp +echo "$as_me:$LINENO: checking exception type" >&5 +echo $ECHO_N "checking exception type... $ECHO_C" >&6 +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -10947,42 +9532,41 @@ _Unwind_SjLj_RaiseException() } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then exceptions_type="sjlj" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - exceptions_type="dwarf2" +exceptions_type="dwarf2" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $exceptions_type" >&5 -$as_echo "$exceptions_type" >&6; } +echo "$as_me:$LINENO: result: $exceptions_type" >&5 +echo "${ECHO_T}$exceptions_type" >&6 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -10995,8 +9579,8 @@ EXCEPTIONS="$exceptions_type" if test "$_os" = "SunOS"; then _temp=`showrev -p | $AWK -F" " '{ print $2 }'` if test "$_os_release" = "7"; then - { $as_echo "$as_me:$LINENO: checking for patch 106327-06 or greater" >&5 -$as_echo_n "checking for patch 106327-06 or greater... " >&6; } + echo "$as_me:$LINENO: checking for patch 106327-06 or greater" >&5 +echo $ECHO_N "checking for patch 106327-06 or greater... $ECHO_C" >&6 _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'` _patch="false" for i in $_temp @@ -11010,15 +9594,15 @@ $as_echo_n "checking for patch 106327-06 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { $as_echo "$as_me:$LINENO: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&5 -$as_echo "$as_me: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&2;} + { echo "$as_me:$LINENO: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&5 +echo "$as_me: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&2;} echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn fi - { $as_echo "$as_me:$LINENO: checking for patch 106950-11 or greater" >&5 -$as_echo_n "checking for patch 106950-11 or greater... " >&6; } + echo "$as_me:$LINENO: checking for patch 106950-11 or greater" >&5 +echo $ECHO_N "checking for patch 106950-11 or greater... $ECHO_C" >&6 _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'` _patch="false" for i in $_temp @@ -11032,17 +9616,17 @@ $as_echo_n "checking for patch 106950-11 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { $as_echo "$as_me:$LINENO: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&5 -$as_echo "$as_me: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&2;} + { echo "$as_me:$LINENO: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&5 +echo "$as_me: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&2;} echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn fi else if test "$_os_release" = "6"; then - { $as_echo "$as_me:$LINENO: checking for patch 105591-09 or greater" >&5 -$as_echo_n "checking for patch 105591-09 or greater... " >&6; } + echo "$as_me:$LINENO: checking for patch 105591-09 or greater" >&5 +echo $ECHO_N "checking for patch 105591-09 or greater... $ECHO_C" >&6 _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'` _patch="false" for i in $_temp @@ -11056,15 +9640,15 @@ $as_echo_n "checking for patch 105591-09 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { $as_echo "$as_me:$LINENO: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&5 -$as_echo "$as_me: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&2;} + { echo "$as_me:$LINENO: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&5 +echo "$as_me: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&2;} echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn fi - { $as_echo "$as_me:$LINENO: checking for patch 107733-08 or greater" >&5 -$as_echo_n "checking for patch 107733-08 or greater... " >&6; } + echo "$as_me:$LINENO: checking for patch 107733-08 or greater" >&5 +echo $ECHO_N "checking for patch 107733-08 or greater... $ECHO_C" >&6 _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'` _patch="false" for i in $_temp @@ -11078,19 +9662,19 @@ $as_echo_n "checking for patch 107733-08 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { $as_echo "$as_me:$LINENO: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&5 -$as_echo "$as_me: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&2;} + { echo "$as_me:$LINENO: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&5 +echo "$as_me: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&2;} echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn fi fi fi fi - { $as_echo "$as_me:$LINENO: checking what the default STL should be" >&5 -$as_echo_n "checking what the default STL should be... " >&6; } + echo "$as_me:$LINENO: checking what the default STL should be" >&5 +echo $ECHO_N "checking what the default STL should be... $ECHO_C" >&6 DEFAULT_TO_STLPORT="no" if test "$_os" = "Linux"; then case "$build_cpu" in @@ -11117,35 +9701,35 @@ $as_echo_n "checking what the default STL should be... " >&6; } DEFAULT_TO_STLPORT="yes" fi if test "$DEFAULT_TO_STLPORT" = "yes"; then - { $as_echo "$as_me:$LINENO: result: stlport" >&5 -$as_echo "stlport" >&6; } + echo "$as_me:$LINENO: result: stlport" >&5 +echo "${ECHO_T}stlport" >&6 else - { $as_echo "$as_me:$LINENO: result: system" >&5 -$as_echo "system" >&6; } + echo "$as_me:$LINENO: result: system" >&5 +echo "${ECHO_T}system" >&6 fi if test "$WITH_STLPORT" = "auto"; then WITH_STLPORT=$DEFAULT_TO_STLPORT fi - { $as_echo "$as_me:$LINENO: checking for STL providing headers" >&5 -$as_echo_n "checking for STL providing headers... " >&6; } + echo "$as_me:$LINENO: checking for STL providing headers" >&5 +echo $ECHO_N "checking for STL providing headers... $ECHO_C" >&6 STLPORT4="" USE_SYSTEM_STL="" if test "$WITH_STLPORT" = "yes"; then - { $as_echo "$as_me:$LINENO: result: using internal stlport." >&5 -$as_echo "using internal stlport." >&6; } + echo "$as_me:$LINENO: result: using internal stlport." >&5 +echo "${ECHO_T}using internal stlport." >&6 if test "$DEFAULT_TO_STLPORT" != "yes"; then - { $as_echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 -$as_echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} + { echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 +echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi elif test "$WITH_STLPORT" = "no"; then - { $as_echo "$as_me:$LINENO: result: using system STL" >&5 -$as_echo "using system STL" >&6; } + echo "$as_me:$LINENO: result: using system STL" >&5 +echo "${ECHO_T}using system STL" >&6 USE_SYSTEM_STL="YES" if test "$DEFAULT_TO_STLPORT" != "no"; then - { $as_echo "$as_me:$LINENO: WARNING: using system STL. Warning, breaks your ABI compatability!" >&5 -$as_echo "$as_me: WARNING: using system STL. Warning, breaks your ABI compatability!" >&2;} + { echo "$as_me:$LINENO: WARNING: using system STL. Warning, breaks your ABI compatability!" >&5 +echo "$as_me: WARNING: using system STL. Warning, breaks your ABI compatability!" >&2;} echo "using system STL. Warning, breaks your ABI compatability!" >>warn fi else @@ -11159,92 +9743,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $STLPORT4/stlport/hash_map _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - { $as_echo "$as_me:$LINENO: result: checked." >&5 -$as_echo "checked." >&6; } -else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + echo "$as_me:$LINENO: result: checked." >&5 +echo "${ECHO_T}checked." >&6 +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: STLport headers not found." >&5 -$as_echo "$as_me: error: STLport headers not found." >&2;} + { { echo "$as_me:$LINENO: error: STLport headers not found." >&5 +echo "$as_me: error: STLport headers not found." >&2;} { (exit 1); exit 1; }; } fi - rm -f conftest.err conftest.$ac_ext else if test -f "$STLPORT4/stlport/hash_map"; then - { $as_echo "$as_me:$LINENO: result: checked." >&5 -$as_echo "checked." >&6; } + echo "$as_me:$LINENO: result: checked." >&5 +echo "${ECHO_T}checked." >&6 else - { { $as_echo "$as_me:$LINENO: error: STLport headers not found." >&5 -$as_echo "$as_me: error: STLport headers not found." >&2;} + { { echo "$as_me:$LINENO: error: STLport headers not found." >&5 +echo "$as_me: error: STLport headers not found." >&2;} { (exit 1); exit 1; }; } fi fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for STLport libraries" >&5 -$as_echo_n "checking for STLport libraries... " >&6; } + echo "$as_me:$LINENO: checking for STLport libraries" >&5 +echo $ECHO_N "checking for STLport libraries... $ECHO_C" >&6 if test "$_os" = "SunOS"; then if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 elif test -f "$STLPORT4/lib/libstlport.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 STLPORT_VER=500 else - { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -$as_echo "$as_me: error: STLport libraries not found" >&2;} + { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 +echo "$as_me: error: STLport libraries not found" >&2;} { (exit 1); exit 1; }; } fi elif test "$_os" = "Darwin"; then if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 elif test -f "$STLPORT4/lib/libstlport.dylib"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 STLPORT_VER=500 else - { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -$as_echo "$as_me: error: STLport libraries not found" >&2;} + { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 +echo "$as_me: error: STLport libraries not found" >&2;} { (exit 1); exit 1; }; } fi else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 elif test -f "$STLPORT4/lib/libstlport.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 STLPORT_VER=500 else - { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -$as_echo "$as_me: error: STLport libraries not found" >&2;} + { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 +echo "$as_me: error: STLport libraries not found" >&2;} { (exit 1); exit 1; }; } fi fi fi if test "$DEFAULT_TO_STLPORT" != "yes"; then - { $as_echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 -$as_echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} + { echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 +echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi fi @@ -11260,8 +9844,8 @@ fi if test "$GCC" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether $CC supports -fvisibility=hidden" >&5 -$as_echo_n "checking whether $CC supports -fvisibility=hidden... " >&6; } + echo "$as_me:$LINENO: checking whether $CC supports -fvisibility=hidden" >&5 +echo $ECHO_N "checking whether $CC supports -fvisibility=hidden... $ECHO_C" >&6 save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -fvisibility=hidden" cat >conftest.$ac_ext <<_ACEOF @@ -11280,73 +9864,71 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then HAVE_GCC_VISIBILITY_FEATURE=TRUE else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$save_CFLAGS if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi # =================================================================== # use --ccache-skip? # =================================================================== -{ $as_echo "$as_me:$LINENO: checking whether we are allowed and able to use --ccache-skip" >&5 -$as_echo_n "checking whether we are allowed and able to use --ccache-skip... " >&6; } +echo "$as_me:$LINENO: checking whether we are allowed and able to use --ccache-skip" >&5 +echo $ECHO_N "checking whether we are allowed and able to use --ccache-skip... $ECHO_C" >&6 if test "$_os" != "Darwin" ; then - { $as_echo "$as_me:$LINENO: result: only used on Mac currently, skipping" >&5 -$as_echo "only used on Mac currently, skipping" >&6; } + echo "$as_me:$LINENO: result: only used on Mac currently, skipping" >&5 +echo "${ECHO_T}only used on Mac currently, skipping" >&6 elif test "$enable_ccache_skip" = "no" ; then - { $as_echo "$as_me:$LINENO: result: no - diabled explicitly" >&5 -$as_echo "no - diabled explicitly" >&6; } + echo "$as_me:$LINENO: result: no - diabled explicitly" >&5 +echo "${ECHO_T}no - diabled explicitly" >&6 elif test "$enable_ccache_skip" = "yes" ; then - { $as_echo "$as_me:$LINENO: result: yes - enabled explicitly, skipping checks" >&5 -$as_echo "yes - enabled explicitly, skipping checks" >&6; } + echo "$as_me:$LINENO: result: yes - enabled explicitly, skipping checks" >&5 +echo "${ECHO_T}yes - enabled explicitly, skipping checks" >&6 USE_CCACHE=YES elif test "$enable_ccache_skip" = "auto" ; then # checking for ccache presence/version - { $as_echo "$as_me:$LINENO: result: probing..." >&5 -$as_echo "probing..." >&6; } + echo "$as_me:$LINENO: result: probing..." >&5 +echo "${ECHO_T}probing..." >&6 # Extract the first word of "ccache", so it can be a program name with args. set dummy ccache; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CCACHE+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CCACHE in [\\/]* | ?:[\\/]*) @@ -11359,43 +9941,42 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_CCACHE" && ac_cv_path_CCACHE="not_found" ;; esac fi CCACHE=$ac_cv_path_CCACHE + if test -n "$CCACHE"; then - { $as_echo "$as_me:$LINENO: result: $CCACHE" >&5 -$as_echo "$CCACHE" >&6; } + echo "$as_me:$LINENO: result: $CCACHE" >&5 +echo "${ECHO_T}$CCACHE" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "$CCACHE" = "not_found" ; then - { $as_echo "$as_me:$LINENO: not enabling --ccache-skip (ccache not found)" >&5 -$as_echo "$as_me: not enabling --ccache-skip (ccache not found)" >&6;} + { echo "$as_me:$LINENO: not enabling --ccache-skip (ccache not found)" >&5 +echo "$as_me: not enabling --ccache-skip (ccache not found)" >&6;} else # check ccache version - { $as_echo "$as_me:$LINENO: checking whether version of ccache is suitable" >&5 -$as_echo_n "checking whether version of ccache is suitable... " >&6; } + echo "$as_me:$LINENO: checking whether version of ccache is suitable" >&5 +echo $ECHO_N "checking whether version of ccache is suitable... $ECHO_C" >&6 CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` if test "$CCACHE_VERSION" = "2.4_OOo"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking whether ccache is actually used for the build" >&5 -$as_echo_n "checking whether ccache is actually used for the build... " >&6; } - ac_ext=cpp + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + echo "$as_me:$LINENO: checking whether ccache is actually used for the build" >&5 +echo $ECHO_N "checking whether ccache is actually used for the build... $ECHO_C" >&6 + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -11419,40 +10000,43 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then use_ccache=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - use_ccache=no +use_ccache=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $use_ccache = yes ; then - { $as_echo "$as_me:$LINENO: result: yes, will enable --ccache-skip" >&5 -$as_echo "yes, will enable --ccache-skip" >&6; } + echo "$as_me:$LINENO: result: yes, will enable --ccache-skip" >&5 +echo "${ECHO_T}yes, will enable --ccache-skip" >&6 USE_CCACHE=YES else - { $as_echo "$as_me:$LINENO: result: no, will not enable --ccache-skip" >&5 -$as_echo "no, will not enable --ccache-skip" >&6; } + echo "$as_me:$LINENO: result: no, will not enable --ccache-skip" >&5 +echo "${ECHO_T}no, will not enable --ccache-skip" >&6 fi CXXFLAGS=$save_CXXFLAGS ac_ext=c @@ -11462,22 +10046,22 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&5 -$as_echo "$as_me: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&6;} + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&5 +echo "$as_me: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&6;} fi fi else - { { $as_echo "$as_me:$LINENO: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&5 -$as_echo "$as_me: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&2;} + { { echo "$as_me:$LINENO: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&5 +echo "$as_me: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&2;} { (exit 1); exit 1; }; } fi if test "$USE_SYSTEM_STL" = "YES"; then - { $as_echo "$as_me:$LINENO: checking if hash_map will be in __gnu_cxx namespace" >&5 -$as_echo_n "checking if hash_map will be in __gnu_cxx namespace... " >&6; } - ac_ext=cpp + echo "$as_me:$LINENO: checking if hash_map will be in __gnu_cxx namespace" >&5 +echo $ECHO_N "checking if hash_map will be in __gnu_cxx namespace... $ECHO_C" >&6 + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -11502,45 +10086,48 @@ hash_map<int, int> t; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_cxx_have_ext_hash_map=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_cxx_have_ext_hash_map=no +ac_cv_cxx_have_ext_hash_map=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then - { { $as_echo "$as_me:$LINENO: error: Can't find hash_map. Try with --with-stlport" >&5 -$as_echo "$as_me: error: Can't find hash_map. Try with --with-stlport" >&2;} + { { echo "$as_me:$LINENO: error: Can't find hash_map. Try with --with-stlport" >&5 +echo "$as_me: error: Can't find hash_map. Try with --with-stlport" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_map" >&5 -$as_echo "$ac_cv_cxx_have_ext_hash_map" >&6; } + echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_map" >&5 +echo "${ECHO_T}$ac_cv_cxx_have_ext_hash_map" >&6 fi if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - { $as_echo "$as_me:$LINENO: checking if STL headers are visibility safe" >&5 -$as_echo_n "checking if STL headers are visibility safe... " >&6; } + echo "$as_me:$LINENO: checking if STL headers are visibility safe" >&5 +echo $ECHO_N "checking if STL headers are visibility safe... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -11559,11 +10146,11 @@ else fi rm -f conftest* - { $as_echo "$as_me:$LINENO: result: $stlvisok" >&5 -$as_echo "$stlvisok" >&6; } + echo "$as_me:$LINENO: result: $stlvisok" >&5 +echo "${ECHO_T}$stlvisok" >&6 if test "$stlvisok" = "no"; then - { $as_echo "$as_me:$LINENO: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&5 -$as_echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&2;} + { echo "$as_me:$LINENO: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&5 +echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&2;} echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -11573,8 +10160,8 @@ $as_echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabli sharedlink_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" - { $as_echo "$as_me:$LINENO: checking if gcc is -fvisibility-inlines-hidden safe with STL headers" >&5 -$as_echo_n "checking if gcc is -fvisibility-inlines-hidden safe with STL headers... " >&6; } + echo "$as_me:$LINENO: checking if gcc is -fvisibility-inlines-hidden safe with STL headers" >&5 +echo $ECHO_N "checking if gcc is -fvisibility-inlines-hidden safe with STL headers... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11593,43 +10180,42 @@ istringstream strm( "test" ); return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then $EGREP -q unresolvable conftest.err; if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gccvisok=no +gccvisok=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $gccvisok" >&5 -$as_echo "$gccvisok" >&6; } + echo "$as_me:$LINENO: result: $gccvisok" >&5 +echo "${ECHO_T}$gccvisok" >&6 if test "$gccvisok" = "no"; then - { $as_echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&5 -$as_echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&2;} + { echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&5 +echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&2;} echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -11638,8 +10224,8 @@ $as_echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Dis fi if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - { $as_echo "$as_me:$LINENO: checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)" >&5 -$as_echo_n "checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)... " >&6; } + echo "$as_me:$LINENO: checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)" >&5 +echo $ECHO_N "checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)... $ECHO_C" >&6 cat >visibility.cxx <<_ACEOF #pragma GCC visibility push(hidden) struct __attribute__ ((visibility ("default"))) TestStruct { @@ -11667,11 +10253,11 @@ _ACEOF fi rm -f visibility.s - { $as_echo "$as_me:$LINENO: result: $gccvisbroken" >&5 -$as_echo "$gccvisbroken" >&6; } + echo "$as_me:$LINENO: result: $gccvisbroken" >&5 +echo "${ECHO_T}$gccvisbroken" >&6 if test "$gccvisbroken" = "yes"; then - { $as_echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&5 -$as_echo "$as_me: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&2;} + { echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&5 +echo "$as_me: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&2;} echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE fi @@ -11687,11 +10273,11 @@ fi -{ $as_echo "$as_me:$LINENO: checking which memory allocator to use" >&5 -$as_echo_n "checking which memory allocator to use... " >&6; } +echo "$as_me:$LINENO: checking which memory allocator to use" >&5 +echo $ECHO_N "checking which memory allocator to use... $ECHO_C" >&6 if test "$with_alloc" = "system"; then - { $as_echo "$as_me:$LINENO: result: system" >&5 -$as_echo "system" >&6; } + echo "$as_me:$LINENO: result: system" >&5 +echo "${ECHO_T}system" >&6 ALLOC="SYS_ALLOC"; @@ -11699,11 +10285,11 @@ $as_echo "system" >&6; } for ac_func in malloc realloc calloc free do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -11728,70 +10314,71 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -11799,18 +10386,18 @@ done fi if test "$with_alloc" = "tcmalloc"; then - { $as_echo "$as_me:$LINENO: result: tcmalloc" >&5 -$as_echo "tcmalloc" >&6; } + echo "$as_me:$LINENO: result: tcmalloc" >&5 +echo "${ECHO_T}tcmalloc" >&6 if ! echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then - { { $as_echo "$as_me:$LINENO: error: tcmalloc only available/usable on ix86" >&5 -$as_echo "$as_me: error: tcmalloc only available/usable on ix86" >&2;} + { { echo "$as_me:$LINENO: error: tcmalloc only available/usable on ix86" >&5 +echo "$as_me: error: tcmalloc only available/usable on ix86" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for malloc in -ltcmalloc" >&5 -$as_echo_n "checking for malloc in -ltcmalloc... " >&6; } +echo "$as_me:$LINENO: checking for malloc in -ltcmalloc" >&5 +echo $ECHO_N "checking for malloc in -ltcmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_tcmalloc_malloc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltcmalloc $LIBS" @@ -11821,58 +10408,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char malloc (); int main () { -return malloc (); +malloc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_tcmalloc_malloc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_tcmalloc_malloc=no +ac_cv_lib_tcmalloc_malloc=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_tcmalloc_malloc" >&5 -$as_echo "$ac_cv_lib_tcmalloc_malloc" >&6; } -if test "x$ac_cv_lib_tcmalloc_malloc" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_tcmalloc_malloc" >&5 +echo "${ECHO_T}$ac_cv_lib_tcmalloc_malloc" >&6 +if test $ac_cv_lib_tcmalloc_malloc = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTCMALLOC 1 _ACEOF @@ -11880,8 +10466,8 @@ _ACEOF LIBS="-ltcmalloc $LIBS" else - { { $as_echo "$as_me:$LINENO: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&5 -$as_echo "$as_me: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&2;} + { { echo "$as_me:$LINENO: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&5 +echo "$as_me: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&2;} { (exit 1); exit 1; }; } fi @@ -11889,15 +10475,15 @@ fi fi if test "$with_alloc" = "jemalloc"; then if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then - { $as_echo "$as_me:$LINENO: result: jemalloc" >&5 -$as_echo "jemalloc" >&6; } + echo "$as_me:$LINENO: result: jemalloc" >&5 +echo "${ECHO_T}jemalloc" >&6 save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pthread" -{ $as_echo "$as_me:$LINENO: checking for malloc in -ljemalloc" >&5 -$as_echo_n "checking for malloc in -ljemalloc... " >&6; } +echo "$as_me:$LINENO: checking for malloc in -ljemalloc" >&5 +echo $ECHO_N "checking for malloc in -ljemalloc... $ECHO_C" >&6 if test "${ac_cv_lib_jemalloc_malloc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljemalloc $LIBS" @@ -11908,58 +10494,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char malloc (); int main () { -return malloc (); +malloc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_jemalloc_malloc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_jemalloc_malloc=no +ac_cv_lib_jemalloc_malloc=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jemalloc_malloc" >&5 -$as_echo "$ac_cv_lib_jemalloc_malloc" >&6; } -if test "x$ac_cv_lib_jemalloc_malloc" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_jemalloc_malloc" >&5 +echo "${ECHO_T}$ac_cv_lib_jemalloc_malloc" >&6 +if test $ac_cv_lib_jemalloc_malloc = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBJEMALLOC 1 _ACEOF @@ -11967,16 +10552,16 @@ _ACEOF LIBS="-ljemalloc $LIBS" else - { { $as_echo "$as_me:$LINENO: error: jemalloc not found or functional. Install the jemalloc allocator." >&5 -$as_echo "$as_me: error: jemalloc not found or functional. Install the jemalloc allocator." >&2;} + { { echo "$as_me:$LINENO: error: jemalloc not found or functional. Install the jemalloc allocator." >&5 +echo "$as_me: error: jemalloc not found or functional. Install the jemalloc allocator." >&2;} { (exit 1); exit 1; }; } fi ALLOC="JEMALLOC"; CFLAGS=$save_CFLAGS else - { $as_echo "$as_me:$LINENO: result: system" >&5 -$as_echo "system" >&6; } + echo "$as_me:$LINENO: result: system" >&5 +echo "${ECHO_T}system" >&6 ALLOC="SYS_ALLOC"; @@ -11984,11 +10569,11 @@ $as_echo "system" >&6; } for ac_func in malloc realloc calloc free do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -12013,70 +10598,71 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -12085,38 +10671,38 @@ done fi fi if test "$with_alloc" = "internal" -o -z "$with_alloc"; then - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to add custom build version" >&5 -$as_echo_n "checking whether to add custom build version... " >&6; } +echo "$as_me:$LINENO: checking whether to add custom build version" >&5 +echo $ECHO_N "checking whether to add custom build version... $ECHO_C" >&6 if test "z$with_build_version" != "z"; then BUILD_VER_STRING=$with_build_version - { $as_echo "$as_me:$LINENO: result: yes, $BUILD_VER_STRING" >&5 -$as_echo "yes, $BUILD_VER_STRING" >&6; } + echo "$as_me:$LINENO: result: yes, $BUILD_VER_STRING" >&5 +echo "${ECHO_T}yes, $BUILD_VER_STRING" >&6 else BUILD_VER_STRING= - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to build with Java support" >&5 -$as_echo_n "checking whether to build with Java support... " >&6; } +echo "$as_me:$LINENO: checking whether to build with Java support" >&5 +echo $ECHO_N "checking whether to build with Java support... $ECHO_C" >&6 if test "$WITH_JAVA" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SOLAR_JAVA="TRUE" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SOLAR_JAVA="" - { $as_echo "$as_me:$LINENO: WARNING: building without java will mean some features will not be available" >&5 -$as_echo "$as_me: WARNING: building without java will mean some features will not be available" >&2;} + { echo "$as_me:$LINENO: WARNING: building without java will mean some features will not be available" >&5 +echo "$as_me: WARNING: building without java will mean some features will not be available" >&2;} echo "building without java will mean some features will not be available" >>warn fi @@ -12143,10 +10729,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "$WITH_JAVA", so it can be a program name with args. set dummy $WITH_JAVA; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_JAVAINTERPRETER+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVAINTERPRETER in [\\/]* | ?:[\\/]*) @@ -12159,35 +10745,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVAINTERPRETER="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi JAVAINTERPRETER=$ac_cv_path_JAVAINTERPRETER + if test -n "$JAVAINTERPRETER"; then - { $as_echo "$as_me:$LINENO: result: $JAVAINTERPRETER" >&5 -$as_echo "$JAVAINTERPRETER" >&6; } + echo "$as_me:$LINENO: result: $JAVAINTERPRETER" >&5 +echo "${ECHO_T}$JAVAINTERPRETER" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - else _java_path="$with_jdk_home/bin/$WITH_JAVA" if test -x "$_java_path"; then JAVAINTERPRETER=$_java_path else - { { $as_echo "$as_me:$LINENO: error: $_java_path not found set with_jdk_home" >&5 -$as_echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} + { { echo "$as_me:$LINENO: error: $_java_path not found set with_jdk_home" >&5 +echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} { (exit 1); exit 1; }; } fi fi @@ -12198,27 +10783,27 @@ $as_echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` elif test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking whether to pass -d32 to Java interpreter" >&5 -$as_echo_n "checking whether to pass -d32 to Java interpreter... " >&6; } + echo "$as_me:$LINENO: checking whether to pass -d32 to Java interpreter" >&5 +echo $ECHO_N "checking whether to pass -d32 to Java interpreter... $ECHO_C" >&6 if "$JAVAINTERPRETER" -d32 >&5 2>&5; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 JAVAIFLAGS=-d32 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi fi if test "$SOLAR_JAVA" != ""; then _gij_longver=0 - { $as_echo "$as_me:$LINENO: checking the installed JDK" >&5 -$as_echo_n "checking the installed JDK... " >&6; } + echo "$as_me:$LINENO: checking the installed JDK" >&5 +echo $ECHO_N "checking the installed JDK... $ECHO_C" >&6 if test -n "$JAVAINTERPRETER"; then if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then - { { $as_echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 -$as_echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} + { { echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 +echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} { (exit 1); exit 1; }; } # dnl Kaffe specific tests # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` @@ -12239,14 +10824,14 @@ $as_echo "$as_me: error: No valid check available. Please check the block for yo # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then JDK=gcj - { $as_echo "$as_me:$LINENO: result: checked (gcj)" >&5 -$as_echo "checked (gcj)" >&6; } + echo "$as_me:$LINENO: result: checked (gcj)" >&5 +echo "${ECHO_T}checked (gcj)" >&6 _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then - { { $as_echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 -$as_echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} + { { echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 +echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} { (exit 1); exit 1; }; } # JDK=bea # @@ -12277,18 +10862,18 @@ $as_echo "$as_me: error: No valid check available. Please check the block for yo _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - { { $as_echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.5" >&5 -$as_echo "$as_me: error: IBM JDK is too old, you need at least 1.5" >&2;} + { { echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.5" >&5 +echo "$as_me: error: IBM JDK is too old, you need at least 1.5" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: result: checked (IBM JDK $_jdk)" >&5 -$as_echo "checked (IBM JDK $_jdk)" >&6; } + echo "$as_me:$LINENO: result: checked (IBM JDK $_jdk)" >&5 +echo "${ECHO_T}checked (IBM JDK $_jdk)" >&6 if test "$with_jdk_home" = ""; then - { { $as_echo "$as_me:$LINENO: error: In order to successfully build OpenOffice.org using the IBM JDK, + { { echo "$as_me:$LINENO: error: In order to successfully build OpenOffice.org using the IBM JDK, you must use the \"--with-jdk-home\" configure option explicitly" >&5 -$as_echo "$as_me: error: In order to successfully build OpenOffice.org using the IBM JDK, +echo "$as_me: error: In order to successfully build OpenOffice.org using the IBM JDK, you must use the \"--with-jdk-home\" configure option explicitly" >&2;} { (exit 1); exit 1; }; } fi @@ -12302,12 +10887,12 @@ you must use the \"--with-jdk-home\" configure option explicitly" >&2;} _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - { { $as_echo "$as_me:$LINENO: error: JDK is too old, you need at least 1.5" >&5 -$as_echo "$as_me: error: JDK is too old, you need at least 1.5" >&2;} + { { echo "$as_me:$LINENO: error: JDK is too old, you need at least 1.5" >&5 +echo "$as_me: error: JDK is too old, you need at least 1.5" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: result: checked (JDK $_jdk)" >&5 -$as_echo "checked (JDK $_jdk)" >&6; } + echo "$as_me:$LINENO: result: checked (JDK $_jdk)" >&5 +echo "${ECHO_T}checked (JDK $_jdk)" >&6 JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` if test "$_os" = "WINNT"; then JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[eE][xX][eE]$,,"` @@ -12317,8 +10902,8 @@ $as_echo "checked (JDK $_jdk)" >&6; } fi fi else - { { $as_echo "$as_me:$LINENO: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&5 -$as_echo "$as_me: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&2;} + { { echo "$as_me:$LINENO: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&5 +echo "$as_me: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&2;} { (exit 1); exit 1; }; } fi else @@ -12339,10 +10924,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "$javacompiler", so it can be a program name with args. set dummy $javacompiler; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_JAVACOMPILER+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVACOMPILER in [\\/]* | ?:[\\/]*) @@ -12355,28 +10940,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVACOMPILER="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi JAVACOMPILER=$ac_cv_path_JAVACOMPILER + if test -n "$JAVACOMPILER"; then - { $as_echo "$as_me:$LINENO: result: $JAVACOMPILER" >&5 -$as_echo "$JAVACOMPILER" >&6; } + echo "$as_me:$LINENO: result: $JAVACOMPILER" >&5 +echo "${ECHO_T}$JAVACOMPILER" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - else _javac_path="$with_jdk_home/bin/$javacompiler" if test -x "$_javac_path"; then @@ -12384,8 +10968,8 @@ fi fi fi if test -z "$JAVACOMPILER"; then - { { $as_echo "$as_me:$LINENO: error: $javacompiler not found set with_jdk_home" >&5 -$as_echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} + { { echo "$as_me:$LINENO: error: $javacompiler not found set with_jdk_home" >&5 +echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then @@ -12402,11 +10986,11 @@ $as_echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} fi if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then - { $as_echo "$as_me:$LINENO: checking re-checking JDK" >&5 -$as_echo_n "checking re-checking JDK... " >&6; } + echo "$as_me:$LINENO: checking re-checking JDK" >&5 +echo $ECHO_N "checking re-checking JDK... $ECHO_C" >&6 JDK=gcj - { $as_echo "$as_me:$LINENO: result: checked (ecj)" >&5 -$as_echo "checked (ecj)" >&6; } + echo "$as_me:$LINENO: result: checked (ecj)" >&5 +echo "${ECHO_T}checked (ecj)" >&6 #TODO: what's to do here? some switch to do 1.5 compiling? JAVAFLAGS="-source 1.5 -target 1.5" _gij_longver="40200" @@ -12425,10 +11009,10 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "javadoc", so it can be a program name with args. set dummy javadoc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_JAVADOC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVADOC in [\\/]* | ?:[\\/]*) @@ -12441,28 +11025,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi JAVADOC=$ac_cv_path_JAVADOC + if test -n "$JAVADOC"; then - { $as_echo "$as_me:$LINENO: result: $JAVADOC" >&5 -$as_echo "$JAVADOC" >&6; } + echo "$as_me:$LINENO: result: $JAVADOC" >&5 +echo "${ECHO_T}$JAVADOC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - else _javadoc_path="$with_jdk_home/bin/javadoc" if test "$_os" = "OS2"; then @@ -12475,10 +11058,10 @@ fi else # Extract the first word of "javadoc", so it can be a program name with args. set dummy javadoc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_JAVADOC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVADOC in [\\/]* | ?:[\\/]*) @@ -12491,33 +11074,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi JAVADOC=$ac_cv_path_JAVADOC + if test -n "$JAVADOC"; then - { $as_echo "$as_me:$LINENO: result: $JAVADOC" >&5 -$as_echo "$JAVADOC" >&6; } + echo "$as_me:$LINENO: result: $JAVADOC" >&5 +echo "${ECHO_T}$JAVADOC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi fi if test -z "$JAVADOC"; then - { { $as_echo "$as_me:$LINENO: error: $_javadoc_path not found set with_jdk_home" >&5 -$as_echo "$as_me: error: $_javadoc_path not found set with_jdk_home" >&2;} + { { echo "$as_me:$LINENO: error: $_javadoc_path not found set with_jdk_home" >&5 +echo "$as_me: error: $_javadoc_path not found set with_jdk_home" >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then @@ -12550,36 +11132,36 @@ class findhome } } _ACEOF - { $as_echo "$as_me:$LINENO: checking if javac works" >&5 -$as_echo_n "checking if javac works... " >&6; } + echo "$as_me:$LINENO: checking if javac works" >&5 +echo $ECHO_N "checking if javac works... $ECHO_C" >&6 javac_cmd="$JAVACOMPILER findhome.java 1>&2" { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 (eval $javac_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0 && test -f ./findhome.class ; then - { $as_echo "$as_me:$LINENO: result: javac works" >&5 -$as_echo "javac works" >&6; } + echo "$as_me:$LINENO: result: javac works" >&5 +echo "${ECHO_T}javac works" >&6 else echo "configure: javac test failed" >&5 cat findhome.java >&5 - { { $as_echo "$as_me:$LINENO: error: javac does not work - java projects will not build!" >&5 -$as_echo "$as_me: error: javac does not work - java projects will not build!" >&2;} + { { echo "$as_me:$LINENO: error: javac does not work - java projects will not build!" >&5 +echo "$as_me: error: javac does not work - java projects will not build!" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking if gij knows its java.home" >&5 -$as_echo_n "checking if gij knows its java.home... " >&6; } + echo "$as_me:$LINENO: checking if gij knows its java.home" >&5 +echo $ECHO_N "checking if gij knows its java.home... $ECHO_C" >&6 JAVA_HOME=`$JAVAINTERPRETER findhome` if test $? = 0 && test "$JAVA_HOME" != "" ; then - { $as_echo "$as_me:$LINENO: result: $JAVA_HOME" >&5 -$as_echo "$JAVA_HOME" >&6; } + echo "$as_me:$LINENO: result: $JAVA_HOME" >&5 +echo "${ECHO_T}$JAVA_HOME" >&6 else echo "configure: java test failed" >&5 cat findhome.java >&5 - { { $as_echo "$as_me:$LINENO: error: gij does not know its java.home - use --with-jdk-home" >&5 -$as_echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2;} + { { echo "$as_me:$LINENO: error: gij does not know its java.home - use --with-jdk-home" >&5 +echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2;} { (exit 1); exit 1; }; } fi else @@ -12602,10 +11184,10 @@ $as_echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" JAVA_HOME=$(readlink $JAVACOMPILER) else # else warn - { $as_echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 -$as_echo "$as_me: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5 -$as_echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&2;} + { echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 +echo "$as_me: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&2;} + { echo "$as_me:$LINENO: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5 +echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&2;} echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn fi @@ -12627,12 +11209,12 @@ $as_echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_H JAVA_HOME_OK="NO" fi if test "$JAVA_HOME_OK" = "NO"; then - { $as_echo "$as_me:$LINENO: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5 -$as_echo "$as_me: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5 -$as_echo "$as_me: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5 -$as_echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&2;} + { echo "$as_me:$LINENO: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5 +echo "$as_me: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&2;} + { echo "$as_me:$LINENO: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5 +echo "$as_me: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&2;} + { echo "$as_me:$LINENO: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5 +echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&2;} echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn @@ -12645,8 +11227,8 @@ fi AWTLIB= if test "$SOLAR_JAVA" != ""; then - { $as_echo "$as_me:$LINENO: checking for jawt lib name" >&5 -$as_echo_n "checking for jawt lib name... " >&6; } + echo "$as_me:$LINENO: checking for jawt lib name" >&5 +echo $ECHO_N "checking for jawt lib name... $ECHO_C" >&6 if test "$JDK" = "gcj"; then save_CFLAGS=$CFLAGS save_LDFLAGS=$LDFLAGS @@ -12654,17 +11236,17 @@ $as_echo_n "checking for jawt lib name... " >&6; } LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" exec 6>/dev/null # no output if test "${ac_cv_header_jni_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for jni.h" >&5 -$as_echo_n "checking for jni.h... " >&6; } + echo "$as_me:$LINENO: checking for jni.h" >&5 +echo $ECHO_N "checking for jni.h... $ECHO_C" >&6 if test "${ac_cv_header_jni_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -$as_echo "$ac_cv_header_jni_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 +echo "${ECHO_T}$ac_cv_header_jni_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking jni.h usability" >&5 -$as_echo_n "checking jni.h usability... " >&6; } +echo "$as_me:$LINENO: checking jni.h usability" >&5 +echo $ECHO_N "checking jni.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12675,38 +11257,41 @@ $ac_includes_default #include <jni.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking jni.h presence" >&5 -$as_echo_n "checking jni.h presence... " >&6; } +echo "$as_me:$LINENO: checking jni.h presence" >&5 +echo $ECHO_N "checking jni.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12715,84 +11300,91 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <jni.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for jni.h" >&5 -$as_echo_n "checking for jni.h... " >&6; } +echo "$as_me:$LINENO: checking for jni.h" >&5 +echo $ECHO_N "checking for jni.h... $ECHO_C" >&6 if test "${ac_cv_header_jni_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_jni_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -$as_echo "$ac_cv_header_jni_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 +echo "${ECHO_T}$ac_cv_header_jni_h" >&6 fi -if test "x$ac_cv_header_jni_h" = x""yes; then +if test $ac_cv_header_jni_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&5 -$as_echo "$as_me: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&2;} + { { echo "$as_me:$LINENO: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&5 +echo "$as_me: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lgcjawt" >&5 -$as_echo_n "checking for JAWT_GetAWT in -lgcjawt... " >&6; } + echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lgcjawt" >&5 +echo $ECHO_N "checking for JAWT_GetAWT in -lgcjawt... $ECHO_C" >&6 if test "${ac_cv_lib_gcjawt_JAWT_GetAWT+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgcjawt $LIBS" @@ -12803,58 +11395,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -return JAWT_GetAWT (); +JAWT_GetAWT (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_gcjawt_JAWT_GetAWT=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_gcjawt_JAWT_GetAWT=no +ac_cv_lib_gcjawt_JAWT_GetAWT=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gcjawt_JAWT_GetAWT" >&5 -$as_echo "$ac_cv_lib_gcjawt_JAWT_GetAWT" >&6; } -if test "x$ac_cv_lib_gcjawt_JAWT_GetAWT" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_gcjawt_JAWT_GetAWT" >&5 +echo "${ECHO_T}$ac_cv_lib_gcjawt_JAWT_GetAWT" >&6 +if test $ac_cv_lib_gcjawt_JAWT_GetAWT = yes; then AWTLIB="-lgcjawt -lgcj" fi @@ -12874,17 +11465,17 @@ fi export LD_LIBRARY_PATH exec 6>/dev/null # no output if test "${ac_cv_header_jni_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for jni.h" >&5 -$as_echo_n "checking for jni.h... " >&6; } + echo "$as_me:$LINENO: checking for jni.h" >&5 +echo $ECHO_N "checking for jni.h... $ECHO_C" >&6 if test "${ac_cv_header_jni_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -$as_echo "$ac_cv_header_jni_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 +echo "${ECHO_T}$ac_cv_header_jni_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking jni.h usability" >&5 -$as_echo_n "checking jni.h usability... " >&6; } +echo "$as_me:$LINENO: checking jni.h usability" >&5 +echo $ECHO_N "checking jni.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12895,38 +11486,41 @@ $ac_includes_default #include <jni.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking jni.h presence" >&5 -$as_echo_n "checking jni.h presence... " >&6; } +echo "$as_me:$LINENO: checking jni.h presence" >&5 +echo $ECHO_N "checking jni.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12935,84 +11529,91 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <jni.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for jni.h" >&5 -$as_echo_n "checking for jni.h... " >&6; } +echo "$as_me:$LINENO: checking for jni.h" >&5 +echo $ECHO_N "checking for jni.h... $ECHO_C" >&6 if test "${ac_cv_header_jni_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_jni_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -$as_echo "$ac_cv_header_jni_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 +echo "${ECHO_T}$ac_cv_header_jni_h" >&6 fi -if test "x$ac_cv_header_jni_h" = x""yes; then +if test $ac_cv_header_jni_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: jni.h could not be found." >&5 -$as_echo "$as_me: error: jni.h could not be found." >&2;} + { { echo "$as_me:$LINENO: error: jni.h could not be found." >&5 +echo "$as_me: error: jni.h could not be found." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -ljawt" >&5 -$as_echo_n "checking for JAWT_GetAWT in -ljawt... " >&6; } + echo "$as_me:$LINENO: checking for JAWT_GetAWT in -ljawt" >&5 +echo $ECHO_N "checking for JAWT_GetAWT in -ljawt... $ECHO_C" >&6 if test "${ac_cv_lib_jawt_JAWT_GetAWT+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljawt $LIBS" @@ -13023,67 +11624,66 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -return JAWT_GetAWT (); +JAWT_GetAWT (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_jawt_JAWT_GetAWT=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_jawt_JAWT_GetAWT=no +ac_cv_lib_jawt_JAWT_GetAWT=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jawt_JAWT_GetAWT" >&5 -$as_echo "$ac_cv_lib_jawt_JAWT_GetAWT" >&6; } -if test "x$ac_cv_lib_jawt_JAWT_GetAWT" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_jawt_JAWT_GetAWT" >&5 +echo "${ECHO_T}$ac_cv_lib_jawt_JAWT_GetAWT" >&6 +if test $ac_cv_lib_jawt_JAWT_GetAWT = yes; then AWTLIB="-ljawt" fi if test -z "$AWTLIB"; then LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" - { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lmawt" >&5 -$as_echo_n "checking for JAWT_GetAWT in -lmawt... " >&6; } + echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lmawt" >&5 +echo $ECHO_N "checking for JAWT_GetAWT in -lmawt... $ECHO_C" >&6 if test "${ac_cv_lib_mawt_JAWT_GetAWT+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmawt $LIBS" @@ -13094,58 +11694,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char JAWT_GetAWT (); int main () { -return JAWT_GetAWT (); +JAWT_GetAWT (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_mawt_JAWT_GetAWT=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_mawt_JAWT_GetAWT=no +ac_cv_lib_mawt_JAWT_GetAWT=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mawt_JAWT_GetAWT" >&5 -$as_echo "$ac_cv_lib_mawt_JAWT_GetAWT" >&6; } -if test "x$ac_cv_lib_mawt_JAWT_GetAWT" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_mawt_JAWT_GetAWT" >&5 +echo "${ECHO_T}$ac_cv_lib_mawt_JAWT_GetAWT" >&6 +if test $ac_cv_lib_mawt_JAWT_GetAWT = yes; then AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt" fi @@ -13158,24 +11757,24 @@ fi if test -z "$AWTLIB"; then AWTLIB=-ljawt fi - { $as_echo "$as_me:$LINENO: result: $AWTLIB" >&5 -$as_echo "$AWTLIB" >&6; } + echo "$as_me:$LINENO: result: $AWTLIB" >&5 +echo "${ECHO_T}$AWTLIB" >&6 fi if test "$SOLAR_JAVA" != ""; then - { $as_echo "$as_me:$LINENO: checking whether to enable gcj aot compilation" >&5 -$as_echo_n "checking whether to enable gcj aot compilation... " >&6; } + echo "$as_me:$LINENO: checking whether to enable gcj aot compilation" >&5 +echo $ECHO_N "checking whether to enable gcj aot compilation... $ECHO_C" >&6 if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then gcjaot="gcj" else gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"` fi - { $as_echo "$as_me:$LINENO: result: $gcjaot" >&5 -$as_echo "$gcjaot" >&6; } + echo "$as_me:$LINENO: result: $gcjaot" >&5 +echo "${ECHO_T}$gcjaot" >&6 if test -n "$with_jdk_home"; then _javac_path="$with_jdk_home/bin/$gcjaot" if test -x "$_javac_path"; then @@ -13185,10 +11784,10 @@ $as_echo "$gcjaot" >&6; } if test -z "$JAVAAOTCOMPILER"; then # Extract the first word of "$gcjaot", so it can be a program name with args. set dummy $gcjaot; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_JAVAAOTCOMPILER+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVAAOTCOMPILER in [\\/]* | ?:[\\/]*) @@ -13201,36 +11800,35 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVAAOTCOMPILER="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi JAVAAOTCOMPILER=$ac_cv_path_JAVAAOTCOMPILER + if test -n "$JAVAAOTCOMPILER"; then - { $as_echo "$as_me:$LINENO: result: $JAVAAOTCOMPILER" >&5 -$as_echo "$JAVAAOTCOMPILER" >&6; } + echo "$as_me:$LINENO: result: $JAVAAOTCOMPILER" >&5 +echo "${ECHO_T}$JAVAAOTCOMPILER" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$JAVAAOTCOMPILER"; then - { $as_echo "$as_me:$LINENO: WARNING: $gcjaot not found, set with_jdk_home" >&5 -$as_echo "$as_me: WARNING: $gcjaot not found, set with_jdk_home" >&2;} + { echo "$as_me:$LINENO: WARNING: $gcjaot not found, set with_jdk_home" >&5 +echo "$as_me: WARNING: $gcjaot not found, set with_jdk_home" >&2;} fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -13247,10 +11845,10 @@ fi # Extract the first word of "dmake", so it can be a program name with args. set dummy dmake; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DMAKE+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DMAKE in [\\/]* | ?:[\\/]*) @@ -13263,35 +11861,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DMAKE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_DMAKE" && ac_cv_path_DMAKE="no" ;; esac fi DMAKE=$ac_cv_path_DMAKE + if test -n "$DMAKE"; then - { $as_echo "$as_me:$LINENO: result: $DMAKE" >&5 -$as_echo "$DMAKE" >&6; } + echo "$as_me:$LINENO: result: $DMAKE" >&5 +echo "${ECHO_T}$DMAKE" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "$DMAKE" = "no"; then BUILD_DMAKE=YES echo "dmake will be built on ./bootstrap" else - { $as_echo "$as_me:$LINENO: checking whether the found dmake is the right dmake" >&5 -$as_echo_n "checking whether the found dmake is the right dmake... " >&6; } + echo "$as_me:$LINENO: checking whether the found dmake is the right dmake" >&5 +echo $ECHO_N "checking whether the found dmake is the right dmake... $ECHO_C" >&6 # we need to find out whether that dmake we found is "our" dmake # or the dmake from Sun's SunStudio Compiler which is something # different @@ -13300,48 +11897,48 @@ $as_echo_n "checking whether the found dmake is the right dmake... " >&6; } $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null if test $? -eq 0; then BUILD_DMAKE=NO - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking the dmake version" >&5 -$as_echo_n "checking the dmake version... " >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + echo "$as_me:$LINENO: checking the dmake version" >&5 +echo $ECHO_N "checking the dmake version... $ECHO_C" >&6 DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then - { $as_echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 -$as_echo "OK, >= 4.11" >&6; } + echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 +echo "${ECHO_T}OK, >= 4.11" >&6 elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then - { $as_echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 -$as_echo "OK, >= 4.11" >&6; } + echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 +echo "${ECHO_T}OK, >= 4.11" >&6 else - { $as_echo "$as_me:$LINENO: result: too old. >= 4.11 is needed" >&5 -$as_echo "too old. >= 4.11 is needed" >&6; } + echo "$as_me:$LINENO: result: too old. >= 4.11 is needed" >&5 +echo "${ECHO_T}too old. >= 4.11 is needed" >&6 echo "A newer dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 echo "dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi fi -{ $as_echo "$as_me:$LINENO: checking whether to enable EPM for packing" >&5 -$as_echo_n "checking whether to enable EPM for packing... " >&6; } +echo "$as_me:$LINENO: checking whether to enable EPM for packing" >&5 +echo $ECHO_N "checking whether to enable EPM for packing... $ECHO_C" >&6 if test "$enable_epm" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 if test "$_os" != "WINNT"; then if test -n "$with_epm"; then EPM=$with_epm else # Extract the first word of "epm", so it can be a program name with args. set dummy epm; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_EPM+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $EPM in [\\/]* | ?:[\\/]*) @@ -13354,29 +11951,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_EPM="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_EPM" && ac_cv_path_EPM="no" ;; esac fi EPM=$ac_cv_path_EPM + if test -n "$EPM"; then - { $as_echo "$as_me:$LINENO: result: $EPM" >&5 -$as_echo "$EPM" >&6; } + echo "$as_me:$LINENO: result: $EPM" >&5 +echo "${ECHO_T}$EPM" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$EPM" = "no" || test "$EPM" = "internal"; then echo "EPM will be built." @@ -13384,44 +11980,44 @@ fi BUILD_TYPE="$BUILD_TYPE EPM" else # Gentoo has some epm which is something different... - { $as_echo "$as_me:$LINENO: checking whether the found epm is the right epm" >&5 -$as_echo_n "checking whether the found epm is the right epm... " >&6; } + echo "$as_me:$LINENO: checking whether the found epm is the right epm" >&5 +echo $ECHO_N "checking whether the found epm is the right epm... $ECHO_C" >&6 if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { { $as_echo "$as_me:$LINENO: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&5 -$as_echo "$as_me: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&2;} + { { echo "$as_me:$LINENO: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&5 +echo "$as_me: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking epm version" >&5 -$as_echo_n "checking epm version... " >&6; } + echo "$as_me:$LINENO: checking epm version" >&5 +echo $ECHO_N "checking epm version... $ECHO_C" >&6 EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then - { $as_echo "$as_me:$LINENO: result: OK, >= 3.7" >&5 -$as_echo "OK, >= 3.7" >&6; } + echo "$as_me:$LINENO: result: OK, >= 3.7" >&5 +echo "${ECHO_T}OK, >= 3.7" >&6 BUILD_EPM=NO if test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking which PackageMaker EPM thinks to use" >&5 -$as_echo_n "checking which PackageMaker EPM thinks to use... " >&6; } + echo "$as_me:$LINENO: checking which PackageMaker EPM thinks to use" >&5 +echo $ECHO_N "checking which PackageMaker EPM thinks to use... $ECHO_C" >&6 _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1` if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then - { { $as_echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 -$as_echo "$as_me: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} + { { echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 +echo "$as_me: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} { (exit 1); exit 1; }; } elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then - { $as_echo "$as_me:$LINENO: result: $_pm, ok" >&5 -$as_echo "$_pm, ok" >&6; } + echo "$as_me:$LINENO: result: $_pm, ok" >&5 +echo "${ECHO_T}$_pm, ok" >&6 else # we never should get here, but go safe - { { $as_echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 -$as_echo "$as_me: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} + { { echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 +echo "$as_me: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} { (exit 1); exit 1; }; } fi fi else - { $as_echo "$as_me:$LINENO: result: too old. epm >= 3.7 is required." >&5 -$as_echo "too old. epm >= 3.7 is required." >&6; } + echo "$as_me:$LINENO: result: too old. epm >= 3.7 is required." >&5 +echo "${ECHO_T}too old. epm >= 3.7 is required." >&6 echo "EPM will be built." BUILD_EPM=YES BUILD_TYPE="$BUILD_TYPE EPM" @@ -13430,8 +12026,8 @@ $as_echo "too old. epm >= 3.7 is required." >&6; } fi # test which package format to use - { $as_echo "$as_me:$LINENO: checking which package format to use" >&5 -$as_echo_n "checking which package format to use... " >&6; } + echo "$as_me:$LINENO: checking which package format to use" >&5 +echo $ECHO_N "checking which package format to use... $ECHO_C" >&6 # defaults case "$_os" in @@ -13467,8 +12063,8 @@ $as_echo_n "checking which package format to use... " >&6; } # we never should get here since we check the arciecture/os at the beginning, # but go sure... *) - { { $as_echo "$as_me:$LINENO: error: unknown system" >&5 -$as_echo "$as_me: error: unknown system" >&2;} + { { echo "$as_me:$LINENO: error: unknown system" >&5 +echo "$as_me: error: unknown system" >&2;} { (exit 1); exit 1; }; } esac if test -n "$with_package_format"; then @@ -13477,7 +12073,7 @@ $as_echo "$as_me: error: unknown system" >&2;} aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi) ;; *) - { { $as_echo "$as_me:$LINENO: error: unsupported format $i. Supported by EPM are: + { { echo "$as_me:$LINENO: error: unsupported format $i. Supported by EPM are: aix - AIX software distribution bsd - FreeBSD, NetBSD, or OpenBSD software distribution depot or swinstall - HP-UX software distribution @@ -13495,7 +12091,7 @@ dmg - Mac OS X .dmg installed - installation tree msi - Windows .msi " >&5 -$as_echo "$as_me: error: unsupported format $i. Supported by EPM are: +echo "$as_me: error: unsupported format $i. Supported by EPM are: aix - AIX software distribution bsd - FreeBSD, NetBSD, or OpenBSD software distribution depot or swinstall - HP-UX software distribution @@ -13519,11 +12115,11 @@ msi - Windows .msi done PKGFORMAT="$with_package_format" fi - { $as_echo "$as_me:$LINENO: result: $PKGFORMAT" >&5 -$as_echo "$PKGFORMAT" >&6; } + echo "$as_me:$LINENO: result: $PKGFORMAT" >&5 +echo "${ECHO_T}$PKGFORMAT" >&6 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then - { $as_echo "$as_me:$LINENO: checking for rpm" >&5 -$as_echo_n "checking for rpm... " >&6; } + echo "$as_me:$LINENO: checking for rpm" >&5 +echo $ECHO_N "checking for rpm... $ECHO_C" >&6 for a in "$RPM" rpmbuild rpm; do $a --usage >/dev/null 2> /dev/null if test $? -eq 0; then @@ -13538,26 +12134,26 @@ $as_echo_n "checking for rpm... " >&6; } fi done if test -z "$RPM" ; then - { { $as_echo "$as_me:$LINENO: error: not found" >&5 -$as_echo "$as_me: error: not found" >&2;} + { { echo "$as_me:$LINENO: error: not found" >&5 +echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/dev/null; then RPM_PATH=`which $RPM` - { $as_echo "$as_me:$LINENO: result: $RPM_PATH" >&5 -$as_echo "$RPM_PATH" >&6; } + echo "$as_me:$LINENO: result: $RPM_PATH" >&5 +echo "${ECHO_T}$RPM_PATH" >&6 else - { { $as_echo "$as_me:$LINENO: error: cannot build packages. Try installing rpmbuild." >&5 -$as_echo "$as_me: error: cannot build packages. Try installing rpmbuild." >&2;} + { { echo "$as_me:$LINENO: error: cannot build packages. Try installing rpmbuild." >&5 +echo "$as_me: error: cannot build packages. Try installing rpmbuild." >&2;} { (exit 1); exit 1; }; } fi fi if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then # Extract the first word of "dpkg", so it can be a program name with args. set dummy dpkg; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DPKG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DPKG in [\\/]* | ?:[\\/]*) @@ -13570,50 +12166,49 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DPKG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_DPKG" && ac_cv_path_DPKG="no" ;; esac fi DPKG=$ac_cv_path_DPKG + if test -n "$DPKG"; then - { $as_echo "$as_me:$LINENO: result: $DPKG" >&5 -$as_echo "$DPKG" >&6; } + echo "$as_me:$LINENO: result: $DPKG" >&5 +echo "${ECHO_T}$DPKG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "$DPKG" = "no"; then - { { $as_echo "$as_me:$LINENO: error: dpkg needed for deb creation. Install dpkg." >&5 -$as_echo "$as_me: error: dpkg needed for deb creation. Install dpkg." >&2;} + { { echo "$as_me:$LINENO: error: dpkg needed for deb creation. Install dpkg." >&5 +echo "$as_me: error: dpkg needed for deb creation. Install dpkg." >&2;} { (exit 1); exit 1; }; } fi fi if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then if test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking for PackageMaker availability" >&5 -$as_echo_n "checking for PackageMaker availability... " >&6; } + echo "$as_me:$LINENO: checking for PackageMaker availability" >&5 +echo $ECHO_N "checking for PackageMaker availability... $ECHO_C" >&6 if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then - { { $as_echo "$as_me:$LINENO: error: not installed. Please install Apples Dev Tools" >&5 -$as_echo "$as_me: error: not installed. Please install Apples Dev Tools" >&2;} + { { echo "$as_me:$LINENO: error: not installed. Please install Apples Dev Tools" >&5 +echo "$as_me: error: not installed. Please install Apples Dev Tools" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 fi else - { { $as_echo "$as_me:$LINENO: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&5 -$as_echo "$as_me: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&2;} + { { echo "$as_me:$LINENO: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&5 +echo "$as_me: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&2;} { (exit 1); exit 1; }; } fi fi @@ -13621,30 +12216,30 @@ $as_echo "$as_me: error: PackageMaker needed to build OSX packages and you are n echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then if test "$EPM" != "no" && test "$EPM" != "internal"; then if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then - { $as_echo "$as_me:$LINENO: checking whether epm is patched for OOos needs" >&5 -$as_echo_n "checking whether epm is patched for OOos needs... " >&6; } + echo "$as_me:$LINENO: checking whether epm is patched for OOos needs" >&5 +echo $ECHO_N "checking whether epm is patched for OOos needs... $ECHO_C" >&6 if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 if echo "$PKGFORMAT" | grep -q rpm; then _pt="rpm" - { $as_echo "$as_me:$LINENO: WARNING: the rpms will need to be installed with --nodeps" >&5 -$as_echo "$as_me: WARNING: the rpms will need to be installed with --nodeps" >&2;} + { echo "$as_me:$LINENO: WARNING: the rpms will need to be installed with --nodeps" >&5 +echo "$as_me: WARNING: the rpms will need to be installed with --nodeps" >&2;} echo "the rpms will need to be installed with --nodeps" >> warn else _pt="pkg" fi - { $as_echo "$as_me:$LINENO: WARNING: the ${_pt}s will not be relocateable" >&5 -$as_echo "$as_me: WARNING: the ${_pt}s will not be relocateable" >&2;} + { echo "$as_me:$LINENO: WARNING: the ${_pt}s will not be relocateable" >&5 +echo "$as_me: WARNING: the ${_pt}s will not be relocateable" >&2;} echo "the ${_pt}s will not be relocateable" >> warn - { $as_echo "$as_me:$LINENO: WARNING: if you want to make sure installation without --nodeps and + { echo "$as_me:$LINENO: WARNING: if you want to make sure installation without --nodeps and relocation will work, you need to patch your epm with the patch in epm/epm-3.7.patch or build with --with-epm=internal which will build a suitable epm" >&5 -$as_echo "$as_me: WARNING: if you want to make sure installation without --nodeps and +echo "$as_me: WARNING: if you want to make sure installation without --nodeps and relocation will work, you need to patch your epm with the patch in epm/epm-3.7.patch or build with --with-epm=internal which will build a suitable epm" >&2;} @@ -13655,10 +12250,10 @@ $as_echo "$as_me: WARNING: if you want to make sure installation without --nodep if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then # Extract the first word of "pkgmk", so it can be a program name with args. set dummy pkgmk; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKGMK+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKGMK in [\\/]* | ?:[\\/]*) @@ -13671,32 +12266,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKGMK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKGMK" && ac_cv_path_PKGMK="no" ;; esac fi PKGMK=$ac_cv_path_PKGMK + if test -n "$PKGMK"; then - { $as_echo "$as_me:$LINENO: result: $PKGMK" >&5 -$as_echo "$PKGMK" >&6; } + echo "$as_me:$LINENO: result: $PKGMK" >&5 +echo "${ECHO_T}$PKGMK" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "$PKGMK" = "no"; then - { { $as_echo "$as_me:$LINENO: error: pkgmk needed for Solaris pkg creation. Install it." >&5 -$as_echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;} + { { echo "$as_me:$LINENO: error: pkgmk needed for Solaris pkg creation. Install it." >&5 +echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;} { (exit 1); exit 1; }; } fi fi @@ -13705,8 +12299,8 @@ $as_echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 EPM=NO PKGFORMAT=native fi @@ -13715,10 +12309,10 @@ fi # Extract the first word of "gperf", so it can be a program name with args. set dummy gperf; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GPERF+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GPERF in [\\/]* | ?:[\\/]*) @@ -13731,91 +12325,90 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GPERF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi GPERF=$ac_cv_path_GPERF + if test -n "$GPERF"; then - { $as_echo "$as_me:$LINENO: result: $GPERF" >&5 -$as_echo "$GPERF" >&6; } + echo "$as_me:$LINENO: result: $GPERF" >&5 +echo "${ECHO_T}$GPERF" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$GPERF"; then - { { $as_echo "$as_me:$LINENO: error: gperf not found but needed. Install it." >&5 -$as_echo "$as_me: error: gperf not found but needed. Install it." >&2;} + { { echo "$as_me:$LINENO: error: gperf not found but needed. Install it." >&5 +echo "$as_me: error: gperf not found but needed. Install it." >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking gperf version" >&5 -$as_echo_n "checking gperf version... " >&6; } +echo "$as_me:$LINENO: checking gperf version" >&5 +echo $ECHO_N "checking gperf version... $ECHO_C" >&6 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: too old, you need at least 3.0.0" >&5 -$as_echo "$as_me: error: too old, you need at least 3.0.0" >&2;} + { { echo "$as_me:$LINENO: error: too old, you need at least 3.0.0" >&5 +echo "$as_me: error: too old, you need at least 3.0.0" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build the stax" >&5 -$as_echo_n "checking whether to build the stax... " >&6; } +echo "$as_me:$LINENO: checking whether to build the stax" >&5 +echo $ECHO_N "checking whether to build the stax... $ECHO_C" >&6 if test -f "./stax/download/jsr173_1.0_api.jar"; then BUILD_STAX=NO - { $as_echo "$as_me:$LINENO: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 -$as_echo "no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6; } + echo "$as_me:$LINENO: result: no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&5 +echo "${ECHO_T}no, will use the prebuilt stax/download/jsr173_1.0_api.jar" >&6 else BUILD_STAX=YES - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to build the ODK" >&5 -$as_echo_n "checking whether to build the ODK... " >&6; } +echo "$as_me:$LINENO: checking whether to build the ODK" >&5 +echo $ECHO_N "checking whether to build the ODK... $ECHO_C" >&6 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 if test "$WITH_JAVA" != "no"; then - { $as_echo "$as_me:$LINENO: checking for external/unowinreg/unowinreg.dll" >&5 -$as_echo_n "checking for external/unowinreg/unowinreg.dll... " >&6; } + echo "$as_me:$LINENO: checking for external/unowinreg/unowinreg.dll" >&5 +echo $ECHO_N "checking for external/unowinreg/unowinreg.dll... $ECHO_C" >&6 if ! test -f "./external/unowinreg/unowinreg.dll"; then HAVE_UNOWINREG_DLL=no else HAVE_UNOWINREG_DLL=yes fi if test "$HAVE_UNOWINREG_DLL" = "yes"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 BUILD_UNOWINREG=NO else if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: result: not found, will be built" >&5 -$as_echo "not found, will be built" >&6; } + echo "$as_me:$LINENO: result: not found, will be built" >&5 +echo "${ECHO_T}not found, will be built" >&6 else - { $as_echo "$as_me:$LINENO: WARNING: not found, will be cross-built using mingw32" >&5 -$as_echo "$as_me: WARNING: not found, will be cross-built using mingw32" >&2;} + { echo "$as_me:$LINENO: WARNING: not found, will be cross-built using mingw32" >&5 +echo "$as_me: WARNING: not found, will be cross-built using mingw32" >&2;} fi BUILD_UNOWINREG=YES fi if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then - { { $as_echo "$as_me:$LINENO: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. + { { echo "$as_me:$LINENO: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. Specify mingw32 g++ executable name with --with-mingwin. Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and put it into external/unowinreg" >&5 -$as_echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. +echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. Specify mingw32 g++ executable name with --with-mingwin. Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and put it into external/unowinreg" >&2;} @@ -13827,10 +12420,10 @@ $as_echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ c if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}$WITH_MINGWIN", so it can be a program name with args. set dummy ${ac_tool_prefix}$WITH_MINGWIN; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MINGWCXX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MINGWCXX"; then ac_cv_prog_MINGWCXX="$MINGWCXX" # Let the user override the test. @@ -13841,36 +12434,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MINGWCXX="${ac_tool_prefix}$WITH_MINGWIN" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi MINGWCXX=$ac_cv_prog_MINGWCXX if test -n "$MINGWCXX"; then - { $as_echo "$as_me:$LINENO: result: $MINGWCXX" >&5 -$as_echo "$MINGWCXX" >&6; } + echo "$as_me:$LINENO: result: $MINGWCXX" >&5 +echo "${ECHO_T}$MINGWCXX" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_MINGWCXX"; then ac_ct_MINGWCXX=$MINGWCXX # Extract the first word of "$WITH_MINGWIN", so it can be a program name with args. set dummy $WITH_MINGWIN; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_MINGWCXX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_MINGWCXX"; then ac_cv_prog_ac_ct_MINGWCXX="$ac_ct_MINGWCXX" # Let the user override the test. @@ -13881,56 +12472,46 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MINGWCXX="$WITH_MINGWIN" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_MINGWCXX" && ac_cv_prog_ac_ct_MINGWCXX="false" fi fi ac_ct_MINGWCXX=$ac_cv_prog_ac_ct_MINGWCXX if test -n "$ac_ct_MINGWCXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_MINGWCXX" >&5 -$as_echo "$ac_ct_MINGWCXX" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_MINGWCXX" >&5 +echo "${ECHO_T}$ac_ct_MINGWCXX" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_MINGWCXX" = x; then - MINGWCXX="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MINGWCXX=$ac_ct_MINGWCXX - fi + MINGWCXX=$ac_ct_MINGWCXX else MINGWCXX="$ac_cv_prog_MINGWCXX" fi fi if test "$MINGWCXX" = "false"; then - { { $as_echo "$as_me:$LINENO: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&5 -$as_echo "$as_me: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&2;} + { { echo "$as_me:$LINENO: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&5 +echo "$as_me: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking whether we are using the MinGW32 cross C++ compiler" >&5 -$as_echo_n "checking whether we are using the MinGW32 cross C++ compiler... " >&6; } + echo "$as_me:$LINENO: checking whether we are using the MinGW32 cross C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the MinGW32 cross C++ compiler... $ECHO_C" >&6 if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then - { { $as_echo "$as_me:$LINENO: error: no" >&5 -$as_echo "$as_me: error: no" >&2;} + { { echo "$as_me:$LINENO: error: no" >&5 +echo "$as_me: error: no" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi if echo "$WITH_MINGWIN" | $EGREP -q "/"; then if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/)); fi @@ -13938,10 +12519,10 @@ $as_echo "yes" >&6; } if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`", so it can be a program name with args. set dummy ${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MINGWSTRIP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MINGWSTRIP"; then ac_cv_prog_MINGWSTRIP="$MINGWSTRIP" # Let the user override the test. @@ -13952,36 +12533,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MINGWSTRIP="${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi MINGWSTRIP=$ac_cv_prog_MINGWSTRIP if test -n "$MINGWSTRIP"; then - { $as_echo "$as_me:$LINENO: result: $MINGWSTRIP" >&5 -$as_echo "$MINGWSTRIP" >&6; } + echo "$as_me:$LINENO: result: $MINGWSTRIP" >&5 +echo "${ECHO_T}$MINGWSTRIP" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_MINGWSTRIP"; then ac_ct_MINGWSTRIP=$MINGWSTRIP # Extract the first word of "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`", so it can be a program name with args. set dummy `echo $WITH_MINGWIN | $SED -e s/g++/strip/`; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_MINGWSTRIP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_MINGWSTRIP"; then ac_cv_prog_ac_ct_MINGWSTRIP="$ac_ct_MINGWSTRIP" # Let the user override the test. @@ -13992,48 +12571,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MINGWSTRIP="`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_MINGWSTRIP" && ac_cv_prog_ac_ct_MINGWSTRIP="false" fi fi ac_ct_MINGWSTRIP=$ac_cv_prog_ac_ct_MINGWSTRIP if test -n "$ac_ct_MINGWSTRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_MINGWSTRIP" >&5 -$as_echo "$ac_ct_MINGWSTRIP" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_MINGWSTRIP" >&5 +echo "${ECHO_T}$ac_ct_MINGWSTRIP" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_MINGWSTRIP" = x; then - MINGWSTRIP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MINGWSTRIP=$ac_ct_MINGWSTRIP - fi + MINGWSTRIP=$ac_ct_MINGWSTRIP else MINGWSTRIP="$ac_cv_prog_MINGWSTRIP" fi fi if test "$MINGWSTRIP" = "false"; then - { { $as_echo "$as_me:$LINENO: error: MinGW32 binutils needed. Install them." >&5 -$as_echo "$as_me: error: MinGW32 binutils needed. Install them." >&2;} + { { echo "$as_me:$LINENO: error: MinGW32 binutils needed. Install them." >&5 +echo "$as_me: error: MinGW32 binutils needed. Install them." >&2;} { (exit 1); exit 1; }; } fi - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -14052,10 +12621,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_LIBS=$LIBS LIBS="" -{ $as_echo "$as_me:$LINENO: checking for main in -lkernel32" >&5 -$as_echo_n "checking for main in -lkernel32... " >&6; } +echo "$as_me:$LINENO: checking for main in -lkernel32" >&5 +echo $ECHO_N "checking for main in -lkernel32... $ECHO_C" >&6 if test "${ac_cv_lib_kernel32_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkernel32 $LIBS" @@ -14070,48 +12639,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_kernel32_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_kernel32_main=no +ac_cv_lib_kernel32_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_kernel32_main" >&5 -$as_echo "$ac_cv_lib_kernel32_main" >&6; } -if test "x$ac_cv_lib_kernel32_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_kernel32_main" >&5 +echo "${ECHO_T}$ac_cv_lib_kernel32_main" >&6 +if test $ac_cv_lib_kernel32_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBKERNEL32 1 _ACEOF @@ -14122,10 +12690,10 @@ fi ac_cv_lib_kernel32=ac_cv_lib_kernel32_main -{ $as_echo "$as_me:$LINENO: checking for main in -ladvapi32" >&5 -$as_echo_n "checking for main in -ladvapi32... " >&6; } +echo "$as_me:$LINENO: checking for main in -ladvapi32" >&5 +echo $ECHO_N "checking for main in -ladvapi32... $ECHO_C" >&6 if test "${ac_cv_lib_advapi32_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ladvapi32 $LIBS" @@ -14140,48 +12708,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_advapi32_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_advapi32_main=no +ac_cv_lib_advapi32_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_advapi32_main" >&5 -$as_echo "$ac_cv_lib_advapi32_main" >&6; } -if test "x$ac_cv_lib_advapi32_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_advapi32_main" >&5 +echo "${ECHO_T}$ac_cv_lib_advapi32_main" >&6 +if test $ac_cv_lib_advapi32_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBADVAPI32 1 _ACEOF @@ -14192,17 +12759,17 @@ fi ac_cv_lib_advapi32=ac_cv_lib_advapi32_main if test "${ac_cv_header_windows_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for windows.h" >&5 -$as_echo_n "checking for windows.h... " >&6; } + echo "$as_me:$LINENO: checking for windows.h" >&5 +echo $ECHO_N "checking for windows.h... $ECHO_C" >&6 if test "${ac_cv_header_windows_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 -$as_echo "$ac_cv_header_windows_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 +echo "${ECHO_T}$ac_cv_header_windows_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking windows.h usability" >&5 -$as_echo_n "checking windows.h usability... " >&6; } +echo "$as_me:$LINENO: checking windows.h usability" >&5 +echo $ECHO_N "checking windows.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14213,38 +12780,41 @@ $ac_includes_default #include <windows.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking windows.h presence" >&5 -$as_echo_n "checking windows.h presence... " >&6; } +echo "$as_me:$LINENO: checking windows.h presence" >&5 +echo $ECHO_N "checking windows.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14253,76 +12823,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <windows.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: windows.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: windows.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: windows.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: windows.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: windows.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: windows.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: windows.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: windows.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: windows.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: windows.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: windows.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: windows.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: windows.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: windows.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: windows.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: windows.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: windows.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for windows.h" >&5 -$as_echo_n "checking for windows.h... " >&6; } +echo "$as_me:$LINENO: checking for windows.h" >&5 +echo $ECHO_N "checking for windows.h... $ECHO_C" >&6 if test "${ac_cv_header_windows_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_windows_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 -$as_echo "$ac_cv_header_windows_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 +echo "${ECHO_T}$ac_cv_header_windows_h" >&6 fi -if test "x$ac_cv_header_windows_h" = x""yes; then +if test $ac_cv_header_windows_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: windows.h missing" >&5 -$as_echo "$as_me: error: windows.h missing" >&2;} + { { echo "$as_me:$LINENO: error: windows.h missing" >&5 +echo "$as_me: error: windows.h missing" >&2;} { (exit 1); exit 1; }; } fi @@ -14342,24 +12919,24 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi BUILD_TYPE="$BUILD_TYPE ODK" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 BUILD_UNOWINREG=NO fi -{ $as_echo "$as_me:$LINENO: checking whether to provide libstdc++/libgcc_s in the installset" >&5 -$as_echo_n "checking whether to provide libstdc++/libgcc_s in the installset... " >&6; } +echo "$as_me:$LINENO: checking whether to provide libstdc++/libgcc_s in the installset" >&5 +echo $ECHO_N "checking whether to provide libstdc++/libgcc_s in the installset... $ECHO_C" >&6 if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ test "$with_system_stdlibs" != "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SYSTEM_STDLIBS=YES else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SYSTEM_STDLIBS=NO fi @@ -14367,25 +12944,25 @@ fi if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then with_system_zlib=yes fi -{ $as_echo "$as_me:$LINENO: checking which zlib to use" >&5 -$as_echo_n "checking which zlib to use... " >&6; } +echo "$as_me:$LINENO: checking which zlib to use" >&5 +echo $ECHO_N "checking which zlib to use... $ECHO_C" >&6 if test -n "$with_system_zlib" -o -n "$with_system_libs" && \ test "$with_system_zlib" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_ZLIB=YES if test "${ac_cv_header_zlib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 -$as_echo_n "checking for zlib.h... " >&6; } + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -$as_echo "$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 -$as_echo_n "checking zlib.h usability... " >&6; } +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14396,38 +12973,41 @@ $ac_includes_default #include <zlib.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 -$as_echo_n "checking zlib.h presence... " >&6; } +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14436,84 +13016,91 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <zlib.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 -$as_echo_n "checking for zlib.h... " >&6; } +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -$as_echo "$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi -if test "x$ac_cv_header_zlib_h" = x""yes; then +if test $ac_cv_header_zlib_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: zlib.h not found. install zlib" >&5 -$as_echo "$as_me: error: zlib.h not found. install zlib" >&2;} + { { echo "$as_me:$LINENO: error: zlib.h not found. install zlib" >&5 +echo "$as_me: error: zlib.h not found. install zlib" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for deflate in -lz" >&5 -$as_echo_n "checking for deflate in -lz... " >&6; } + echo "$as_me:$LINENO: checking for deflate in -lz" >&5 +echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6 if test "${ac_cv_lib_z_deflate+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -14524,92 +13111,91 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char deflate (); int main () { -return deflate (); +deflate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_z_deflate=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_z_deflate=no +ac_cv_lib_z_deflate=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 -$as_echo "$ac_cv_lib_z_deflate" >&6; } -if test "x$ac_cv_lib_z_deflate" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 +echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6 +if test $ac_cv_lib_z_deflate = yes; then ZLIB=-lz else - { { $as_echo "$as_me:$LINENO: error: zlib not found or functional" >&5 -$as_echo "$as_me: error: zlib not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: zlib not found or functional" >&5 +echo "$as_me: error: zlib not found or functional" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_ZLIB=NO BUILD_TYPE="$BUILD_TYPE ZLIB" fi -{ $as_echo "$as_me:$LINENO: checking which jpeg to use" >&5 -$as_echo_n "checking which jpeg to use... " >&6; } +echo "$as_me:$LINENO: checking which jpeg to use" >&5 +echo $ECHO_N "checking which jpeg to use... $ECHO_C" >&6 if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ test "$with_system_jpeg" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_JPEG=YES if test "${ac_cv_header_jpeglib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -$as_echo_n "checking for jpeglib.h... " >&6; } + echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 if test "${ac_cv_header_jpeglib_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 -$as_echo "$ac_cv_header_jpeglib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 -$as_echo_n "checking jpeglib.h usability... " >&6; } +echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 +echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14620,38 +13206,41 @@ $ac_includes_default #include <jpeglib.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 -$as_echo_n "checking jpeglib.h presence... " >&6; } +echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 +echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14660,84 +13249,91 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <jpeglib.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -$as_echo_n "checking for jpeglib.h... " >&6; } +echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 if test "${ac_cv_header_jpeglib_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_jpeglib_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 -$as_echo "$ac_cv_header_jpeglib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 fi -if test "x$ac_cv_header_jpeglib_h" = x""yes; then +if test $ac_cv_header_jpeglib_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: jpeg.h not found. install libjpeg" >&5 -$as_echo "$as_me: error: jpeg.h not found. install libjpeg" >&2;} + { { echo "$as_me:$LINENO: error: jpeg.h not found. install libjpeg" >&5 +echo "$as_me: error: jpeg.h not found. install libjpeg" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for jpeg_resync_to_restart in -ljpeg" >&5 -$as_echo_n "checking for jpeg_resync_to_restart in -ljpeg... " >&6; } + echo "$as_me:$LINENO: checking for jpeg_resync_to_restart in -ljpeg" >&5 +echo $ECHO_N "checking for jpeg_resync_to_restart in -ljpeg... $ECHO_C" >&6 if test "${ac_cv_lib_jpeg_jpeg_resync_to_restart+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" @@ -14748,91 +13344,90 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char jpeg_resync_to_restart (); int main () { -return jpeg_resync_to_restart (); +jpeg_resync_to_restart (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_jpeg_jpeg_resync_to_restart=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_jpeg_jpeg_resync_to_restart=no +ac_cv_lib_jpeg_jpeg_resync_to_restart=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_resync_to_restart" >&5 -$as_echo "$ac_cv_lib_jpeg_jpeg_resync_to_restart" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_resync_to_restart" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_resync_to_restart" >&5 +echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_resync_to_restart" >&6 +if test $ac_cv_lib_jpeg_jpeg_resync_to_restart = yes; then JPEG3RDLIB=-ljpeg else - { $as_echo "$as_me:$LINENO: checking jpeg library not found or fuctional" >&5 -$as_echo_n "checking jpeg library not found or fuctional... " >&6; } + echo "$as_me:$LINENO: checking jpeg library not found or fuctional" >&5 +echo $ECHO_N "checking jpeg library not found or fuctional... $ECHO_C" >&6 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_JPEG=NO BUILD_TYPE="$BUILD_TYPE JPEG" fi -{ $as_echo "$as_me:$LINENO: checking which expat to use" >&5 -$as_echo_n "checking which expat to use... " >&6; } +echo "$as_me:$LINENO: checking which expat to use" >&5 +echo $ECHO_N "checking which expat to use... $ECHO_C" >&6 if test -n "$with_system_expat" -o -n "$with_system_libs" && \ test "$with_system_expat" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_EXPAT=YES if test "${ac_cv_header_expat_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for expat.h" >&5 -$as_echo_n "checking for expat.h... " >&6; } + echo "$as_me:$LINENO: checking for expat.h" >&5 +echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 if test "${ac_cv_header_expat_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -$as_echo "$ac_cv_header_expat_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 +echo "${ECHO_T}$ac_cv_header_expat_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking expat.h usability" >&5 -$as_echo_n "checking expat.h usability... " >&6; } +echo "$as_me:$LINENO: checking expat.h usability" >&5 +echo $ECHO_N "checking expat.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14843,38 +13438,41 @@ $ac_includes_default #include <expat.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking expat.h presence" >&5 -$as_echo_n "checking expat.h presence... " >&6; } +echo "$as_me:$LINENO: checking expat.h presence" >&5 +echo $ECHO_N "checking expat.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14883,85 +13481,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <expat.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: expat.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: expat.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: expat.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for expat.h" >&5 -$as_echo_n "checking for expat.h... " >&6; } +echo "$as_me:$LINENO: checking for expat.h" >&5 +echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 if test "${ac_cv_header_expat_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_expat_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -$as_echo "$ac_cv_header_expat_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 +echo "${ECHO_T}$ac_cv_header_expat_h" >&6 fi -if test "x$ac_cv_header_expat_h" = x""yes; then +if test $ac_cv_header_expat_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: expat.h not found. install expat" >&5 -$as_echo "$as_me: error: expat.h not found. install expat" >&2;} + { { echo "$as_me:$LINENO: error: expat.h not found. install expat" >&5 +echo "$as_me: error: expat.h not found. install expat" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5 -$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; } +echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5 +echo $ECHO_N "checking for XML_ParserCreate in -lexpat... $ECHO_C" >&6 if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" @@ -14972,58 +13577,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char XML_ParserCreate (); int main () { -return XML_ParserCreate (); +XML_ParserCreate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_expat_XML_ParserCreate=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_expat_XML_ParserCreate=no +ac_cv_lib_expat_XML_ParserCreate=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 -$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; } -if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 +echo "${ECHO_T}$ac_cv_lib_expat_XML_ParserCreate" >&6 +if test $ac_cv_lib_expat_XML_ParserCreate = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXPAT 1 _ACEOF @@ -15031,24 +13635,24 @@ _ACEOF LIBS="-lexpat $LIBS" else - { $as_echo "$as_me:$LINENO: result: expat library not found or functional." >&5 -$as_echo "expat library not found or functional." >&6; } + echo "$as_me:$LINENO: result: expat library not found or functional." >&5 +echo "${ECHO_T}expat library not found or functional." >&6 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_EXPAT=NO BUILD_TYPE="$BUILD_TYPE EXPAT" fi -{ $as_echo "$as_me:$LINENO: checking which libwpd to use" >&5 -$as_echo_n "checking which libwpd to use... " >&6; } +echo "$as_me:$LINENO: checking which libwpd to use" >&5 +echo $ECHO_N "checking which libwpd to use... $ECHO_C" >&6 if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \ test "$with_system_libwpd" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LIBWPD=YES succeeded=no @@ -15056,10 +13660,10 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -15072,29 +13676,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -15105,25 +13708,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libwpd-0.8 " >&5 -$as_echo_n "checking for libwpd-0.8 ... " >&6; } + echo "$as_me:$LINENO: checking for libwpd-0.8 " >&5 +echo $ECHO_N "checking for libwpd-0.8 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "libwpd-0.8 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking LIBWPD_CFLAGS" >&5 -$as_echo_n "checking LIBWPD_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking LIBWPD_CFLAGS" >&5 +echo $ECHO_N "checking LIBWPD_CFLAGS... $ECHO_C" >&6 LIBWPD_CFLAGS=`$PKG_CONFIG --cflags "libwpd-0.8 "` - { $as_echo "$as_me:$LINENO: result: $LIBWPD_CFLAGS" >&5 -$as_echo "$LIBWPD_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $LIBWPD_CFLAGS" >&5 +echo "${ECHO_T}$LIBWPD_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking LIBWPD_LIBS" >&5 -$as_echo_n "checking LIBWPD_LIBS... " >&6; } + echo "$as_me:$LINENO: checking LIBWPD_LIBS" >&5 +echo $ECHO_N "checking LIBWPD_LIBS... $ECHO_C" >&6 LIBWPD_LIBS=`$PKG_CONFIG --libs "libwpd-0.8 "` - { $as_echo "$as_me:$LINENO: result: $LIBWPD_LIBS" >&5 -$as_echo "$LIBWPD_LIBS" >&6; } + echo "$as_me:$LINENO: result: $LIBWPD_LIBS" >&5 +echo "${ECHO_T}$LIBWPD_LIBS" >&6 else LIBWPD_CFLAGS="" LIBWPD_LIBS="" @@ -15144,14 +13747,14 @@ $as_echo "$LIBWPD_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_LIBWPD=NO BUILD_TYPE="$BUILD_TYPE LIBWPD" fi @@ -15159,12 +13762,12 @@ fi -{ $as_echo "$as_me:$LINENO: checking which cppunit to use" >&5 -$as_echo_n "checking which cppunit to use... " >&6; } +echo "$as_me:$LINENO: checking which cppunit to use" >&5 +echo $ECHO_N "checking which cppunit to use... $ECHO_C" >&6 if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ test "$with_system_cppunit" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_CPPUNIT=YES # might work for earlier, too but go sure: @@ -15173,10 +13776,10 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -15189,29 +13792,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -15222,25 +13824,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for cppunit >= 1.12.0 " >&5 -$as_echo_n "checking for cppunit >= 1.12.0 ... " >&6; } + echo "$as_me:$LINENO: checking for cppunit >= 1.12.0 " >&5 +echo $ECHO_N "checking for cppunit >= 1.12.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "cppunit >= 1.12.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking CPPUNIT_CFLAGS" >&5 -$as_echo_n "checking CPPUNIT_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking CPPUNIT_CFLAGS" >&5 +echo $ECHO_N "checking CPPUNIT_CFLAGS... $ECHO_C" >&6 CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.12.0 "` - { $as_echo "$as_me:$LINENO: result: $CPPUNIT_CFLAGS" >&5 -$as_echo "$CPPUNIT_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $CPPUNIT_CFLAGS" >&5 +echo "${ECHO_T}$CPPUNIT_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking CPPUNIT_LIBS" >&5 -$as_echo_n "checking CPPUNIT_LIBS... " >&6; } + echo "$as_me:$LINENO: checking CPPUNIT_LIBS" >&5 +echo $ECHO_N "checking CPPUNIT_LIBS... $ECHO_C" >&6 CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.12.0 "` - { $as_echo "$as_me:$LINENO: result: $CPPUNIT_LIBS" >&5 -$as_echo "$CPPUNIT_LIBS" >&6; } + echo "$as_me:$LINENO: result: $CPPUNIT_LIBS" >&5 +echo "${ECHO_T}$CPPUNIT_LIBS" >&6 else CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" @@ -15261,14 +13863,14 @@ $as_echo "$CPPUNIT_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (cppunit >= 1.12.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_CPPUNIT=NO BUILD_TYPE="$BUILD_TYPE CPPUNIT" fi @@ -15277,18 +13879,18 @@ fi if test "$test_freetype" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether freetype is available" >&5 -$as_echo_n "checking whether freetype is available... " >&6; } + echo "$as_me:$LINENO: checking whether freetype is available" >&5 +echo $ECHO_N "checking whether freetype is available... $ECHO_C" >&6 succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -15301,29 +13903,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -15334,25 +13935,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for freetype2 >= 2.0 " >&5 -$as_echo_n "checking for freetype2 >= 2.0 ... " >&6; } + echo "$as_me:$LINENO: checking for freetype2 >= 2.0 " >&5 +echo $ECHO_N "checking for freetype2 >= 2.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "freetype2 >= 2.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5 -$as_echo_n "checking FREETYPE_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5 +echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.0 "` - { $as_echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5 -$as_echo "$FREETYPE_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5 +echo "${ECHO_T}$FREETYPE_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5 -$as_echo_n "checking FREETYPE_LIBS... " >&6; } + echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5 +echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.0 "` - { $as_echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5 -$as_echo "$FREETYPE_LIBS" >&6; } + echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5 +echo "${ECHO_T}$FREETYPE_LIBS" >&6 else FREETYPE_CFLAGS="" FREETYPE_LIBS="" @@ -15373,8 +13974,8 @@ $as_echo "$FREETYPE_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi @@ -15388,10 +13989,10 @@ if test "$test_freetype" = "yes"; then save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" LDFLAGS="$LDFLAGS $FREETYPE_LIBS" - { $as_echo "$as_me:$LINENO: checking for FT_GlyphSlot_Embolden in -lfreetype" >&5 -$as_echo_n "checking for FT_GlyphSlot_Embolden in -lfreetype... " >&6; } + echo "$as_me:$LINENO: checking for FT_GlyphSlot_Embolden in -lfreetype" >&5 +echo $ECHO_N "checking for FT_GlyphSlot_Embolden in -lfreetype... $ECHO_C" >&6 if test "${ac_cv_lib_freetype_FT_GlyphSlot_Embolden+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfreetype $LIBS" @@ -15402,58 +14003,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char FT_GlyphSlot_Embolden (); int main () { -return FT_GlyphSlot_Embolden (); +FT_GlyphSlot_Embolden (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_freetype_FT_GlyphSlot_Embolden=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no +ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&5 -$as_echo "$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&6; } -if test "x$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&5 +echo "${ECHO_T}$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&6 +if test $ac_cv_lib_freetype_FT_GlyphSlot_Embolden = yes; then USE_FT_EMBOLDEN="YES" else USE_FT_EMBOLDEN="NO" @@ -15486,26 +14086,26 @@ if test -n "$with_system_libxml" -o -n "$with_system_libs" && \ fi fi -{ $as_echo "$as_me:$LINENO: checking which libxslt to use" >&5 -$as_echo_n "checking which libxslt to use... " >&6; } +echo "$as_me:$LINENO: checking which libxslt to use" >&5 +echo $ECHO_N "checking which libxslt to use... $ECHO_C" >&6 if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ test "$with_system_libxslt" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LIBXSLT=YES if test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 -$as_echo_n "checking LIBXSLT_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 +echo $ECHO_N "checking LIBXSLT_CFLAGS... $ECHO_C" >&6 LIBXSLT_CFLAGS=`xslt-config --cflags` - { $as_echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 -$as_echo "$LIBXSLT_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 -$as_echo_n "checking LIBXSLT_LIBS... " >&6; } + echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 +echo "${ECHO_T}$LIBXSLT_CFLAGS" >&6 + echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 +echo $ECHO_N "checking LIBXSLT_LIBS... $ECHO_C" >&6 LIBXSLT_LIBS=`xslt-config --libs` - { $as_echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 -$as_echo "$LIBXSLT_LIBS" >&6; } + echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 +echo "${ECHO_T}$LIBXSLT_LIBS" >&6 else @@ -15515,10 +14115,10 @@ $as_echo "$LIBXSLT_LIBS" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -15531,29 +14131,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -15564,25 +14163,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libxslt" >&5 -$as_echo_n "checking for libxslt... " >&6; } + echo "$as_me:$LINENO: checking for libxslt" >&5 +echo $ECHO_N "checking for libxslt... $ECHO_C" >&6 if $PKG_CONFIG --exists "libxslt" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 -$as_echo_n "checking LIBXSLT_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 +echo $ECHO_N "checking LIBXSLT_CFLAGS... $ECHO_C" >&6 LIBXSLT_CFLAGS=`$PKG_CONFIG --cflags "libxslt"` - { $as_echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 -$as_echo "$LIBXSLT_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 +echo "${ECHO_T}$LIBXSLT_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 -$as_echo_n "checking LIBXSLT_LIBS... " >&6; } + echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 +echo $ECHO_N "checking LIBXSLT_LIBS... $ECHO_C" >&6 LIBXSLT_LIBS=`$PKG_CONFIG --libs "libxslt"` - { $as_echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 -$as_echo "$LIBXSLT_LIBS" >&6; } + echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 +echo "${ECHO_T}$LIBXSLT_LIBS" >&6 else LIBXSLT_CFLAGS="" LIBXSLT_LIBS="" @@ -15603,8 +14202,8 @@ $as_echo "$LIBXSLT_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi @@ -15613,10 +14212,10 @@ $as_echo "$as_me: error: Library requirements (libxslt) not met; consider adjust # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XSLTPROC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XSLTPROC in [\\/]* | ?:[\\/]*) @@ -15629,37 +14228,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="no" ;; esac fi XSLTPROC=$ac_cv_path_XSLTPROC + if test -n "$XSLTPROC"; then - { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5 -$as_echo "$XSLTPROC" >&6; } + echo "$as_me:$LINENO: result: $XSLTPROC" >&5 +echo "${ECHO_T}$XSLTPROC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "$XSLTPROC" = "no"; then - { { $as_echo "$as_me:$LINENO: error: xsltproc is required" >&5 -$as_echo "$as_me: error: xsltproc is required" >&2;} + { { echo "$as_me:$LINENO: error: xsltproc is required" >&5 +echo "$as_me: error: xsltproc is required" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_LIBXSLT=NO BUILD_TYPE="$BUILD_TYPE LIBXSLT" fi @@ -15668,25 +14266,25 @@ fi -{ $as_echo "$as_me:$LINENO: checking which libxml to use" >&5 -$as_echo_n "checking which libxml to use... " >&6; } +echo "$as_me:$LINENO: checking which libxml to use" >&5 +echo $ECHO_N "checking which libxml to use... $ECHO_C" >&6 if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ test "$with_system_libxml" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LIBXML=YES if test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 -$as_echo_n "checking LIBXML_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 +echo $ECHO_N "checking LIBXML_CFLAGS... $ECHO_C" >&6 LIBXML_CFLAGS=`xml2-config --cflags` - { $as_echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 -$as_echo "$LIBXML_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 -$as_echo_n "checking LIBXML_LIBS... " >&6; } + echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 +echo "${ECHO_T}$LIBXML_CFLAGS" >&6 + echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 +echo $ECHO_N "checking LIBXML_LIBS... $ECHO_C" >&6 LIBXML_LIBS=`xml2-config --libs` - { $as_echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 -$as_echo "$LIBXML_LIBS" >&6; } + echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 +echo "${ECHO_T}$LIBXML_LIBS" >&6 else @@ -15696,10 +14294,10 @@ $as_echo "$LIBXML_LIBS" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -15712,29 +14310,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -15745,25 +14342,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libxml-2.0 >= 2.0" >&5 -$as_echo_n "checking for libxml-2.0 >= 2.0... " >&6; } + echo "$as_me:$LINENO: checking for libxml-2.0 >= 2.0" >&5 +echo $ECHO_N "checking for libxml-2.0 >= 2.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "libxml-2.0 >= 2.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 -$as_echo_n "checking LIBXML_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 +echo $ECHO_N "checking LIBXML_CFLAGS... $ECHO_C" >&6 LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0"` - { $as_echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 -$as_echo "$LIBXML_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 +echo "${ECHO_T}$LIBXML_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 -$as_echo_n "checking LIBXML_LIBS... " >&6; } + echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 +echo $ECHO_N "checking LIBXML_LIBS... $ECHO_C" >&6 LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0"` - { $as_echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 -$as_echo "$LIBXML_LIBS" >&6; } + echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 +echo "${ECHO_T}$LIBXML_LIBS" >&6 else LIBXML_CFLAGS="" LIBXML_LIBS="" @@ -15784,8 +14381,8 @@ $as_echo "$LIBXML_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi @@ -15793,8 +14390,8 @@ $as_echo "$as_me: error: Library requirements (libxml-2.0 >= 2.0) not met; consi BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_LIBXML=NO BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" fi @@ -15802,27 +14399,27 @@ fi -{ $as_echo "$as_me:$LINENO: checking which python to use" >&5 -$as_echo_n "checking which python to use... " >&6; } +echo "$as_me:$LINENO: checking which python to use" >&5 +echo $ECHO_N "checking which python to use... $ECHO_C" >&6 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then with_system_python=yes - { $as_echo "$as_me:$LINENO: result: compiling against MacOSX10.4u.sdk (python version 2.3)" >&5 -$as_echo "compiling against MacOSX10.4u.sdk (python version 2.3)" >&6; } + echo "$as_me:$LINENO: result: compiling against MacOSX10.4u.sdk (python version 2.3)" >&5 +echo "${ECHO_T}compiling against MacOSX10.4u.sdk (python version 2.3)" >&6 PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3" PYTHON_LIBS="-framework Python" elif test -n "$with_system_python" -o -n "$with_system_libs" && \ test "$with_system_python" != "no"; then with_system_python=yes - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.2" >&5 -$as_echo_n "checking whether $PYTHON version >= 2.2... " >&6; } + echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.2" >&5 +echo $ECHO_N "checking whether $PYTHON version >= 2.2... $ECHO_C" >&6 prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. @@ -15835,11 +14432,11 @@ sys.exit(sys.hexversion < minverhex)" ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { { $as_echo "$as_me:$LINENO: error: too old" >&5 -$as_echo "$as_me: error: too old" >&2;} + { { echo "$as_me:$LINENO: error: too old" >&5 +echo "$as_me: error: too old" >&2;} { (exit 1); exit 1; }; } fi @@ -15847,10 +14444,10 @@ fi else # Otherwise, try each interpreter until we find one that satisfies # VERSION. - { $as_echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.2" >&5 -$as_echo_n "checking for a Python interpreter with version >= 2.2... " >&6; } + echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.2" >&5 +echo $ECHO_N "checking for a Python interpreter with version >= 2.2... $ECHO_C" >&6 if test "${am_cv_pathless_PYTHON+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else for am_cv_pathless_PYTHON in python python2 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do @@ -15872,18 +14469,18 @@ fi done fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5 -$as_echo "$am_cv_pathless_PYTHON" >&6; } +echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5 +echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PYTHON+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) @@ -15896,49 +14493,48 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON + if test -n "$PYTHON"; then - { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } + echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then - { { $as_echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 -$as_echo "$as_me: error: no suitable Python interpreter found" >&2;} + { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 +echo "$as_me: error: no suitable Python interpreter found" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 -$as_echo_n "checking for $am_display_PYTHON version... " >&6; } + echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 +echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6 if test "${am_cv_python_version+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 -$as_echo "$am_cv_python_version" >&6; } +echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 +echo "${ECHO_T}$am_cv_python_version" >&6 PYTHON_VERSION=$am_cv_python_version @@ -15949,30 +14545,30 @@ $as_echo "$am_cv_python_version" >&6; } - { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 -$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } + echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 +echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6 if test "${am_cv_python_platform+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 -$as_echo "$am_cv_python_platform" >&6; } +echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 +echo "${ECHO_T}$am_cv_python_platform" >&6 PYTHON_PLATFORM=$am_cv_python_platform - { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 -$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } + echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 +echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6 if test "${am_cv_python_pythondir+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 -$as_echo "$am_cv_python_pythondir" >&6; } +echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 +echo "${ECHO_T}$am_cv_python_pythondir" >&6 pythondir=$am_cv_python_pythondir @@ -15980,16 +14576,16 @@ $as_echo "$am_cv_python_pythondir" >&6; } pkgpythondir=\${pythondir}/$PACKAGE - { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 -$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } + echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 +echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6 if test "${am_cv_python_pyexecdir+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 -$as_echo "$am_cv_python_pyexecdir" >&6; } +echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 +echo "${ECHO_T}$am_cv_python_pyexecdir" >&6 pyexecdir=$am_cv_python_pyexecdir @@ -16012,17 +14608,17 @@ if test "$with_system_python" = "yes" ; then save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" if test "${ac_cv_header_Python_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for Python.h" >&5 -$as_echo_n "checking for Python.h... " >&6; } + echo "$as_me:$LINENO: checking for Python.h" >&5 +echo $ECHO_N "checking for Python.h... $ECHO_C" >&6 if test "${ac_cv_header_Python_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 -$as_echo "$ac_cv_header_Python_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 +echo "${ECHO_T}$ac_cv_header_Python_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking Python.h usability" >&5 -$as_echo_n "checking Python.h usability... " >&6; } +echo "$as_me:$LINENO: checking Python.h usability" >&5 +echo $ECHO_N "checking Python.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16033,38 +14629,41 @@ $ac_includes_default #include <Python.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking Python.h presence" >&5 -$as_echo_n "checking Python.h presence... " >&6; } +echo "$as_me:$LINENO: checking Python.h presence" >&5 +echo $ECHO_N "checking Python.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16073,76 +14672,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <Python.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: Python.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: Python.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: Python.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for Python.h" >&5 -$as_echo_n "checking for Python.h... " >&6; } +echo "$as_me:$LINENO: checking for Python.h" >&5 +echo $ECHO_N "checking for Python.h... $ECHO_C" >&6 if test "${ac_cv_header_Python_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_Python_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 -$as_echo "$ac_cv_header_Python_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 +echo "${ECHO_T}$ac_cv_header_Python_h" >&6 fi -if test "x$ac_cv_header_Python_h" = x""yes; then +if test $ac_cv_header_Python_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Python headers not found" >&5 -$as_echo "$as_me: error: Python headers not found" >&2;} + { { echo "$as_me:$LINENO: error: Python headers not found" >&5 +echo "$as_me: error: Python headers not found" >&2;} { (exit 1); exit 1; }; } fi @@ -16151,8 +14757,8 @@ fi else SYSTEM_PYTHON=NO BUILD_TYPE="$BUILD_TYPE PYTHON" - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 # Embedded python dies without Home set if test "z$HOME" = "z"; then export HOME=""; @@ -16161,10 +14767,10 @@ $as_echo "internal" >&6; } if test -z "$BZIP2"; then # Extract the first word of "bzip2", so it can be a program name with args. set dummy bzip2; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_BZIP2+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $BZIP2 in [\\/]* | ?:[\\/]*) @@ -16177,31 +14783,30 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi BZIP2=$ac_cv_path_BZIP2 + if test -n "$BZIP2"; then - { $as_echo "$as_me:$LINENO: result: $BZIP2" >&5 -$as_echo "$BZIP2" >&6; } + echo "$as_me:$LINENO: result: $BZIP2" >&5 +echo "${ECHO_T}$BZIP2" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$BZIP2"; then - { { $as_echo "$as_me:$LINENO: error: the internal Python module has a .tar.bz2. You need bzip2" >&5 -$as_echo "$as_me: error: the internal Python module has a .tar.bz2. You need bzip2" >&2;} + { { echo "$as_me:$LINENO: error: the internal Python module has a .tar.bz2. You need bzip2" >&5 +echo "$as_me: error: the internal Python module has a .tar.bz2. You need bzip2" >&2;} { (exit 1); exit 1; }; } fi fi @@ -16212,17 +14817,17 @@ fi HOME=`echo $HOME | sed 's:\\\\:/:g'` -{ $as_echo "$as_me:$LINENO: checking which db to use" >&5 -$as_echo_n "checking which db to use... " >&6; } +echo "$as_me:$LINENO: checking which db to use" >&5 +echo $ECHO_N "checking which db to use... $ECHO_C" >&6 if test -n "$with_system_db" -o -n "$with_system_libs" && \ test "$with_system_db" != "no"; then SYSTEM_DB=YES - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - { $as_echo "$as_me:$LINENO: checking for db.h" >&5 -$as_echo_n "checking for db.h... " >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 + echo "$as_me:$LINENO: checking for db.h" >&5 +echo $ECHO_N "checking for db.h... $ECHO_C" >&6 if test "${ac_cv_header_db_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16236,44 +14841,47 @@ cat >>conftest.$ac_ext <<_ACEOF #include <db.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_db_h=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_db_h=no +ac_cv_header_db_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 -$as_echo "$ac_cv_header_db_h" >&6; } -if test "x$ac_cv_header_db_h" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 +echo "${ECHO_T}$ac_cv_header_db_h" >&6 +if test $ac_cv_header_db_h = yes; then DB_INCLUDES=/usr/include else CFLAGS=-I/usr/include/db4 - { $as_echo "$as_me:$LINENO: checking for db4/db.h" >&5 -$as_echo_n "checking for db4/db.h... " >&6; } + echo "$as_me:$LINENO: checking for db4/db.h" >&5 +echo $ECHO_N "checking for db4/db.h... $ECHO_C" >&6 if test "${ac_cv_header_db4_db_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16286,40 +14894,43 @@ cat >>conftest.$ac_ext <<_ACEOF #include <db4/db.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_db4_db_h=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_db4_db_h=no +ac_cv_header_db4_db_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db4_db_h" >&5 -$as_echo "$ac_cv_header_db4_db_h" >&6; } -if test "x$ac_cv_header_db4_db_h" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_header_db4_db_h" >&5 +echo "${ECHO_T}$ac_cv_header_db4_db_h" >&6 +if test $ac_cv_header_db4_db_h = yes; then DB_INCLUDES=/usr/include/db4 else - { { $as_echo "$as_me:$LINENO: error: no. install the db4 libraries" >&5 -$as_echo "$as_me: error: no. install the db4 libraries" >&2;} + { { echo "$as_me:$LINENO: error: no. install the db4 libraries" >&5 +echo "$as_me: error: no. install the db4 libraries" >&2;} { (exit 1); exit 1; }; } fi @@ -16328,16 +14939,14 @@ fi fi - { $as_echo "$as_me:$LINENO: checking whether db is at least 4.1" >&5 -$as_echo_n "checking whether db is at least 4.1... " >&6; } + echo "$as_me:$LINENO: checking whether db is at least 4.1" >&5 +echo $ECHO_N "checking whether db is at least 4.1... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -16355,49 +14964,35 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: no. you need at least db 4.1" >&5 -$as_echo "$as_me: error: no. you need at least db 4.1" >&2;} +{ { echo "$as_me:$LINENO: error: no. you need at least db 4.1" >&5 +echo "$as_me: error: no. you need at least db 4.1" >&2;} { (exit 1); exit 1; }; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - -{ $as_echo "$as_me:$LINENO: checking for main in -ldb" >&5 -$as_echo_n "checking for main in -ldb... " >&6; } +echo "$as_me:$LINENO: checking for main in -ldb" >&5 +echo $ECHO_N "checking for main in -ldb... $ECHO_C" >&6 if test "${ac_cv_lib_db_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldb $LIBS" @@ -16412,48 +15007,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_db_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_db_main=no +ac_cv_lib_db_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_db_main" >&5 -$as_echo "$ac_cv_lib_db_main" >&6; } -if test "x$ac_cv_lib_db_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_db_main" >&5 +echo "${ECHO_T}$ac_cv_lib_db_main" >&6 +if test $ac_cv_lib_db_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDB 1 _ACEOF @@ -16461,16 +15055,16 @@ _ACEOF LIBS="-ldb $LIBS" else - { { $as_echo "$as_me:$LINENO: error: db not installed or functional" >&5 -$as_echo "$as_me: error: db not installed or functional" >&2;} + { { echo "$as_me:$LINENO: error: db not installed or functional" >&5 +echo "$as_me: error: db not installed or functional" >&2;} { (exit 1); exit 1; }; } fi ac_cv_lib_db=ac_cv_lib_db_main SCPDEFS="$SCPDEFS -DSYSTEM_DB" else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_DB=NO BUILD_TYPE="$BUILD_TYPE BERKELEYDB" fi @@ -16479,22 +15073,22 @@ fi -{ $as_echo "$as_me:$LINENO: checking which lucene to use" >&5 -$as_echo_n "checking which lucene to use... " >&6; } +echo "$as_me:$LINENO: checking which lucene to use" >&5 +echo $ECHO_N "checking which lucene to use... $ECHO_C" >&6 if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LUCENE=YES if test -z $LUCENE_CORE_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core-2.3.jar" >&5 -$as_echo_n "checking for /usr/share/java/lucene-core-2.3.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core-2.3.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/lucene-core-2.3.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_lucene_core_2_3_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene-core-2.3.jar"; then ac_cv_file__usr_share_java_lucene_core_2_3_jar=yes @@ -16502,20 +15096,20 @@ else ac_cv_file__usr_share_java_lucene_core_2_3_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_core_2_3_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&6 +if test $ac_cv_file__usr_share_java_lucene_core_2_3_jar = yes; then LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core.jar" >&5 -$as_echo_n "checking for /usr/share/java/lucene-core.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/lucene-core.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_lucene_core_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene-core.jar"; then ac_cv_file__usr_share_java_lucene_core_jar=yes @@ -16523,19 +15117,19 @@ else ac_cv_file__usr_share_java_lucene_core_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_lucene_core_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_core_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_core_jar" >&6 +if test $ac_cv_file__usr_share_java_lucene_core_jar = yes; then LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene.jar" >&5 -$as_echo_n "checking for /usr/share/java/lucene.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/lucene.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/lucene.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_lucene_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene.jar"; then ac_cv_file__usr_share_java_lucene_jar=yes @@ -16543,13 +15137,13 @@ else ac_cv_file__usr_share_java_lucene_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_lucene_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_jar" >&6 +if test $ac_cv_file__usr_share_java_lucene_jar = yes; then LUCENE_CORE_JAR=/usr/share/java/lucene.jar else - { { $as_echo "$as_me:$LINENO: error: lucene-core.jar replacement not found" >&5 -$as_echo "$as_me: error: lucene-core.jar replacement not found" >&2;} + { { echo "$as_me:$LINENO: error: lucene-core.jar replacement not found" >&5 +echo "$as_me: error: lucene-core.jar replacement not found" >&2;} { (exit 1); exit 1; }; } fi @@ -16563,15 +15157,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 -$as_echo_n "checking for $LUCENE_CORE_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 +echo $ECHO_N "checking for $LUCENE_CORE_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LUCENE_CORE_JAR"; then eval "$as_ac_File=yes" @@ -16579,31 +15173,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: lucene-core.jar not found." >&5 -$as_echo "$as_me: error: lucene-core.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: lucene-core.jar not found." >&5 +echo "$as_me: error: lucene-core.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LUCENE_ANALYZERS_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-analyzers-2.3.jar" >&5 -$as_echo_n "checking for /usr/share/java/lucene-analyzers-2.3.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/lucene-analyzers-2.3.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/lucene-analyzers-2.3.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene-analyzers-2.3.jar"; then ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar=yes @@ -16611,20 +15201,20 @@ else ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&6 +if test $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar = yes; then LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar" >&5 -$as_echo_n "checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/lucene-contrib/lucene-analyzers.jar"; then ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar=yes @@ -16632,13 +15222,13 @@ else ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&6 +if test $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar = yes; then LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar else - { { $as_echo "$as_me:$LINENO: error: lucene-analyzers.jar replacement not found." >&5 -$as_echo "$as_me: error: lucene-analyzers.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: lucene-analyzers.jar replacement not found." >&5 +echo "$as_me: error: lucene-analyzers.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -16648,15 +15238,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 -$as_echo_n "checking for $LUCENE_CORE_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 +echo $ECHO_N "checking for $LUCENE_CORE_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LUCENE_CORE_JAR"; then eval "$as_ac_File=yes" @@ -16664,23 +15254,19 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: lucene-analyzers.jar not found." >&5 -$as_echo "$as_me: error: lucene-analyzers.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: lucene-analyzers.jar not found." >&5 +echo "$as_me: error: lucene-analyzers.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi - { $as_echo "$as_me:$LINENO: checking whether lucene is version 2.x" >&5 -$as_echo_n "checking whether lucene is version 2.x... " >&6; } + echo "$as_me:$LINENO: checking whether lucene is version 2.x" >&5 +echo $ECHO_N "checking whether lucene is version 2.x... $ECHO_C" >&6 export LUCENE_CORE_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'LUCENE_CORE_JAR'}"; @@ -16691,17 +15277,17 @@ $as_echo_n "checking whether lucene is version 2.x... " >&6; } } else { exit 1; }'; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { { $as_echo "$as_me:$LINENO: error: no, you need lucene 2" >&5 -$as_echo "$as_me: error: no, you need lucene 2" >&2;} + { { echo "$as_me:$LINENO: error: no, you need lucene 2" >&5 +echo "$as_me: error: no, you need lucene 2" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_LUCENE=NO BUILD_TYPE="$BUILD_TYPE LUCENE" fi @@ -16709,44 +15295,44 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to build the MySQL Connector extension" >&5 -$as_echo_n "checking whether to build the MySQL Connector extension... " >&6; } +echo "$as_me:$LINENO: checking whether to build the MySQL Connector extension" >&5 +echo $ECHO_N "checking whether to build the MySQL Connector extension... $ECHO_C" >&6 if test -n "$enable_mysql_connector" -a "$enable_mysql_connector" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_MYSQLC=YES - { $as_echo "$as_me:$LINENO: checking for mysqlc module" >&5 -$as_echo_n "checking for mysqlc module... " >&6; } + echo "$as_me:$LINENO: checking for mysqlc module" >&5 +echo $ECHO_N "checking for mysqlc module... $ECHO_C" >&6 if test -d mysqlc; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi BUILD_TYPE="$BUILD_TYPE MYSQLC" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_MYSQLC=NO fi if test "$ENABLE_MYSQLC" = "YES"; then -{ $as_echo "$as_me:$LINENO: checking for mysql pre-requisites" >&5 -$as_echo_n "checking for mysql pre-requisites... " >&6; } +echo "$as_me:$LINENO: checking for mysql pre-requisites" >&5 +echo $ECHO_N "checking for mysql pre-requisites... $ECHO_C" >&6 if test -n "$with_system_mysql" -o -n "$with_system_libs" && \ test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then - { $as_echo "$as_me:$LINENO: result: external MySQL" >&5 -$as_echo "external MySQL" >&6; } + echo "$as_me:$LINENO: result: external MySQL" >&5 +echo "${ECHO_T}external MySQL" >&6 SYSTEM_MYSQL=YES # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MYSQLCONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MYSQLCONFIG in [\\/]* | ?:[\\/]*) @@ -16759,72 +15345,71 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MYSQLCONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi MYSQLCONFIG=$ac_cv_path_MYSQLCONFIG + if test -n "$MYSQLCONFIG"; then - { $as_echo "$as_me:$LINENO: result: $MYSQLCONFIG" >&5 -$as_echo "$MYSQLCONFIG" >&6; } + echo "$as_me:$LINENO: result: $MYSQLCONFIG" >&5 +echo "${ECHO_T}$MYSQLCONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - - { $as_echo "$as_me:$LINENO: checking MySQL version" >&5 -$as_echo_n "checking MySQL version... " >&6; } + echo "$as_me:$LINENO: checking MySQL version" >&5 +echo $ECHO_N "checking MySQL version... $ECHO_C" >&6 MYSQL_VERSION=`$MYSQLCONFIG --version` MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1` if test "$MYSQL_MAJOR" -ge "5"; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: too old, use 5.0.x or 5.1.x" >&5 -$as_echo "$as_me: error: too old, use 5.0.x or 5.1.x" >&2;} + { { echo "$as_me:$LINENO: error: too old, use 5.0.x or 5.1.x" >&5 +echo "$as_me: error: too old, use 5.0.x or 5.1.x" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for MySQL Client library" >&5 -$as_echo_n "checking for MySQL Client library... " >&6; } + echo "$as_me:$LINENO: checking for MySQL Client library" >&5 +echo $ECHO_N "checking for MySQL Client library... $ECHO_C" >&6 MYSQL_INC=`$MYSQLCONFIG --include` MYSQL_LIB=`$MYSQLCONFIG --libs` MYSQL_DEFINES=`$MYSQLCONFIG --cflags | sed -e s,$MYSQL_INC,,` - { $as_echo "$as_me:$LINENO: result: includes $MYSQL_INC, libraries $MYSQL_LIB" >&5 -$as_echo "includes $MYSQL_INC, libraries $MYSQL_LIB" >&6; } + echo "$as_me:$LINENO: result: includes $MYSQL_INC, libraries $MYSQL_LIB" >&5 +echo "${ECHO_T}includes $MYSQL_INC, libraries $MYSQL_LIB" >&6 else SYSTEM_MYSQL=NO if test -n "$with_libmysql_path"; then - { $as_echo "$as_me:$LINENO: result: external Connector/C (libmysql)" >&5 -$as_echo "external Connector/C (libmysql)" >&6; } + echo "$as_me:$LINENO: result: external Connector/C (libmysql)" >&5 +echo "${ECHO_T}external Connector/C (libmysql)" >&6 LIBMYSQL=libmysql.so if test "$_os" = "Darwin"; then LIBMYSQL=libmysql.dylib elif test "$_os" = "WINNT"; then LIBMYSQL=libmysql.dll fi - { $as_echo "$as_me:$LINENO: checking for $LIBMYSQL" >&5 -$as_echo_n "checking for $LIBMYSQL... " >&6; } + echo "$as_me:$LINENO: checking for $LIBMYSQL" >&5 +echo $ECHO_N "checking for $LIBMYSQL... $ECHO_C" >&6 if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then - { $as_echo "$as_me:$LINENO: result: found." >&5 -$as_echo "found." >&6; } + echo "$as_me:$LINENO: result: found." >&5 +echo "${ECHO_T}found." >&6 LIBMYSQL_PATH=$with_libmysql_path else - { { $as_echo "$as_me:$LINENO: error: not found. Please specify proper path in --with-libmysql-path." >&5 -$as_echo "$as_me: error: not found. Please specify proper path in --with-libmysql-path." >&2;} + { { echo "$as_me:$LINENO: error: not found. Please specify proper path in --with-libmysql-path." >&5 +echo "$as_me: error: not found. Please specify proper path in --with-libmysql-path." >&2;} { (exit 1); exit 1; }; } fi else - { { $as_echo "$as_me:$LINENO: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&5 -$as_echo "$as_me: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&2;} + { { echo "$as_me:$LINENO: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&5 +echo "$as_me: error: not given. Please specify either --with-system-mysql or --with-libmysql-path" >&2;} { (exit 1); exit 1; }; } fi fi @@ -16834,7 +15419,7 @@ fi -ac_ext=cpp +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -16842,31 +15427,31 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # FIXME! # who thought this too-generic cppconn dir was a good idea? -{ $as_echo "$as_me:$LINENO: checking MySQL Connector/C++" >&5 -$as_echo_n "checking MySQL Connector/C++... " >&6; } +echo "$as_me:$LINENO: checking MySQL Connector/C++" >&5 +echo $ECHO_N "checking MySQL Connector/C++... $ECHO_C" >&6 if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_MYSQL_CPPCONN=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${ac_cv_header_mysql_driver_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 -$as_echo_n "checking for mysql_driver.h... " >&6; } + echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 +echo $ECHO_N "checking for mysql_driver.h... $ECHO_C" >&6 if test "${ac_cv_header_mysql_driver_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mysql_driver_h" >&5 -$as_echo "$ac_cv_header_mysql_driver_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_mysql_driver_h" >&5 +echo "${ECHO_T}$ac_cv_header_mysql_driver_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking mysql_driver.h usability" >&5 -$as_echo_n "checking mysql_driver.h usability... " >&6; } +echo "$as_me:$LINENO: checking mysql_driver.h usability" >&5 +echo $ECHO_N "checking mysql_driver.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16877,38 +15462,41 @@ $ac_includes_default #include <mysql_driver.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking mysql_driver.h presence" >&5 -$as_echo_n "checking mysql_driver.h presence... " >&6; } +echo "$as_me:$LINENO: checking mysql_driver.h presence" >&5 +echo $ECHO_N "checking mysql_driver.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16917,85 +15505,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <mysql_driver.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: mysql_driver.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: mysql_driver.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mysql_driver.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mysql_driver.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mysql_driver.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mysql_driver.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: mysql_driver.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: mysql_driver.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: mysql_driver.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: mysql_driver.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: mysql_driver.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mysql_driver.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: mysql_driver.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: mysql_driver.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mysql_driver.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mysql_driver.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mysql_driver.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mysql_driver.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mysql_driver.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mysql_driver.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mysql_driver.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mysql_driver.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: mysql_driver.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mysql_driver.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: mysql_driver.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 -$as_echo_n "checking for mysql_driver.h... " >&6; } +echo "$as_me:$LINENO: checking for mysql_driver.h" >&5 +echo $ECHO_N "checking for mysql_driver.h... $ECHO_C" >&6 if test "${ac_cv_header_mysql_driver_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mysql_driver_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mysql_driver_h" >&5 -$as_echo "$ac_cv_header_mysql_driver_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_mysql_driver_h" >&5 +echo "${ECHO_T}$ac_cv_header_mysql_driver_h" >&6 fi -if test "x$ac_cv_header_mysql_driver_h" = x""yes; then +if test $ac_cv_header_mysql_driver_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&5 -$as_echo "$as_me: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&2;} + { { echo "$as_me:$LINENO: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&5 +echo "$as_me: error: mysql_driver.h not found. install MySQL C++ Connectivity" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for main in -lmysqlcppconn" >&5 -$as_echo_n "checking for main in -lmysqlcppconn... " >&6; } +echo "$as_me:$LINENO: checking for main in -lmysqlcppconn" >&5 +echo $ECHO_N "checking for main in -lmysqlcppconn... $ECHO_C" >&6 if test "${ac_cv_lib_mysqlcppconn_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmysqlcppconn $LIBS" @@ -17010,48 +15605,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_mysqlcppconn_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_mysqlcppconn_main=no +ac_cv_lib_mysqlcppconn_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlcppconn_main" >&5 -$as_echo "$ac_cv_lib_mysqlcppconn_main" >&6; } -if test "x$ac_cv_lib_mysqlcppconn_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlcppconn_main" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlcppconn_main" >&6 +if test $ac_cv_lib_mysqlcppconn_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYSQLCPPCONN 1 _ACEOF @@ -17059,21 +15653,19 @@ _ACEOF LIBS="-lmysqlcppconn $LIBS" else - { { $as_echo "$as_me:$LINENO: error: MySQL C++ Connectivity lib not found or functional" >&5 -$as_echo "$as_me: error: MySQL C++ Connectivity lib not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: MySQL C++ Connectivity lib not found or functional" >&5 +echo "$as_me: error: MySQL C++ Connectivity lib not found or functional" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking version" >&5 -$as_echo_n "checking version... " >&6; } + echo "$as_me:$LINENO: checking version" >&5 +echo $ECHO_N "checking version... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17097,45 +15689,31 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: not suitable, we need >= 1.0.6" >&5 -$as_echo "$as_me: error: not suitable, we need >= 1.0.6" >&2;} +{ { echo "$as_me:$LINENO: error: not suitable, we need >= 1.0.6" >&5 +echo "$as_me: error: not suitable, we need >= 1.0.6" >&2;} { (exit 1); exit 1; }; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -17143,16 +15721,16 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - { $as_echo "$as_me:$LINENO: checking for mysqlcppconn module" >&5 -$as_echo_n "checking for mysqlcppconn module... " >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 + echo "$as_me:$LINENO: checking for mysqlcppconn module" >&5 +echo $ECHO_N "checking for mysqlcppconn module... $ECHO_C" >&6 if test -d mysqlcppconn; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN" @@ -17167,25 +15745,25 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: checking which hsqldb to use" >&5 -$as_echo_n "checking which hsqldb to use... " >&6; } +echo "$as_me:$LINENO: checking which hsqldb to use" >&5 +echo $ECHO_N "checking which hsqldb to use... $ECHO_C" >&6 if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_HSQLDB=YES if test -z $HSQLDB_JAR; then HSQLDB_JAR=/usr/share/java/hsqldb.jar fi - as_ac_File=`$as_echo "ac_cv_file_$HSQLDB_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $HSQLDB_JAR" >&5 -$as_echo_n "checking for $HSQLDB_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$HSQLDB_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $HSQLDB_JAR" >&5 +echo $ECHO_N "checking for $HSQLDB_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$HSQLDB_JAR"; then eval "$as_ac_File=yes" @@ -17193,22 +15771,18 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: hsqldb.jar not found." >&5 -$as_echo "$as_me: error: hsqldb.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: hsqldb.jar not found." >&5 +echo "$as_me: error: hsqldb.jar not found." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking whether hsqldb is 1.8.0.x" >&5 -$as_echo_n "checking whether hsqldb is 1.8.0.x... " >&6; } + echo "$as_me:$LINENO: checking whether hsqldb is 1.8.0.x" >&5 +echo $ECHO_N "checking whether hsqldb is 1.8.0.x... $ECHO_C" >&6 export HSQLDB_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'HSQLDB_JAR'}"; @@ -17231,41 +15805,41 @@ $as_echo_n "checking whether hsqldb is 1.8.0.x... " >&6; } } else { exit 1; }'; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { { $as_echo "$as_me:$LINENO: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&5 -$as_echo "$as_me: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&2;} + { { echo "$as_me:$LINENO: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&5 +echo "$as_me: error: no, you need hsqldb >= 1.8.0.9 but < 1.8.1" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_HSQLDB=NO BUILD_TYPE="$BUILD_TYPE HSQLDB" fi -{ $as_echo "$as_me:$LINENO: checking which beanshell to use" >&5 -$as_echo_n "checking which beanshell to use... " >&6; } +echo "$as_me:$LINENO: checking which beanshell to use" >&5 +echo $ECHO_N "checking which beanshell to use... $ECHO_C" >&6 if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_BSH=YES if test -z $BSH_JAR; then BSH_JAR=/usr/share/java/bsh.jar fi - as_ac_File=`$as_echo "ac_cv_file_$BSH_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $BSH_JAR" >&5 -$as_echo_n "checking for $BSH_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$BSH_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $BSH_JAR" >&5 +echo $ECHO_N "checking for $BSH_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$BSH_JAR"; then eval "$as_ac_File=yes" @@ -17273,23 +15847,19 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: bsh.jar not found." >&5 -$as_echo "$as_me: error: bsh.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: bsh.jar not found." >&5 +echo "$as_me: error: bsh.jar not found." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_BSH=NO BUILD_TYPE="$BUILD_TYPE BSH" fi @@ -17297,22 +15867,22 @@ fi -{ $as_echo "$as_me:$LINENO: checking which saxon to use" >&5 -$as_echo_n "checking which saxon to use... " >&6; } +echo "$as_me:$LINENO: checking which saxon to use" >&5 +echo $ECHO_N "checking which saxon to use... $ECHO_C" >&6 if test -n "$with_system_saxon" -o -n "$with_system_libs" && \ test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_SAXON=YES if test -z $SAXON_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 -$as_echo_n "checking for /usr/share/java/saxon9.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/saxon9.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/saxon9.jar"; then ac_cv_file__usr_share_java_saxon9_jar=yes @@ -17320,20 +15890,20 @@ else ac_cv_file__usr_share_java_saxon9_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_saxon9_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_saxon9_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon9_jar" >&6 +if test $ac_cv_file__usr_share_java_saxon9_jar = yes; then SAXON_JAR=/usr/share/java/saxon9.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon.jar" >&5 -$as_echo_n "checking for /usr/share/java/saxon.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/saxon.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/saxon.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_saxon_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/saxon.jar"; then ac_cv_file__usr_share_java_saxon_jar=yes @@ -17341,19 +15911,19 @@ else ac_cv_file__usr_share_java_saxon_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_saxon_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_saxon_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon_jar" >&6 +if test $ac_cv_file__usr_share_java_saxon_jar = yes; then SAXON_JAR=/usr/share/java/saxon.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 -$as_echo_n "checking for /usr/share/java/saxon9.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/saxon9.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/saxon9.jar"; then ac_cv_file__usr_share_java_saxon9_jar=yes @@ -17361,13 +15931,13 @@ else ac_cv_file__usr_share_java_saxon9_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_saxon9_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_saxon9_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_saxon9_jar" >&6 +if test $ac_cv_file__usr_share_java_saxon9_jar = yes; then SAXON_JAR=/usr/share/java/saxon9.jar else - { { $as_echo "$as_me:$LINENO: error: saxon.jar replacement not found" >&5 -$as_echo "$as_me: error: saxon.jar replacement not found" >&2;} + { { echo "$as_me:$LINENO: error: saxon.jar replacement not found" >&5 +echo "$as_me: error: saxon.jar replacement not found" >&2;} { (exit 1); exit 1; }; } fi @@ -17381,15 +15951,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$SAXON_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $SAXON_JAR" >&5 -$as_echo_n "checking for $SAXON_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$SAXON_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $SAXON_JAR" >&5 +echo $ECHO_N "checking for $SAXON_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$SAXON_JAR"; then eval "$as_ac_File=yes" @@ -17397,31 +15967,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: saxon.jar replacement not found." >&5 -$as_echo "$as_me: error: saxon.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: saxon.jar replacement not found." >&5 +echo "$as_me: error: saxon.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -n "$SERIALIZER_JAR"; then - as_ac_File=`$as_echo "ac_cv_file_$SERIALIZER_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $SERIALIZER_JAR" >&5 -$as_echo_n "checking for $SERIALIZER_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$SERIALIZER_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $SERIALIZER_JAR" >&5 +echo $ECHO_N "checking for $SERIALIZER_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$SERIALIZER_JAR"; then eval "$as_ac_File=yes" @@ -17429,17 +15995,13 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: serializer.jar not found." >&5 -$as_echo "$as_me: error: serializer.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: serializer.jar not found." >&5 +echo "$as_me: error: serializer.jar not found." >&2;} { (exit 1); exit 1; }; } fi @@ -17447,8 +16009,8 @@ fi fi - { $as_echo "$as_me:$LINENO: checking if saxon works" >&5 -$as_echo_n "checking if saxon works... " >&6; } + echo "$as_me:$LINENO: checking if saxon works" >&5 +echo $ECHO_N "checking if saxon works... $ECHO_C" >&6 cat > saxontest.java <<_ACEOF import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; @@ -17492,37 +16054,37 @@ _ACEOF { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 (eval $javac_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0 && test -f ./saxontest.class ; then java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" { (eval echo "$as_me:$LINENO: \"$java_cmd\"") >&5 (eval $java_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else cat saxontest.java >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&5 -$as_echo "$as_me: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&2;} + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&5 +echo "$as_me: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat saxontest.java >&5 - { { $as_echo "$as_me:$LINENO: error: saxontest could not be compiled, non-functional saxon jar" >&5 -$as_echo "$as_me: error: saxontest could not be compiled, non-functional saxon jar" >&2;} + { { echo "$as_me:$LINENO: error: saxontest could not be compiled, non-functional saxon jar" >&5 +echo "$as_me: error: saxontest could not be compiled, non-functional saxon jar" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_SAXON=NO NEED_SAXON=TRUE fi @@ -17536,20 +16098,20 @@ fi if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then with_system_curl=yes fi -{ $as_echo "$as_me:$LINENO: checking which curl to use" >&5 -$as_echo_n "checking which curl to use... " >&6; } +echo "$as_me:$LINENO: checking which curl to use" >&5 +echo $ECHO_N "checking which curl to use... $ECHO_C" >&6 if test -n "$with_system_curl" -o -n "$with_system_libs" && \ test "$with_system_curl" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_CURL=YES # Extract the first word of "curl-config", so it can be a program name with args. set dummy curl-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CURLCONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CURLCONFIG in [\\/]* | ?:[\\/]*) @@ -17562,52 +16124,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CURLCONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi CURLCONFIG=$ac_cv_path_CURLCONFIG + if test -n "$CURLCONFIG"; then - { $as_echo "$as_me:$LINENO: result: $CURLCONFIG" >&5 -$as_echo "$CURLCONFIG" >&6; } + echo "$as_me:$LINENO: result: $CURLCONFIG" >&5 +echo "${ECHO_T}$CURLCONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CURLCONFIG"; then - { { $as_echo "$as_me:$LINENO: error: install curl to run this script" >&5 -$as_echo "$as_me: error: install curl to run this script" >&2;} + { { echo "$as_me:$LINENO: error: install curl to run this script" >&5 +echo "$as_me: error: install curl to run this script" >&2;} { (exit 1); exit 1; }; } fi # check curl version - { $as_echo "$as_me:$LINENO: checking whether curl is >= 7.13.1" >&5 -$as_echo_n "checking whether curl is >= 7.13.1... " >&6; } + echo "$as_me:$LINENO: checking whether curl is >= 7.13.1" >&5 +echo $ECHO_N "checking whether curl is >= 7.13.1... $ECHO_C" >&6 if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "13" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "1"; then - { { $as_echo "$as_me:$LINENO: error: no, you need at least curl 7.13,1" >&5 -$as_echo "$as_me: error: no, you need at least curl 7.13,1" >&2;} + { { echo "$as_me:$LINENO: error: no, you need at least curl 7.13,1" >&5 +echo "$as_me: error: no, you need at least curl 7.13,1" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi CURL_LIBS=`$CURLCONFIG --libs` CURL_CFLAGS=`$CURLCONFIG --cflags` else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_CURL=NO BUILD_TYPE="$BUILD_TYPE CURL" fi @@ -17615,31 +16176,31 @@ fi -{ $as_echo "$as_me:$LINENO: checking which mdds to use" >&5 -$as_echo_n "checking which mdds to use... " >&6; } +echo "$as_me:$LINENO: checking which mdds to use" >&5 +echo $ECHO_N "checking which mdds to use... $ECHO_C" >&6 if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ test "$with_system_mdds" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_MDDS=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 -$as_echo_n "checking for mdds/flat_segment_tree.hpp... " >&6; } + echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 +echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 -$as_echo "$ac_cv_header_mdds_flat_segment_tree_hpp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp usability" >&5 -$as_echo_n "checking mdds/flat_segment_tree.hpp usability... " >&6; } +echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp usability" >&5 +echo $ECHO_N "checking mdds/flat_segment_tree.hpp usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17650,38 +16211,41 @@ $ac_includes_default #include <mdds/flat_segment_tree.hpp> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp presence" >&5 -$as_echo_n "checking mdds/flat_segment_tree.hpp presence... " >&6; } +echo "$as_me:$LINENO: checking mdds/flat_segment_tree.hpp presence" >&5 +echo $ECHO_N "checking mdds/flat_segment_tree.hpp presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17690,76 +16254,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <mdds/flat_segment_tree.hpp> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: mdds/flat_segment_tree.hpp: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 -$as_echo_n "checking for mdds/flat_segment_tree.hpp... " >&6; } +echo "$as_me:$LINENO: checking for mdds/flat_segment_tree.hpp" >&5 +echo $ECHO_N "checking for mdds/flat_segment_tree.hpp... $ECHO_C" >&6 if test "${ac_cv_header_mdds_flat_segment_tree_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mdds_flat_segment_tree_hpp=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 -$as_echo "$ac_cv_header_mdds_flat_segment_tree_hpp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_mdds_flat_segment_tree_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_mdds_flat_segment_tree_hpp" >&6 fi -if test "x$ac_cv_header_mdds_flat_segment_tree_hpp" = x""yes; then +if test $ac_cv_header_mdds_flat_segment_tree_hpp = yes; then : else - { { $as_echo "$as_me:$LINENO: error: mdds/flat_segment_tree.hpp not found. install mdds" >&5 -$as_echo "$as_me: error: mdds/flat_segment_tree.hpp not found. install mdds" >&2;} + { { echo "$as_me:$LINENO: error: mdds/flat_segment_tree.hpp not found. install mdds" >&5 +echo "$as_me: error: mdds/flat_segment_tree.hpp not found. install mdds" >&2;} { (exit 1); exit 1; }; } fi @@ -17771,38 +16342,38 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 BUILD_TYPE="$BUILD_TYPE MDDS" SYSTEM_MDDS=NO fi -{ $as_echo "$as_me:$LINENO: checking which boost to use" >&5 -$as_echo_n "checking which boost to use... " >&6; } +echo "$as_me:$LINENO: checking which boost to use" >&5 +echo $ECHO_N "checking which boost to use... $ECHO_C" >&6 if test -n "$with_system_boost" -o -n "$with_system_headers" && \ test "$with_system_boost" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_BOOST=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 -$as_echo_n "checking for boost/shared_ptr.hpp... " >&6; } + echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 -$as_echo "$ac_cv_header_boost_shared_ptr_hpp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5 -$as_echo_n "checking boost/shared_ptr.hpp usability... " >&6; } +echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5 +echo $ECHO_N "checking boost/shared_ptr.hpp usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17813,38 +16384,41 @@ $ac_includes_default #include <boost/shared_ptr.hpp> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5 -$as_echo_n "checking boost/shared_ptr.hpp presence... " >&6; } +echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5 +echo $ECHO_N "checking boost/shared_ptr.hpp presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17853,92 +16427,99 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <boost/shared_ptr.hpp> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 -$as_echo_n "checking for boost/shared_ptr.hpp... " >&6; } +echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_boost_shared_ptr_hpp=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 -$as_echo "$ac_cv_header_boost_shared_ptr_hpp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6 fi -if test "x$ac_cv_header_boost_shared_ptr_hpp" = x""yes; then +if test $ac_cv_header_boost_shared_ptr_hpp = yes; then : else - { { $as_echo "$as_me:$LINENO: error: boost/shared_ptr.hpp not found. install boost" >&5 -$as_echo "$as_me: error: boost/shared_ptr.hpp not found. install boost" >&2;} + { { echo "$as_me:$LINENO: error: boost/shared_ptr.hpp not found. install boost" >&5 +echo "$as_me: error: boost/shared_ptr.hpp not found. install boost" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 -$as_echo_n "checking for boost/spirit/include/classic_core.hpp... " >&6; } + echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 +echo $ECHO_N "checking for boost/spirit/include/classic_core.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 -$as_echo "$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp usability" >&5 -$as_echo_n "checking boost/spirit/include/classic_core.hpp usability... " >&6; } +echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp usability" >&5 +echo $ECHO_N "checking boost/spirit/include/classic_core.hpp usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17949,38 +16530,41 @@ $ac_includes_default #include <boost/spirit/include/classic_core.hpp> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp presence" >&5 -$as_echo_n "checking boost/spirit/include/classic_core.hpp presence... " >&6; } +echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp presence" >&5 +echo $ECHO_N "checking boost/spirit/include/classic_core.hpp presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17989,92 +16573,99 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <boost/spirit/include/classic_core.hpp> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 -$as_echo_n "checking for boost/spirit/include/classic_core.hpp... " >&6; } +echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 +echo $ECHO_N "checking for boost/spirit/include/classic_core.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_boost_spirit_include_classic_core_hpp=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 -$as_echo "$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6 fi -if test "x$ac_cv_header_boost_spirit_include_classic_core_hpp" = x""yes; then +if test $ac_cv_header_boost_spirit_include_classic_core_hpp = yes; then : else - { { $as_echo "$as_me:$LINENO: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&5 -$as_echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&2;} + { { echo "$as_me:$LINENO: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&5 +echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.36" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_boost_function_hpp+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 -$as_echo_n "checking for boost/function.hpp... " >&6; } + echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 +echo $ECHO_N "checking for boost/function.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_function_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 -$as_echo "$ac_cv_header_boost_function_hpp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_function_hpp" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking boost/function.hpp usability" >&5 -$as_echo_n "checking boost/function.hpp usability... " >&6; } +echo "$as_me:$LINENO: checking boost/function.hpp usability" >&5 +echo $ECHO_N "checking boost/function.hpp usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18085,38 +16676,41 @@ $ac_includes_default #include <boost/function.hpp> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking boost/function.hpp presence" >&5 -$as_echo_n "checking boost/function.hpp presence... " >&6; } +echo "$as_me:$LINENO: checking boost/function.hpp presence" >&5 +echo $ECHO_N "checking boost/function.hpp presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18125,76 +16719,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <boost/function.hpp> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: boost/function.hpp: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: boost/function.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: boost/function.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/function.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: boost/function.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 -$as_echo_n "checking for boost/function.hpp... " >&6; } +echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 +echo $ECHO_N "checking for boost/function.hpp... $ECHO_C" >&6 if test "${ac_cv_header_boost_function_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_boost_function_hpp=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 -$as_echo "$ac_cv_header_boost_function_hpp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_function_hpp" >&6 fi -if test "x$ac_cv_header_boost_function_hpp" = x""yes; then +if test $ac_cv_header_boost_function_hpp = yes; then : else - { { $as_echo "$as_me:$LINENO: error: boost/function.hpp not found. install boost" >&5 -$as_echo "$as_me: error: boost/function.hpp not found. install boost" >&2;} + { { echo "$as_me:$LINENO: error: boost/function.hpp not found. install boost" >&5 +echo "$as_me: error: boost/function.hpp not found. install boost" >&2;} { (exit 1); exit 1; }; } fi @@ -18202,8 +16803,8 @@ fi save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -fno-exceptions" - { $as_echo "$as_me:$LINENO: checking whether boost/function.hpp compiles with -fno-exceptions" >&5 -$as_echo_n "checking whether boost/function.hpp compiles with -fno-exceptions... " >&6; } + echo "$as_me:$LINENO: checking whether boost/function.hpp compiles with -fno-exceptions" >&5 +echo $ECHO_N "checking whether boost/function.hpp compiles with -fno-exceptions... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18221,40 +16822,43 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_cxx_boost_no_exceptons_broken=no else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_cxx_boost_no_exceptons_broken=yes +ac_cv_cxx_boost_no_exceptons_broken=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then - { { $as_echo "$as_me:$LINENO: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&5 -$as_echo "$as_me: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&2;} + { { echo "$as_me:$LINENO: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&5 +echo "$as_me: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi CXXFLAGS=$save_CXXFLAGS ac_ext=c @@ -18264,38 +16868,38 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 BUILD_TYPE="$BUILD_TYPE BOOST" SYSTEM_BOOST=NO fi -{ $as_echo "$as_me:$LINENO: checking which vigra to use" >&5 -$as_echo_n "checking which vigra to use... " >&6; } +echo "$as_me:$LINENO: checking which vigra to use" >&5 +echo $ECHO_N "checking which vigra to use... $ECHO_C" >&6 if test -n "$with_system_vigra" -o -n "$with_system_headers" && \ test "$with_system_vigra" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_VIGRA=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 -$as_echo_n "checking for vigra/copyimage.hxx... " >&6; } + echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 +echo $ECHO_N "checking for vigra/copyimage.hxx... $ECHO_C" >&6 if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 -$as_echo "$ac_cv_header_vigra_copyimage_hxx" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 +echo "${ECHO_T}$ac_cv_header_vigra_copyimage_hxx" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking vigra/copyimage.hxx usability" >&5 -$as_echo_n "checking vigra/copyimage.hxx usability... " >&6; } +echo "$as_me:$LINENO: checking vigra/copyimage.hxx usability" >&5 +echo $ECHO_N "checking vigra/copyimage.hxx usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18306,38 +16910,41 @@ $ac_includes_default #include <vigra/copyimage.hxx> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking vigra/copyimage.hxx presence" >&5 -$as_echo_n "checking vigra/copyimage.hxx presence... " >&6; } +echo "$as_me:$LINENO: checking vigra/copyimage.hxx presence" >&5 +echo $ECHO_N "checking vigra/copyimage.hxx presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18346,76 +16953,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <vigra/copyimage.hxx> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&5 +echo "$as_me: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 -$as_echo_n "checking for vigra/copyimage.hxx... " >&6; } +echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 +echo $ECHO_N "checking for vigra/copyimage.hxx... $ECHO_C" >&6 if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_vigra_copyimage_hxx=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 -$as_echo "$ac_cv_header_vigra_copyimage_hxx" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 +echo "${ECHO_T}$ac_cv_header_vigra_copyimage_hxx" >&6 fi -if test "x$ac_cv_header_vigra_copyimage_hxx" = x""yes; then +if test $ac_cv_header_vigra_copyimage_hxx = yes; then : else - { { $as_echo "$as_me:$LINENO: error: vigra/copyimage.hxx not found. install vigra" >&5 -$as_echo "$as_me: error: vigra/copyimage.hxx not found. install vigra" >&2;} + { { echo "$as_me:$LINENO: error: vigra/copyimage.hxx not found. install vigra" >&5 +echo "$as_me: error: vigra/copyimage.hxx not found. install vigra" >&2;} { (exit 1); exit 1; }; } fi @@ -18427,33 +17041,33 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 BUILD_TYPE="$BUILD_TYPE VIGRA" SYSTEM_VIGRA=NO fi -{ $as_echo "$as_me:$LINENO: checking which odbc headers to use" >&5 -$as_echo_n "checking which odbc headers to use... " >&6; } +echo "$as_me:$LINENO: checking which odbc headers to use" >&5 +echo $ECHO_N "checking which odbc headers to use... $ECHO_C" >&6 if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \ test "$with_system_odbc_headers" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_ODBC_HEADERS=YES if test "${ac_cv_header_sqlext_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sqlext.h" >&5 -$as_echo_n "checking for sqlext.h... " >&6; } + echo "$as_me:$LINENO: checking for sqlext.h" >&5 +echo $ECHO_N "checking for sqlext.h... $ECHO_C" >&6 if test "${ac_cv_header_sqlext_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 -$as_echo "$ac_cv_header_sqlext_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 +echo "${ECHO_T}$ac_cv_header_sqlext_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sqlext.h usability" >&5 -$as_echo_n "checking sqlext.h usability... " >&6; } +echo "$as_me:$LINENO: checking sqlext.h usability" >&5 +echo $ECHO_N "checking sqlext.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18464,38 +17078,41 @@ $ac_includes_default #include <sqlext.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking sqlext.h presence" >&5 -$as_echo_n "checking sqlext.h presence... " >&6; } +echo "$as_me:$LINENO: checking sqlext.h presence" >&5 +echo $ECHO_N "checking sqlext.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18504,168 +17121,173 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sqlext.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sqlext.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sqlext.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sqlext.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sqlext.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sqlext.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sqlext.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sqlext.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: sqlext.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sqlext.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlext.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sqlext.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlext.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sqlext.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sqlext.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlext.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sqlext.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for sqlext.h" >&5 -$as_echo_n "checking for sqlext.h... " >&6; } +echo "$as_me:$LINENO: checking for sqlext.h" >&5 +echo $ECHO_N "checking for sqlext.h... $ECHO_C" >&6 if test "${ac_cv_header_sqlext_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sqlext_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 -$as_echo "$ac_cv_header_sqlext_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 +echo "${ECHO_T}$ac_cv_header_sqlext_h" >&6 fi -if test "x$ac_cv_header_sqlext_h" = x""yes; then +if test $ac_cv_header_sqlext_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: odbc not found. install odbc" >&5 -$as_echo "$as_me: error: odbc not found. install odbc" >&2;} + { { echo "$as_me:$LINENO: error: odbc not found. install odbc" >&5 +echo "$as_me: error: odbc not found. install odbc" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_ODBC_HEADERS=NO BUILD_TYPE="$BUILD_TYPE UNIXODBC" fi -{ $as_echo "$as_me:$LINENO: checking whether to enable build of Mozilla/Mozilla NSS-using components" >&5 -$as_echo_n "checking whether to enable build of Mozilla/Mozilla NSS-using components... " >&6; } +echo "$as_me:$LINENO: checking whether to enable build of Mozilla/Mozilla NSS-using components" >&5 +echo $ECHO_N "checking whether to enable build of Mozilla/Mozilla NSS-using components... $ECHO_C" >&6 if test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 WITH_MOZILLA=NO ENABLE_NSS_MODULE=NO else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 WITH_MOZILLA=YES fi -{ $as_echo "$as_me:$LINENO: checking whether to build Mozilla addressbook connectivity" >&5 -$as_echo_n "checking whether to build Mozilla addressbook connectivity... " >&6; } +echo "$as_me:$LINENO: checking whether to build Mozilla addressbook connectivity" >&5 +echo $ECHO_N "checking whether to build Mozilla addressbook connectivity... $ECHO_C" >&6 if test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 elif test "$with_system_mozilla" = "yes"; then - { $as_echo "$as_me:$LINENO: result: no, not possible with system-mozilla" >&5 -$as_echo "no, not possible with system-mozilla" >&6; } + echo "$as_me:$LINENO: result: no, not possible with system-mozilla" >&5 +echo "${ECHO_T}no, not possible with system-mozilla" >&6 else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to build XML Security support" >&5 -$as_echo_n "checking whether to build XML Security support... " >&6; } +echo "$as_me:$LINENO: checking whether to build XML Security support" >&5 +echo $ECHO_N "checking whether to build XML Security support... $ECHO_C" >&6 if test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:$LINENO: result: no, since Mozilla (NSS) disabled but needed" >&5 -$as_echo "no, since Mozilla (NSS) disabled but needed" >&6; } + echo "$as_me:$LINENO: result: no, since Mozilla (NSS) disabled but needed" >&5 +echo "${ECHO_T}no, since Mozilla (NSS) disabled but needed" >&6 else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to build LDAP configuration backend" >&5 -$as_echo_n "checking whether to build LDAP configuration backend... " >&6; } +echo "$as_me:$LINENO: checking whether to build LDAP configuration backend" >&5 +echo $ECHO_N "checking whether to build LDAP configuration backend... $ECHO_C" >&6 if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 WITH_LDAP=YES else - { $as_echo "$as_me:$LINENO: result: no. Either Mozilla or OpenLDAP needed" >&5 -$as_echo "no. Either Mozilla or OpenLDAP needed" >&6; } + echo "$as_me:$LINENO: result: no. Either Mozilla or OpenLDAP needed" >&5 +echo "${ECHO_T}no. Either Mozilla or OpenLDAP needed" >&6 WITH_LDAP=NO fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 WITH_LDAP=NO fi if test "$WITH_LDAP" = "YES"; then - { $as_echo "$as_me:$LINENO: checking which LDAP SDK to use" >&5 -$as_echo_n "checking which LDAP SDK to use... " >&6; } + echo "$as_me:$LINENO: checking which LDAP SDK to use" >&5 +echo $ECHO_N "checking which LDAP SDK to use... $ECHO_C" >&6 if test -n "$with_openldap" && test "$with_openldap" != "no"; then - { $as_echo "$as_me:$LINENO: result: OpenLDAP" >&5 -$as_echo "OpenLDAP" >&6; } + echo "$as_me:$LINENO: result: OpenLDAP" >&5 +echo "${ECHO_T}OpenLDAP" >&6 WITH_OPENLDAP=YES for ac_header in ldap.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18676,38 +17298,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18716,93 +17341,96 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: ldap.h not found. install openldap libs" >&5 -$as_echo "$as_me: error: ldap.h not found. install openldap libs" >&2;} + { { echo "$as_me:$LINENO: error: ldap.h not found. install openldap libs" >&5 +echo "$as_me: error: ldap.h not found. install openldap libs" >&2;} { (exit 1); exit 1; }; } fi done -{ $as_echo "$as_me:$LINENO: checking for ldap_simple_bind_s in -lldap" >&5 -$as_echo_n "checking for ldap_simple_bind_s in -lldap... " >&6; } +echo "$as_me:$LINENO: checking for ldap_simple_bind_s in -lldap" >&5 +echo $ECHO_N "checking for ldap_simple_bind_s in -lldap... $ECHO_C" >&6 if test "${ac_cv_lib_ldap_ldap_simple_bind_s+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" @@ -18813,58 +17441,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char ldap_simple_bind_s (); int main () { -return ldap_simple_bind_s (); +ldap_simple_bind_s (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ldap_ldap_simple_bind_s=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ldap_ldap_simple_bind_s=no +ac_cv_lib_ldap_ldap_simple_bind_s=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5 -$as_echo "$ac_cv_lib_ldap_ldap_simple_bind_s" >&6; } -if test "x$ac_cv_lib_ldap_ldap_simple_bind_s" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5 +echo "${ECHO_T}$ac_cv_lib_ldap_ldap_simple_bind_s" >&6 +if test $ac_cv_lib_ldap_ldap_simple_bind_s = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -18872,18 +17499,18 @@ _ACEOF LIBS="-lldap $LIBS" else - { { $as_echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 -$as_echo "$as_me: error: openldap lib not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 +echo "$as_me: error: openldap lib not found or functional" >&2;} { (exit 1); exit 1; }; } fi # rumours say that OpenLDAP doesn't have that function. I looked and # it has it. Test for it to be sure -{ $as_echo "$as_me:$LINENO: checking for ldap_set_option in -lldap" >&5 -$as_echo_n "checking for ldap_set_option in -lldap... " >&6; } +echo "$as_me:$LINENO: checking for ldap_set_option in -lldap" >&5 +echo $ECHO_N "checking for ldap_set_option in -lldap... $ECHO_C" >&6 if test "${ac_cv_lib_ldap_ldap_set_option+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" @@ -18894,58 +17521,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char ldap_set_option (); int main () { -return ldap_set_option (); +ldap_set_option (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ldap_ldap_set_option=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ldap_ldap_set_option=no +ac_cv_lib_ldap_ldap_set_option=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_set_option" >&5 -$as_echo "$ac_cv_lib_ldap_ldap_set_option" >&6; } -if test "x$ac_cv_lib_ldap_ldap_set_option" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_set_option" >&5 +echo "${ECHO_T}$ac_cv_lib_ldap_ldap_set_option" >&6 +if test $ac_cv_lib_ldap_ldap_set_option = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -18953,14 +17579,14 @@ _ACEOF LIBS="-lldap $LIBS" else - { { $as_echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 -$as_echo "$as_me: error: openldap lib not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 +echo "$as_me: error: openldap lib not found or functional" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: Netscape/Mozilla" >&5 -$as_echo "Netscape/Mozilla" >&6; } + echo "$as_me:$LINENO: result: Netscape/Mozilla" >&5 +echo "${ECHO_T}Netscape/Mozilla" >&6 # TODO. Actually do a sanity check and check for # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT WITH_OPENLDAP=NO @@ -18969,16 +17595,16 @@ fi -{ $as_echo "$as_me:$LINENO: checking which mozilla to use" >&5 -$as_echo_n "checking which mozilla to use... " >&6; } +echo "$as_me:$LINENO: checking which mozilla to use" >&5 +echo $ECHO_N "checking which mozilla to use... $ECHO_C" >&6 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_MOZILLA=YES ENABLE_NSS_MODULE=NO enable_nss_module=no - { $as_echo "$as_me:$LINENO: checking which Mozilla flavour to use" >&5 -$as_echo_n "checking which Mozilla flavour to use... " >&6; } + echo "$as_me:$LINENO: checking which Mozilla flavour to use" >&5 +echo $ECHO_N "checking which Mozilla flavour to use... $ECHO_C" >&6 if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then MOZ_FLAVOUR=libxul elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then @@ -18993,8 +17619,8 @@ $as_echo_n "checking which Mozilla flavour to use... " >&6; } MOZ_FLAVOUR=libxul fi tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'` - { $as_echo "$as_me:$LINENO: result: $tmp" >&5 -$as_echo "$tmp" >&6; } + echo "$as_me:$LINENO: result: $tmp" >&5 +echo "${ECHO_T}$tmp" >&6 succeeded=no @@ -19002,10 +17628,10 @@ $as_echo "$tmp" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19018,29 +17644,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -19051,25 +17676,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for nss" >&5 -$as_echo_n "checking for nss... " >&6; } + echo "$as_me:$LINENO: checking for nss" >&5 +echo $ECHO_N "checking for nss... $ECHO_C" >&6 if $PKG_CONFIG --exists "nss" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 -$as_echo_n "checking MOZ_NSS_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 +echo $ECHO_N "checking MOZ_NSS_CFLAGS... $ECHO_C" >&6 MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss"` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 -$as_echo "$MOZ_NSS_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 +echo "${ECHO_T}$MOZ_NSS_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 -$as_echo_n "checking MOZ_NSS_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 +echo $ECHO_N "checking MOZ_NSS_LIBS... $ECHO_C" >&6 MOZ_NSS_LIBS=`$PKG_CONFIG --libs "nss"` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 -$as_echo "$MOZ_NSS_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 +echo "${ECHO_T}$MOZ_NSS_LIBS" >&6 else MOZ_NSS_CFLAGS="" MOZ_NSS_LIBS="" @@ -19100,10 +17725,10 @@ $as_echo "$MOZ_NSS_LIBS" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19116,29 +17741,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -19149,25 +17773,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nss " >&5 -$as_echo_n "checking for $MOZ_FLAVOUR-nss ... " >&6; } + echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nss " >&5 +echo $ECHO_N "checking for $MOZ_FLAVOUR-nss ... $ECHO_C" >&6 if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nss " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 -$as_echo_n "checking MOZ_NSS_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 +echo $ECHO_N "checking MOZ_NSS_CFLAGS... $ECHO_C" >&6 MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nss "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 -$as_echo "$MOZ_NSS_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 +echo "${ECHO_T}$MOZ_NSS_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 -$as_echo_n "checking MOZ_NSS_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 +echo $ECHO_N "checking MOZ_NSS_LIBS... $ECHO_C" >&6 MOZ_NSS_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nss "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 -$as_echo "$MOZ_NSS_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 +echo "${ECHO_T}$MOZ_NSS_LIBS" >&6 else MOZ_NSS_CFLAGS="" MOZ_NSS_LIBS="" @@ -19188,8 +17812,8 @@ $as_echo "$MOZ_NSS_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi @@ -19205,10 +17829,10 @@ $as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consi if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19221,29 +17845,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -19254,25 +17877,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for nspr " >&5 -$as_echo_n "checking for nspr ... " >&6; } + echo "$as_me:$LINENO: checking for nspr " >&5 +echo $ECHO_N "checking for nspr ... $ECHO_C" >&6 if $PKG_CONFIG --exists "nspr " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 -$as_echo_n "checking MOZ_NSPR_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 +echo $ECHO_N "checking MOZ_NSPR_CFLAGS... $ECHO_C" >&6 MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "nspr "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 -$as_echo "$MOZ_NSPR_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 +echo "${ECHO_T}$MOZ_NSPR_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 -$as_echo_n "checking MOZ_NSPR_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 +echo $ECHO_N "checking MOZ_NSPR_LIBS... $ECHO_C" >&6 MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "nspr "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 -$as_echo "$MOZ_NSPR_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 +echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6 else MOZ_NSPR_CFLAGS="" MOZ_NSPR_LIBS="" @@ -19293,8 +17916,8 @@ $as_echo "$MOZ_NSPR_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi @@ -19307,10 +17930,10 @@ $as_echo "$as_me: error: Library requirements (nspr ) not met; consider adjustin if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19323,29 +17946,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -19356,25 +17978,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nspr " >&5 -$as_echo_n "checking for $MOZ_FLAVOUR-nspr ... " >&6; } + echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nspr " >&5 +echo $ECHO_N "checking for $MOZ_FLAVOUR-nspr ... $ECHO_C" >&6 if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nspr " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 -$as_echo_n "checking MOZ_NSPR_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 +echo $ECHO_N "checking MOZ_NSPR_CFLAGS... $ECHO_C" >&6 MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nspr "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 -$as_echo "$MOZ_NSPR_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 +echo "${ECHO_T}$MOZ_NSPR_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 -$as_echo_n "checking MOZ_NSPR_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 +echo $ECHO_N "checking MOZ_NSPR_LIBS... $ECHO_C" >&6 MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nspr "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 -$as_echo "$MOZ_NSPR_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 +echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6 else MOZ_NSPR_CFLAGS="" MOZ_NSPR_LIBS="" @@ -19395,8 +18017,8 @@ $as_echo "$MOZ_NSPR_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi @@ -19409,10 +18031,10 @@ $as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; cons if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19425,29 +18047,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -19458,25 +18079,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-xpcom" >&5 -$as_echo_n "checking for $MOZ_FLAVOUR-xpcom... " >&6; } + echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-xpcom" >&5 +echo $ECHO_N "checking for $MOZ_FLAVOUR-xpcom... $ECHO_C" >&6 if $PKG_CONFIG --exists "$MOZ_FLAVOUR-xpcom" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 -$as_echo_n "checking MOZILLAXPCOM_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 +echo $ECHO_N "checking MOZILLAXPCOM_CFLAGS... $ECHO_C" >&6 MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-xpcom"` - { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 -$as_echo "$MOZILLAXPCOM_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 +echo "${ECHO_T}$MOZILLAXPCOM_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 -$as_echo_n "checking MOZILLAXPCOM_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 +echo $ECHO_N "checking MOZILLAXPCOM_LIBS... $ECHO_C" >&6 MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-xpcom"` - { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 -$as_echo "$MOZILLAXPCOM_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 +echo "${ECHO_T}$MOZILLAXPCOM_LIBS" >&6 else MOZILLAXPCOM_CFLAGS="" MOZILLAXPCOM_LIBS="" @@ -19511,10 +18132,10 @@ $as_echo "$MOZILLAXPCOM_LIBS" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19527,29 +18148,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -19560,25 +18180,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libxul " >&5 -$as_echo_n "checking for libxul ... " >&6; } + echo "$as_me:$LINENO: checking for libxul " >&5 +echo $ECHO_N "checking for libxul ... $ECHO_C" >&6 if $PKG_CONFIG --exists "libxul " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 -$as_echo_n "checking MOZILLAXPCOM_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 +echo $ECHO_N "checking MOZILLAXPCOM_CFLAGS... $ECHO_C" >&6 MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "libxul "` - { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 -$as_echo "$MOZILLAXPCOM_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 +echo "${ECHO_T}$MOZILLAXPCOM_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 -$as_echo_n "checking MOZILLAXPCOM_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 +echo $ECHO_N "checking MOZILLAXPCOM_LIBS... $ECHO_C" >&6 MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "libxul "` - { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 -$as_echo "$MOZILLAXPCOM_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 +echo "${ECHO_T}$MOZILLAXPCOM_LIBS" >&6 else MOZILLAXPCOM_CFLAGS="" MOZILLAXPCOM_LIBS="" @@ -19599,8 +18219,8 @@ $as_echo "$MOZILLAXPCOM_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi @@ -19620,10 +18240,10 @@ $as_echo "$as_me: error: Library requirements (libxul ) not met; consider adjust CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS" LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS" -{ $as_echo "$as_me:$LINENO: checking for PK11_GetCertFromPrivateKey in -lnss3" >&5 -$as_echo_n "checking for PK11_GetCertFromPrivateKey in -lnss3... " >&6; } +echo "$as_me:$LINENO: checking for PK11_GetCertFromPrivateKey in -lnss3" >&5 +echo $ECHO_N "checking for PK11_GetCertFromPrivateKey in -lnss3... $ECHO_C" >&6 if test "${ac_cv_lib_nss3_PK11_GetCertFromPrivateKey+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnss3 $LIBS" @@ -19634,58 +18254,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char PK11_GetCertFromPrivateKey (); int main () { -return PK11_GetCertFromPrivateKey (); +PK11_GetCertFromPrivateKey (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no +ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&5 -$as_echo "$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&6; } -if test "x$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&5 +echo "${ECHO_T}$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&6 +if test $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSS3 1 _ACEOF @@ -19693,10 +18312,10 @@ _ACEOF LIBS="-lnss3 $LIBS" else - { { $as_echo "$as_me:$LINENO: error: PK11_GetCertFromPrivateKey missing but needed. + { { echo "$as_me:$LINENO: error: PK11_GetCertFromPrivateKey missing but needed. See https://bugzilla.mozilla.org/show_bug.cgi?id=262274. Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&5 -$as_echo "$as_me: error: PK11_GetCertFromPrivateKey missing but needed. +echo "$as_me: error: PK11_GetCertFromPrivateKey missing but needed. See https://bugzilla.mozilla.org/show_bug.cgi?id=262274. Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&2;} { (exit 1); exit 1; }; } @@ -19708,17 +18327,17 @@ fi MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then - { $as_echo "$as_me:$LINENO: checking whether $tmp was compiled with --enable-ldap" >&5 -$as_echo_n "checking whether $tmp was compiled with --enable-ldap... " >&6; } + echo "$as_me:$LINENO: checking whether $tmp was compiled with --enable-ldap" >&5 +echo $ECHO_N "checking whether $tmp was compiled with --enable-ldap... $ECHO_C" >&6 if test -d "$MOZ_INC/ldap"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MOZ_LDAP_CFLAGS="-I$MOZ_INC" else - { { $as_echo "$as_me:$LINENO: error: no. + { { echo "$as_me:$LINENO: error: no. Could not find LDAP header include files in $MOZ_INC/ldap. Please recompile $tmp with --enable-ldap or use --with-openldap." >&5 -$as_echo "$as_me: error: no. +echo "$as_me: error: no. Could not find LDAP header include files in $MOZ_INC/ldap. Please recompile $tmp with --enable-ldap or use --with-openldap." >&2;} { (exit 1); exit 1; }; } @@ -19732,48 +18351,48 @@ Please recompile $tmp with --enable-ldap or use --with-openldap." >&2;} fi elif test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 WITH_MOZILLA=NO ENABLE_NSS_MODULE=NO enable_nss_module=no else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_MOZILLA=NO BUILD_TYPE="$BUILD_TYPE MOZ" if test -z "$with_mozilla_version"; then MOZILLA_VERSION= else - { $as_echo "$as_me:$LINENO: checking which mozilla version to build" >&5 -$as_echo_n "checking which mozilla version to build... " >&6; } + echo "$as_me:$LINENO: checking which mozilla version to build" >&5 +echo $ECHO_N "checking which mozilla version to build... $ECHO_C" >&6 MOZILLA_VERSION=$with_mozilla_version enable_build_mozilla=1 - { $as_echo "$as_me:$LINENO: result: $MOZILLA_VERSION" >&5 -$as_echo "$MOZILLA_VERSION" >&6; } + echo "$as_me:$LINENO: result: $MOZILLA_VERSION" >&5 +echo "${ECHO_T}$MOZILLA_VERSION" >&6 fi -{ $as_echo "$as_me:$LINENO: checking for toolkit mozilla should use" >&5 -$as_echo_n "checking for toolkit mozilla should use... " >&6; } +echo "$as_me:$LINENO: checking for toolkit mozilla should use" >&5 +echo $ECHO_N "checking for toolkit mozilla should use... $ECHO_C" >&6 if test -z "$with_mozilla_toolkit"; then if test "$_os" != "WINNT" ; then if test "$_os" = "Darwin" ; then MOZILLA_TOOLKIT=mac - { $as_echo "$as_me:$LINENO: result: mac" >&5 -$as_echo "mac" >&6; } + echo "$as_me:$LINENO: result: mac" >&5 +echo "${ECHO_T}mac" >&6 else MOZILLA_TOOLKIT=gtk2 - { $as_echo "$as_me:$LINENO: result: gtk2" >&5 -$as_echo "gtk2" >&6; } + echo "$as_me:$LINENO: result: gtk2" >&5 +echo "${ECHO_T}gtk2" >&6 fi fi else MOZILLA_TOOLKIT=$with_mozilla_toolkit enable_build_mozilla=1 - { $as_echo "$as_me:$LINENO: result: $MOZILLA_TOOLKIT" >&5 -$as_echo "$MOZILLA_TOOLKIT" >&6; } + echo "$as_me:$LINENO: result: $MOZILLA_TOOLKIT" >&5 +echo "${ECHO_T}$MOZILLA_TOOLKIT" >&6 fi #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not @@ -19790,63 +18409,63 @@ else enable_build_mozilla= fi -{ $as_echo "$as_me:$LINENO: checking whether to build Mozilla/SeaMonkey" >&5 -$as_echo_n "checking whether to build Mozilla/SeaMonkey... " >&6; } +echo "$as_me:$LINENO: checking whether to build Mozilla/SeaMonkey" >&5 +echo $ECHO_N "checking whether to build Mozilla/SeaMonkey... $ECHO_C" >&6 if test -n "$enable_build_mozilla"; then BUILD_MOZAB="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else BUILD_MOZAB="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to build provided NSS module" >&5 -$as_echo_n "checking whether to build provided NSS module... " >&6; } +echo "$as_me:$LINENO: checking whether to build provided NSS module" >&5 +echo $ECHO_N "checking whether to build provided NSS module... $ECHO_C" >&6 if test "$enable_nss_module" != "no"; then ENABLE_NSS_MODULE="YES" BUILD_TYPE="$BUILD_TYPE NSS" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for Mozilla build tooling" >&5 -$as_echo_n "checking for Mozilla build tooling... " >&6; } + echo "$as_me:$LINENO: checking for Mozilla build tooling" >&5 +echo $ECHO_N "checking for Mozilla build tooling... $ECHO_C" >&6 if test -z "$MOZILLABUILD" ; then -{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling not found. +{ { echo "$as_me:$LINENO: error: Mozilla build tooling not found. Use the --with-mozilla-build option after installling the tools obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32" >&5 -$as_echo "$as_me: error: Mozilla build tooling not found. +echo "$as_me: error: Mozilla build tooling not found. Use the --with-mozilla-build option after installling the tools obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32" >&2;} { (exit 1); exit 1; }; } else if test \( "$WITH_MINGWIN" = "yes" \) ; then if test ! -d "$MOZILLABUILD" ; then -{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 -$as_echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} +{ { echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 +echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 fi else if test ! -d "$MOZILLABUILD/moztools" \ -o ! -d "$MOZILLABUILD/msys" ; then -{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 -$as_echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} +{ { echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 +echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 fi fi fi fi else ENABLE_NSS_MODULE="NO" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test "$BUILD_MOZAB" = "TRUE"; then @@ -19854,13 +18473,13 @@ if test "$BUILD_MOZAB" = "TRUE"; then if test "$WITH_MINGWIN" != "yes"; then # compiling with MSVC. Only supported platform here is MSVS2005 at the moment. if test "$MSVSVER" != "2005"; then - { { $as_echo "$as_me:$LINENO: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&5 -$as_echo "$as_me: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&2;} + { { echo "$as_me:$LINENO: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&5 +echo "$as_me: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&5 -$as_echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&2;} + { echo "$as_me:$LINENO: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&5 +echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&2;} echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn fi fi @@ -19870,65 +18489,65 @@ $as_echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and li fi MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source" MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst` - { $as_echo "$as_me:$LINENO: checking for mozilla sources" >&5 -$as_echo_n "checking for mozilla sources... " >&6; } + echo "$as_me:$LINENO: checking for mozilla sources" >&5 +echo $ECHO_N "checking for mozilla sources... $ECHO_C" >&6 if test -z "$MOZILLA_FETCH_FILE"; then - { $as_echo "$as_me:$LINENO: result: not found" >&5 -$as_echo "not found" >&6; } + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 HAVE_MOZILLA_TARBALL=n else - { $as_echo "$as_me:$LINENO: checking for $MOZILLA_FETCH_FILE" >&5 -$as_echo_n "checking for $MOZILLA_FETCH_FILE... " >&6; } + echo "$as_me:$LINENO: checking for $MOZILLA_FETCH_FILE" >&5 +echo $ECHO_N "checking for $MOZILLA_FETCH_FILE... $ECHO_C" >&6 if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then if test -z "$DO_FETCH"; then - { $as_echo "$as_me:$LINENO: result: will be fetched" >&5 -$as_echo "will be fetched" >&6; } + echo "$as_me:$LINENO: result: will be fetched" >&5 +echo "${ECHO_T}will be fetched" >&6 HAVE_MOZILLA_TARBALL=y else - { $as_echo "$as_me:$LINENO: result: not found" >&5 -$as_echo "not found" >&6; } + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 HAVE_MOZILLA_TARBALL=n fi else - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 HAVE_MOZILLA_TARBALL=y fi fi if test "$HAVE_MOZILLA_TARBALL" != "y"; then - { { $as_echo "$as_me:$LINENO: error: Mozilla/SeaMonkey source archive not found. + { { echo "$as_me:$LINENO: error: Mozilla/SeaMonkey source archive not found. Use \"./fetch_tarballs.sh ooo.lst\" to download." >&5 -$as_echo "$as_me: error: Mozilla/SeaMonkey source archive not found. +echo "$as_me: error: Mozilla/SeaMonkey source archive not found. Use \"./fetch_tarballs.sh ooo.lst\" to download." >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for moztools binaries" >&5 -$as_echo_n "checking for moztools binaries... " >&6; } + echo "$as_me:$LINENO: checking for moztools binaries" >&5 +echo $ECHO_N "checking for moztools binaries... $ECHO_C" >&6 if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then - { { $as_echo "$as_me:$LINENO: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip + { { echo "$as_me:$LINENO: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)" >&5 -$as_echo "$as_me: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip +echo "$as_me: error: The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 fi elif test "$_os" = "Darwin"; then if test "$MOZILLA_TOOLKIT" = "gtk2"; then - { $as_echo "$as_me:$LINENO: checking whether mozilla can be built..." >&5 -$as_echo "$as_me: checking whether mozilla can be built..." >&6;} + { echo "$as_me:$LINENO: checking whether mozilla can be built..." >&5 +echo "$as_me: checking whether mozilla can be built..." >&6;} succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -19941,29 +18560,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -19974,25 +18592,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" >&5 -$as_echo_n "checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8... " >&6; } + echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" >&5 +echo $ECHO_N "checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZGTK2_CFLAGS" >&5 -$as_echo_n "checking MOZGTK2_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZGTK2_CFLAGS" >&5 +echo $ECHO_N "checking MOZGTK2_CFLAGS... $ECHO_C" >&6 MOZGTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - { $as_echo "$as_me:$LINENO: result: $MOZGTK2_CFLAGS" >&5 -$as_echo "$MOZGTK2_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZGTK2_CFLAGS" >&5 +echo "${ECHO_T}$MOZGTK2_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZGTK2_LIBS" >&5 -$as_echo_n "checking MOZGTK2_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZGTK2_LIBS" >&5 +echo $ECHO_N "checking MOZGTK2_LIBS... $ECHO_C" >&6 MOZGTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - { $as_echo "$as_me:$LINENO: result: $MOZGTK2_LIBS" >&5 -$as_echo "$MOZGTK2_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZGTK2_LIBS" >&5 +echo "${ECHO_T}$MOZGTK2_LIBS" >&6 else MOZGTK2_CFLAGS="" MOZGTK2_LIBS="" @@ -20011,11 +18629,11 @@ $as_echo "$MOZGTK2_LIBS" >&6; } fi if test $succeeded = yes; then - { $as_echo "$as_me:$LINENO: OK - can build mozilla" >&5 -$as_echo "$as_me: OK - can build mozilla" >&6;} + { echo "$as_me:$LINENO: OK - can build mozilla" >&5 +echo "$as_me: OK - can build mozilla" >&6;} else - { { $as_echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 -$as_echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} + { { echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 +echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} { (exit 1); exit 1; }; } fi @@ -20026,10 +18644,10 @@ $as_echo "$as_me: error: Prerequisites to build mozilla not met. Either use the if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -20042,29 +18660,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -20075,25 +18692,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.6.3" >&5 -$as_echo_n "checking for libIDL-2.0 >= 0.6.3... " >&6; } + echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.6.3" >&5 +echo $ECHO_N "checking for libIDL-2.0 >= 0.6.3... $ECHO_C" >&6 if $PKG_CONFIG --exists "libIDL-2.0 >= 0.6.3" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.6.3"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.6.3"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -$as_echo "$MOZLIBREQ_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -20118,8 +18735,8 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - { { $as_echo "$as_me:$LINENO: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&5 -$as_echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&2;} + { { echo "$as_me:$LINENO: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&5 +echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&2;} { (exit 1); exit 1; }; } fi fi @@ -20132,10 +18749,10 @@ $as_echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with m if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -20148,29 +18765,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -20181,25 +18797,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+-2.0" >&5 -$as_echo_n "checking for gtk+-2.0... " >&6; } + echo "$as_me:$LINENO: checking for gtk+-2.0" >&5 +echo $ECHO_N "checking for gtk+-2.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+-2.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+-2.0"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -$as_echo "$MOZLIBREQ_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -20224,8 +18840,8 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZGTK"; then - { { $as_echo "$as_me:$LINENO: error: GTK2 is needed to build mozilla." >&5 -$as_echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} + { { echo "$as_me:$LINENO: error: GTK2 is needed to build mozilla." >&5 +echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} { (exit 1); exit 1; }; } fi @@ -20234,10 +18850,10 @@ $as_echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -20250,29 +18866,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -20283,25 +18898,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.8.0" >&5 -$as_echo_n "checking for libIDL-2.0 >= 0.8.0... " >&6; } + echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.8.0" >&5 +echo $ECHO_N "checking for libIDL-2.0 >= 0.8.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.8.0"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -$as_echo "$MOZLIBREQ_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -20326,8 +18941,8 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - { { $as_echo "$as_me:$LINENO: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&5 -$as_echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&2;} + { { echo "$as_me:$LINENO: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&5 +echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&2;} { (exit 1); exit 1; }; } fi else @@ -20337,10 +18952,10 @@ $as_echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozi if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -20353,29 +18968,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -20386,25 +19000,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+ >= 1.2.3" >&5 -$as_echo_n "checking for gtk+ >= 1.2.3... " >&6; } + echo "$as_me:$LINENO: checking for gtk+ >= 1.2.3" >&5 +echo $ECHO_N "checking for gtk+ >= 1.2.3... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+ >= 1.2.3" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+ >= 1.2.3"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+ >= 1.2.3"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -$as_echo "$MOZLIBREQ_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -20429,8 +19043,8 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZGTK"; then - { { $as_echo "$as_me:$LINENO: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&5 -$as_echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&2;} + { { echo "$as_me:$LINENO: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&5 +echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&2;} { (exit 1); exit 1; }; } fi @@ -20439,10 +19053,10 @@ $as_echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla. if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -20455,29 +19069,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -20488,25 +19101,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libidl >= 0.6.3 libidl <= 0.6.8" >&5 -$as_echo_n "checking for libidl >= 0.6.3 libidl <= 0.6.8... " >&6; } + echo "$as_me:$LINENO: checking for libidl >= 0.6.3 libidl <= 0.6.8" >&5 +echo $ECHO_N "checking for libidl >= 0.6.3 libidl <= 0.6.8... $ECHO_C" >&6 if $PKG_CONFIG --exists "libidl >= 0.6.3 libidl <= 0.6.8" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 -$as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 +echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6 MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libidl >= 0.6.3 libidl <= 0.6.8"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 -$as_echo "$MOZLIBREQ_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 +echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 -$as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 +echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6 MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libidl >= 0.6.3 libidl <= 0.6.8"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 -$as_echo "$MOZLIBREQ_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 +echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6 else MOZLIBREQ_CFLAGS="" MOZLIBREQ_LIBS="" @@ -20531,8 +19144,8 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - { { $as_echo "$as_me:$LINENO: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&5 -$as_echo "$as_me: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&2;} + { { echo "$as_me:$LINENO: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&5 +echo "$as_me: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&2;} { (exit 1); exit 1; }; } fi fi @@ -20553,25 +19166,25 @@ fi -{ $as_echo "$as_me:$LINENO: checking which sane header to use" >&5 -$as_echo_n "checking which sane header to use... " >&6; } +echo "$as_me:$LINENO: checking which sane header to use" >&5 +echo $ECHO_N "checking which sane header to use... $ECHO_C" >&6 if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \ test "$with_system_sane_header" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_SANE_HEADER=YES if test "${ac_cv_header_sane_sane_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sane/sane.h" >&5 -$as_echo_n "checking for sane/sane.h... " >&6; } + echo "$as_me:$LINENO: checking for sane/sane.h" >&5 +echo $ECHO_N "checking for sane/sane.h... $ECHO_C" >&6 if test "${ac_cv_header_sane_sane_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 -$as_echo "$ac_cv_header_sane_sane_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 +echo "${ECHO_T}$ac_cv_header_sane_sane_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sane/sane.h usability" >&5 -$as_echo_n "checking sane/sane.h usability... " >&6; } +echo "$as_me:$LINENO: checking sane/sane.h usability" >&5 +echo $ECHO_N "checking sane/sane.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20582,38 +19195,41 @@ $ac_includes_default #include <sane/sane.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking sane/sane.h presence" >&5 -$as_echo_n "checking sane/sane.h presence... " >&6; } +echo "$as_me:$LINENO: checking sane/sane.h presence" >&5 +echo $ECHO_N "checking sane/sane.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20622,103 +19238,110 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sane/sane.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sane/sane.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: sane/sane.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sane/sane.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sane/sane.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sane/sane.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sane/sane.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sane/sane.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for sane/sane.h" >&5 -$as_echo_n "checking for sane/sane.h... " >&6; } +echo "$as_me:$LINENO: checking for sane/sane.h" >&5 +echo $ECHO_N "checking for sane/sane.h... $ECHO_C" >&6 if test "${ac_cv_header_sane_sane_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sane_sane_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 -$as_echo "$ac_cv_header_sane_sane_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 +echo "${ECHO_T}$ac_cv_header_sane_sane_h" >&6 fi -if test "x$ac_cv_header_sane_sane_h" = x""yes; then +if test $ac_cv_header_sane_sane_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: sane not found. install sane" >&5 -$as_echo "$as_me: error: sane not found. install sane" >&2;} + { { echo "$as_me:$LINENO: error: sane not found. install sane" >&5 +echo "$as_me: error: sane not found. install sane" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_SANE_HEADER=NO BUILD_TYPE="$BUILD_TYPE SANE" fi -{ $as_echo "$as_me:$LINENO: checking which icu to use" >&5 -$as_echo_n "checking which icu to use... " >&6; } +echo "$as_me:$LINENO: checking which icu to use" >&5 +echo $ECHO_N "checking which icu to use... $ECHO_C" >&6 if test -n "$with_system_icu" -o -n "$with_system_libs" && \ test "$with_system_icu" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_ICU=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { $as_echo "$as_me:$LINENO: checking for unicode/rbbi.h" >&5 -$as_echo_n "checking for unicode/rbbi.h... " >&6; } + echo "$as_me:$LINENO: checking for unicode/rbbi.h" >&5 +echo $ECHO_N "checking for unicode/rbbi.h... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20727,34 +19350,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ unicode/rbbi.h _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - { $as_echo "$as_me:$LINENO: result: checked." >&5 -$as_echo "checked." >&6; } -else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + echo "$as_me:$LINENO: result: checked." >&5 +echo "${ECHO_T}checked." >&6 +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: icu headers not found." >&5 -$as_echo "$as_me: error: icu headers not found." >&2;} + { { echo "$as_me:$LINENO: error: icu headers not found." >&5 +echo "$as_me: error: icu headers not found." >&2;} { (exit 1); exit 1; }; } fi - rm -f conftest.err conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -20764,10 +19387,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Extract the first word of "genbrk", so it can be a program name with args. set dummy genbrk; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SYSTEM_GENBRK+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SYSTEM_GENBRK in [\\/]* | ?:[\\/]*) @@ -20781,39 +19404,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SYSTEM_GENBRK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi SYSTEM_GENBRK=$ac_cv_path_SYSTEM_GENBRK + if test -n "$SYSTEM_GENBRK"; then - { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENBRK" >&5 -$as_echo "$SYSTEM_GENBRK" >&6; } + echo "$as_me:$LINENO: result: $SYSTEM_GENBRK" >&5 +echo "${ECHO_T}$SYSTEM_GENBRK" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$SYSTEM_GENBRK"; then - { { $as_echo "$as_me:$LINENO: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&5 -$as_echo "$as_me: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&2;} + { { echo "$as_me:$LINENO: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&5 +echo "$as_me: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "genccode", so it can be a program name with args. set dummy genccode; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SYSTEM_GENCCODE+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SYSTEM_GENCCODE in [\\/]* | ?:[\\/]*) @@ -20827,39 +19449,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SYSTEM_GENCCODE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi SYSTEM_GENCCODE=$ac_cv_path_SYSTEM_GENCCODE + if test -n "$SYSTEM_GENCCODE"; then - { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENCCODE" >&5 -$as_echo "$SYSTEM_GENCCODE" >&6; } + echo "$as_me:$LINENO: result: $SYSTEM_GENCCODE" >&5 +echo "${ECHO_T}$SYSTEM_GENCCODE" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$SYSTEM_GENCCODE"; then - { { $as_echo "$as_me:$LINENO: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&5 -$as_echo "$as_me: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&2;} + { { echo "$as_me:$LINENO: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&5 +echo "$as_me: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "gencmn", so it can be a program name with args. set dummy gencmn; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SYSTEM_GENCMN+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SYSTEM_GENCMN in [\\/]* | ?:[\\/]*) @@ -20873,40 +19494,39 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SYSTEM_GENCMN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi SYSTEM_GENCMN=$ac_cv_path_SYSTEM_GENCMN + if test -n "$SYSTEM_GENCMN"; then - { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENCMN" >&5 -$as_echo "$SYSTEM_GENCMN" >&6; } + echo "$as_me:$LINENO: result: $SYSTEM_GENCMN" >&5 +echo "${ECHO_T}$SYSTEM_GENCMN" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$SYSTEM_GENCMN"; then - { { $as_echo "$as_me:$LINENO: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&5 -$as_echo "$as_me: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&2;} + { { echo "$as_me:$LINENO: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&5 +echo "$as_me: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "icu-config", so it can be a program name with args. set dummy icu-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ICUCONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ICUCONFIG in [\\/]* | ?:[\\/]*) @@ -20919,47 +19539,46 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ICUCONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi ICUCONFIG=$ac_cv_path_ICUCONFIG + if test -n "$ICUCONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ICUCONFIG" >&5 -$as_echo "$ICUCONFIG" >&6; } + echo "$as_me:$LINENO: result: $ICUCONFIG" >&5 +echo "${ECHO_T}$ICUCONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - - { $as_echo "$as_me:$LINENO: checking ICU version" >&5 -$as_echo_n "checking ICU version... " >&6; } + echo "$as_me:$LINENO: checking ICU version" >&5 +echo $ECHO_N "checking ICU version... $ECHO_C" >&6 ICU_VERSION=`$ICUCONFIG --version` ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` if test "$ICU_MAJOR" -ge "4"; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: not suitable, only >= 4.0 supported currently" >&5 -$as_echo "$as_me: error: not suitable, only >= 4.0 supported currently" >&2;} + { { echo "$as_me:$LINENO: error: not suitable, only >= 4.0 supported currently" >&5 +echo "$as_me: error: not suitable, only >= 4.0 supported currently" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_ICU=NO BUILD_TYPE="$BUILD_TYPE ICU" fi @@ -20972,18 +19591,18 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to enable graphite support" >&5 -$as_echo_n "checking whether to enable graphite support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable graphite support" >&5 +echo $ECHO_N "checking whether to enable graphite support... $ECHO_C" >&6 if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_GRAPHITE="TRUE" - { $as_echo "$as_me:$LINENO: checking which graphite to use" >&5 -$as_echo_n "checking which graphite to use... " >&6; } + echo "$as_me:$LINENO: checking which graphite to use" >&5 +echo $ECHO_N "checking which graphite to use... $ECHO_C" >&6 if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ test "$with_system_graphite" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_GRAPHITE=YES succeeded=no @@ -20991,10 +19610,10 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -21007,29 +19626,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -21040,25 +19658,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for silgraphite " >&5 -$as_echo_n "checking for silgraphite ... " >&6; } + echo "$as_me:$LINENO: checking for silgraphite " >&5 +echo $ECHO_N "checking for silgraphite ... $ECHO_C" >&6 if $PKG_CONFIG --exists "silgraphite " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking GRAPHITE_CFLAGS" >&5 -$as_echo_n "checking GRAPHITE_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GRAPHITE_CFLAGS" >&5 +echo $ECHO_N "checking GRAPHITE_CFLAGS... $ECHO_C" >&6 GRAPHITE_CFLAGS=`$PKG_CONFIG --cflags "silgraphite "` - { $as_echo "$as_me:$LINENO: result: $GRAPHITE_CFLAGS" >&5 -$as_echo "$GRAPHITE_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GRAPHITE_CFLAGS" >&5 +echo "${ECHO_T}$GRAPHITE_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking GRAPHITE_LIBS" >&5 -$as_echo_n "checking GRAPHITE_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GRAPHITE_LIBS" >&5 +echo $ECHO_N "checking GRAPHITE_LIBS... $ECHO_C" >&6 GRAPHITE_LIBS=`$PKG_CONFIG --libs "silgraphite "` - { $as_echo "$as_me:$LINENO: result: $GRAPHITE_LIBS" >&5 -$as_echo "$GRAPHITE_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GRAPHITE_LIBS" >&5 +echo "${ECHO_T}$GRAPHITE_LIBS" >&6 else GRAPHITE_CFLAGS="" GRAPHITE_LIBS="" @@ -21079,20 +19697,20 @@ $as_echo "$GRAPHITE_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_GRAPHITE=NO BUILD_TYPE="$BUILD_TYPE GRAPHITE" fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -21102,15 +19720,15 @@ fi if test "$_os" = "Darwin"; then if test "x$with_x" = "xyes"; then - { { $as_echo "$as_me:$LINENO: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&5 -$as_echo "$as_me: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&2;} + { { echo "$as_me:$LINENO: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&5 +echo "$as_me: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: checking for /System/Library/Frameworks/AppKit.framework" >&5 -$as_echo_n "checking for /System/Library/Frameworks/AppKit.framework... " >&6; } + echo "$as_me:$LINENO: checking for /System/Library/Frameworks/AppKit.framework" >&5 +echo $ECHO_N "checking for /System/Library/Frameworks/AppKit.framework... $ECHO_C" >&6 if test -d "/System/Library/Frameworks/AppKit.framework/"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 x_includes="no_x_includes" x_libraries="no_x_libraries" enable_gtk=no @@ -21118,8 +19736,8 @@ $as_echo "yes" >&6; } ENABLE_CUPS="" else - { { $as_echo "$as_me:$LINENO: error: No AppKit.framewrok found" >&5 -$as_echo "$as_me: error: No AppKit.framewrok found" >&2;} + { { echo "$as_me:$LINENO: error: No AppKit.framewrok found" >&5 +echo "$as_me: error: No AppKit.framewrok found" >&2;} { (exit 1); exit 1; }; } fi fi @@ -21132,49 +19750,44 @@ elif test "$_os" = "OS2" ; then echo "Do Nothing for _os = OS2. Don't check for X11." : elif test "$_os" != "WINNT" ; then - { $as_echo "$as_me:$LINENO: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } + echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6 -# Check whether --with-x was given. +# Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then - withval=$with_x; -fi + withval="$with_x" +fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else - case $x_includes,$x_libraries in #( - *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 -$as_echo "$as_me: error: cannot use X directory names containing '" >&2;} - { (exit 1); exit 1; }; };; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then - $as_echo_n "(cached) " >&6 + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else + if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir +rm -fr conftest.dir if mkdir conftest.dir; then cd conftest.dir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +_ACEOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl dylib la dll; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done @@ -21182,16 +19795,16 @@ _ACEOF # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in - /usr/include) ac_x_includes= ;; + /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in - /usr/lib | /usr/lib64 | /lib | /lib64) ;; + /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. - rm -f -r conftest.dir + rm -fr conftest.dir fi # Standard set of common directories for X headers. @@ -21232,7 +19845,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21240,39 +19853,39 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <X11/Xlib.h> +#include <X11/Intrinsic.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # We can compile using X headers with no special include directory. ac_x_includes= else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then + if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done fi - rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no @@ -21281,99 +19894,94 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" + LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <X11/Xlib.h> +#include <X11/Intrinsic.h> int main () { -XrmInitialize () +XtMalloc (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl dylib la dll; do - if test -r "$ac_dir/libX11.$ac_extension"; then + for ac_extension in a so sl; do + if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac +if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi -;; #( - *) have_x=yes;; - esac +fi + + fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then - { $as_echo "$as_me:$LINENO: result: $have_x" >&5 -$as_echo "$have_x" >&6; } + echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then @@ -21394,12 +20002,12 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - cat >conftest.$ac_ext <<_ACEOF + case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -21415,35 +20023,43 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" -else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_R_nospace=yes +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_R_nospace=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $ac_R_nospace = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + X_LIBS="$X_LIBS -R$x_libraries" + else LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -21459,47 +20075,47 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_R_space=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: neither works" >&5 -$as_echo "neither works" >&6; } +ac_R_space=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS + if test $ac_R_space = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6 + fi + fi + LIBS=$ac_xsave_LIBS + esac fi # Check for system-dependent libraries X programs must link with. @@ -21520,51 +20136,52 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { -return XOpenDisplay (); +XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } +echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" @@ -21575,66 +20192,65 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { -return dnet_ntoa (); +dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dnet_dnet_ntoa=no +ac_cv_lib_dnet_dnet_ntoa=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } + echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" @@ -21645,66 +20261,63 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { -return dnet_ntoa (); +dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dnet_stub_dnet_ntoa=no +ac_cv_lib_dnet_stub_dnet_ntoa=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" @@ -21716,10 +20329,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 -$as_echo_n "checking for gethostbyname... " >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21744,69 +20357,74 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -$as_echo "$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" @@ -21817,66 +20435,65 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" @@ -21887,58 +20504,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gethostbyname=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gethostbyname=no +ac_cv_lib_bsd_gethostbyname=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 +if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -21952,10 +20568,10 @@ fi # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - { $as_echo "$as_me:$LINENO: checking for connect" >&5 -$as_echo_n "checking for connect... " >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21980,69 +20596,74 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -$as_echo "$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } + echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" @@ -22053,68 +20674,67 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); int main () { -return connect (); +connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_connect=no +ac_cv_lib_socket_connect=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - { $as_echo "$as_me:$LINENO: checking for remove" >&5 -$as_echo_n "checking for remove... " >&6; } + echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22139,69 +20759,74 @@ cat >>conftest.$ac_ext <<_ACEOF #undef remove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char remove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_remove || defined __stub___remove +#if defined (__stub_remove) || defined (__stub___remove) choke me +#else +char (*f) () = remove; +#endif +#ifdef __cplusplus +} #endif int main () { -return remove (); +return f != remove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_remove=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_remove=no +ac_cv_func_remove=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -$as_echo "$ac_cv_func_remove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5 -$as_echo_n "checking for remove in -lposix... " >&6; } + echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" @@ -22212,68 +20837,67 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char remove (); int main () { -return remove (); +remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_posix_remove=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_posix_remove=no +ac_cv_lib_posix_remove=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 +if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - { $as_echo "$as_me:$LINENO: checking for shmat" >&5 -$as_echo_n "checking for shmat... " >&6; } + echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22298,69 +20922,74 @@ cat >>conftest.$ac_ext <<_ACEOF #undef shmat -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shmat (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_shmat || defined __stub___shmat +#if defined (__stub_shmat) || defined (__stub___shmat) choke me +#else +char (*f) () = shmat; +#endif +#ifdef __cplusplus +} #endif int main () { -return shmat (); +return f != shmat; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_shmat=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_shmat=no +ac_cv_func_shmat=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -$as_echo "$ac_cv_func_shmat" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 -$as_echo_n "checking for shmat in -lipc... " >&6; } + echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" @@ -22371,58 +21000,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shmat (); int main () { -return shmat (); +shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ipc_shmat=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ipc_shmat=no +ac_cv_lib_ipc_shmat=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 +if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -22438,10 +21066,10 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } + echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" @@ -22452,58 +21080,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char IceConnectionNumber (); int main () { -return IceConnectionNumber (); +IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ICE_IceConnectionNumber=no +ac_cv_lib_ICE_IceConnectionNumber=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -22520,21 +21147,21 @@ fi x_libraries="default_x_libraries" fi if test -z "$x_libraries"; then - { { $as_echo "$as_me:$LINENO: error: No X libraries found" >&5 -$as_echo "$as_me: error: No X libraries found" >&2;} + { { echo "$as_me:$LINENO: error: No X libraries found" >&5 +echo "$as_me: error: No X libraries found" >&2;} { (exit 1); exit 1; }; } # Exit fi if test -z "$x_includes"; then - { { $as_echo "$as_me:$LINENO: error: No X includes found" >&5 -$as_echo "$as_me: error: No X includes found" >&2;} + { { echo "$as_me:$LINENO: error: No X includes found" >&5 +echo "$as_me: error: No X includes found" >&2;} { (exit 1); exit 1; }; } # Exit fi CFLAGS=$X_CFLAGS LDFLAGS="$X_LDFLAGS $X_LIBS" - { $as_echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 -$as_echo_n "checking for XOpenDisplay in -lX11... " >&6; } + echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 +echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" @@ -22545,69 +21172,68 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { -return XOpenDisplay (); +XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_X11_XOpenDisplay=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_X11_XOpenDisplay=no +ac_cv_lib_X11_XOpenDisplay=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5 -$as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; } -if test "x$ac_cv_lib_X11_XOpenDisplay" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 +if test $ac_cv_lib_X11_XOpenDisplay = yes; then x_libs="-lX11 $X_EXTRA_LIBS" else - { { $as_echo "$as_me:$LINENO: error: X Development libraries not found" >&5 -$as_echo "$as_me: error: X Development libraries not found" >&2;} + { { echo "$as_me:$LINENO: error: X Development libraries not found" >&5 +echo "$as_me: error: X Development libraries not found" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for XauDisposeAuth in -lXau" >&5 -$as_echo_n "checking for XauDisposeAuth in -lXau... " >&6; } + echo "$as_me:$LINENO: checking for XauDisposeAuth in -lXau" >&5 +echo $ECHO_N "checking for XauDisposeAuth in -lXau... $ECHO_C" >&6 if test "${ac_cv_lib_Xau_XauDisposeAuth+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXau $LIBS" @@ -22618,58 +21244,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char XauDisposeAuth (); int main () { -return XauDisposeAuth (); +XauDisposeAuth (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_Xau_XauDisposeAuth=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_Xau_XauDisposeAuth=no +ac_cv_lib_Xau_XauDisposeAuth=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xau_XauDisposeAuth" >&5 -$as_echo "$ac_cv_lib_Xau_XauDisposeAuth" >&6; } -if test "x$ac_cv_lib_Xau_XauDisposeAuth" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_Xau_XauDisposeAuth" >&5 +echo "${ECHO_T}$ac_cv_lib_Xau_XauDisposeAuth" >&6 +if test $ac_cv_lib_Xau_XauDisposeAuth = yes; then XAU_LIBS="-lXau" fi @@ -22701,20 +21326,20 @@ fi if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then - { $as_echo "$as_me:$LINENO: checking whether to use Xaw" >&5 -$as_echo_n "checking whether to use Xaw... " >&6; } + echo "$as_me:$LINENO: checking whether to use Xaw" >&5 +echo $ECHO_N "checking whether to use Xaw... $ECHO_C" >&6 if test "$enable_Xaw" = "no"; then DISABLE_XAW=TRUE - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 for ac_header in X11/Composite.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22727,63 +21352,62 @@ cat >>conftest.$ac_ext <<_ACEOF #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: Xt include headers not found" >&5 -$as_echo "$as_me: error: Xt include headers not found" >&2;} + { { echo "$as_me:$LINENO: error: Xt include headers not found" >&5 +echo "$as_me: error: Xt include headers not found" >&2;} { (exit 1); exit 1; }; } fi done else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 for ac_header in X11/Xaw/Label.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22796,57 +21420,56 @@ cat >>conftest.$ac_ext <<_ACEOF #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: Xaw include headers not found" >&5 -$as_echo "$as_me: error: Xaw include headers not found" >&2;} + { { echo "$as_me:$LINENO: error: Xaw include headers not found" >&5 +echo "$as_me: error: Xaw include headers not found" >&2;} { (exit 1); exit 1; }; } fi done -{ $as_echo "$as_me:$LINENO: checking for main in -lXaw" >&5 -$as_echo_n "checking for main in -lXaw... " >&6; } +echo "$as_me:$LINENO: checking for main in -lXaw" >&5 +echo $ECHO_N "checking for main in -lXaw... $ECHO_C" >&6 if test "${ac_cv_lib_Xaw_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXaw $LIBS" @@ -22861,48 +21484,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_Xaw_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_Xaw_main=no +ac_cv_lib_Xaw_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_main" >&5 -$as_echo "$ac_cv_lib_Xaw_main" >&6; } -if test "x$ac_cv_lib_Xaw_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_main" >&5 +echo "${ECHO_T}$ac_cv_lib_Xaw_main" >&6 +if test $ac_cv_lib_Xaw_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXAW 1 _ACEOF @@ -22910,8 +21532,8 @@ _ACEOF LIBS="-lXaw $LIBS" else - { { $as_echo "$as_me:$LINENO: error: Xaw library not found or functional" >&5 -$as_echo "$as_me: error: Xaw library not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: Xaw library not found or functional" >&5 +echo "$as_me: error: Xaw library not found or functional" >&2;} { (exit 1); exit 1; }; } fi @@ -22923,17 +21545,17 @@ fi if test "$ENABLE_FONTCONFIG" = "TRUE" ; then if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 -$as_echo_n "checking for fontconfig/fontconfig.h... " >&6; } + echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 +echo $ECHO_N "checking for fontconfig/fontconfig.h... $ECHO_C" >&6 if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 -$as_echo "$ac_cv_header_fontconfig_fontconfig_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 +echo "${ECHO_T}$ac_cv_header_fontconfig_fontconfig_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking fontconfig/fontconfig.h usability" >&5 -$as_echo_n "checking fontconfig/fontconfig.h usability... " >&6; } +echo "$as_me:$LINENO: checking fontconfig/fontconfig.h usability" >&5 +echo $ECHO_N "checking fontconfig/fontconfig.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22944,38 +21566,41 @@ $ac_includes_default #include <fontconfig/fontconfig.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking fontconfig/fontconfig.h presence" >&5 -$as_echo_n "checking fontconfig/fontconfig.h presence... " >&6; } +echo "$as_me:$LINENO: checking fontconfig/fontconfig.h presence" >&5 +echo $ECHO_N "checking fontconfig/fontconfig.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22984,90 +21609,95 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <fontconfig/fontconfig.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 -$as_echo_n "checking for fontconfig/fontconfig.h... " >&6; } +echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 +echo $ECHO_N "checking for fontconfig/fontconfig.h... $ECHO_C" >&6 if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_fontconfig_fontconfig_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 -$as_echo "$ac_cv_header_fontconfig_fontconfig_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 +echo "${ECHO_T}$ac_cv_header_fontconfig_fontconfig_h" >&6 fi -if test "x$ac_cv_header_fontconfig_fontconfig_h" = x""yes; then +if test $ac_cv_header_fontconfig_fontconfig_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&5 -$as_echo "$as_me: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&2;} + { { echo "$as_me:$LINENO: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&5 +echo "$as_me: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking whether fontconfig is >= 2.2.0" >&5 -$as_echo_n "checking whether fontconfig is >= 2.2.0... " >&6; } + echo "$as_me:$LINENO: checking whether fontconfig is >= 2.2.0" >&5 +echo $ECHO_N "checking whether fontconfig is >= 2.2.0... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23085,77 +21715,63 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: no, fontconfig >= 2.2.0 needed" >&5 -$as_echo "$as_me: error: no, fontconfig >= 2.2.0 needed" >&2;} +{ { echo "$as_me:$LINENO: error: no, fontconfig >= 2.2.0 needed" >&5 +echo "$as_me: error: no, fontconfig >= 2.2.0 needed" >&2;} { (exit 1); exit 1; }; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ $as_echo "$as_me:$LINENO: checking whether to link to Xrender" >&5 -$as_echo_n "checking whether to link to Xrender... " >&6; } +echo "$as_me:$LINENO: checking whether to link to Xrender" >&5 +echo $ECHO_N "checking whether to link to Xrender... $ECHO_C" >&6 if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 XRENDER_LINK=YES with_system_xrender_headers=yes else - { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 -$as_echo "no, dynamically open it" >&6; } + echo "$as_me:$LINENO: result: no, dynamically open it" >&5 +echo "${ECHO_T}no, dynamically open it" >&6 XRENDER_LINK=NO fi -{ $as_echo "$as_me:$LINENO: checking which Xrender headers to use" >&5 -$as_echo_n "checking which Xrender headers to use... " >&6; } +echo "$as_me:$LINENO: checking which Xrender headers to use" >&5 +echo $ECHO_N "checking which Xrender headers to use... $ECHO_C" >&6 if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \ test "$with_system_xrender_headers" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_XRENDER_HEADERS=YES if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 -$as_echo_n "checking for X11/extensions/Xrender.h... " >&6; } + echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 +echo $ECHO_N "checking for X11/extensions/Xrender.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xrender_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrender_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrender.h usability" >&5 -$as_echo_n "checking X11/extensions/Xrender.h usability... " >&6; } +echo "$as_me:$LINENO: checking X11/extensions/Xrender.h usability" >&5 +echo $ECHO_N "checking X11/extensions/Xrender.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23166,38 +21782,41 @@ $ac_includes_default #include <X11/extensions/Xrender.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrender.h presence" >&5 -$as_echo_n "checking X11/extensions/Xrender.h presence... " >&6; } +echo "$as_me:$LINENO: checking X11/extensions/Xrender.h presence" >&5 +echo $ECHO_N "checking X11/extensions/Xrender.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23206,92 +21825,99 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <X11/extensions/Xrender.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 -$as_echo_n "checking for X11/extensions/Xrender.h... " >&6; } +echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 +echo $ECHO_N "checking for X11/extensions/Xrender.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_extensions_Xrender_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xrender_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrender_h" >&6 fi -if test "x$ac_cv_header_X11_extensions_Xrender_h" = x""yes; then +if test $ac_cv_header_X11_extensions_Xrender_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Xrender not found. install X" >&5 -$as_echo "$as_me: error: Xrender not found. install X" >&2;} + { { echo "$as_me:$LINENO: error: Xrender not found. install X" >&5 +echo "$as_me: error: Xrender not found. install X" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_XRENDER_HEADERS=NO BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" fi if test "$XRENDER_LINK" = "YES"; then -{ $as_echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5 -$as_echo_n "checking for XRenderQueryVersion in -lXrender... " >&6; } +echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5 +echo $ECHO_N "checking for XRenderQueryVersion in -lXrender... $ECHO_C" >&6 if test "${ac_cv_lib_Xrender_XRenderQueryVersion+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrender $LIBS" @@ -23302,58 +21928,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char XRenderQueryVersion (); int main () { -return XRenderQueryVersion (); +XRenderQueryVersion (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_Xrender_XRenderQueryVersion=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_Xrender_XRenderQueryVersion=no +ac_cv_lib_Xrender_XRenderQueryVersion=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryVersion" >&5 -$as_echo "$ac_cv_lib_Xrender_XRenderQueryVersion" >&6; } -if test "x$ac_cv_lib_Xrender_XRenderQueryVersion" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryVersion" >&5 +echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderQueryVersion" >&6 +if test $ac_cv_lib_Xrender_XRenderQueryVersion = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXRENDER 1 _ACEOF @@ -23361,8 +21986,8 @@ _ACEOF LIBS="-lXrender $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libXrender not found or functional" >&5 -$as_echo "$as_me: error: libXrender not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: libXrender not found or functional" >&5 +echo "$as_me: error: libXrender not found or functional" >&2;} { (exit 1); exit 1; }; } fi @@ -23370,13 +21995,13 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to enable RandR support" >&5 -$as_echo_n "checking whether to enable RandR support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable RandR support" >&5 +echo $ECHO_N "checking whether to enable RandR support... $ECHO_C" >&6 if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then XRANDR_DLOPEN="TRUE" - { $as_echo "$as_me:$LINENO: result: resorting to dlopen libXrandr at runtime" >&5 -$as_echo "resorting to dlopen libXrandr at runtime" >&6; } + echo "$as_me:$LINENO: result: resorting to dlopen libXrandr at runtime" >&5 +echo "${ECHO_T}resorting to dlopen libXrandr at runtime" >&6 else XRANDR_DLOPEN="FALSE" @@ -23385,10 +22010,10 @@ $as_echo "resorting to dlopen libXrandr at runtime" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -23401,29 +22026,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -23434,25 +22058,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for xrandr >= 1.2" >&5 -$as_echo_n "checking for xrandr >= 1.2... " >&6; } + echo "$as_me:$LINENO: checking for xrandr >= 1.2" >&5 +echo $ECHO_N "checking for xrandr >= 1.2... $ECHO_C" >&6 if $PKG_CONFIG --exists "xrandr >= 1.2" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking XRANDR_CFLAGS" >&5 -$as_echo_n "checking XRANDR_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking XRANDR_CFLAGS" >&5 +echo $ECHO_N "checking XRANDR_CFLAGS... $ECHO_C" >&6 XRANDR_CFLAGS=`$PKG_CONFIG --cflags "xrandr >= 1.2"` - { $as_echo "$as_me:$LINENO: result: $XRANDR_CFLAGS" >&5 -$as_echo "$XRANDR_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $XRANDR_CFLAGS" >&5 +echo "${ECHO_T}$XRANDR_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking XRANDR_LIBS" >&5 -$as_echo_n "checking XRANDR_LIBS... " >&6; } + echo "$as_me:$LINENO: checking XRANDR_LIBS" >&5 +echo $ECHO_N "checking XRANDR_LIBS... $ECHO_C" >&6 XRANDR_LIBS=`$PKG_CONFIG --libs "xrandr >= 1.2"` - { $as_echo "$as_me:$LINENO: result: $XRANDR_LIBS" >&5 -$as_echo "$XRANDR_LIBS" >&6; } + echo "$as_me:$LINENO: result: $XRANDR_LIBS" >&5 +echo "${ECHO_T}$XRANDR_LIBS" >&6 else XRANDR_CFLAGS="" XRANDR_LIBS="" @@ -23478,17 +22102,17 @@ $as_echo "$XRANDR_LIBS" >&6; } if test "$ENABLE_RANDR" != "TRUE"; then if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 -$as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; } + echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 +echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h usability" >&5 -$as_echo_n "checking X11/extensions/Xrandr.h usability... " >&6; } +echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h usability" >&5 +echo $ECHO_N "checking X11/extensions/Xrandr.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23499,38 +22123,41 @@ $ac_includes_default #include <X11/extensions/Xrandr.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h presence" >&5 -$as_echo_n "checking X11/extensions/Xrandr.h presence... " >&6; } +echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h presence" >&5 +echo $ECHO_N "checking X11/extensions/Xrandr.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23539,86 +22166,93 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <X11/extensions/Xrandr.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 -$as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; } +echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 +echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_extensions_Xrandr_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6 fi -if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then +if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&5 -$as_echo "$as_me: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&2;} + { { echo "$as_me:$LINENO: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&5 +echo "$as_me: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&2;} { (exit 1); exit 1; }; } fi XRANDR_CFLAGS=" " -{ $as_echo "$as_me:$LINENO: checking for XRRQueryExtension in -lXrandr" >&5 -$as_echo_n "checking for XRRQueryExtension in -lXrandr... " >&6; } +echo "$as_me:$LINENO: checking for XRRQueryExtension in -lXrandr" >&5 +echo $ECHO_N "checking for XRRQueryExtension in -lXrandr... $ECHO_C" >&6 if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrandr $LIBS" @@ -23629,58 +22263,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char XRRQueryExtension (); int main () { -return XRRQueryExtension (); +XRRQueryExtension (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_Xrandr_XRRQueryExtension=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_Xrandr_XRRQueryExtension=no +ac_cv_lib_Xrandr_XRRQueryExtension=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5 -$as_echo "$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; } -if test "x$ac_cv_lib_Xrandr_XRRQueryExtension" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5 +echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRQueryExtension" >&6 +if test $ac_cv_lib_Xrandr_XRRQueryExtension = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXRANDR 1 _ACEOF @@ -23688,53 +22321,53 @@ _ACEOF LIBS="-lXrandr $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libXrandr not found or functional" >&5 -$as_echo "$as_me: error: libXrandr not found or functional" >&2;} + { { echo "$as_me:$LINENO: error: libXrandr not found or functional" >&5 +echo "$as_me: error: libXrandr not found or functional" >&2;} { (exit 1); exit 1; }; } fi XRANDR_LIBS="-lXrandr " ENABLE_RANDR="TRUE" - { $as_echo "$as_me:$LINENO: result: enabling RandR support" >&5 -$as_echo "enabling RandR support" >&6; } + echo "$as_me:$LINENO: result: enabling RandR support" >&5 +echo "${ECHO_T}enabling RandR support" >&6 fi fi else ENABLE_RANDR="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to use neon" >&5 -$as_echo_n "checking whether to use neon... " >&6; } +echo "$as_me:$LINENO: checking whether to use neon" >&5 +echo $ECHO_N "checking whether to use neon... $ECHO_C" >&6 if test "$enable_neon" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 DISABLE_NEON=TRUE else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -{ $as_echo "$as_me:$LINENO: checking which neon to use" >&5 -$as_echo_n "checking which neon to use... " >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +echo "$as_me:$LINENO: checking which neon to use" >&5 +echo $ECHO_N "checking which neon to use... $ECHO_C" >&6 if test -n "$with_system_neon" -o -n "$with_system_libs" && \ test "$with_system_neon" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -23747,29 +22380,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -23780,25 +22412,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for neon >= 0.26.0" >&5 -$as_echo_n "checking for neon >= 0.26.0... " >&6; } + echo "$as_me:$LINENO: checking for neon >= 0.26.0" >&5 +echo $ECHO_N "checking for neon >= 0.26.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "neon >= 0.26.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5 -$as_echo_n "checking NEON_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5 +echo $ECHO_N "checking NEON_CFLAGS... $ECHO_C" >&6 NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.26.0"` - { $as_echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5 -$as_echo "$NEON_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5 +echo "${ECHO_T}$NEON_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking NEON_LIBS" >&5 -$as_echo_n "checking NEON_LIBS... " >&6; } + echo "$as_me:$LINENO: checking NEON_LIBS" >&5 +echo $ECHO_N "checking NEON_LIBS... $ECHO_C" >&6 NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.26.0"` - { $as_echo "$as_me:$LINENO: result: $NEON_LIBS" >&5 -$as_echo "$NEON_LIBS" >&6; } + echo "$as_me:$LINENO: result: $NEON_LIBS" >&5 +echo "${ECHO_T}$NEON_LIBS" >&6 else NEON_CFLAGS="" NEON_LIBS="" @@ -23819,8 +22451,8 @@ $as_echo "$NEON_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 -$as_echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} + { { echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5 +echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} { (exit 1); exit 1; }; } fi @@ -23828,8 +22460,8 @@ $as_echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;} NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" SYSTEM_NEON=YES else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_NEON=NO NEON_LIBS=-lneon NEON_CFLAGS= @@ -23844,12 +22476,12 @@ fi if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then with_system_openssl=yes fi -{ $as_echo "$as_me:$LINENO: checking which libssl to use" >&5 -$as_echo_n "checking which libssl to use... " >&6; } +echo "$as_me:$LINENO: checking which libssl to use" >&5 +echo $ECHO_N "checking which libssl to use... $ECHO_C" >&6 if test -n "$with_system_openssl" -o -n "$with_system_libs" && \ test "$with_system_openssl" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 # Mac OS builds should get out without extra stuff is the Mac porters' # wish. And pkg-config is although Xcode ships a .pc for openssl if test "$_os" = "Darwin"; then @@ -23862,10 +22494,10 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -23878,29 +22510,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -23911,25 +22542,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for openssl " >&5 -$as_echo_n "checking for openssl ... " >&6; } + echo "$as_me:$LINENO: checking for openssl " >&5 +echo $ECHO_N "checking for openssl ... $ECHO_C" >&6 if $PKG_CONFIG --exists "openssl " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking OPENSSL_CFLAGS" >&5 -$as_echo_n "checking OPENSSL_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking OPENSSL_CFLAGS" >&5 +echo $ECHO_N "checking OPENSSL_CFLAGS... $ECHO_C" >&6 OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl "` - { $as_echo "$as_me:$LINENO: result: $OPENSSL_CFLAGS" >&5 -$as_echo "$OPENSSL_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $OPENSSL_CFLAGS" >&5 +echo "${ECHO_T}$OPENSSL_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking OPENSSL_LIBS" >&5 -$as_echo_n "checking OPENSSL_LIBS... " >&6; } + echo "$as_me:$LINENO: checking OPENSSL_LIBS" >&5 +echo $ECHO_N "checking OPENSSL_LIBS... $ECHO_C" >&6 OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl "` - { $as_echo "$as_me:$LINENO: result: $OPENSSL_LIBS" >&5 -$as_echo "$OPENSSL_LIBS" >&6; } + echo "$as_me:$LINENO: result: $OPENSSL_LIBS" >&5 +echo "${ECHO_T}$OPENSSL_LIBS" >&6 else OPENSSL_CFLAGS="" OPENSSL_LIBS="" @@ -23950,16 +22581,16 @@ $as_echo "$OPENSSL_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi fi SYSTEM_OPENSSL=YES else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_OPENSSL=NO BUILD_TYPE="$BUILD_TYPE OPENSSL" fi @@ -23967,33 +22598,33 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to enable agg" >&5 -$as_echo_n "checking whether to enable agg... " >&6; } +echo "$as_me:$LINENO: checking whether to enable agg" >&5 +echo $ECHO_N "checking whether to enable agg... $ECHO_C" >&6 if test "$with_agg" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_AGG=YES - { $as_echo "$as_me:$LINENO: checking which AGG to use" >&5 -$as_echo_n "checking which AGG to use... " >&6; } + echo "$as_me:$LINENO: checking which AGG to use" >&5 +echo $ECHO_N "checking which AGG to use... $ECHO_C" >&6 if test -n "$with_system_agg" -o -n "$with_system_libs" && \ test "$with_system_agg" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -24006,29 +22637,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -24039,25 +22669,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libagg >= 2.3" >&5 -$as_echo_n "checking for libagg >= 2.3... " >&6; } + echo "$as_me:$LINENO: checking for libagg >= 2.3" >&5 +echo $ECHO_N "checking for libagg >= 2.3... $ECHO_C" >&6 if $PKG_CONFIG --exists "libagg >= 2.3" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking AGG_CFLAGS" >&5 -$as_echo_n "checking AGG_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking AGG_CFLAGS" >&5 +echo $ECHO_N "checking AGG_CFLAGS... $ECHO_C" >&6 AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3"` - { $as_echo "$as_me:$LINENO: result: $AGG_CFLAGS" >&5 -$as_echo "$AGG_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $AGG_CFLAGS" >&5 +echo "${ECHO_T}$AGG_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking AGG_LIBS" >&5 -$as_echo_n "checking AGG_LIBS... " >&6; } + echo "$as_me:$LINENO: checking AGG_LIBS" >&5 +echo $ECHO_N "checking AGG_LIBS... $ECHO_C" >&6 AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3"` - { $as_echo "$as_me:$LINENO: result: $AGG_LIBS" >&5 -$as_echo "$AGG_LIBS" >&6; } + echo "$as_me:$LINENO: result: $AGG_LIBS" >&5 +echo "${ECHO_T}$AGG_LIBS" >&6 else AGG_CFLAGS="" AGG_LIBS="" @@ -24078,13 +22708,13 @@ $as_echo "$AGG_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking agg version" >&5 -$as_echo_n "checking agg version... " >&6; } + echo "$as_me:$LINENO: checking agg version" >&5 +echo $ECHO_N "checking agg version... $ECHO_C" >&6 # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway # (/usr/include gets stripped from pkg-config output) if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then @@ -24096,23 +22726,23 @@ $as_echo_n "checking agg version... " >&6; } $PKG_CONFIG --modversion libagg | grep -q 2.4; then # 2.4's libagg.pc.in still contains 2.3 :/ if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then - { $as_echo "$as_me:$LINENO: result: 2.4" >&5 -$as_echo "2.4" >&6; } + echo "$as_me:$LINENO: result: 2.4" >&5 +echo "${ECHO_T}2.4" >&6 AGG_VERSION=2400 else - { $as_echo "$as_me:$LINENO: result: 2.3" >&5 -$as_echo "2.3" >&6; } + echo "$as_me:$LINENO: result: 2.3" >&5 +echo "${ECHO_T}2.3" >&6 AGG_VERSION=2300 fi SYSTEM_AGG=YES else - { { $as_echo "$as_me:$LINENO: error: only agg 2.3 and 2.4 are supported" >&5 -$as_echo "$as_me: error: only agg 2.3 and 2.4 are supported" >&2;} + { { echo "$as_me:$LINENO: error: only agg 2.3 and 2.4 are supported" >&5 +echo "$as_me: error: only agg 2.3 and 2.4 are supported" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_AGG=NO AGG_VERSION=2300 BUILD_TYPE="$BUILD_TYPE AGG" @@ -24121,12 +22751,12 @@ $as_echo "internal" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking which redland library to use" >&5 -$as_echo_n "checking which redland library to use... " >&6; } +echo "$as_me:$LINENO: checking which redland library to use" >&5 +echo $ECHO_N "checking which redland library to use... $ECHO_C" >&6 if test -n "$with_system_redland" -o -n "$with_system_libs" && \ test "$with_system_redland" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_REDLAND=YES succeeded=no @@ -24134,10 +22764,10 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -24150,29 +22780,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -24183,25 +22812,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for redland >= 1.0.8" >&5 -$as_echo_n "checking for redland >= 1.0.8... " >&6; } + echo "$as_me:$LINENO: checking for redland >= 1.0.8" >&5 +echo $ECHO_N "checking for redland >= 1.0.8... $ECHO_C" >&6 if $PKG_CONFIG --exists "redland >= 1.0.8" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking REDLAND_CFLAGS" >&5 -$as_echo_n "checking REDLAND_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking REDLAND_CFLAGS" >&5 +echo $ECHO_N "checking REDLAND_CFLAGS... $ECHO_C" >&6 REDLAND_CFLAGS=`$PKG_CONFIG --cflags "redland >= 1.0.8"` - { $as_echo "$as_me:$LINENO: result: $REDLAND_CFLAGS" >&5 -$as_echo "$REDLAND_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $REDLAND_CFLAGS" >&5 +echo "${ECHO_T}$REDLAND_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking REDLAND_LIBS" >&5 -$as_echo_n "checking REDLAND_LIBS... " >&6; } + echo "$as_me:$LINENO: checking REDLAND_LIBS" >&5 +echo $ECHO_N "checking REDLAND_LIBS... $ECHO_C" >&6 REDLAND_LIBS=`$PKG_CONFIG --libs "redland >= 1.0.8"` - { $as_echo "$as_me:$LINENO: result: $REDLAND_LIBS" >&5 -$as_echo "$REDLAND_LIBS" >&6; } + echo "$as_me:$LINENO: result: $REDLAND_LIBS" >&5 +echo "${ECHO_T}$REDLAND_LIBS" >&6 else REDLAND_CFLAGS="" REDLAND_LIBS="" @@ -24222,14 +22851,14 @@ $as_echo "$REDLAND_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (redland >= 1.0.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 BUILD_TYPE="$BUILD_TYPE REDLAND" SYSTEM_REDLAND=NO fi @@ -24237,14 +22866,14 @@ fi -{ $as_echo "$as_me:$LINENO: checking which libhunspell to use" >&5 -$as_echo_n "checking which libhunspell to use... " >&6; } +echo "$as_me:$LINENO: checking which libhunspell to use" >&5 +echo $ECHO_N "checking which libhunspell to use... $ECHO_C" >&6 if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ test "$with_system_hunspell" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_HUNSPELL=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -24256,10 +22885,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -24272,29 +22901,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -24305,25 +22933,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for hunspell" >&5 -$as_echo_n "checking for hunspell... " >&6; } + echo "$as_me:$LINENO: checking for hunspell" >&5 +echo $ECHO_N "checking for hunspell... $ECHO_C" >&6 if $PKG_CONFIG --exists "hunspell" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking HUNSPELL_CFLAGS" >&5 -$as_echo_n "checking HUNSPELL_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking HUNSPELL_CFLAGS" >&5 +echo $ECHO_N "checking HUNSPELL_CFLAGS... $ECHO_C" >&6 HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell"` - { $as_echo "$as_me:$LINENO: result: $HUNSPELL_CFLAGS" >&5 -$as_echo "$HUNSPELL_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $HUNSPELL_CFLAGS" >&5 +echo "${ECHO_T}$HUNSPELL_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking HUNSPELL_LIBS" >&5 -$as_echo_n "checking HUNSPELL_LIBS... " >&6; } + echo "$as_me:$LINENO: checking HUNSPELL_LIBS" >&5 +echo $ECHO_N "checking HUNSPELL_LIBS... $ECHO_C" >&6 HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell"` - { $as_echo "$as_me:$LINENO: result: $HUNSPELL_LIBS" >&5 -$as_echo "$HUNSPELL_LIBS" >&6; } + echo "$as_me:$LINENO: result: $HUNSPELL_LIBS" >&5 +echo "${ECHO_T}$HUNSPELL_LIBS" >&6 else HUNSPELL_CFLAGS="" HUNSPELL_LIBS="" @@ -24349,17 +22977,17 @@ $as_echo "$HUNSPELL_LIBS" >&6; } if test "$HUNSPELL_PC" != "TRUE"; then if test "${ac_cv_header_hunspell_hxx+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 -$as_echo_n "checking for hunspell.hxx... " >&6; } + echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 +echo $ECHO_N "checking for hunspell.hxx... $ECHO_C" >&6 if test "${ac_cv_header_hunspell_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 -$as_echo "$ac_cv_header_hunspell_hxx" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 +echo "${ECHO_T}$ac_cv_header_hunspell_hxx" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking hunspell.hxx usability" >&5 -$as_echo_n "checking hunspell.hxx usability... " >&6; } +echo "$as_me:$LINENO: checking hunspell.hxx usability" >&5 +echo $ECHO_N "checking hunspell.hxx usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24370,38 +22998,41 @@ $ac_includes_default #include <hunspell.hxx> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking hunspell.hxx presence" >&5 -$as_echo_n "checking hunspell.hxx presence... " >&6; } +echo "$as_me:$LINENO: checking hunspell.hxx presence" >&5 +echo $ECHO_N "checking hunspell.hxx presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24410,87 +23041,94 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <hunspell.hxx> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: hunspell.hxx: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: hunspell.hxx: present but cannot be compiled" >&5 +echo "$as_me: WARNING: hunspell.hxx: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell.hxx: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: hunspell.hxx: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 -$as_echo_n "checking for hunspell.hxx... " >&6; } +echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 +echo $ECHO_N "checking for hunspell.hxx... $ECHO_C" >&6 if test "${ac_cv_header_hunspell_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_hunspell_hxx=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 -$as_echo "$ac_cv_header_hunspell_hxx" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 +echo "${ECHO_T}$ac_cv_header_hunspell_hxx" >&6 fi -if test "x$ac_cv_header_hunspell_hxx" = x""yes; then +if test $ac_cv_header_hunspell_hxx = yes; then : else if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 -$as_echo_n "checking for hunspell/hunspell.hxx... " >&6; } + echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 +echo $ECHO_N "checking for hunspell/hunspell.hxx... $ECHO_C" >&6 if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 -$as_echo "$ac_cv_header_hunspell_hunspell_hxx" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 +echo "${ECHO_T}$ac_cv_header_hunspell_hunspell_hxx" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking hunspell/hunspell.hxx usability" >&5 -$as_echo_n "checking hunspell/hunspell.hxx usability... " >&6; } +echo "$as_me:$LINENO: checking hunspell/hunspell.hxx usability" >&5 +echo $ECHO_N "checking hunspell/hunspell.hxx usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24501,38 +23139,41 @@ $ac_includes_default #include <hunspell/hunspell.hxx> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking hunspell/hunspell.hxx presence" >&5 -$as_echo_n "checking hunspell/hunspell.hxx presence... " >&6; } +echo "$as_me:$LINENO: checking hunspell/hunspell.hxx presence" >&5 +echo $ECHO_N "checking hunspell/hunspell.hxx presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24541,76 +23182,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <hunspell/hunspell.hxx> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&5 +echo "$as_me: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 -$as_echo_n "checking for hunspell/hunspell.hxx... " >&6; } +echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 +echo $ECHO_N "checking for hunspell/hunspell.hxx... $ECHO_C" >&6 if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_hunspell_hunspell_hxx=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 -$as_echo "$ac_cv_header_hunspell_hunspell_hxx" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 +echo "${ECHO_T}$ac_cv_header_hunspell_hunspell_hxx" >&6 fi -if test "x$ac_cv_header_hunspell_hunspell_hxx" = x""yes; then +if test $ac_cv_header_hunspell_hunspell_hxx = yes; then HUNSPELL_CFLAGS=-I/usr/include/hunspell else - { { $as_echo "$as_me:$LINENO: error: hunspell headers not found." >&5 -$as_echo "$as_me: error: hunspell headers not found." >&2;} + { { echo "$as_me:$LINENO: error: hunspell headers not found." >&5 +echo "$as_me: error: hunspell headers not found." >&2;} { (exit 1); exit 1; }; } fi @@ -24620,10 +23268,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for main in -lhunspell" >&5 -$as_echo_n "checking for main in -lhunspell... " >&6; } +echo "$as_me:$LINENO: checking for main in -lhunspell" >&5 +echo $ECHO_N "checking for main in -lhunspell... $ECHO_C" >&6 if test "${ac_cv_lib_hunspell_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhunspell $LIBS" @@ -24638,48 +23286,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_hunspell_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_hunspell_main=no +ac_cv_lib_hunspell_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_main" >&5 -$as_echo "$ac_cv_lib_hunspell_main" >&6; } -if test "x$ac_cv_lib_hunspell_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_main" >&5 +echo "${ECHO_T}$ac_cv_lib_hunspell_main" >&6 +if test $ac_cv_lib_hunspell_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBHUNSPELL 1 _ACEOF @@ -24687,8 +23334,8 @@ _ACEOF LIBS="-lhunspell $LIBS" else - { { $as_echo "$as_me:$LINENO: error: hunspell library not found." >&5 -$as_echo "$as_me: error: hunspell library not found." >&2;} + { { echo "$as_me:$LINENO: error: hunspell library not found." >&5 +echo "$as_me: error: hunspell library not found." >&2;} { (exit 1); exit 1; }; } fi @@ -24701,8 +23348,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_HUNSPELL=NO BUILD_TYPE="$BUILD_TYPE HUNSPELL" fi @@ -24710,25 +23357,25 @@ fi -{ $as_echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5 -$as_echo_n "checking which altlinuxhyph to use... " >&6; } +echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5 +echo $ECHO_N "checking which altlinuxhyph to use... $ECHO_C" >&6 if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \ test "$with_system_altlinuxhyph" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_HYPH=YES if test "${ac_cv_header_hyphen_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for hyphen.h" >&5 -$as_echo_n "checking for hyphen.h... " >&6; } + echo "$as_me:$LINENO: checking for hyphen.h" >&5 +echo $ECHO_N "checking for hyphen.h... $ECHO_C" >&6 if test "${ac_cv_header_hyphen_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 -$as_echo "$ac_cv_header_hyphen_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 +echo "${ECHO_T}$ac_cv_header_hyphen_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking hyphen.h usability" >&5 -$as_echo_n "checking hyphen.h usability... " >&6; } +echo "$as_me:$LINENO: checking hyphen.h usability" >&5 +echo $ECHO_N "checking hyphen.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24739,38 +23386,41 @@ $ac_includes_default #include <hyphen.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking hyphen.h presence" >&5 -$as_echo_n "checking hyphen.h presence... " >&6; } +echo "$as_me:$LINENO: checking hyphen.h presence" >&5 +echo $ECHO_N "checking hyphen.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24779,84 +23429,91 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <hyphen.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: hyphen.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: hyphen.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: hyphen.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: hyphen.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: hyphen.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: hyphen.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: hyphen.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: hyphen.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: hyphen.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: hyphen.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: hyphen.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: hyphen.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: hyphen.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: hyphen.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: hyphen.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: hyphen.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for hyphen.h" >&5 -$as_echo_n "checking for hyphen.h... " >&6; } +echo "$as_me:$LINENO: checking for hyphen.h" >&5 +echo $ECHO_N "checking for hyphen.h... $ECHO_C" >&6 if test "${ac_cv_header_hyphen_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_hyphen_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 -$as_echo "$ac_cv_header_hyphen_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 +echo "${ECHO_T}$ac_cv_header_hyphen_h" >&6 fi -if test "x$ac_cv_header_hyphen_h" = x""yes; then +if test $ac_cv_header_hyphen_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: altlinuxhyph headers not found." >&5 -$as_echo "$as_me: error: altlinuxhyph headers not found." >&2;} + { { echo "$as_me:$LINENO: error: altlinuxhyph headers not found." >&5 +echo "$as_me: error: altlinuxhyph headers not found." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for struct _HyphenDict.cset" >&5 -$as_echo_n "checking for struct _HyphenDict.cset... " >&6; } + echo "$as_me:$LINENO: checking for struct _HyphenDict.cset" >&5 +echo $ECHO_N "checking for struct _HyphenDict.cset... $ECHO_C" >&6 if test "${ac_cv_member_struct__HyphenDict_cset+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -24877,29 +23534,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct__HyphenDict_cset=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -24918,50 +23579,52 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct__HyphenDict_cset=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct__HyphenDict_cset=no +ac_cv_member_struct__HyphenDict_cset=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct__HyphenDict_cset" >&5 -$as_echo "$ac_cv_member_struct__HyphenDict_cset" >&6; } -if test "x$ac_cv_member_struct__HyphenDict_cset" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_member_struct__HyphenDict_cset" >&5 +echo "${ECHO_T}$ac_cv_member_struct__HyphenDict_cset" >&6 +if test $ac_cv_member_struct__HyphenDict_cset = yes; then : else - { { $as_echo "$as_me:$LINENO: error: no. You are sure you have altlinuyhyph headers?" >&5 -$as_echo "$as_me: error: no. You are sure you have altlinuyhyph headers?" >&2;} + { { echo "$as_me:$LINENO: error: no. You are sure you have altlinuyhyph headers?" >&5 +echo "$as_me: error: no. You are sure you have altlinuyhyph headers?" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyphen" >&5 -$as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhyphen... " >&6; } + echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyphen" >&5 +echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhyphen... $ECHO_C" >&6 if test "${ac_cv_lib_hyphen_hnj_hyphen_hyphenate2+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyphen $LIBS" @@ -24972,70 +23635,69 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -return hnj_hyphen_hyphenate2 (); +hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no +ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&5 -$as_echo "$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&6; } -if test "x$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&5 +echo "${ECHO_T}$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&6 +if test $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2 = yes; then HYPHEN_LIB=-lhyphen else - { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} + { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 +echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} { (exit 1); exit 1; }; } fi if test -z "$HYPHEN_LIB"; then - { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyph" >&5 -$as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhyph... " >&6; } + echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyph" >&5 +echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhyph... $ECHO_C" >&6 if test "${ac_cv_lib_hyph_hnj_hyphen_hyphenate2+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyph $LIBS" @@ -25046,71 +23708,70 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -return hnj_hyphen_hyphenate2 (); +hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_hyph_hnj_hyphen_hyphenate2=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no +ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&5 -$as_echo "$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&6; } -if test "x$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&5 +echo "${ECHO_T}$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&6 +if test $ac_cv_lib_hyph_hnj_hyphen_hyphenate2 = yes; then HYPHEN_LIB=-lhyph else - { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} + { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 +echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} { (exit 1); exit 1; }; } fi fi if test -z "$HYPHEN_LIB"; then - { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhnj" >&5 -$as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhnj... " >&6; } + echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhnj" >&5 +echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhnj... $ECHO_C" >&6 if test "${ac_cv_lib_hnj_hnj_hyphen_hyphenate2+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhnj $LIBS" @@ -25121,82 +23782,81 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char hnj_hyphen_hyphenate2 (); int main () { -return hnj_hyphen_hyphenate2 (); +hnj_hyphen_hyphenate2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_hnj_hnj_hyphen_hyphenate2=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no +ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&5 -$as_echo "$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&6; } -if test "x$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&5 +echo "${ECHO_T}$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&6 +if test $ac_cv_lib_hnj_hnj_hyphen_hyphenate2 = yes; then HYPHEN_LIB=-lhnj else - { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} + { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 +echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} { (exit 1); exit 1; }; } fi fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_HYPH=NO BUILD_TYPE="$BUILD_TYPE HYPHEN" fi -{ $as_echo "$as_me:$LINENO: checking which mythes to use" >&5 -$as_echo_n "checking which mythes to use... " >&6; } +echo "$as_me:$LINENO: checking which mythes to use" >&5 +echo $ECHO_N "checking which mythes to use... $ECHO_C" >&6 if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_MYTHES=YES - ac_ext=cpp + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -25208,10 +23868,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -25224,29 +23884,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -25257,25 +23916,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for mythes" >&5 -$as_echo_n "checking for mythes... " >&6; } + echo "$as_me:$LINENO: checking for mythes" >&5 +echo $ECHO_N "checking for mythes... $ECHO_C" >&6 if $PKG_CONFIG --exists "mythes" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking MYTHES_CFLAGS" >&5 -$as_echo_n "checking MYTHES_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking MYTHES_CFLAGS" >&5 +echo $ECHO_N "checking MYTHES_CFLAGS... $ECHO_C" >&6 MYTHES_CFLAGS=`$PKG_CONFIG --cflags "mythes"` - { $as_echo "$as_me:$LINENO: result: $MYTHES_CFLAGS" >&5 -$as_echo "$MYTHES_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $MYTHES_CFLAGS" >&5 +echo "${ECHO_T}$MYTHES_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking MYTHES_LIBS" >&5 -$as_echo_n "checking MYTHES_LIBS... " >&6; } + echo "$as_me:$LINENO: checking MYTHES_LIBS" >&5 +echo $ECHO_N "checking MYTHES_LIBS... $ECHO_C" >&6 MYTHES_LIBS=`$PKG_CONFIG --libs "mythes"` - { $as_echo "$as_me:$LINENO: result: $MYTHES_LIBS" >&5 -$as_echo "$MYTHES_LIBS" >&6; } + echo "$as_me:$LINENO: result: $MYTHES_LIBS" >&5 +echo "${ECHO_T}$MYTHES_LIBS" >&6 else MYTHES_CFLAGS="" MYTHES_LIBS="" @@ -25301,17 +23960,17 @@ $as_echo "$MYTHES_LIBS" >&6; } if test "$MYTHES_PKGCONFIG" = "no"; then if test "${ac_cv_header_mythes_hxx+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for mythes.hxx" >&5 -$as_echo_n "checking for mythes.hxx... " >&6; } + echo "$as_me:$LINENO: checking for mythes.hxx" >&5 +echo $ECHO_N "checking for mythes.hxx... $ECHO_C" >&6 if test "${ac_cv_header_mythes_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 -$as_echo "$ac_cv_header_mythes_hxx" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 +echo "${ECHO_T}$ac_cv_header_mythes_hxx" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking mythes.hxx usability" >&5 -$as_echo_n "checking mythes.hxx usability... " >&6; } +echo "$as_me:$LINENO: checking mythes.hxx usability" >&5 +echo $ECHO_N "checking mythes.hxx usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25322,38 +23981,41 @@ $ac_includes_default #include <mythes.hxx> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking mythes.hxx presence" >&5 -$as_echo_n "checking mythes.hxx presence... " >&6; } +echo "$as_me:$LINENO: checking mythes.hxx presence" >&5 +echo $ECHO_N "checking mythes.hxx presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25362,85 +24024,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <mythes.hxx> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mythes.hxx: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: mythes.hxx: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mythes.hxx: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mythes.hxx: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mythes.hxx: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mythes.hxx: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mythes.hxx: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for mythes.hxx" >&5 -$as_echo_n "checking for mythes.hxx... " >&6; } +echo "$as_me:$LINENO: checking for mythes.hxx" >&5 +echo $ECHO_N "checking for mythes.hxx... $ECHO_C" >&6 if test "${ac_cv_header_mythes_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mythes_hxx=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 -$as_echo "$ac_cv_header_mythes_hxx" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 +echo "${ECHO_T}$ac_cv_header_mythes_hxx" >&6 fi -if test "x$ac_cv_header_mythes_hxx" = x""yes; then +if test $ac_cv_header_mythes_hxx = yes; then : else - { { $as_echo "$as_me:$LINENO: error: mythes.hxx headers not found." >&5 -$as_echo "$as_me: error: mythes.hxx headers not found." >&2;} + { { echo "$as_me:$LINENO: error: mythes.hxx headers not found." >&5 +echo "$as_me: error: mythes.hxx headers not found." >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for main in -lmythes-1.2" >&5 -$as_echo_n "checking for main in -lmythes-1.2... " >&6; } +echo "$as_me:$LINENO: checking for main in -lmythes-1.2" >&5 +echo $ECHO_N "checking for main in -lmythes-1.2... $ECHO_C" >&6 if test "${ac_cv_lib_mythes_1_2_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes-1.2 $LIBS" @@ -25455,48 +24124,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_mythes_1_2_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_mythes_1_2_main=no +ac_cv_lib_mythes_1_2_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_1_2_main" >&5 -$as_echo "$ac_cv_lib_mythes_1_2_main" >&6; } -if test "x$ac_cv_lib_mythes_1_2_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_1_2_main" >&5 +echo "${ECHO_T}$ac_cv_lib_mythes_1_2_main" >&6 +if test $ac_cv_lib_mythes_1_2_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYTHES_1_2 1 _ACEOF @@ -25508,10 +24176,10 @@ else fi if test "$MYTHES_FOUND" = "no"; then - { $as_echo "$as_me:$LINENO: checking for main in -lmythes" >&5 -$as_echo_n "checking for main in -lmythes... " >&6; } + echo "$as_me:$LINENO: checking for main in -lmythes" >&5 +echo $ECHO_N "checking for main in -lmythes... $ECHO_C" >&6 if test "${ac_cv_lib_mythes_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes $LIBS" @@ -25526,48 +24194,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_mythes_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_mythes_main=no +ac_cv_lib_mythes_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_main" >&5 -$as_echo "$ac_cv_lib_mythes_main" >&6; } -if test "x$ac_cv_lib_mythes_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_main" >&5 +echo "${ECHO_T}$ac_cv_lib_mythes_main" >&6 +if test $ac_cv_lib_mythes_main = yes; then MYTHES_FOUND=yes else MYTHES_FOUND=no @@ -25575,8 +24242,8 @@ fi fi if test "$MYTHES_FOUND" = "no"; then - { { $as_echo "$as_me:$LINENO: error: mythes library not found!." >&5 -$as_echo "$as_me: error: mythes library not found!." >&2;} + { { echo "$as_me:$LINENO: error: mythes library not found!." >&5 +echo "$as_me: error: mythes library not found!." >&2;} { (exit 1); exit 1; }; } fi fi @@ -25587,8 +24254,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_MYTHES=NO BUILD_TYPE="$BUILD_TYPE MYTHES" fi @@ -25596,25 +24263,25 @@ fi -{ $as_echo "$as_me:$LINENO: checking which lpsolve to use" >&5 -$as_echo_n "checking which lpsolve to use... " >&6; } +echo "$as_me:$LINENO: checking which lpsolve to use" >&5 +echo $ECHO_N "checking which lpsolve to use... $ECHO_C" >&6 if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \ test "$with_system_lpsolve" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LPSOLVE=YES if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 -$as_echo_n "checking for lpsolve/lp_lib.h... " >&6; } + echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 +echo $ECHO_N "checking for lpsolve/lp_lib.h... $ECHO_C" >&6 if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 -$as_echo "$ac_cv_header_lpsolve_lp_lib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 +echo "${ECHO_T}$ac_cv_header_lpsolve_lp_lib_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking lpsolve/lp_lib.h usability" >&5 -$as_echo_n "checking lpsolve/lp_lib.h usability... " >&6; } +echo "$as_me:$LINENO: checking lpsolve/lp_lib.h usability" >&5 +echo $ECHO_N "checking lpsolve/lp_lib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25625,38 +24292,41 @@ $ac_includes_default #include <lpsolve/lp_lib.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking lpsolve/lp_lib.h presence" >&5 -$as_echo_n "checking lpsolve/lp_lib.h presence... " >&6; } +echo "$as_me:$LINENO: checking lpsolve/lp_lib.h presence" >&5 +echo $ECHO_N "checking lpsolve/lp_lib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25665,86 +24335,93 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <lpsolve/lp_lib.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 -$as_echo_n "checking for lpsolve/lp_lib.h... " >&6; } +echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 +echo $ECHO_N "checking for lpsolve/lp_lib.h... $ECHO_C" >&6 if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_lpsolve_lp_lib_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 -$as_echo "$ac_cv_header_lpsolve_lp_lib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 +echo "${ECHO_T}$ac_cv_header_lpsolve_lp_lib_h" >&6 fi -if test "x$ac_cv_header_lpsolve_lp_lib_h" = x""yes; then +if test $ac_cv_header_lpsolve_lp_lib_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: lpsolve headers not found." >&5 -$as_echo "$as_me: error: lpsolve headers not found." >&2;} + { { echo "$as_me:$LINENO: error: lpsolve headers not found." >&5 +echo "$as_me: error: lpsolve headers not found." >&2;} { (exit 1); exit 1; }; } fi # some systems need this. Like Ubuntu.... -{ $as_echo "$as_me:$LINENO: checking for floor in -lm" >&5 -$as_echo_n "checking for floor in -lm... " >&6; } +echo "$as_me:$LINENO: checking for floor in -lm" >&5 +echo $ECHO_N "checking for floor in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_floor+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" @@ -25755,58 +24432,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char floor (); int main () { -return floor (); +floor (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_m_floor=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_m_floor=no +ac_cv_lib_m_floor=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_floor" >&5 -$as_echo "$ac_cv_lib_m_floor" >&6; } -if test "x$ac_cv_lib_m_floor" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_m_floor" >&5 +echo "${ECHO_T}$ac_cv_lib_m_floor" >&6 +if test $ac_cv_lib_m_floor = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -25816,10 +24492,10 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } +echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" @@ -25830,58 +24506,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -25891,10 +24566,10 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for make_lp in -llpsolve55" >&5 -$as_echo_n "checking for make_lp in -llpsolve55... " >&6; } +echo "$as_me:$LINENO: checking for make_lp in -llpsolve55" >&5 +echo $ECHO_N "checking for make_lp in -llpsolve55... $ECHO_C" >&6 if test "${ac_cv_lib_lpsolve55_make_lp+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llpsolve55 $LIBS" @@ -25905,58 +24580,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char make_lp (); int main () { -return make_lp (); +make_lp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_lpsolve55_make_lp=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_lpsolve55_make_lp=no +ac_cv_lib_lpsolve55_make_lp=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lpsolve55_make_lp" >&5 -$as_echo "$ac_cv_lib_lpsolve55_make_lp" >&6; } -if test "x$ac_cv_lib_lpsolve55_make_lp" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_lpsolve55_make_lp" >&5 +echo "${ECHO_T}$ac_cv_lib_lpsolve55_make_lp" >&6 +if test $ac_cv_lib_lpsolve55_make_lp = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBLPSOLVE55 1 _ACEOF @@ -25964,37 +24638,37 @@ _ACEOF LIBS="-llpsolve55 $LIBS" else - { { $as_echo "$as_me:$LINENO: error: lpsolve library not found or too old." >&5 -$as_echo "$as_me: error: lpsolve library not found or too old." >&2;} + { { echo "$as_me:$LINENO: error: lpsolve library not found or too old." >&5 +echo "$as_me: error: lpsolve library not found or too old." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_LPSOLVE=NO BUILD_TYPE="$BUILD_TYPE LPSOLVE" fi -{ $as_echo "$as_me:$LINENO: checking which libtextcat to use" >&5 -$as_echo_n "checking which libtextcat to use... " >&6; } +echo "$as_me:$LINENO: checking which libtextcat to use" >&5 +echo $ECHO_N "checking which libtextcat to use... $ECHO_C" >&6 if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LIBTEXTCAT=YES if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 -$as_echo_n "checking for libtextcat/textcat.h... " >&6; } + echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 +echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 -$as_echo "$ac_cv_header_libtextcat_textcat_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 +echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking libtextcat/textcat.h usability" >&5 -$as_echo_n "checking libtextcat/textcat.h usability... " >&6; } +echo "$as_me:$LINENO: checking libtextcat/textcat.h usability" >&5 +echo $ECHO_N "checking libtextcat/textcat.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26005,38 +24679,41 @@ $ac_includes_default #include <libtextcat/textcat.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking libtextcat/textcat.h presence" >&5 -$as_echo_n "checking libtextcat/textcat.h presence... " >&6; } +echo "$as_me:$LINENO: checking libtextcat/textcat.h presence" >&5 +echo $ECHO_N "checking libtextcat/textcat.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26045,85 +24722,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <libtextcat/textcat.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libtextcat/textcat.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 -$as_echo_n "checking for libtextcat/textcat.h... " >&6; } +echo "$as_me:$LINENO: checking for libtextcat/textcat.h" >&5 +echo $ECHO_N "checking for libtextcat/textcat.h... $ECHO_C" >&6 if test "${ac_cv_header_libtextcat_textcat_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libtextcat_textcat_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 -$as_echo "$ac_cv_header_libtextcat_textcat_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_libtextcat_textcat_h" >&5 +echo "${ECHO_T}$ac_cv_header_libtextcat_textcat_h" >&6 fi -if test "x$ac_cv_header_libtextcat_textcat_h" = x""yes; then +if test $ac_cv_header_libtextcat_textcat_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: libtextcat headers not found." >&5 -$as_echo "$as_me: error: libtextcat headers not found." >&2;} + { { echo "$as_me:$LINENO: error: libtextcat headers not found." >&5 +echo "$as_me: error: libtextcat headers not found." >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for special_textcat_Init in -ltextcat" >&5 -$as_echo_n "checking for special_textcat_Init in -ltextcat... " >&6; } +echo "$as_me:$LINENO: checking for special_textcat_Init in -ltextcat" >&5 +echo $ECHO_N "checking for special_textcat_Init in -ltextcat... $ECHO_C" >&6 if test "${ac_cv_lib_textcat_special_textcat_Init+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltextcat $LIBS" @@ -26134,58 +24818,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char special_textcat_Init (); int main () { -return special_textcat_Init (); +special_textcat_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_textcat_special_textcat_Init=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_textcat_special_textcat_Init=no +ac_cv_lib_textcat_special_textcat_Init=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_textcat_special_textcat_Init" >&5 -$as_echo "$ac_cv_lib_textcat_special_textcat_Init" >&6; } -if test "x$ac_cv_lib_textcat_special_textcat_Init" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_textcat_special_textcat_Init" >&5 +echo "${ECHO_T}$ac_cv_lib_textcat_special_textcat_Init" >&6 +if test $ac_cv_lib_textcat_special_textcat_Init = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTEXTCAT 1 _ACEOF @@ -26193,44 +24876,44 @@ _ACEOF LIBS="-ltextcat $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&5 -$as_echo "$as_me: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&2;} + { { echo "$as_me:$LINENO: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&5 +echo "$as_me: error: libtextcat library not found or not suitable. libtextcat typically needs to be patched" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_LIBTEXTCAT=NO BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT" fi -{ $as_echo "$as_me:$LINENO: checking which libtextcat data directory to use" >&5 -$as_echo_n "checking which libtextcat data directory to use... " >&6; } +echo "$as_me:$LINENO: checking which libtextcat data directory to use" >&5 +echo $ECHO_N "checking which libtextcat data directory to use... $ECHO_C" >&6 if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then if test "$with_system_libtextcat_data" = "yes"; then SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat else SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data fi - { $as_echo "$as_me:$LINENO: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 -$as_echo "$SYSTEM_LIBTEXTCAT_DATA" >&6; } + echo "$as_me:$LINENO: result: $SYSTEM_LIBTEXTCAT_DATA" >&5 +echo "${ECHO_T}$SYSTEM_LIBTEXTCAT_DATA" >&6 else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA" fi if test "$_os" = "Linux"; then - { $as_echo "$as_me:$LINENO: checking whether libc is >= 2.1.1" >&5 -$as_echo_n "checking whether libc is >= 2.1.1... " >&6; } + echo "$as_me:$LINENO: checking whether libc is >= 2.1.1" >&5 +echo $ECHO_N "checking whether libc is >= 2.1.1... $ECHO_C" >&6 exec 6>/dev/null # no output - { $as_echo "$as_me:$LINENO: checking for gnu_get_libc_version in -lc" >&5 -$as_echo_n "checking for gnu_get_libc_version in -lc... " >&6; } + echo "$as_me:$LINENO: checking for gnu_get_libc_version in -lc" >&5 +echo $ECHO_N "checking for gnu_get_libc_version in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_gnu_get_libc_version+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" @@ -26241,68 +24924,67 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gnu_get_libc_version (); int main () { -return gnu_get_libc_version (); +gnu_get_libc_version (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_gnu_get_libc_version=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_gnu_get_libc_version=no +ac_cv_lib_c_gnu_get_libc_version=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gnu_get_libc_version" >&5 -$as_echo "$ac_cv_lib_c_gnu_get_libc_version" >&6; } -if test "x$ac_cv_lib_c_gnu_get_libc_version" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_c_gnu_get_libc_version" >&5 +echo "${ECHO_T}$ac_cv_lib_c_gnu_get_libc_version" >&6 +if test $ac_cv_lib_c_gnu_get_libc_version = yes; then HAVE_LIBC=yes; export HAVE_LIBC fi exec 6>&1 # output on again if test "$HAVE_LIBC"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { { $as_echo "$as_me:$LINENO: error: no, upgrade libc" >&5 -$as_echo "$as_me: error: no, upgrade libc" >&2;} + { { echo "$as_me:$LINENO: error: no, upgrade libc" >&5 +echo "$as_me: error: no, upgrade libc" >&2;} { (exit 1); exit 1; }; } fi fi @@ -26311,11 +24993,11 @@ if test "$_os" != "WNT"; then for ac_func in getopt do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26340,70 +25022,71 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF HAVE_GETOPT=YES else @@ -26414,11 +25097,11 @@ done for ac_func in readdir_r do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26443,70 +25126,71 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF HAVE_READDIR_R=YES else @@ -26527,8 +25211,8 @@ fi if test \( "$_os" = "WINNT" \) ; then - { $as_echo "$as_me:$LINENO: checking for PSDK files" >&5 -$as_echo_n "checking for PSDK files... " >&6; } + echo "$as_me:$LINENO: checking for PSDK files" >&5 +echo $ECHO_N "checking for PSDK files... $ECHO_C" >&6 if test -z "$with_psdk_home"; then # This first line will detect a February 2003 Microsoft Platform SDK PSDK_HOME=`./oowintool --psdk-home` @@ -26549,13 +25233,13 @@ $as_echo_n "checking for PSDK files... " >&6; } PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'` # Problem with current PSDK (iz 49865) if test -f "$PSDK_HOME/Lib/libcp.lib"; then - { { $as_echo "$as_me:$LINENO: error: + { { echo "$as_me:$LINENO: error: Some modules do not build correctly with MS Platform SDK - April 2005 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found. Remove/rename/backup that file and restart configure. Details about this problem can be found in issue 49856." >&5 -$as_echo "$as_me: error: +echo "$as_me: error: Some modules do not build correctly with MS Platform SDK - April 2005 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found. @@ -26577,9 +25261,9 @@ problem can be found in issue 49856." >&2;} HAVE_PSDK_LIB="no" fi if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then - { { $as_echo "$as_me:$LINENO: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs + { { echo "$as_me:$LINENO: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs are installed or use --with-psdk-home ." >&5 -$as_echo "$as_me: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs +echo "$as_me: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs are installed or use --with-psdk-home ." >&2;} { (exit 1); exit 1; }; } fi @@ -26587,31 +25271,31 @@ are installed or use --with-psdk-home ." >&2;} -o ! -x "$PSDK_HOME/bin/msidb.exe" \ -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \ -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then - { { $as_echo "$as_me:$LINENO: error: Some (all) files of the Windows Installer SDK are missing, please install." >&5 -$as_echo "$as_me: error: Some (all) files of the Windows Installer SDK are missing, please install." >&2;} + { { echo "$as_me:$LINENO: error: Some (all) files of the Windows Installer SDK are missing, please install." >&5 +echo "$as_me: error: Some (all) files of the Windows Installer SDK are missing, please install." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: result: SDK files found ...)" >&5 -$as_echo "SDK files found ...)" >&6; } + echo "$as_me:$LINENO: result: SDK files found ...)" >&5 +echo "${ECHO_T}SDK files found ...)" >&6 if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: Found Windows SDK 6.1 ($PSDK_HOME)" >&5 -$as_echo "Found Windows SDK 6.1 ($PSDK_HOME)" >&6; } + echo "$as_me:$LINENO: result: Found Windows SDK 6.1 ($PSDK_HOME)" >&5 +echo "${ECHO_T}Found Windows SDK 6.1 ($PSDK_HOME)" >&6 WINDOWS_VISTA_PSDK=TRUE elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: Found Windows SDK 6.0 ($PSDK_HOME)" >&5 -$as_echo "Found Windows SDK 6.0 ($PSDK_HOME)" >&6; } + echo "$as_me:$LINENO: result: Found Windows SDK 6.0 ($PSDK_HOME)" >&5 +echo "${ECHO_T}Found Windows SDK 6.0 ($PSDK_HOME)" >&6 WINDOWS_VISTA_PSDK=TRUE else - { $as_echo "$as_me:$LINENO: result: Found Legacy Windows Platform SDK ($PSDK_HOME)" >&5 -$as_echo "Found Legacy Windows Platform SDK ($PSDK_HOME)" >&6; } + echo "$as_me:$LINENO: result: Found Legacy Windows Platform SDK ($PSDK_HOME)" >&5 +echo "${ECHO_T}Found Legacy Windows Platform SDK ($PSDK_HOME)" >&6 fi fi if test \( "$_os" = "WINNT" \) ; then - { $as_echo "$as_me:$LINENO: checking for DirectX SDK files" >&5 -$as_echo_n "checking for DirectX SDK files... " >&6; } + echo "$as_me:$LINENO: checking for DirectX SDK files" >&5 +echo $ECHO_N "checking for DirectX SDK files... $ECHO_C" >&6 if test -z "$with_directx_home"; then if test -n "$DXSDK_DIR"; then DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"` @@ -26643,17 +25327,17 @@ $as_echo_n "checking for DirectX SDK files... " >&6; } fi if test -n "$ENABLE_DIRECTX"; then if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { { $as_echo "$as_me:$LINENO: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&5 -$as_echo "$as_me: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&2;} + { { echo "$as_me:$LINENO: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&5 +echo "$as_me: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&2;} { (exit 1); exit 1; }; } fi else DIRECTXSDK_HOME="" - { $as_echo "$as_me:$LINENO: result: disabled" >&5 -$as_echo "disabled" >&6; } + echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6 fi fi @@ -26661,14 +25345,14 @@ fi NSIS_PATH="" if test "$_os" = "WINNT" ; then - { $as_echo "$as_me:$LINENO: checking for NSIS" >&5 -$as_echo_n "checking for NSIS... " >&6; } + echo "$as_me:$LINENO: checking for NSIS" >&5 +echo $ECHO_N "checking for NSIS... $ECHO_C" >&6 # Extract the first word of "nsis.exe", so it can be a program name with args. set dummy nsis.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_NSIS_PATH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $NSIS_PATH in [\\/]* | ?:[\\/]*) @@ -26681,28 +25365,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_NSIS_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi NSIS_PATH=$ac_cv_path_NSIS_PATH + if test -n "$NSIS_PATH"; then - { $as_echo "$as_me:$LINENO: result: $NSIS_PATH" >&5 -$as_echo "$NSIS_PATH" >&6; } + echo "$as_me:$LINENO: result: $NSIS_PATH" >&5 +echo "${ECHO_T}$NSIS_PATH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -n "$NSIS_PATH"; then NSIS_PATH=`dirname "$NSIS_PATH"` fi @@ -26717,24 +25400,24 @@ fi NSIS_PATH="$nsistest" fi if test -z "$NSIS_PATH"; then - { $as_echo "$as_me:$LINENO: WARNING: NSIS not found, no self contained installer will be build." >&5 -$as_echo "$as_me: WARNING: NSIS not found, no self contained installer will be build." >&2;} + { echo "$as_me:$LINENO: WARNING: NSIS not found, no self contained installer will be build." >&5 +echo "$as_me: WARNING: NSIS not found, no self contained installer will be build." >&2;} echo "NSIS not found, no self contained installer will be build." >> warn else NSIS_PATH=`cygpath -d "$NSIS_PATH"` NSIS_PATH=`cygpath -u "$NSIS_PATH"` - { $as_echo "$as_me:$LINENO: result: found ($NSIS_PATH)" >&5 -$as_echo "found ($NSIS_PATH)" >&6; } + echo "$as_me:$LINENO: result: found ($NSIS_PATH)" >&5 +echo "${ECHO_T}found ($NSIS_PATH)" >&6 fi fi # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_BISON+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $BISON in [\\/]* | ?:[\\/]*) @@ -26747,59 +25430,58 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi BISON=$ac_cv_path_BISON + if test -n "$BISON"; then - { $as_echo "$as_me:$LINENO: result: $BISON" >&5 -$as_echo "$BISON" >&6; } + echo "$as_me:$LINENO: result: $BISON" >&5 +echo "${ECHO_T}$BISON" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$BISON"; then - { { $as_echo "$as_me:$LINENO: error: no bison found in \$PATH, install bison" >&5 -$as_echo "$as_me: error: no bison found in \$PATH, install bison" >&2;} + { { echo "$as_me:$LINENO: error: no bison found in \$PATH, install bison" >&5 +echo "$as_me: error: no bison found in \$PATH, install bison" >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: checking the bison version" >&5 -$as_echo_n "checking the bison version... " >&6; } + echo "$as_me:$LINENO: checking the bison version" >&5 +echo $ECHO_N "checking the bison version... $ECHO_C" >&6 _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` # Accept newer than 1.875 or older(equal) than 1.75 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then if test "$_bison_version" = "1.875" ; then - { $as_echo "$as_me:$LINENO: WARNING: suspect ($BISON $_bison_version)" >&5 -$as_echo "$as_me: WARNING: suspect ($BISON $_bison_version)" >&2;} + { echo "$as_me:$LINENO: WARNING: suspect ($BISON $_bison_version)" >&5 +echo "$as_me: WARNING: suspect ($BISON $_bison_version)" >&2;} echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn else - { $as_echo "$as_me:$LINENO: result: checked ($BISON $_bison_version)" >&5 -$as_echo "checked ($BISON $_bison_version)" >&6; } + echo "$as_me:$LINENO: result: checked ($BISON $_bison_version)" >&5 +echo "${ECHO_T}checked ($BISON $_bison_version)" >&6 fi else - { { $as_echo "$as_me:$LINENO: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&5 -$as_echo "$as_me: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&2;} + { { echo "$as_me:$LINENO: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&5 +echo "$as_me: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&2;} { (exit 1); exit 1; }; } fi fi # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FLEX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FLEX in [\\/]* | ?:[\\/]*) @@ -26812,39 +25494,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi FLEX=$ac_cv_path_FLEX + if test -n "$FLEX"; then - { $as_echo "$as_me:$LINENO: result: $FLEX" >&5 -$as_echo "$FLEX" >&6; } + echo "$as_me:$LINENO: result: $FLEX" >&5 +echo "${ECHO_T}$FLEX" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$FLEX"; then - { { $as_echo "$as_me:$LINENO: error: no flex found in \$PATH, install flex" >&5 -$as_echo "$as_me: error: no flex found in \$PATH, install flex" >&2;} + { { echo "$as_me:$LINENO: error: no flex found in \$PATH, install flex" >&5 +echo "$as_me: error: no flex found in \$PATH, install flex" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "patch", so it can be a program name with args. set dummy patch; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PATCH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PATCH in [\\/]* | ?:[\\/]*) @@ -26857,31 +25538,30 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi PATCH=$ac_cv_path_PATCH + if test -n "$PATCH"; then - { $as_echo "$as_me:$LINENO: result: $PATCH" >&5 -$as_echo "$PATCH" >&6; } + echo "$as_me:$LINENO: result: $PATCH" >&5 +echo "${ECHO_T}$PATCH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$PATCH"; then - { { $as_echo "$as_me:$LINENO: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&5 -$as_echo "$as_me: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&2;} + { { echo "$as_me:$LINENO: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&5 +echo "$as_me: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&2;} { (exit 1); exit 1; }; } fi @@ -26892,20 +25572,20 @@ if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then if test -x "$with_gnu_patch"; then GNUPATCH=$with_gnu_patch else - { { $as_echo "$as_me:$LINENO: error: --with-gnu-patch did not point to an executable" >&5 -$as_echo "$as_me: error: --with-gnu-patch did not point to an executable" >&2;} + { { echo "$as_me:$LINENO: error: --with-gnu-patch did not point to an executable" >&5 +echo "$as_me: error: --with-gnu-patch did not point to an executable" >&2;} { (exit 1); exit 1; }; } fi fi - { $as_echo "$as_me:$LINENO: checking whether $GNUPATCH is GNU patch" >&5 -$as_echo_n "checking whether $GNUPATCH is GNU patch... " >&6; } + echo "$as_me:$LINENO: checking whether $GNUPATCH is GNU patch" >&5 +echo $ECHO_N "checking whether $GNUPATCH is GNU patch... $ECHO_C" >&6 if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { { $as_echo "$as_me:$LINENO: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&5 -$as_echo "$as_me: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&2;} + { { echo "$as_me:$LINENO: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&5 +echo "$as_me: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&2;} { (exit 1); exit 1; }; } fi fi @@ -26916,10 +25596,10 @@ if test -z "$with_gnu_cp"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GNUCP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GNUCP in [\\/]* | ?:[\\/]*) @@ -26932,65 +25612,64 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GNUCP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi GNUCP=$ac_cv_path_GNUCP + if test -n "$GNUCP"; then - { $as_echo "$as_me:$LINENO: result: $GNUCP" >&5 -$as_echo "$GNUCP" >&6; } + echo "$as_me:$LINENO: result: $GNUCP" >&5 +echo "${ECHO_T}$GNUCP" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$GNUCP" && break done if test -z $GNUCP; then - { { $as_echo "$as_me:$LINENO: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&5 -$as_echo "$as_me: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&2;} + { { echo "$as_me:$LINENO: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&5 +echo "$as_me: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&2;} { (exit 1); exit 1; }; } fi else if test -x "$with_gnu_cp"; then GNUCP=$with_gnu_cp else - { { $as_echo "$as_me:$LINENO: error: --with-gnu-cp did not point to an executable" >&5 -$as_echo "$as_me: error: --with-gnu-cp did not point to an executable" >&2;} + { { echo "$as_me:$LINENO: error: --with-gnu-cp did not point to an executable" >&5 +echo "$as_me: error: --with-gnu-cp did not point to an executable" >&2;} { (exit 1); exit 1; }; } fi fi -{ $as_echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp" >&5 -$as_echo_n "checking whether $GNUCP is GNU cp... " >&6; } -if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp from coreutils with preserve= support" >&5 +echo $ECHO_N "checking whether $GNUCP is GNU cp from coreutils with preserve= support... $ECHO_C" >&6 +if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then - { { $as_echo "$as_me:$LINENO: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&5 -$as_echo "$as_me: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&2;} + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + GNUCP='' +fi + +if test -z "$GNUCP"; then + if test "$_os" = "SunOS" -o "$_os" = "FreeBSD"; then + { { echo "$as_me:$LINENO: error: no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it" >&5 +echo "$as_me: error: no, GNU cp from coreutils is needed. install or specify with --with-gnu-cp=/path/to/it" >&2;} { (exit 1); exit 1; }; } - else - GNUCP='' - { $as_echo "$as_me:$LINENO: result: no gnucp found - using the system's cp command" >&5 -$as_echo "no gnucp found - using the system's cp command" >&6; } - fi + else + echo "$as_me:$LINENO: result: no GNU cp from coreutils found - using the system's cp command" >&5 +echo "${ECHO_T}no GNU cp from coreutils found - using the system's cp command" >&6 fi fi @@ -27001,10 +25680,10 @@ if test "$_os" = "WINNT"; then CYGWIN_PATH="" # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CYGWIN_PATH+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CYGWIN_PATH in [\\/]* | ?:[\\/]*) @@ -27017,28 +25696,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CYGWIN_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi CYGWIN_PATH=$ac_cv_path_CYGWIN_PATH + if test -n "$CYGWIN_PATH"; then - { $as_echo "$as_me:$LINENO: result: $CYGWIN_PATH" >&5 -$as_echo "$CYGWIN_PATH" >&6; } + echo "$as_me:$LINENO: result: $CYGWIN_PATH" >&5 +echo "${ECHO_T}$CYGWIN_PATH" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - CYGWIN_PATH=`dirname "$CYGWIN_PATH"` fi if test -z "$CYGWIN_PATH"; then @@ -27047,18 +25725,18 @@ fi if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then - { $as_echo "$as_me:$LINENO: checking ml.exe assembler path" >&5 -$as_echo_n "checking ml.exe assembler path... " >&6; } + echo "$as_me:$LINENO: checking ml.exe assembler path" >&5 +echo $ECHO_N "checking ml.exe assembler path... $ECHO_C" >&6 if test -n "$with_asm_home"; then with_asm_home=`cygpath -u "$with_asm_home"` fi if test ! -x "$with_asm_home/ml.exe"; then # Extract the first word of "ml.exe", so it can be a program name with args. set dummy ml.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ML_EXE+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ML_EXE in [\\/]* | ?:[\\/]*) @@ -27071,44 +25749,43 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ML_EXE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi ML_EXE=$ac_cv_path_ML_EXE + if test -n "$ML_EXE"; then - { $as_echo "$as_me:$LINENO: result: $ML_EXE" >&5 -$as_echo "$ML_EXE" >&6; } + echo "$as_me:$LINENO: result: $ML_EXE" >&5 +echo "${ECHO_T}$ML_EXE" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$ML_EXE"; then if test -x "$with_cl_home/bin/ml.exe"; then with_asm_home=$with_cl_home/bin - { $as_echo "$as_me:$LINENO: result: found ($with_asm_home)" >&5 -$as_echo "found ($with_asm_home)" >&6; } + echo "$as_me:$LINENO: result: found ($with_asm_home)" >&5 +echo "${ECHO_T}found ($with_asm_home)" >&6 else - { { $as_echo "$as_me:$LINENO: error: Configure did not find ml.exe assembler." >&5 -$as_echo "$as_me: error: Configure did not find ml.exe assembler." >&2;} + { { echo "$as_me:$LINENO: error: Configure did not find ml.exe assembler." >&5 +echo "$as_me: error: Configure did not find ml.exe assembler." >&2;} { (exit 1); exit 1; }; } fi else with_asm_home="ASM_IN_PATH" fi fi - { $as_echo "$as_me:$LINENO: result: $ASM_HOME" >&5 -$as_echo "$ASM_HOME" >&6; } + echo "$as_me:$LINENO: result: $ASM_HOME" >&5 +echo "${ECHO_T}$ASM_HOME" >&6 else with_asm_home="NO_ASM_HOME" fi @@ -27128,10 +25805,10 @@ if test -n "$with_zip_home" ; then else # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ZIP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ZIP in [\\/]* | ?:[\\/]*) @@ -27144,34 +25821,33 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi ZIP=$ac_cv_path_ZIP + if test -n "$ZIP"; then - { $as_echo "$as_me:$LINENO: result: $ZIP" >&5 -$as_echo "$ZIP" >&6; } + echo "$as_me:$LINENO: result: $ZIP" >&5 +echo "${ECHO_T}$ZIP" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "unzip", so it can be a program name with args. set dummy unzip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_UNZIP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $UNZIP in [\\/]* | ?:[\\/]*) @@ -27184,58 +25860,57 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi UNZIP=$ac_cv_path_UNZIP + if test -n "$UNZIP"; then - { $as_echo "$as_me:$LINENO: result: $UNZIP" >&5 -$as_echo "$UNZIP" >&6; } + echo "$as_me:$LINENO: result: $UNZIP" >&5 +echo "${ECHO_T}$UNZIP" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ZIP_HOME=`dirname "$ZIP"` fi if test -z "$ZIP" -o -z "$UNZIP"; then - { { $as_echo "$as_me:$LINENO: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&5 -$as_echo "$as_me: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&2;} + { { echo "$as_me:$LINENO: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&5 +echo "$as_me: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&2;} { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then if test -n "`$ZIP -h | grep -i WinNT`" ; then -{ { $as_echo "$as_me:$LINENO: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&5 -$as_echo "$as_me: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&2;} +{ { echo "$as_me:$LINENO: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&5 +echo "$as_me: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&2;} { (exit 1); exit 1; }; } fi fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for unicows.dll" >&5 -$as_echo_n "checking for unicows.dll... " >&6; } + echo "$as_me:$LINENO: checking for unicows.dll" >&5 +echo $ECHO_N "checking for unicows.dll... $ECHO_C" >&6 if test -x ./external/unicows/unicows.dll; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { { $as_echo "$as_me:$LINENO: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. + { { echo "$as_me:$LINENO: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. Get it from the Microsoft site and put it into external/unicows. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: <http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>." >&5 -$as_echo "$as_me: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. +echo "$as_me: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. Get it from the Microsoft site and put it into external/unicows. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: @@ -27245,18 +25920,18 @@ may have to search Microsoft's website.) Last time it was seen at: fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for dbghelp.dll" >&5 -$as_echo_n "checking for dbghelp.dll... " >&6; } + echo "$as_me:$LINENO: checking for dbghelp.dll" >&5 +echo $ECHO_N "checking for dbghelp.dll... $ECHO_C" >&6 if test -x ./external/dbghelp/dbghelp.dll; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { { $as_echo "$as_me:$LINENO: error: dbghelp.dll is missing in external/dbghelp/. + { { echo "$as_me:$LINENO: error: dbghelp.dll is missing in external/dbghelp/. Get it from the Microsoft site and put it into external/dbghelp. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: <http://www.microsoft.com/downloads/release.asp?releaseid=30682>." >&5 -$as_echo "$as_me: error: dbghelp.dll is missing in external/dbghelp/. +echo "$as_me: error: dbghelp.dll is missing in external/dbghelp/. Get it from the Microsoft site and put it into external/dbghelp. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: @@ -27269,24 +25944,24 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then if ./oowintool --msvc-copy-dlls ./external/msvcp ; then : else - { { $as_echo "$as_me:$LINENO: error: oowintool failed to copy CRT" >&5 -$as_echo "$as_me: error: oowintool failed to copy CRT" >&2;} + { { echo "$as_me:$LINENO: error: oowintool failed to copy CRT" >&5 +echo "$as_me: error: oowintool failed to copy CRT" >&2;} { (exit 1); exit 1; }; } fi fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for gdiplus.dll" >&5 -$as_echo_n "checking for gdiplus.dll... " >&6; } + echo "$as_me:$LINENO: checking for gdiplus.dll" >&5 +echo $ECHO_N "checking for gdiplus.dll... $ECHO_C" >&6 if test -x ./external/gdiplus/gdiplus.dll; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - { { $as_echo "$as_me:$LINENO: error: gdiplus.dll is missing in external/gdiplus/. + { { echo "$as_me:$LINENO: error: gdiplus.dll is missing in external/gdiplus/. Get it from the Microsoft site and put it into external/gdiplus. You may have to search Microsoft's website. Last time it was seen at: <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>." >&5 -$as_echo "$as_me: error: gdiplus.dll is missing in external/gdiplus/. +echo "$as_me: error: gdiplus.dll is missing in external/gdiplus/. Get it from the Microsoft site and put it into external/gdiplus. You may have to search Microsoft's website. Last time it was seen at: <http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>." >&2;} @@ -27300,11 +25975,11 @@ fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then - { $as_echo "$as_me:$LINENO: checking for instmsia.exe/instmsiw.exe" >&5 -$as_echo_n "checking for instmsia.exe/instmsiw.exe... " >&6; } + echo "$as_me:$LINENO: checking for instmsia.exe/instmsiw.exe" >&5 +echo $ECHO_N "checking for instmsia.exe/instmsiw.exe... $ECHO_C" >&6 if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then - { $as_echo "$as_me:$LINENO: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1` MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1` @@ -27313,27 +25988,27 @@ $as_echo "found" >&6; } cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK" fi if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then - { { $as_echo "$as_me:$LINENO: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. + { { echo "$as_me:$LINENO: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. These programs are part of the Visual Studio installation and should be found in a directory similar to: \"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\" As the automatic detection fails please copy the files to external/msi/." >&5 -$as_echo "$as_me: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. +echo "$as_me: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. These programs are part of the Visual Studio installation and should be found in a directory similar to: \"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\" As the automatic detection fails please copy the files to external/msi/." >&2;} { (exit 1); exit 1; }; } else - { $as_echo "$as_me:$LINENO: result: found and copied" >&5 -$as_echo "found and copied" >&6; } + echo "$as_me:$LINENO: result: found and copied" >&5 +echo "${ECHO_T}found and copied" >&6 fi fi fi fi -{ $as_echo "$as_me:$LINENO: checking which VCLplugs shall be built" >&5 -$as_echo_n "checking which VCLplugs shall be built... " >&6; } +echo "$as_me:$LINENO: checking which VCLplugs shall be built" >&5 +echo $ECHO_N "checking which VCLplugs shall be built... $ECHO_C" >&6 ENABLE_GTK="" if test "x$enable_gtk" = "xyes"; then ENABLE_GTK="TRUE" @@ -27356,31 +26031,31 @@ fi if test -z "$R"; then - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { $as_echo "$as_me:$LINENO: result: $R" >&5 -$as_echo "$R" >&6; } + echo "$as_me:$LINENO: result: $R" >&5 +echo "${ECHO_T}$R" >&6 fi ENABLE_GCONF="" -{ $as_echo "$as_me:$LINENO: checking whether to enable GConf support" >&5 -$as_echo_n "checking whether to enable GConf support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable GConf support" >&5 +echo $ECHO_N "checking whether to enable GConf support... $ECHO_C" >&6 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then ENABLE_GCONF="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -27393,29 +26068,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -27426,25 +26100,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 -$as_echo_n "checking for gconf-2.0 ... " >&6; } + echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 +echo $ECHO_N "checking for gconf-2.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "gconf-2.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 -$as_echo_n "checking GCONF_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 +echo $ECHO_N "checking GCONF_CFLAGS... $ECHO_C" >&6 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 -$as_echo "$GCONF_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 +echo "${ECHO_T}$GCONF_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 -$as_echo_n "checking GCONF_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 +echo $ECHO_N "checking GCONF_LIBS... $ECHO_C" >&6 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 -$as_echo "$GCONF_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 +echo "${ECHO_T}$GCONF_LIBS" >&6 else GCONF_CFLAGS="" GCONF_LIBS="" @@ -27465,35 +26139,35 @@ $as_echo "$GCONF_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi ENABLE_GNOMEVFS="" -{ $as_echo "$as_me:$LINENO: checking whether to enable GNOME VFS support" >&5 -$as_echo_n "checking whether to enable GNOME VFS support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable GNOME VFS support" >&5 +echo $ECHO_N "checking whether to enable GNOME VFS support... $ECHO_C" >&6 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then ENABLE_GNOMEVFS="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -27506,29 +26180,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -27539,25 +26212,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gnome-vfs-2.0 >= 2.6.0 " >&5 -$as_echo_n "checking for gnome-vfs-2.0 >= 2.6.0 ... " >&6; } + echo "$as_me:$LINENO: checking for gnome-vfs-2.0 >= 2.6.0 " >&5 +echo $ECHO_N "checking for gnome-vfs-2.0 >= 2.6.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "gnome-vfs-2.0 >= 2.6.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking GNOMEVFS_CFLAGS" >&5 -$as_echo_n "checking GNOMEVFS_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GNOMEVFS_CFLAGS" >&5 +echo $ECHO_N "checking GNOMEVFS_CFLAGS... $ECHO_C" >&6 GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6.0 "` - { $as_echo "$as_me:$LINENO: result: $GNOMEVFS_CFLAGS" >&5 -$as_echo "$GNOMEVFS_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GNOMEVFS_CFLAGS" >&5 +echo "${ECHO_T}$GNOMEVFS_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking GNOMEVFS_LIBS" >&5 -$as_echo_n "checking GNOMEVFS_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GNOMEVFS_LIBS" >&5 +echo $ECHO_N "checking GNOMEVFS_LIBS... $ECHO_C" >&6 GNOMEVFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6.0 "` - { $as_echo "$as_me:$LINENO: result: $GNOMEVFS_LIBS" >&5 -$as_echo "$GNOMEVFS_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GNOMEVFS_LIBS" >&5 +echo "${ECHO_T}$GNOMEVFS_LIBS" >&6 else GNOMEVFS_CFLAGS="" GNOMEVFS_LIBS="" @@ -27578,8 +26251,8 @@ $as_echo "$GNOMEVFS_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi @@ -27590,10 +26263,10 @@ $as_echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -27606,29 +26279,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -27639,25 +26311,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 -$as_echo_n "checking for gconf-2.0 ... " >&6; } + echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 +echo $ECHO_N "checking for gconf-2.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "gconf-2.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 -$as_echo_n "checking GCONF_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 +echo $ECHO_N "checking GCONF_CFLAGS... $ECHO_C" >&6 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 -$as_echo "$GCONF_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 +echo "${ECHO_T}$GCONF_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 -$as_echo_n "checking GCONF_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 +echo $ECHO_N "checking GCONF_LIBS... $ECHO_C" >&6 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 -$as_echo "$GCONF_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 +echo "${ECHO_T}$GCONF_LIBS" >&6 else GCONF_CFLAGS="" GCONF_LIBS="" @@ -27678,15 +26350,15 @@ $as_echo "$GCONF_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -27704,10 +26376,10 @@ if test "$test_gtk" = "yes"; then if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -27720,29 +26392,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -27753,25 +26424,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " >&5 -$as_echo_n "checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ... " >&6; } + echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " >&5 +echo $ECHO_N "checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 -$as_echo_n "checking GTK_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 +echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6 GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - { $as_echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 -$as_echo "$GTK_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 +echo "${ECHO_T}$GTK_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking GTK_LIBS" >&5 -$as_echo_n "checking GTK_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GTK_LIBS" >&5 +echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6 GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - { $as_echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 -$as_echo "$GTK_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 +echo "${ECHO_T}$GTK_LIBS" >&6 else GTK_CFLAGS="" GTK_LIBS="" @@ -27792,8 +26463,8 @@ $as_echo "$GTK_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 -$as_echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} + { { echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 +echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} { (exit 1); exit 1; }; } fi @@ -27804,22 +26475,22 @@ $as_echo "$as_me: error: requirements to build the gtk-plugin not met. Use --dis BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK" fi - { $as_echo "$as_me:$LINENO: checking whether to enable DBUS support" >&5 -$as_echo_n "checking whether to enable DBUS support... " >&6; } + echo "$as_me:$LINENO: checking whether to enable DBUS support" >&5 +echo $ECHO_N "checking whether to enable DBUS support... $ECHO_C" >&6 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then ENABLE_DBUS="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -27832,29 +26503,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -27865,25 +26535,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for dbus-glib-1 >= 0.70 " >&5 -$as_echo_n "checking for dbus-glib-1 >= 0.70 ... " >&6; } + echo "$as_me:$LINENO: checking for dbus-glib-1 >= 0.70 " >&5 +echo $ECHO_N "checking for dbus-glib-1 >= 0.70 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "dbus-glib-1 >= 0.70 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5 -$as_echo_n "checking DBUS_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5 +echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.70 "` - { $as_echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5 -$as_echo "$DBUS_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5 +echo "${ECHO_T}$DBUS_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking DBUS_LIBS" >&5 -$as_echo_n "checking DBUS_LIBS... " >&6; } + echo "$as_me:$LINENO: checking DBUS_LIBS" >&5 +echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.70 "` - { $as_echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5 -$as_echo "$DBUS_LIBS" >&6; } + echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5 +echo "${ECHO_T}$DBUS_LIBS" >&6 else DBUS_CFLAGS="" DBUS_LIBS="" @@ -27904,37 +26574,37 @@ $as_echo "$DBUS_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - { $as_echo "$as_me:$LINENO: checking whether to enable GIO support" >&5 -$as_echo_n "checking whether to enable GIO support... " >&6; } + echo "$as_me:$LINENO: checking whether to enable GIO support" >&5 +echo $ECHO_N "checking whether to enable GIO support... $ECHO_C" >&6 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then if test "$ENABLE_GNOMEVFS" = "TRUE" ; then - { { $as_echo "$as_me:$LINENO: error: please use --enable-gio only together with --disable-gnome-vfs." >&5 -$as_echo "$as_me: error: please use --enable-gio only together with --disable-gnome-vfs." >&2;} + { { echo "$as_me:$LINENO: error: please use --enable-gio only together with --disable-gnome-vfs." >&5 +echo "$as_me: error: please use --enable-gio only together with --disable-gnome-vfs." >&2;} { (exit 1); exit 1; }; } fi ENABLE_GIO="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -27947,29 +26617,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -27980,25 +26649,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gio-2.0 " >&5 -$as_echo_n "checking for gio-2.0 ... " >&6; } + echo "$as_me:$LINENO: checking for gio-2.0 " >&5 +echo $ECHO_N "checking for gio-2.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "gio-2.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking GIO_CFLAGS" >&5 -$as_echo_n "checking GIO_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GIO_CFLAGS" >&5 +echo $ECHO_N "checking GIO_CFLAGS... $ECHO_C" >&6 GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GIO_CFLAGS" >&5 -$as_echo "$GIO_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GIO_CFLAGS" >&5 +echo "${ECHO_T}$GIO_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking GIO_LIBS" >&5 -$as_echo_n "checking GIO_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GIO_LIBS" >&5 +echo $ECHO_N "checking GIO_LIBS... $ECHO_C" >&6 GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GIO_LIBS" >&5 -$as_echo "$GIO_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GIO_LIBS" >&5 +echo "${ECHO_T}$GIO_LIBS" >&6 else GIO_CFLAGS="" GIO_LIBS="" @@ -28019,14 +26688,14 @@ $as_echo "$GIO_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -28044,8 +26713,8 @@ GSTREAMER_LIBS="" ENABLE_GSTREAMER="" if test "$test_gstreamer" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether to build the GStreamer media backend" >&5 -$as_echo_n "checking whether to build the GStreamer media backend... " >&6; } + echo "$as_me:$LINENO: checking whether to build the GStreamer media backend" >&5 +echo $ECHO_N "checking whether to build the GStreamer media backend... $ECHO_C" >&6 if test "x$enable_gstreamer" != "xno" ; then succeeded=no @@ -28053,10 +26722,10 @@ $as_echo_n "checking whether to build the GStreamer media backend... " >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -28069,29 +26738,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -28102,25 +26770,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 -$as_echo_n "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... " >&6; } + echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " >&5 +echo $ECHO_N "checking for gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking GSTREAMER_CFLAGS" >&5 -$as_echo_n "checking GSTREAMER_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GSTREAMER_CFLAGS" >&5 +echo $ECHO_N "checking GSTREAMER_CFLAGS... $ECHO_C" >&6 GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - { $as_echo "$as_me:$LINENO: result: $GSTREAMER_CFLAGS" >&5 -$as_echo "$GSTREAMER_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GSTREAMER_CFLAGS" >&5 +echo "${ECHO_T}$GSTREAMER_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking GSTREAMER_LIBS" >&5 -$as_echo_n "checking GSTREAMER_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GSTREAMER_LIBS" >&5 +echo $ECHO_N "checking GSTREAMER_LIBS... $ECHO_C" >&6 GSTREAMER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 "` - { $as_echo "$as_me:$LINENO: result: $GSTREAMER_LIBS" >&5 -$as_echo "$GSTREAMER_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GSTREAMER_LIBS" >&5 +echo "${ECHO_T}$GSTREAMER_LIBS" >&6 else GSTREAMER_CFLAGS="" GSTREAMER_LIBS="" @@ -28141,17 +26809,17 @@ $as_echo "$GSTREAMER_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 -$as_echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} + { { echo "$as_me:$LINENO: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&5 +echo "$as_me: error: requirements to build the GStreamer media backend not met. Use --disable-gstreamer or install the missing packages" >&2;} { (exit 1); exit 1; }; } fi ENABLE_GSTREAMER="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -28166,18 +26834,18 @@ SYSTEM_CAIRO="" if test "$test_cairo" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether to use cairo" >&5 -$as_echo_n "checking whether to use cairo... " >&6; } + echo "$as_me:$LINENO: checking whether to use cairo" >&5 +echo $ECHO_N "checking whether to use cairo... $ECHO_C" >&6 if test "x$enable_cairo" != "xno" ; then ENABLE_CAIRO="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking which cairo to use" >&5 -$as_echo_n "checking which cairo to use... " >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + echo "$as_me:$LINENO: checking which cairo to use" >&5 +echo $ECHO_N "checking which cairo to use... $ECHO_C" >&6 if test -n "$with_system_cairo" -o -n "$with_system_libs" && \ test "$with_system_cairo" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_CAIRO=YES @@ -28186,10 +26854,10 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -28202,29 +26870,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -28235,25 +26902,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for cairo >= 1.0.2 " >&5 -$as_echo_n "checking for cairo >= 1.0.2 ... " >&6; } + echo "$as_me:$LINENO: checking for cairo >= 1.0.2 " >&5 +echo $ECHO_N "checking for cairo >= 1.0.2 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "cairo >= 1.0.2 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking CAIRO_CFLAGS" >&5 -$as_echo_n "checking CAIRO_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking CAIRO_CFLAGS" >&5 +echo $ECHO_N "checking CAIRO_CFLAGS... $ECHO_C" >&6 CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.0.2 "` - { $as_echo "$as_me:$LINENO: result: $CAIRO_CFLAGS" >&5 -$as_echo "$CAIRO_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $CAIRO_CFLAGS" >&5 +echo "${ECHO_T}$CAIRO_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking CAIRO_LIBS" >&5 -$as_echo_n "checking CAIRO_LIBS... " >&6; } + echo "$as_me:$LINENO: checking CAIRO_LIBS" >&5 +echo $ECHO_N "checking CAIRO_LIBS... $ECHO_C" >&6 CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.0.2 "` - { $as_echo "$as_me:$LINENO: result: $CAIRO_LIBS" >&5 -$as_echo "$CAIRO_LIBS" >&6; } + echo "$as_me:$LINENO: result: $CAIRO_LIBS" >&5 +echo "${ECHO_T}$CAIRO_LIBS" >&6 else CAIRO_CFLAGS="" CAIRO_LIBS="" @@ -28274,27 +26941,25 @@ $as_echo "$CAIRO_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then - { { $as_echo "$as_me:$LINENO: error: Cairo library requires fontconfig." >&5 -$as_echo "$as_me: error: Cairo library requires fontconfig." >&2;} + { { echo "$as_me:$LINENO: error: Cairo library requires fontconfig." >&5 +echo "$as_me: error: Cairo library requires fontconfig." >&2;} { (exit 1); exit 1; }; } fi if test "$with_system_xrender_headers" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether Xrender.h defines PictStandardA8" >&5 -$as_echo_n "checking whether Xrender.h defines PictStandardA8... " >&6; } + echo "$as_me:$LINENO: checking whether Xrender.h defines PictStandardA8" >&5 +echo $ECHO_N "checking whether Xrender.h defines PictStandardA8... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -28315,56 +26980,42 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: no, X headers too old." >&5 -$as_echo "$as_me: error: no, X headers too old." >&2;} +{ { echo "$as_me:$LINENO: error: no, X headers too old." >&5 +echo "$as_me: error: no, X headers too old." >&2;} { (exit 1); exit 1; }; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi else BUILD_TYPE="$BUILD_TYPE CAIRO" if test "$build_cpu" != "x86_64"; then BUILD_PIXMAN=YES fi - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -28375,25 +27026,25 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to build the OpenGL Transitions component" >&5 -$as_echo_n "checking whether to build the OpenGL Transitions component... " >&6; } +echo "$as_me:$LINENO: checking whether to build the OpenGL Transitions component" >&5 +echo $ECHO_N "checking whether to build the OpenGL Transitions component... $ECHO_C" >&6 ENABLE_OPENGL= if test "x$enable_opengl" != "xno" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 if test "${ac_cv_header_GL_gl_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5 -$as_echo_n "checking for GL/gl.h... " >&6; } + echo "$as_me:$LINENO: checking for GL/gl.h" >&5 +echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6 if test "${ac_cv_header_GL_gl_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 -$as_echo "$ac_cv_header_GL_gl_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 +echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5 -$as_echo_n "checking GL/gl.h usability... " >&6; } +echo "$as_me:$LINENO: checking GL/gl.h usability" >&5 +echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28404,38 +27055,41 @@ $ac_includes_default #include <GL/gl.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5 -$as_echo_n "checking GL/gl.h presence... " >&6; } +echo "$as_me:$LINENO: checking GL/gl.h presence" >&5 +echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28444,85 +27098,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <GL/gl.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5 -$as_echo_n "checking for GL/gl.h... " >&6; } +echo "$as_me:$LINENO: checking for GL/gl.h" >&5 +echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6 if test "${ac_cv_header_GL_gl_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_GL_gl_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 -$as_echo "$ac_cv_header_GL_gl_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 +echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6 fi -if test "x$ac_cv_header_GL_gl_h" = x""yes; then +if test $ac_cv_header_GL_gl_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: OpenGL headers not found" >&5 -$as_echo "$as_me: error: OpenGL headers not found" >&2;} + { { echo "$as_me:$LINENO: error: OpenGL headers not found" >&5 +echo "$as_me: error: OpenGL headers not found" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for main in -lGL" >&5 -$as_echo_n "checking for main in -lGL... " >&6; } +echo "$as_me:$LINENO: checking for main in -lGL" >&5 +echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6 if test "${ac_cv_lib_GL_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGL $LIBS" @@ -28537,48 +27198,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_GL_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_GL_main=no +ac_cv_lib_GL_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 -$as_echo "$ac_cv_lib_GL_main" >&6; } -if test "x$ac_cv_lib_GL_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 +echo "${ECHO_T}$ac_cv_lib_GL_main" >&6 +if test $ac_cv_lib_GL_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGL 1 _ACEOF @@ -28586,16 +27246,16 @@ _ACEOF LIBS="-lGL $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libGL not installed or functional" >&5 -$as_echo "$as_me: error: libGL not installed or functional" >&2;} + { { echo "$as_me:$LINENO: error: libGL not installed or functional" >&5 +echo "$as_me: error: libGL not installed or functional" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for main in -lGLU" >&5 -$as_echo_n "checking for main in -lGLU... " >&6; } +echo "$as_me:$LINENO: checking for main in -lGLU" >&5 +echo $ECHO_N "checking for main in -lGLU... $ECHO_C" >&6 if test "${ac_cv_lib_GLU_main+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGLU $LIBS" @@ -28610,48 +27270,47 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_GLU_main=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_GLU_main=no +ac_cv_lib_GLU_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5 -$as_echo "$ac_cv_lib_GLU_main" >&6; } -if test "x$ac_cv_lib_GLU_main" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5 +echo "${ECHO_T}$ac_cv_lib_GLU_main" >&6 +if test $ac_cv_lib_GLU_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGLU 1 _ACEOF @@ -28659,71 +27318,71 @@ _ACEOF LIBS="-lGLU $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libGLU not installed or functional" >&5 -$as_echo "$as_me: error: libGLU not installed or functional" >&2;} + { { echo "$as_me:$LINENO: error: libGLU not installed or functional" >&5 +echo "$as_me: error: libGLU not installed or functional" >&2;} { (exit 1); exit 1; }; } fi ENABLE_OPENGL=TRUE else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to build extra presenter ui" >&5 -$as_echo_n "checking whether to build extra presenter ui... " >&6; } +echo "$as_me:$LINENO: checking whether to build extra presenter ui" >&5 +echo $ECHO_N "checking whether to build extra presenter ui... $ECHO_C" >&6 if test -n "$enable_presenter_extra_ui" -a "$enable_presenter_extra_ui" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_PRESENTER_EXTRA_UI=YES else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_PRESENTER_EXTRA_UI=NO fi -{ $as_echo "$as_me:$LINENO: checking whether to build the Presentation Minimizer extension" >&5 -$as_echo_n "checking whether to build the Presentation Minimizer extension... " >&6; } +echo "$as_me:$LINENO: checking whether to build the Presentation Minimizer extension" >&5 +echo $ECHO_N "checking whether to build the Presentation Minimizer extension... $ECHO_C" >&6 if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_MINIMIZER=YES else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_MINIMIZER=NO fi -{ $as_echo "$as_me:$LINENO: checking whether to build the Presenter Screen extension" >&5 -$as_echo_n "checking whether to build the Presenter Screen extension... " >&6; } +echo "$as_me:$LINENO: checking whether to build the Presenter Screen extension" >&5 +echo $ECHO_N "checking whether to build the Presenter Screen extension... $ECHO_C" >&6 if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_PRESENTER_SCREEN=YES else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_PRESENTER_SCREEN=NO fi -{ $as_echo "$as_me:$LINENO: checking whether to build the PDF Import extension" >&5 -$as_echo_n "checking whether to build the PDF Import extension... " >&6; } +echo "$as_me:$LINENO: checking whether to build the PDF Import extension" >&5 +echo $ECHO_N "checking whether to build the PDF Import extension... $ECHO_C" >&6 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_PDFIMPORT=YES - { $as_echo "$as_me:$LINENO: checking which pdf backend to use" >&5 -$as_echo_n "checking which pdf backend to use... " >&6; } + echo "$as_me:$LINENO: checking which pdf backend to use" >&5 +echo $ECHO_N "checking which pdf backend to use... $ECHO_C" >&6 if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ test "$with_system_poppler" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_POPPLER=YES succeeded=no @@ -28731,10 +27390,10 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -28747,29 +27406,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -28780,25 +27438,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for poppler >= 0.8.0 " >&5 -$as_echo_n "checking for poppler >= 0.8.0 ... " >&6; } + echo "$as_me:$LINENO: checking for poppler >= 0.8.0 " >&5 +echo $ECHO_N "checking for poppler >= 0.8.0 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "poppler >= 0.8.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking POPPLER_CFLAGS" >&5 -$as_echo_n "checking POPPLER_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking POPPLER_CFLAGS" >&5 +echo $ECHO_N "checking POPPLER_CFLAGS... $ECHO_C" >&6 POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.8.0 "` - { $as_echo "$as_me:$LINENO: result: $POPPLER_CFLAGS" >&5 -$as_echo "$POPPLER_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $POPPLER_CFLAGS" >&5 +echo "${ECHO_T}$POPPLER_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking POPPLER_LIBS" >&5 -$as_echo_n "checking POPPLER_LIBS... " >&6; } + echo "$as_me:$LINENO: checking POPPLER_LIBS" >&5 +echo $ECHO_N "checking POPPLER_LIBS... $ECHO_C" >&6 POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.8.0 "` - { $as_echo "$as_me:$LINENO: result: $POPPLER_LIBS" >&5 -$as_echo "$POPPLER_LIBS" >&6; } + echo "$as_me:$LINENO: result: $POPPLER_LIBS" >&5 +echo "${ECHO_T}$POPPLER_LIBS" >&6 else POPPLER_CFLAGS="" POPPLER_LIBS="" @@ -28819,30 +27477,30 @@ $as_echo "$POPPLER_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_POPPLER=NO BUILD_TYPE="$BUILD_TYPE XPDF" - { $as_echo "$as_me:$LINENO: checking for xpdf module" >&5 -$as_echo_n "checking for xpdf module... " >&6; } + echo "$as_me:$LINENO: checking for xpdf module" >&5 +echo $ECHO_N "checking for xpdf module... $ECHO_C" >&6 if test -d ./xpdf; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_PDFIMPORT=NO fi @@ -28851,62 +27509,62 @@ fi if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then - { $as_echo "$as_me:$LINENO: checking for sdext module" >&5 -$as_echo_n "checking for sdext module... " >&6; } + echo "$as_me:$LINENO: checking for sdext module" >&5 +echo $ECHO_N "checking for sdext module... $ECHO_C" >&6 if test -d ./sdext; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi BUILD_TYPE="$BUILD_TYPE SDEXT" fi -{ $as_echo "$as_me:$LINENO: checking whether to build the Wiki Publisher extension" >&5 -$as_echo_n "checking whether to build the Wiki Publisher extension... " >&6; } +echo "$as_me:$LINENO: checking whether to build the Wiki Publisher extension" >&5 +echo $ECHO_N "checking whether to build the Wiki Publisher extension... $ECHO_C" >&6 if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking for swext module" >&5 -$as_echo_n "checking for swext module... " >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + echo "$as_me:$LINENO: checking for swext module" >&5 +echo $ECHO_N "checking for swext module... $ECHO_C" >&6 if test -d ./swext; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi ENABLE_MEDIAWIKI=YES BUILD_TYPE="$BUILD_TYPE SWEXT" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_MEDIAWIKI=NO fi if test "$ENABLE_MEDIAWIKI" = "YES"; then - { $as_echo "$as_me:$LINENO: checking which Servlet API Jar to use" >&5 -$as_echo_n "checking which Servlet API Jar to use... " >&6; } + echo "$as_me:$LINENO: checking which Servlet API Jar to use" >&5 +echo $ECHO_N "checking which Servlet API Jar to use... $ECHO_C" >&6 if test -n "$with_system_servlet_api"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_SERVLETAPI=YES if test -z "$SERVLETAPI_JAR"; then SERVLETAPI_JAR=/usr/share/java/servlet-api.jar fi - as_ac_File=`$as_echo "ac_cv_file_$SERVLETAPI_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $SERVLETAPI_JAR" >&5 -$as_echo_n "checking for $SERVLETAPI_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$SERVLETAPI_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $SERVLETAPI_JAR" >&5 +echo $ECHO_N "checking for $SERVLETAPI_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$SERVLETAPI_JAR"; then eval "$as_ac_File=yes" @@ -28914,23 +27572,19 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: servlet-api.jar not found." >&5 -$as_echo "$as_me: error: servlet-api.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: servlet-api.jar not found." >&5 +echo "$as_me: error: servlet-api.jar not found." >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_SERVLETAPI=NO BUILD_TYPE="$BUILD_TYPE TOMCAT" fi @@ -28938,40 +27592,40 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to build the Report Builder extension" >&5 -$as_echo_n "checking whether to build the Report Builder extension... " >&6; } +echo "$as_me:$LINENO: checking whether to build the Report Builder extension" >&5 +echo $ECHO_N "checking whether to build the Report Builder extension... $ECHO_C" >&6 if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_REPORTBUILDER=YES - { $as_echo "$as_me:$LINENO: checking for reportbuilder module" >&5 -$as_echo_n "checking for reportbuilder module... " >&6; } + echo "$as_me:$LINENO: checking for reportbuilder module" >&5 +echo $ECHO_N "checking for reportbuilder module... $ECHO_C" >&6 if test -d ./reportbuilder; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking which jfreereport libs to use" >&5 -$as_echo_n "checking which jfreereport libs to use... " >&6; } + echo "$as_me:$LINENO: checking which jfreereport libs to use" >&5 +echo $ECHO_N "checking which jfreereport libs to use... $ECHO_C" >&6 if test "$with_system_jfreereport" = "yes"; then SYSTEM_JFREEREPORT=YES - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 if test -z $SAC_JAR; then SAC_JAR=/usr/share/java/sac.jar fi - as_ac_File=`$as_echo "ac_cv_file_$SAC_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $SAC_JAR" >&5 -$as_echo_n "checking for $SAC_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$SAC_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $SAC_JAR" >&5 +echo $ECHO_N "checking for $SAC_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$SAC_JAR"; then eval "$as_ac_File=yes" @@ -28979,30 +27633,26 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: sac.jar not found." >&5 -$as_echo "$as_me: error: sac.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: sac.jar not found." >&5 +echo "$as_me: error: sac.jar not found." >&2;} { (exit 1); exit 1; }; } fi if test -z $LIBXML_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libxml-1.0.0.jar" >&5 -$as_echo_n "checking for /usr/share/java/libxml-1.0.0.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libxml-1.0.0.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libxml-1.0.0.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libxml_1_0_0_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libxml-1.0.0.jar"; then ac_cv_file__usr_share_java_libxml_1_0_0_jar=yes @@ -29010,20 +27660,20 @@ else ac_cv_file__usr_share_java_libxml_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libxml_1_0_0_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&6 +if test $ac_cv_file__usr_share_java_libxml_1_0_0_jar = yes; then LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libxml.jar" >&5 -$as_echo_n "checking for /usr/share/java/libxml.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libxml.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libxml.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libxml_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libxml.jar"; then ac_cv_file__usr_share_java_libxml_jar=yes @@ -29031,13 +27681,13 @@ else ac_cv_file__usr_share_java_libxml_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libxml_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libxml_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libxml_jar" >&6 +if test $ac_cv_file__usr_share_java_libxml_jar = yes; then LIBXML_JAR=/usr/share/java/libxml.jar else - { { $as_echo "$as_me:$LINENO: error: libxml.jar replacement not found." >&5 -$as_echo "$as_me: error: libxml.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: libxml.jar replacement not found." >&5 +echo "$as_me: error: libxml.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29047,15 +27697,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBXML_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBXML_JAR" >&5 -$as_echo_n "checking for $LIBXML_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LIBXML_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LIBXML_JAR" >&5 +echo $ECHO_N "checking for $LIBXML_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBXML_JAR"; then eval "$as_ac_File=yes" @@ -29063,31 +27713,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: libxml.jar not found." >&5 -$as_echo "$as_me: error: libxml.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: libxml.jar not found." >&5 +echo "$as_me: error: libxml.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $FLUTE_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flute-1.3.0.jar" >&5 -$as_echo_n "checking for /usr/share/java/flute-1.3.0.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/flute-1.3.0.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/flute-1.3.0.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_flute_1_3_0_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/flute-1.3.0.jar"; then ac_cv_file__usr_share_java_flute_1_3_0_jar=yes @@ -29095,20 +27741,20 @@ else ac_cv_file__usr_share_java_flute_1_3_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_1_3_0_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_flute_1_3_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_flute_1_3_0_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_1_3_0_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_flute_1_3_0_jar" >&6 +if test $ac_cv_file__usr_share_java_flute_1_3_0_jar = yes; then FLUTE_JAR=/usr/share/java/flute-1.3.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flute.jar" >&5 -$as_echo_n "checking for /usr/share/java/flute.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/flute.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/flute.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_flute_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/flute.jar"; then ac_cv_file__usr_share_java_flute_jar=yes @@ -29116,13 +27762,13 @@ else ac_cv_file__usr_share_java_flute_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_flute_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_flute_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_flute_jar" >&6 +if test $ac_cv_file__usr_share_java_flute_jar = yes; then FLUTE_JAR=/usr/share/java/flute.jar else - { { $as_echo "$as_me:$LINENO: error: flute-1.3.0.jar replacement not found." >&5 -$as_echo "$as_me: error: flute-1.3.0.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: flute-1.3.0.jar replacement not found." >&5 +echo "$as_me: error: flute-1.3.0.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29132,15 +27778,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$FLUTE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $FLUTE_JAR" >&5 -$as_echo_n "checking for $FLUTE_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$FLUTE_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $FLUTE_JAR" >&5 +echo $ECHO_N "checking for $FLUTE_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$FLUTE_JAR"; then eval "$as_ac_File=yes" @@ -29148,31 +27794,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: flute-1.3.0.jar not found." >&5 -$as_echo "$as_me: error: flute-1.3.0.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: flute-1.3.0.jar not found." >&5 +echo "$as_me: error: flute-1.3.0.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $JFREEREPORT_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine-0.9.2.jar" >&5 -$as_echo_n "checking for /usr/share/java/flow-engine-0.9.2.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine-0.9.2.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/flow-engine-0.9.2.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_flow_engine_0_9_2_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/flow-engine-0.9.2.jar"; then ac_cv_file__usr_share_java_flow_engine_0_9_2_jar=yes @@ -29180,20 +27822,20 @@ else ac_cv_file__usr_share_java_flow_engine_0_9_2_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&6 +if test $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar = yes; then JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine.jar" >&5 -$as_echo_n "checking for /usr/share/java/flow-engine.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/flow-engine.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_flow_engine_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/flow-engine.jar"; then ac_cv_file__usr_share_java_flow_engine_jar=yes @@ -29201,13 +27843,13 @@ else ac_cv_file__usr_share_java_flow_engine_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_flow_engine_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_flow_engine_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_flow_engine_jar" >&6 +if test $ac_cv_file__usr_share_java_flow_engine_jar = yes; then JFREEREPORT_JAR=/usr/share/java/flow-engine.jar else - { { $as_echo "$as_me:$LINENO: error: jfreereport.jar replacement not found." >&5 -$as_echo "$as_me: error: jfreereport.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: jfreereport.jar replacement not found." >&5 +echo "$as_me: error: jfreereport.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29217,15 +27859,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$JFREEREPORT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $JFREEREPORT_JAR" >&5 -$as_echo_n "checking for $JFREEREPORT_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$JFREEREPORT_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $JFREEREPORT_JAR" >&5 +echo $ECHO_N "checking for $JFREEREPORT_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$JFREEREPORT_JAR"; then eval "$as_ac_File=yes" @@ -29233,31 +27875,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: jfreereport.jar not found." >&5 -$as_echo "$as_me: error: jfreereport.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: jfreereport.jar not found." >&5 +echo "$as_me: error: jfreereport.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBLAYOUT_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/liblayout-0.2.9.jar" >&5 -$as_echo_n "checking for /usr/share/java/liblayout-0.2.9.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/liblayout-0.2.9.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/liblayout-0.2.9.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_liblayout_0_2_9_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/liblayout-0.2.9.jar"; then ac_cv_file__usr_share_java_liblayout_0_2_9_jar=yes @@ -29265,20 +27903,20 @@ else ac_cv_file__usr_share_java_liblayout_0_2_9_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&6 +if test $ac_cv_file__usr_share_java_liblayout_0_2_9_jar = yes; then LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/liblayout.jar" >&5 -$as_echo_n "checking for /usr/share/java/liblayout.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/liblayout.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/liblayout.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_liblayout_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/liblayout.jar"; then ac_cv_file__usr_share_java_liblayout_jar=yes @@ -29286,13 +27924,13 @@ else ac_cv_file__usr_share_java_liblayout_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_liblayout_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_liblayout_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_liblayout_jar" >&6 +if test $ac_cv_file__usr_share_java_liblayout_jar = yes; then LIBLAYOUT_JAR=/usr/share/java/liblayout.jar else - { { $as_echo "$as_me:$LINENO: error: liblayout.jar replacement not found." >&5 -$as_echo "$as_me: error: liblayout.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: liblayout.jar replacement not found." >&5 +echo "$as_me: error: liblayout.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29302,15 +27940,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBLAYOUT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBLAYOUT_JAR" >&5 -$as_echo_n "checking for $LIBLAYOUT_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LIBLAYOUT_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LIBLAYOUT_JAR" >&5 +echo $ECHO_N "checking for $LIBLAYOUT_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBLAYOUT_JAR"; then eval "$as_ac_File=yes" @@ -29318,31 +27956,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: liblayout.jar not found." >&5 -$as_echo "$as_me: error: liblayout.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: liblayout.jar not found." >&5 +echo "$as_me: error: liblayout.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBLOADER_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libloader-1.0.0.jar" >&5 -$as_echo_n "checking for /usr/share/java/libloader-1.0.0.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libloader-1.0.0.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libloader-1.0.0.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libloader_1_0_0_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libloader-1.0.0.jar"; then ac_cv_file__usr_share_java_libloader_1_0_0_jar=yes @@ -29350,20 +27984,20 @@ else ac_cv_file__usr_share_java_libloader_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libloader_1_0_0_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&6 +if test $ac_cv_file__usr_share_java_libloader_1_0_0_jar = yes; then LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libloader.jar" >&5 -$as_echo_n "checking for /usr/share/java/libloader.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libloader.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libloader.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libloader_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libloader.jar"; then ac_cv_file__usr_share_java_libloader_jar=yes @@ -29371,13 +28005,13 @@ else ac_cv_file__usr_share_java_libloader_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libloader_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libloader_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libloader_jar" >&6 +if test $ac_cv_file__usr_share_java_libloader_jar = yes; then LIBLOADER_JAR=/usr/share/java/libloader.jar else - { { $as_echo "$as_me:$LINENO: error: libloader.jar replacement not found." >&5 -$as_echo "$as_me: error: libloader.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: libloader.jar replacement not found." >&5 +echo "$as_me: error: libloader.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29387,15 +28021,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBLOADER_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBLOADER_JAR" >&5 -$as_echo_n "checking for $LIBLOADER_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LIBLOADER_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LIBLOADER_JAR" >&5 +echo $ECHO_N "checking for $LIBLOADER_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBLOADER_JAR"; then eval "$as_ac_File=yes" @@ -29403,31 +28037,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: libloader.jar not found." >&5 -$as_echo "$as_me: error: libloader.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: libloader.jar not found." >&5 +echo "$as_me: error: libloader.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBFORMULA_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libformula-0.2.0.jar" >&5 -$as_echo_n "checking for /usr/share/java/libformula-0.2.0.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libformula-0.2.0.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libformula-0.2.0.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libformula_0_2_0_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libformula-0.2.0.jar"; then ac_cv_file__usr_share_java_libformula_0_2_0_jar=yes @@ -29435,20 +28065,20 @@ else ac_cv_file__usr_share_java_libformula_0_2_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libformula_0_2_0_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&6 +if test $ac_cv_file__usr_share_java_libformula_0_2_0_jar = yes; then LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libformula.jar" >&5 -$as_echo_n "checking for /usr/share/java/libformula.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libformula.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libformula.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libformula_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libformula.jar"; then ac_cv_file__usr_share_java_libformula_jar=yes @@ -29456,13 +28086,13 @@ else ac_cv_file__usr_share_java_libformula_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libformula_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libformula_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libformula_jar" >&6 +if test $ac_cv_file__usr_share_java_libformula_jar = yes; then LIBFORMULA_JAR=/usr/share/java/libformula.jar else - { { $as_echo "$as_me:$LINENO: error: libformula.jar replacement not found." >&5 -$as_echo "$as_me: error: libformula.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: libformula.jar replacement not found." >&5 +echo "$as_me: error: libformula.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29472,15 +28102,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBFORMULA_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBFORMULA_JAR" >&5 -$as_echo_n "checking for $LIBFORMULA_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LIBFORMULA_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LIBFORMULA_JAR" >&5 +echo $ECHO_N "checking for $LIBFORMULA_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBFORMULA_JAR"; then eval "$as_ac_File=yes" @@ -29488,31 +28118,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: libformula.jar not found." >&5 -$as_echo "$as_me: error: libformula.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: libformula.jar not found." >&5 +echo "$as_me: error: libformula.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBREPOSITORY_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/librepository-1.0.0.jar" >&5 -$as_echo_n "checking for /usr/share/java/librepository-1.0.0.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/librepository-1.0.0.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/librepository-1.0.0.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_librepository_1_0_0_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/librepository-1.0.0.jar"; then ac_cv_file__usr_share_java_librepository_1_0_0_jar=yes @@ -29520,20 +28146,20 @@ else ac_cv_file__usr_share_java_librepository_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_librepository_1_0_0_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&6 +if test $ac_cv_file__usr_share_java_librepository_1_0_0_jar = yes; then LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/librepository.jar" >&5 -$as_echo_n "checking for /usr/share/java/librepository.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/librepository.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/librepository.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_librepository_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/librepository.jar"; then ac_cv_file__usr_share_java_librepository_jar=yes @@ -29541,13 +28167,13 @@ else ac_cv_file__usr_share_java_librepository_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_librepository_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_librepository_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_librepository_jar" >&6 +if test $ac_cv_file__usr_share_java_librepository_jar = yes; then LIBREPOSITORY_JAR=/usr/share/java/librepository.jar else - { { $as_echo "$as_me:$LINENO: error: librepository.jar replacement not found." >&5 -$as_echo "$as_me: error: librepository.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: librepository.jar replacement not found." >&5 +echo "$as_me: error: librepository.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29557,15 +28183,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBREPOSITORY_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBREPOSITORY_JAR" >&5 -$as_echo_n "checking for $LIBREPOSITORY_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LIBREPOSITORY_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LIBREPOSITORY_JAR" >&5 +echo $ECHO_N "checking for $LIBREPOSITORY_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBREPOSITORY_JAR"; then eval "$as_ac_File=yes" @@ -29573,31 +28199,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: librepository.jar not found." >&5 -$as_echo "$as_me: error: librepository.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: librepository.jar not found." >&5 +echo "$as_me: error: librepository.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBFONTS_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libfonts-1.0.0.jar" >&5 -$as_echo_n "checking for /usr/share/java/libfonts-1.0.0.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libfonts-1.0.0.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libfonts-1.0.0.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libfonts_1_0_0_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libfonts-1.0.0.jar"; then ac_cv_file__usr_share_java_libfonts_1_0_0_jar=yes @@ -29605,20 +28227,20 @@ else ac_cv_file__usr_share_java_libfonts_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&6 +if test $ac_cv_file__usr_share_java_libfonts_1_0_0_jar = yes; then LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libfonts.jar" >&5 -$as_echo_n "checking for /usr/share/java/libfonts.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libfonts.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libfonts.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libfonts_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libfonts.jar"; then ac_cv_file__usr_share_java_libfonts_jar=yes @@ -29626,13 +28248,13 @@ else ac_cv_file__usr_share_java_libfonts_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libfonts_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libfonts_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libfonts_jar" >&6 +if test $ac_cv_file__usr_share_java_libfonts_jar = yes; then LIBFONTS_JAR=/usr/share/java/libfonts.jar else - { { $as_echo "$as_me:$LINENO: error: libfonts.jar replacement not found." >&5 -$as_echo "$as_me: error: libfonts.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: libfonts.jar replacement not found." >&5 +echo "$as_me: error: libfonts.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29642,15 +28264,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBFONTS_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBFONTS_JAR" >&5 -$as_echo_n "checking for $LIBFONTS_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LIBFONTS_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LIBFONTS_JAR" >&5 +echo $ECHO_N "checking for $LIBFONTS_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBFONTS_JAR"; then eval "$as_ac_File=yes" @@ -29658,31 +28280,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: libfonts.jar not found." >&5 -$as_echo "$as_me: error: libfonts.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: libfonts.jar not found." >&5 +echo "$as_me: error: libfonts.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $LIBSERIALIZER_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libserializer-1.0.0.jar" >&5 -$as_echo_n "checking for /usr/share/java/libserializer-1.0.0.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libserializer-1.0.0.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libserializer-1.0.0.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libserializer_1_0_0_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libserializer-1.0.0.jar"; then ac_cv_file__usr_share_java_libserializer_1_0_0_jar=yes @@ -29690,20 +28308,20 @@ else ac_cv_file__usr_share_java_libserializer_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&6 +if test $ac_cv_file__usr_share_java_libserializer_1_0_0_jar = yes; then LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libserializer.jar" >&5 -$as_echo_n "checking for /usr/share/java/libserializer.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libserializer.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libserializer.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libserializer_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libserializer.jar"; then ac_cv_file__usr_share_java_libserializer_jar=yes @@ -29711,13 +28329,13 @@ else ac_cv_file__usr_share_java_libserializer_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libserializer_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libserializer_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libserializer_jar" >&6 +if test $ac_cv_file__usr_share_java_libserializer_jar = yes; then LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar else - { { $as_echo "$as_me:$LINENO: error: libserializer.jar replacement not found." >&5 -$as_echo "$as_me: error: libserializer.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: libserializer.jar replacement not found." >&5 +echo "$as_me: error: libserializer.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29727,15 +28345,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBSERIALIZER_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBSERIALIZER_JAR" >&5 -$as_echo_n "checking for $LIBSERIALIZER_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LIBSERIALIZER_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LIBSERIALIZER_JAR" >&5 +echo $ECHO_N "checking for $LIBSERIALIZER_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBSERIALIZER_JAR"; then eval "$as_ac_File=yes" @@ -29743,17 +28361,13 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: libserializer.jar not found." >&5 -$as_echo "$as_me: error: libserializer.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: libserializer.jar not found." >&5 +echo "$as_me: error: libserializer.jar not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29761,14 +28375,14 @@ fi if test -z $LIBBASE_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libbase-1.0.0.jar" >&5 -$as_echo_n "checking for /usr/share/java/libbase-1.0.0.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libbase-1.0.0.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libbase-1.0.0.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libbase_1_0_0_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libbase-1.0.0.jar"; then ac_cv_file__usr_share_java_libbase_1_0_0_jar=yes @@ -29776,20 +28390,20 @@ else ac_cv_file__usr_share_java_libbase_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libbase_1_0_0_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&6 +if test $ac_cv_file__usr_share_java_libbase_1_0_0_jar = yes; then LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libbase.jar" >&5 -$as_echo_n "checking for /usr/share/java/libbase.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/libbase.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/libbase.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_libbase_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/libbase.jar"; then ac_cv_file__usr_share_java_libbase_jar=yes @@ -29797,13 +28411,13 @@ else ac_cv_file__usr_share_java_libbase_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_libbase_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libbase_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_libbase_jar" >&6 +if test $ac_cv_file__usr_share_java_libbase_jar = yes; then LIBBASE_JAR=/usr/share/java/libbase.jar else - { { $as_echo "$as_me:$LINENO: error: libbase.jar replacement not found." >&5 -$as_echo "$as_me: error: libbase.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: libbase.jar replacement not found." >&5 +echo "$as_me: error: libbase.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29813,15 +28427,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBBASE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBBASE_JAR" >&5 -$as_echo_n "checking for $LIBBASE_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$LIBBASE_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $LIBBASE_JAR" >&5 +echo $ECHO_N "checking for $LIBBASE_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$LIBBASE_JAR"; then eval "$as_ac_File=yes" @@ -29829,33 +28443,29 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: libbase.jar not found." >&5 -$as_echo "$as_me: error: libbase.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: libbase.jar not found." >&5 +echo "$as_me: error: libbase.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - { $as_echo "$as_me:$LINENO: checking for jfreereport module" >&5 -$as_echo_n "checking for jfreereport module... " >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 + echo "$as_me:$LINENO: checking for jfreereport module" >&5 +echo $ECHO_N "checking for jfreereport module... $ECHO_C" >&6 if test -d ./jfreereport; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} + { { echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 +echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} { (exit 1); exit 1; }; } fi SYSTEM_JFREEREPORT=NO @@ -29863,8 +28473,8 @@ $as_echo "$as_me: error: not existing. get it (did you get the -extensions tarba fi BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_REPORTBUILDER=NO SYSTEM_JFREEREPORT=NO fi @@ -29885,22 +28495,22 @@ fi # this has to be here because both the wiki publisher and the SRB use # commons-logging if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then - { $as_echo "$as_me:$LINENO: checking which Apache commons-* libs to use" >&5 -$as_echo_n "checking which Apache commons-* libs to use... " >&6; } + echo "$as_me:$LINENO: checking which Apache commons-* libs to use" >&5 +echo $ECHO_N "checking which Apache commons-* libs to use... $ECHO_C" >&6 if test "$with_system_apache_commons" = "yes"; then SYSTEM_APACHE_COMMONS=YES - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 if test "$ENABLE_MEDIAWIKI" = "YES"; then if test -z $COMMONS_CODEC_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec-1.3.jar" >&5 -$as_echo_n "checking for /usr/share/java/commons-codec-1.3.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec-1.3.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-codec-1.3.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_commons_codec_1_3_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-codec-1.3.jar"; then ac_cv_file__usr_share_java_commons_codec_1_3_jar=yes @@ -29908,20 +28518,20 @@ else ac_cv_file__usr_share_java_commons_codec_1_3_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_commons_codec_1_3_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_codec_1_3_jar = yes; then COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec.jar" >&5 -$as_echo_n "checking for /usr/share/java/commons-codec.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-codec.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_commons_codec_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-codec.jar"; then ac_cv_file__usr_share_java_commons_codec_jar=yes @@ -29929,13 +28539,13 @@ else ac_cv_file__usr_share_java_commons_codec_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_commons_codec_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_commons_codec_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_codec_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_codec_jar = yes; then COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar else - { { $as_echo "$as_me:$LINENO: error: commons-codec.jar replacement not found." >&5 -$as_echo "$as_me: error: commons-codec.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: commons-codec.jar replacement not found." >&5 +echo "$as_me: error: commons-codec.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -29945,15 +28555,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $COMMONS_CODEC_JAR" >&5 -$as_echo_n "checking for $COMMONS_CODEC_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $COMMONS_CODEC_JAR" >&5 +echo $ECHO_N "checking for $COMMONS_CODEC_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$COMMONS_CODEC_JAR"; then eval "$as_ac_File=yes" @@ -29961,31 +28571,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: commons-codec.jar not found." >&5 -$as_echo "$as_me: error: commons-codec.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: commons-codec.jar not found." >&5 +echo "$as_me: error: commons-codec.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $COMMONS_LANG_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang-2.3.jar" >&5 -$as_echo_n "checking for /usr/share/java/commons-lang-2.3.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang-2.3.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-lang-2.3.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_commons_lang_2_3_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-lang-2.3.jar"; then ac_cv_file__usr_share_java_commons_lang_2_3_jar=yes @@ -29993,20 +28599,20 @@ else ac_cv_file__usr_share_java_commons_lang_2_3_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_commons_lang_2_3_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_lang_2_3_jar = yes; then COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang.jar" >&5 -$as_echo_n "checking for /usr/share/java/commons-lang.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-lang.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_commons_lang_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-lang.jar"; then ac_cv_file__usr_share_java_commons_lang_jar=yes @@ -30014,13 +28620,13 @@ else ac_cv_file__usr_share_java_commons_lang_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_commons_lang_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_commons_lang_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_lang_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_lang_jar = yes; then COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar else - { { $as_echo "$as_me:$LINENO: error: commons-lang.jar replacement not found." >&5 -$as_echo "$as_me: error: commons-lang.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: commons-lang.jar replacement not found." >&5 +echo "$as_me: error: commons-lang.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -30030,15 +28636,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $COMMONS_LANG_JAR" >&5 -$as_echo_n "checking for $COMMONS_LANG_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $COMMONS_LANG_JAR" >&5 +echo $ECHO_N "checking for $COMMONS_LANG_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$COMMONS_LANG_JAR"; then eval "$as_ac_File=yes" @@ -30046,31 +28652,27 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: commons-lang.jar not found." >&5 -$as_echo "$as_me: error: commons-lang.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: commons-lang.jar not found." >&5 +echo "$as_me: error: commons-lang.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi if test -z $COMMONS_HTTPCLIENT_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient-3.1.jar" >&5 -$as_echo_n "checking for /usr/share/java/commons-httpclient-3.1.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient-3.1.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-httpclient-3.1.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_commons_httpclient_3_1_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-httpclient-3.1.jar"; then ac_cv_file__usr_share_java_commons_httpclient_3_1_jar=yes @@ -30078,20 +28680,20 @@ else ac_cv_file__usr_share_java_commons_httpclient_3_1_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar = yes; then COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient.jar" >&5 -$as_echo_n "checking for /usr/share/java/commons-httpclient.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-httpclient.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_commons_httpclient_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-httpclient.jar"; then ac_cv_file__usr_share_java_commons_httpclient_jar=yes @@ -30099,13 +28701,13 @@ else ac_cv_file__usr_share_java_commons_httpclient_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_commons_httpclient_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_commons_httpclient_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_httpclient_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_httpclient_jar = yes; then COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar else - { { $as_echo "$as_me:$LINENO: error: commons-httpclient.jar replacement not found." >&5 -$as_echo "$as_me: error: commons-httpclient.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: commons-httpclient.jar replacement not found." >&5 +echo "$as_me: error: commons-httpclient.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -30115,15 +28717,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $COMMONS_HTTPCLIENT_JAR" >&5 -$as_echo_n "checking for $COMMONS_HTTPCLIENT_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $COMMONS_HTTPCLIENT_JAR" >&5 +echo $ECHO_N "checking for $COMMONS_HTTPCLIENT_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$COMMONS_HTTPCLIENT_JAR"; then eval "$as_ac_File=yes" @@ -30131,17 +28733,13 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: commons-httpclient.jar not found." >&5 -$as_echo "$as_me: error: commons-httpclient.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: commons-httpclient.jar not found." >&5 +echo "$as_me: error: commons-httpclient.jar not found." >&2;} { (exit 1); exit 1; }; } fi @@ -30149,14 +28747,14 @@ fi fi if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then if test -z $COMMONS_LOGGING_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging-1.1.1.jar" >&5 -$as_echo_n "checking for /usr/share/java/commons-logging-1.1.1.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging-1.1.1.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-logging-1.1.1.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_commons_logging_1_1_1_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-logging-1.1.1.jar"; then ac_cv_file__usr_share_java_commons_logging_1_1_1_jar=yes @@ -30164,20 +28762,20 @@ else ac_cv_file__usr_share_java_commons_logging_1_1_1_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar = yes; then COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging.jar" >&5 -$as_echo_n "checking for /usr/share/java/commons-logging.jar... " >&6; } + echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-logging.jar... $ECHO_C" >&6 if test "${ac_cv_file__usr_share_java_commons_logging_jar+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/share/java/commons-logging.jar"; then ac_cv_file__usr_share_java_commons_logging_jar=yes @@ -30185,13 +28783,13 @@ else ac_cv_file__usr_share_java_commons_logging_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_jar" >&5 -$as_echo "$ac_cv_file__usr_share_java_commons_logging_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_commons_logging_jar" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_logging_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_logging_jar = yes; then COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar else - { { $as_echo "$as_me:$LINENO: error: commons-logging.jar replacement not found." >&5 -$as_echo "$as_me: error: commons-logging.jar replacement not found." >&2;} + { { echo "$as_me:$LINENO: error: commons-logging.jar replacement not found." >&5 +echo "$as_me: error: commons-logging.jar replacement not found." >&2;} { (exit 1); exit 1; }; } fi @@ -30201,15 +28799,15 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $COMMONS_LOGGING_JAR" >&5 -$as_echo_n "checking for $COMMONS_LOGGING_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + as_ac_File=`echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $COMMONS_LOGGING_JAR" >&5 +echo $ECHO_N "checking for $COMMONS_LOGGING_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$COMMONS_LOGGING_JAR"; then eval "$as_ac_File=yes" @@ -30217,25 +28815,21 @@ else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 +if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { $as_echo "$as_me:$LINENO: error: commons-logging.jar not found." >&5 -$as_echo "$as_me: error: commons-logging.jar not found." >&2;} + { { echo "$as_me:$LINENO: error: commons-logging.jar not found." >&5 +echo "$as_me: error: commons-logging.jar not found." >&2;} { (exit 1); exit 1; }; } fi fi fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_APACHE_COMMONS=NO BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" fi @@ -30287,8 +28881,8 @@ if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then kde_test_include="ksharedptr.h" kde_test_library="libkdeui.so" - { $as_echo "$as_me:$LINENO: checking for Qt headers" >&5 -$as_echo_n "checking for Qt headers... " >&6; } + echo "$as_me:$LINENO: checking for Qt headers" >&5 +echo $ECHO_N "checking for Qt headers... $ECHO_C" >&6 qt_incdir="no" for kde_check in $qt_incdirs ; do if test -r "$kde_check/$qt_test_include" ; then @@ -30296,18 +28890,18 @@ $as_echo_n "checking for Qt headers... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $qt_incdir" >&5 -$as_echo "$qt_incdir" >&6; } + echo "$as_me:$LINENO: result: $qt_incdir" >&5 +echo "${ECHO_T}$qt_incdir" >&6 if test "x$qt_incdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: Qt headers not found. Please specify the root of + { { echo "$as_me:$LINENO: error: Qt headers not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt headers not found. Please specify the root of +echo "$as_me: error: Qt headers not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for Qt libraries" >&5 -$as_echo_n "checking for Qt libraries... " >&6; } + echo "$as_me:$LINENO: checking for Qt libraries" >&5 +echo $ECHO_N "checking for Qt libraries... $ECHO_C" >&6 qt_libdir="no" for qt_check in $qt_libdirs ; do if test -r "$qt_check/$qt_test_library" ; then @@ -30315,22 +28909,22 @@ $as_echo_n "checking for Qt libraries... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $qt_libdir" >&5 -$as_echo "$qt_libdir" >&6; } + echo "$as_me:$LINENO: result: $qt_libdir" >&5 +echo "${ECHO_T}$qt_libdir" >&6 if test "x$qt_libdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: Qt libraries not found. Please specify the root of + { { echo "$as_me:$LINENO: error: Qt libraries not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt libraries not found. Please specify the root of +echo "$as_me: error: Qt libraries not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MOC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MOC in [\\/]* | ?:[\\/]*) @@ -30344,39 +28938,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no" ;; esac fi MOC=$ac_cv_path_MOC + if test -n "$MOC"; then - { $as_echo "$as_me:$LINENO: result: $MOC" >&5 -$as_echo "$MOC" >&6; } + echo "$as_me:$LINENO: result: $MOC" >&5 +echo "${ECHO_T}$MOC" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "$MOC" = "no" ; then - { { $as_echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify + { { echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt Meta Object Compiler not found. Please specify +echo "$as_me: error: Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for KDE headers" >&5 -$as_echo_n "checking for KDE headers... " >&6; } + echo "$as_me:$LINENO: checking for KDE headers" >&5 +echo $ECHO_N "checking for KDE headers... $ECHO_C" >&6 kde_incdir="no" for kde_check in $kde_incdirs ; do if test -r "$kde_check/$kde_test_include" ; then @@ -30384,18 +28977,18 @@ $as_echo_n "checking for KDE headers... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $kde_incdir" >&5 -$as_echo "$kde_incdir" >&6; } + echo "$as_me:$LINENO: result: $kde_incdir" >&5 +echo "${ECHO_T}$kde_incdir" >&6 if test "x$kde_incdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: KDE headers not found. Please specify the root of + { { echo "$as_me:$LINENO: error: KDE headers not found. Please specify the root of your KDE installation by exporting KDEDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: KDE headers not found. Please specify the root of +echo "$as_me: error: KDE headers not found. Please specify the root of your KDE installation by exporting KDEDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for KDE libraries" >&5 -$as_echo_n "checking for KDE libraries... " >&6; } + echo "$as_me:$LINENO: checking for KDE libraries" >&5 +echo $ECHO_N "checking for KDE libraries... $ECHO_C" >&6 kde_libdir="no" for kde_check in $kde_libdirs ; do if test -r "$kde_check/$kde_test_library" ; then @@ -30403,12 +28996,12 @@ $as_echo_n "checking for KDE libraries... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $kde_libdir" >&5 -$as_echo "$kde_libdir" >&6; } + echo "$as_me:$LINENO: result: $kde_libdir" >&5 +echo "${ECHO_T}$kde_libdir" >&6 if test "x$kde_libdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: KDE libraries not found. Please specify the root of + { { echo "$as_me:$LINENO: error: KDE libraries not found. Please specify the root of your KDE installation by exporting KDEDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: KDE libraries not found. Please specify the root of +echo "$as_me: error: KDE libraries not found. Please specify the root of your KDE installation by exporting KDEDIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi @@ -30450,8 +29043,8 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then kde_test_include="ksharedptr.h" kde_test_library="libkdeui.so" - { $as_echo "$as_me:$LINENO: checking for Qt4 headers" >&5 -$as_echo_n "checking for Qt4 headers... " >&6; } + echo "$as_me:$LINENO: checking for Qt4 headers" >&5 +echo $ECHO_N "checking for Qt4 headers... $ECHO_C" >&6 qt_header_dir="no" for inc_dir in $qt_incdirs ; do if test -r "$inc_dir/$qt_test_include" ; then @@ -30460,16 +29053,16 @@ $as_echo_n "checking for Qt4 headers... " >&6; } fi done - { $as_echo "$as_me:$LINENO: result: $qt_header_dir" >&5 -$as_echo "$qt_header_dir" >&6; } + echo "$as_me:$LINENO: result: $qt_header_dir" >&5 +echo "${ECHO_T}$qt_header_dir" >&6 if test "x$qt_header_dir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} + { { echo "$as_me:$LINENO: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 +echo "$as_me: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for Qt4 libraries" >&5 -$as_echo_n "checking for Qt4 libraries... " >&6; } + echo "$as_me:$LINENO: checking for Qt4 libraries" >&5 +echo $ECHO_N "checking for Qt4 libraries... $ECHO_C" >&6 qt_lib_dir="no" for lib_dir in $qt_libdirs ; do if test -r "$lib_dir/$qt_test_library" ; then @@ -30478,21 +29071,21 @@ $as_echo_n "checking for Qt4 libraries... " >&6; } fi done - { $as_echo "$as_me:$LINENO: result: $qt_lib_dir" >&5 -$as_echo "$qt_lib_dir" >&6; } + echo "$as_me:$LINENO: result: $qt_lib_dir" >&5 +echo "${ECHO_T}$qt_lib_dir" >&6 if test "x$qt_lib_dir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} + { { echo "$as_me:$LINENO: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 +echo "$as_me: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MOC4+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MOC4 in [\\/]* | ?:[\\/]*) @@ -30506,39 +29099,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MOC4="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_MOC4" && ac_cv_path_MOC4="no" ;; esac fi MOC4=$ac_cv_path_MOC4 + if test -n "$MOC4"; then - { $as_echo "$as_me:$LINENO: result: $MOC4" >&5 -$as_echo "$MOC4" >&6; } + echo "$as_me:$LINENO: result: $MOC4" >&5 +echo "${ECHO_T}$MOC4" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "$MOC4" = "no" ; then - { { $as_echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify + { { echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt Meta Object Compiler not found. Please specify +echo "$as_me: error: Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for KDE4 headers" >&5 -$as_echo_n "checking for KDE4 headers... " >&6; } + echo "$as_me:$LINENO: checking for KDE4 headers" >&5 +echo $ECHO_N "checking for KDE4 headers... $ECHO_C" >&6 kde_incdir="no" for kde_check in $kde_incdirs ; do if test -r "$kde_check/$kde_test_include" ; then @@ -30546,16 +29138,16 @@ $as_echo_n "checking for KDE4 headers... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $kde_incdir" >&5 -$as_echo "$kde_incdir" >&6; } + echo "$as_me:$LINENO: result: $kde_incdir" >&5 +echo "${ECHO_T}$kde_incdir" >&6 if test "x$kde_incdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} + { { echo "$as_me:$LINENO: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 +echo "$as_me: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: checking for KDE4 libraries" >&5 -$as_echo_n "checking for KDE4 libraries... " >&6; } + echo "$as_me:$LINENO: checking for KDE4 libraries" >&5 +echo $ECHO_N "checking for KDE4 libraries... $ECHO_C" >&6 kde_libdir="no" for kde_check in $kde_libdirs ; do if test -r "$kde_check/$kde_test_library" ; then @@ -30564,11 +29156,11 @@ $as_echo_n "checking for KDE4 libraries... " >&6; } fi done - { $as_echo "$as_me:$LINENO: result: $kde_libdir" >&5 -$as_echo "$kde_libdir" >&6; } + echo "$as_me:$LINENO: result: $kde_libdir" >&5 +echo "${ECHO_T}$kde_libdir" >&6 if test "x$kde_libdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} + { { echo "$as_me:$LINENO: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 +echo "$as_me: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} { (exit 1); exit 1; }; } fi @@ -30579,34 +29171,34 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to enable the lockdown pieces" >&5 -$as_echo_n "checking whether to enable the lockdown pieces... " >&6; } +echo "$as_me:$LINENO: checking whether to enable the lockdown pieces" >&5 +echo $ECHO_N "checking whether to enable the lockdown pieces... $ECHO_C" >&6 ENABLE_LOCKDOWN="" if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then ENABLE_LOCKDOWN=YES - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to enable evolution 2 support" >&5 -$as_echo_n "checking whether to enable evolution 2 support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable evolution 2 support" >&5 +echo $ECHO_N "checking whether to enable evolution 2 support... $ECHO_C" >&6 if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -30619,29 +29211,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test "$PKG_CONFIG" = "no" ; then @@ -30652,25 +29243,25 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gobject-2.0" >&5 -$as_echo_n "checking for gobject-2.0... " >&6; } + echo "$as_me:$LINENO: checking for gobject-2.0" >&5 +echo $ECHO_N "checking for gobject-2.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "gobject-2.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 succeeded=yes - { $as_echo "$as_me:$LINENO: checking GOBJECT_CFLAGS" >&5 -$as_echo_n "checking GOBJECT_CFLAGS... " >&6; } + echo "$as_me:$LINENO: checking GOBJECT_CFLAGS" >&5 +echo $ECHO_N "checking GOBJECT_CFLAGS... $ECHO_C" >&6 GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0"` - { $as_echo "$as_me:$LINENO: result: $GOBJECT_CFLAGS" >&5 -$as_echo "$GOBJECT_CFLAGS" >&6; } + echo "$as_me:$LINENO: result: $GOBJECT_CFLAGS" >&5 +echo "${ECHO_T}$GOBJECT_CFLAGS" >&6 - { $as_echo "$as_me:$LINENO: checking GOBJECT_LIBS" >&5 -$as_echo_n "checking GOBJECT_LIBS... " >&6; } + echo "$as_me:$LINENO: checking GOBJECT_LIBS" >&5 +echo $ECHO_N "checking GOBJECT_LIBS... $ECHO_C" >&6 GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0"` - { $as_echo "$as_me:$LINENO: result: $GOBJECT_LIBS" >&5 -$as_echo "$GOBJECT_LIBS" >&6; } + echo "$as_me:$LINENO: result: $GOBJECT_LIBS" >&5 +echo "${ECHO_T}$GOBJECT_LIBS" >&6 else GOBJECT_CFLAGS="" GOBJECT_LIBS="" @@ -30691,27 +29282,27 @@ $as_echo "$GOBJECT_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi ENABLE_EVOAB2="TRUE" else ENABLE_EVOAB2="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to enable KDE address book support" >&5 -$as_echo_n "checking whether to enable KDE address book support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable KDE address book support" >&5 +echo $ECHO_N "checking whether to enable KDE address book support... $ECHO_C" >&6 if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - ac_ext=cpp + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -30719,16 +29310,14 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $KDE_CFLAGS" - { $as_echo "$as_me:$LINENO: checking whether KDE is between 3.2 and 3.6" >&5 -$as_echo_n "checking whether KDE is between 3.2 and 3.6... " >&6; } + echo "$as_me:$LINENO: checking whether KDE is between 3.2 and 3.6" >&5 +echo $ECHO_N "checking whether KDE is between 3.2 and 3.6... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -30746,44 +29335,30 @@ int main(int argc, char **argv) { _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&5 -$as_echo "$as_me: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&2;} +{ { echo "$as_me:$LINENO: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&5 +echo "$as_me: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&2;} { (exit 1); exit 1; }; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - CXXFLAGS=$save_CXXFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -30793,67 +29368,67 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ENABLE_KAB=TRUE else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_KAB= fi -{ $as_echo "$as_me:$LINENO: checking whether to include MathMLDTD" >&5 -$as_echo_n "checking whether to include MathMLDTD... " >&6; } +echo "$as_me:$LINENO: checking whether to include MathMLDTD" >&5 +echo $ECHO_N "checking whether to include MathMLDTD... $ECHO_C" >&6 if test -n "$enable_mathmldtd"; then if test "$enable_mathmldtd" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 BUILD_TYPE="$BUILD_TYPE MATHMLDTD" fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" fi -{ $as_echo "$as_me:$LINENO: checking whether to include third-party fonts" >&5 -$as_echo_n "checking whether to include third-party fonts... " >&6; } +echo "$as_me:$LINENO: checking whether to include third-party fonts" >&5 +echo $ECHO_N "checking whether to include third-party fonts... $ECHO_C" >&6 if test "$with_fonts" != "no" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 WITH_FONTS=YES BUILD_TYPE="$BUILD_TYPE MORE_FONTS" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 WITH_FONTS=NO SCPDEFS="$SCPDEFS -DWITHOUT_FONTS" fi -{ $as_echo "$as_me:$LINENO: checking whether to include PPDs" >&5 -$as_echo_n "checking whether to include PPDs... " >&6; } +echo "$as_me:$LINENO: checking whether to include PPDs" >&5 +echo $ECHO_N "checking whether to include PPDs... $ECHO_C" >&6 if test "$with_ppds" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 WITHOUT_PPDS=YES SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" fi -{ $as_echo "$as_me:$LINENO: checking whether to include AFMs" >&5 -$as_echo_n "checking whether to include AFMs... " >&6; } +echo "$as_me:$LINENO: checking whether to include AFMs" >&5 +echo $ECHO_N "checking whether to include AFMs... $ECHO_C" >&6 if test "$with_afms" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 BUILD_TYPE="$BUILD_TYPE AFMS" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 WITHOUT_AFMS=YES SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" fi @@ -30861,13 +29436,13 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether and how to use Xinerama" >&5 -$as_echo_n "checking whether and how to use Xinerama... " >&6; } +echo "$as_me:$LINENO: checking whether and how to use Xinerama" >&5 +echo $ECHO_N "checking whether and how to use Xinerama... $ECHO_C" >&6 if test "$_os" = "Darwin"; then USE_XINERAMA=YES XINERAMA_LINK=dynamic - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then # we have both versions, let the user decide but use the dynamic one @@ -30897,20 +29472,20 @@ elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then XINERAMA_LINK=none fi if test "$USE_XINERAMA" = "YES"; then - { $as_echo "$as_me:$LINENO: result: yes, with $XINERAMA_LINK linking" >&5 -$as_echo "yes, with $XINERAMA_LINK linking" >&6; } + echo "$as_me:$LINENO: result: yes, with $XINERAMA_LINK linking" >&5 +echo "${ECHO_T}yes, with $XINERAMA_LINK linking" >&6 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 -$as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; } + echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 +echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6 else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h usability" >&5 -$as_echo_n "checking X11/extensions/Xinerama.h usability... " >&6; } +echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h usability" >&5 +echo $ECHO_N "checking X11/extensions/Xinerama.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -30921,38 +29496,41 @@ $ac_includes_default #include <X11/extensions/Xinerama.h> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h presence" >&5 -$as_echo_n "checking X11/extensions/Xinerama.h presence... " >&6; } +echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h presence" >&5 +echo $ECHO_N "checking X11/extensions/Xinerama.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -30961,76 +29539,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <X11/extensions/Xinerama.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&2;} - + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 -$as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; } +echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 +echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_extensions_Xinerama_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6 fi -if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then +if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Xinerama header not found." >&5 -$as_echo "$as_me: error: Xinerama header not found." >&2;} + { { echo "$as_me:$LINENO: error: Xinerama header not found." >&5 +echo "$as_me: error: Xinerama header not found." >&2;} { (exit 1); exit 1; }; } fi @@ -31043,10 +29628,10 @@ fi XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" fi -{ $as_echo "$as_me:$LINENO: checking for XineramaIsActive in -lXinerama" >&5 -$as_echo_n "checking for XineramaIsActive in -lXinerama... " >&6; } +echo "$as_me:$LINENO: checking for XineramaIsActive in -lXinerama" >&5 +echo $ECHO_N "checking for XineramaIsActive in -lXinerama... $ECHO_C" >&6 if test "${ac_cv_lib_Xinerama_XineramaIsActive+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXinerama $XINERAMA_EXTRA_LIBS $LIBS" @@ -31057,58 +29642,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char XineramaIsActive (); int main () { -return XineramaIsActive (); +XineramaIsActive (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_Xinerama_XineramaIsActive=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_Xinerama_XineramaIsActive=no +ac_cv_lib_Xinerama_XineramaIsActive=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaIsActive" >&5 -$as_echo "$ac_cv_lib_Xinerama_XineramaIsActive" >&6; } -if test "x$ac_cv_lib_Xinerama_XineramaIsActive" = x""yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaIsActive" >&5 +echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaIsActive" >&6 +if test $ac_cv_lib_Xinerama_XineramaIsActive = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBXINERAMA 1 _ACEOF @@ -31116,18 +29700,18 @@ _ACEOF LIBS="-lXinerama $LIBS" else - { { $as_echo "$as_me:$LINENO: error: Xinerama not functional?" >&5 -$as_echo "$as_me: error: Xinerama not functional?" >&2;} + { { echo "$as_me:$LINENO: error: Xinerama not functional?" >&5 +echo "$as_me: error: Xinerama not functional?" >&2;} { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:$LINENO: result: no, libXinerama not found or wrong architecture." >&5 -$as_echo "no, libXinerama not found or wrong architecture." >&6; } + echo "$as_me:$LINENO: result: no, libXinerama not found or wrong architecture." >&5 +echo "${ECHO_T}no, libXinerama not found or wrong architecture." >&6 fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -31141,10 +29725,10 @@ if test -z "$with_ant_home"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ANT+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ANT in [\\/]* | ?:[\\/]*) @@ -31157,28 +29741,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi ANT=$ac_cv_path_ANT + if test -n "$ANT"; then - { $as_echo "$as_me:$LINENO: result: $ANT" >&5 -$as_echo "$ANT" >&6; } + echo "$as_me:$LINENO: result: $ANT" >&5 +echo "${ECHO_T}$ANT" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ANT" && break done @@ -31190,10 +29773,10 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ANT+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ANT in [\\/]* | ?:[\\/]*) @@ -31207,28 +29790,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi ANT=$ac_cv_path_ANT + if test -n "$ANT"; then - { $as_echo "$as_me:$LINENO: result: $ANT" >&5 -$as_echo "$ANT" >&6; } + echo "$as_me:$LINENO: result: $ANT" >&5 +echo "${ECHO_T}$ANT" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ANT" && break done @@ -31237,8 +29819,8 @@ done fi if test -z "$ANT"; then - { { $as_echo "$as_me:$LINENO: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&5 -$as_echo "$as_me: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&2;} + { { echo "$as_me:$LINENO: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&5 +echo "$as_me: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&2;} { (exit 1); exit 1; }; } else # resolve relative or absolute symlink @@ -31257,8 +29839,8 @@ else export ANT_HOME fi - { $as_echo "$as_me:$LINENO: checking if $ANT works" >&5 -$as_echo_n "checking if $ANT works... " >&6; } + echo "$as_me:$LINENO: checking if $ANT works" >&5 +echo $ECHO_N "checking if $ANT works... $ECHO_C" >&6 cat > conftest.java << EOF public class conftest { int testmethod(int a, int b) { @@ -31285,11 +29867,11 @@ EOF { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 (eval $ant_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0 && test -f ./conftest.class ; then - { $as_echo "$as_me:$LINENO: result: Ant works" >&5 -$as_echo "Ant works" >&6; } + echo "$as_me:$LINENO: result: Ant works" >&5 +echo "${ECHO_T}Ant works" >&6 if test -z "$WITH_ANT_HOME"; then ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` if test -z "$ANT_HOME"; then @@ -31302,8 +29884,8 @@ $as_echo "Ant works" >&6; } echo "configure: Ant test failed" >&5 cat conftest.java >&5 cat conftest.xml >&5 - { $as_echo "$as_me:$LINENO: WARNING: Ant does not work - Some Java projects will not build!" >&5 -$as_echo "$as_me: WARNING: Ant does not work - Some Java projects will not build!" >&2;} + { echo "$as_me:$LINENO: WARNING: Ant does not work - Some Java projects will not build!" >&5 +echo "$as_me: WARNING: Ant does not work - Some Java projects will not build!" >&2;} ANT_HOME="" echo "Ant does not work - Some Java projects will not build!" >>warn fi @@ -31316,8 +29898,8 @@ fi if test "$ANT_HOME" != "NO_ANT_HOME"; then - { $as_echo "$as_me:$LINENO: checking Ant lib directory" >&5 -$as_echo_n "checking Ant lib directory... " >&6; } + echo "$as_me:$LINENO: checking Ant lib directory" >&5 +echo $ECHO_N "checking Ant lib directory... $ECHO_C" >&6 if test -f $ANT_HOME/lib/ant.jar; then ANT_LIB="$ANT_HOME/lib" else @@ -31333,16 +29915,16 @@ $as_echo_n "checking Ant lib directory... " >&6; } if test -f $ANT_HOME/lib/ant/ant.jar; then ANT_LIB="$ANT_HOME/lib/ant" else - { { $as_echo "$as_me:$LINENO: error: Ant libraries not found!" >&5 -$as_echo "$as_me: error: Ant libraries not found!" >&2;} + { { echo "$as_me:$LINENO: error: Ant libraries not found!" >&5 +echo "$as_me: error: Ant libraries not found!" >&2;} { (exit 1); exit 1; }; } fi fi fi fi fi - { $as_echo "$as_me:$LINENO: result: Ant lib directory found." >&5 -$as_echo "Ant lib directory found." >&6; } + echo "$as_me:$LINENO: result: Ant lib directory found." >&5 +echo "${ECHO_T}Ant lib directory found." >&6 fi fi @@ -31354,8 +29936,8 @@ if test "$ENABLE_MEDIAWIKI" = "YES"; then fi ant_minminor1=`echo $ant_minver | cut -d"." -f2` -{ $as_echo "$as_me:$LINENO: checking whether ant is >= $ant_minver" >&5 -$as_echo_n "checking whether ant is >= $ant_minver... " >&6; } +echo "$as_me:$LINENO: checking whether ant is >= $ant_minver" >&5 +echo $ECHO_N "checking whether ant is >= $ant_minver... $ECHO_C" >&6 ant_version=`$ANT -version | $AWK '{ print $4; }'` ant_version_major=`echo $ant_version | cut -d. -f1` ant_version_minor=`echo $ant_version | cut -d. -f2` @@ -31363,20 +29945,20 @@ echo "configure: ant_version $ant_version " >&5 echo "configure: ant_version_major $ant_version_major " >&5 echo "configure: ant_version_minor $ant_version_minor " >&5 if test "$ant_version_major" -ge "2"; then - { $as_echo "$as_me:$LINENO: result: yes, $ant_version" >&5 -$as_echo "yes, $ant_version" >&6; } + echo "$as_me:$LINENO: result: yes, $ant_version" >&5 +echo "${ECHO_T}yes, $ant_version" >&6 elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then - { $as_echo "$as_me:$LINENO: result: yes, $ant_version" >&5 -$as_echo "yes, $ant_version" >&6; } + echo "$as_me:$LINENO: result: yes, $ant_version" >&5 +echo "${ECHO_T}yes, $ant_version" >&6 else - { { $as_echo "$as_me:$LINENO: error: no, you need at least ant >= $ant_minver" >&5 -$as_echo "$as_me: error: no, you need at least ant >= $ant_minver" >&2;} + { { echo "$as_me:$LINENO: error: no, you need at least ant >= $ant_minver" >&5 +echo "$as_me: error: no, you need at least ant >= $ant_minver" >&2;} { (exit 1); exit 1; }; } fi if test "$ENABLE_MEDIAWIKI" = "YES"; then -{ $as_echo "$as_me:$LINENO: checking whether ant supports mapper type=\"regexp\"" >&5 -$as_echo_n "checking whether ant supports mapper type=\"regexp\"... " >&6; } +echo "$as_me:$LINENO: checking whether ant supports mapper type=\"regexp\"" >&5 +echo $ECHO_N "checking whether ant supports mapper type=\"regexp\"... $ECHO_C" >&6 rm -rf confdir mkdir confdir cat > conftest.java << EOF @@ -31411,19 +29993,19 @@ EOF { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 (eval $ant_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test $? = 0 && test -f ./conftest.class ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -rf confdir else echo "configure: Ant test failed" >&5 cat conftest.java >&5 cat conftest.xml >&5 rm -rf confdir - { { $as_echo "$as_me:$LINENO: error: no. Did you install ant-apache-regexp?" >&5 -$as_echo "$as_me: error: no. Did you install ant-apache-regexp?" >&2;} + { { echo "$as_me:$LINENO: error: no. Did you install ant-apache-regexp?" >&5 +echo "$as_me: error: no. Did you install ant-apache-regexp?" >&2;} { (exit 1); exit 1; }; } fi fi @@ -31431,8 +30013,8 @@ rm -f conftest* core core.* *.core OOO_JUNIT_JAR= if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then - { $as_echo "$as_me:$LINENO: checking for JUnit 4" >&5 -$as_echo_n "checking for JUnit 4... " >&6; } + echo "$as_me:$LINENO: checking for JUnit 4" >&5 +echo $ECHO_N "checking for JUnit 4... $ECHO_C" >&6 if test "$with_junit" == "yes"; then if test -e /usr/share/java/junit4.jar; then OOO_JUNIT_JAR=/usr/share/java/junit4.jar @@ -31448,15 +30030,15 @@ $as_echo_n "checking for JUnit 4... " >&6; } "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \ grep org/junit/Before.class > /dev/null 2>&5 if test $? -eq 0; then - { $as_echo "$as_me:$LINENO: result: $OOO_JUNIT_JAR" >&5 -$as_echo "$OOO_JUNIT_JAR" >&6; } + echo "$as_me:$LINENO: result: $OOO_JUNIT_JAR" >&5 +echo "${ECHO_T}$OOO_JUNIT_JAR" >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: cannot find JUnit 4 jar; please install one in the default + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: cannot find JUnit 4 jar; please install one in the default location (/usr/share/java), specify its pathname via --with-junit=..., or disable it via --without-junit" >&5 -$as_echo "$as_me: error: cannot find JUnit 4 jar; please install one in the default +echo "$as_me: error: cannot find JUnit 4 jar; please install one in the default location (/usr/share/java), specify its pathname via --with-junit=..., or disable it via --without-junit" >&2;} { (exit 1); exit 1; }; } @@ -31464,172 +30046,172 @@ location (/usr/share/java), specify its pathname via fi -{ $as_echo "$as_me:$LINENO: checking which languages to be built" >&5 -$as_echo_n "checking which languages to be built... " >&6; } +echo "$as_me:$LINENO: checking which languages to be built" >&5 +echo $ECHO_N "checking which languages to be built... $ECHO_C" >&6 WITH_LANG="$with_lang" if test -z "$WITH_LANG"; then - { $as_echo "$as_me:$LINENO: result: en-US" >&5 -$as_echo "en-US" >&6; } + echo "$as_me:$LINENO: result: en-US" >&5 +echo "${ECHO_T}en-US" >&6 else - { $as_echo "$as_me:$LINENO: result: $WITH_LANG" >&5 -$as_echo "$WITH_LANG" >&6; } + echo "$as_me:$LINENO: result: $WITH_LANG" >&5 +echo "${ECHO_T}$WITH_LANG" >&6 fi -{ $as_echo "$as_me:$LINENO: checking which languages have poor help localizations" >&5 -$as_echo_n "checking which languages have poor help localizations... " >&6; } +echo "$as_me:$LINENO: checking which languages have poor help localizations" >&5 +echo $ECHO_N "checking which languages have poor help localizations... $ECHO_C" >&6 WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations" if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { $as_echo "$as_me:$LINENO: result: $WITH_POOR_HELP_LOCALIZATIONS" >&5 -$as_echo "$WITH_POOR_HELP_LOCALIZATIONS" >&6; } + echo "$as_me:$LINENO: result: $WITH_POOR_HELP_LOCALIZATIONS" >&5 +echo "${ECHO_T}$WITH_POOR_HELP_LOCALIZATIONS" >&6 fi -{ $as_echo "$as_me:$LINENO: checking which dictionaries to include" >&5 -$as_echo_n "checking which dictionaries to include... " >&6; } +echo "$as_me:$LINENO: checking which dictionaries to include" >&5 +echo $ECHO_N "checking which dictionaries to include... $ECHO_C" >&6 if test -z "$with_dict"; then WITH_DICT=,ALL, - { $as_echo "$as_me:$LINENO: result: ALL" >&5 -$as_echo "ALL" >&6; } + echo "$as_me:$LINENO: result: ALL" >&5 +echo "${ECHO_T}ALL" >&6 else WITH_DICT=","$with_dict"," - { $as_echo "$as_me:$LINENO: result: $with_dict" >&5 -$as_echo "$with_dict" >&6; } + echo "$as_me:$LINENO: result: $with_dict" >&5 +echo "${ECHO_T}$with_dict" >&6 fi -{ $as_echo "$as_me:$LINENO: checking for additional 'intro' bitmaps" >&5 -$as_echo_n "checking for additional 'intro' bitmaps... " >&6; } +echo "$as_me:$LINENO: checking for additional 'intro' bitmaps" >&5 +echo $ECHO_N "checking for additional 'intro' bitmaps... $ECHO_C" >&6 INTRO_BITMAPS= if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then INTRO_BITMAPS= - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do case "$bitmap" in *.bmp) ;; - *) bitmap= ; { $as_echo "$as_me:$LINENO: WARNING: Intro bitmaps should be .bmp files!" >&5 -$as_echo "$as_me: WARNING: Intro bitmaps should be .bmp files!" >&2;} ;; + *) bitmap= ; { echo "$as_me:$LINENO: WARNING: Intro bitmaps should be .bmp files!" >&5 +echo "$as_me: WARNING: Intro bitmaps should be .bmp files!" >&2;} ;; esac if test -n "$bitmap" ; then INTRO_BITMAPS="$INTRO_BITMAPS $bitmap" fi done - { $as_echo "$as_me:$LINENO: result: $INTRO_BITMAPS" >&5 -$as_echo "$INTRO_BITMAPS" >&6; } + echo "$as_me:$LINENO: result: $INTRO_BITMAPS" >&5 +echo "${ECHO_T}$INTRO_BITMAPS" >&6 fi -{ $as_echo "$as_me:$LINENO: checking for additional 'about' bitmaps" >&5 -$as_echo_n "checking for additional 'about' bitmaps... " >&6; } +echo "$as_me:$LINENO: checking for additional 'about' bitmaps" >&5 +echo $ECHO_N "checking for additional 'about' bitmaps... $ECHO_C" >&6 ABOUT_BITMAPS= if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then ABOUT_BITMAPS= - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do case "$bitmap" in *.bmp) ;; - *) bitmap= ; { $as_echo "$as_me:$LINENO: WARNING: About bitmaps should be .bmp files!" >&5 -$as_echo "$as_me: WARNING: About bitmaps should be .bmp files!" >&2;} ;; + *) bitmap= ; { echo "$as_me:$LINENO: WARNING: About bitmaps should be .bmp files!" >&5 +echo "$as_me: WARNING: About bitmaps should be .bmp files!" >&2;} ;; esac if test -n "$bitmap" ; then ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap" fi done - { $as_echo "$as_me:$LINENO: result: $ABOUT_BITMAPS" >&5 -$as_echo "$ABOUT_BITMAPS" >&6; } + echo "$as_me:$LINENO: result: $ABOUT_BITMAPS" >&5 +echo "${ECHO_T}$ABOUT_BITMAPS" >&6 fi OOO_VENDOR= -{ $as_echo "$as_me:$LINENO: checking for vendor" >&5 -$as_echo_n "checking for vendor... " >&6; } +echo "$as_me:$LINENO: checking for vendor" >&5 +echo $ECHO_N "checking for vendor... $ECHO_C" >&6 if test -z "$with_vendor" -o "$with_vendor" = "no" ; then - { $as_echo "$as_me:$LINENO: result: not set" >&5 -$as_echo "not set" >&6; } + echo "$as_me:$LINENO: result: not set" >&5 +echo "${ECHO_T}not set" >&6 else OOO_VENDOR="$with_vendor" - { $as_echo "$as_me:$LINENO: result: $OOO_VENDOR" >&5 -$as_echo "$OOO_VENDOR" >&6; } + echo "$as_me:$LINENO: result: $OOO_VENDOR" >&5 +echo "${ECHO_T}$OOO_VENDOR" >&6 fi UNIXWRAPPERNAME= -{ $as_echo "$as_me:$LINENO: checking for UNIX wrapper name" >&5 -$as_echo_n "checking for UNIX wrapper name... " >&6; } +echo "$as_me:$LINENO: checking for UNIX wrapper name" >&5 +echo $ECHO_N "checking for UNIX wrapper name... $ECHO_C" >&6 if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then - { $as_echo "$as_me:$LINENO: result: not set" >&5 -$as_echo "not set" >&6; } + echo "$as_me:$LINENO: result: not set" >&5 +echo "${ECHO_T}not set" >&6 else UNIXWRAPPERNAME="$with_unix_wrapper" - { $as_echo "$as_me:$LINENO: result: $UNIXWRAPPERNAME" >&5 -$as_echo "$UNIXWRAPPERNAME" >&6; } + echo "$as_me:$LINENO: result: $UNIXWRAPPERNAME" >&5 +echo "${ECHO_T}$UNIXWRAPPERNAME" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to statically link to Gtk" >&5 -$as_echo_n "checking whether to statically link to Gtk... " >&6; } +echo "$as_me:$LINENO: checking whether to statically link to Gtk" >&5 +echo $ECHO_N "checking whether to statically link to Gtk... $ECHO_C" >&6 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then ENABLE_STATIC_GTK="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else ENABLE_STATIC_GTK="FALSE" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to use layout dialogs" >&5 -$as_echo_n "checking whether to use layout dialogs... " >&6; } +echo "$as_me:$LINENO: checking whether to use layout dialogs" >&5 +echo $ECHO_N "checking whether to use layout dialogs... $ECHO_C" >&6 if test -n "$enable_layout" && test "$enable_layout" != "no"; then ENABLE_LAYOUT="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else ENABLE_LAYOUT="FALSE" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi # =================================================================== # De- or increase default verbosity of build process # =================================================================== -{ $as_echo "$as_me:$LINENO: checking build verbosity" >&5 -$as_echo_n "checking build verbosity... " >&6; } +echo "$as_me:$LINENO: checking build verbosity" >&5 +echo $ECHO_N "checking build verbosity... $ECHO_C" >&6 if test -n "$enable_verbose"; then if test "$enable_verbose" = "yes"; then VERBOSE="TRUE" - { $as_echo "$as_me:$LINENO: result: high" >&5 -$as_echo "high" >&6; } + echo "$as_me:$LINENO: result: high" >&5 +echo "${ECHO_T}high" >&6 fi if test "$enable_verbose" = "no"; then VERBOSE="FALSE" - { $as_echo "$as_me:$LINENO: result: low" >&5 -$as_echo "low" >&6; } + echo "$as_me:$LINENO: result: low" >&5 +echo "${ECHO_T}low" >&6 fi else - { $as_echo "$as_me:$LINENO: result: not set" >&5 -$as_echo "not set" >&6; } + echo "$as_me:$LINENO: result: not set" >&5 +echo "${ECHO_T}not set" >&6 fi -{ $as_echo "$as_me:$LINENO: checking whether to enable dependency tracking" >&5 -$as_echo_n "checking whether to enable dependency tracking... " >&6; } +echo "$as_me:$LINENO: checking whether to enable dependency tracking" >&5 +echo $ECHO_N "checking whether to enable dependency tracking... $ECHO_C" >&6 if test "$enable_dependency_tracking" = "no"; then nodep=TRUE - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi @@ -31640,22 +30222,22 @@ echo "* *" echo "********************************************************************" if test -z "$COMPATH"; then - { { $as_echo "$as_me:$LINENO: error: No compiler found." >&5 -$as_echo "$as_me: error: No compiler found." >&2;} + { { echo "$as_me:$LINENO: error: No compiler found." >&5 +echo "$as_me: error: No compiler found." >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking solver path" >&5 -$as_echo_n "checking solver path... " >&6; } +echo "$as_me:$LINENO: checking solver path" >&5 +echo $ECHO_N "checking solver path... $ECHO_C" >&6 if test -z "$with_local_solver"; then LOCAL_SOLVER="DEFAULT" - { $as_echo "$as_me:$LINENO: result: default" >&5 -$as_echo "default" >&6; } + echo "$as_me:$LINENO: result: default" >&5 +echo "${ECHO_T}default" >&6 else LOCAL_SOLVER=$with_local_solver - { $as_echo "$as_me:$LINENO: result: $with_local_solver" >&5 -$as_echo "$with_local_solver" >&6; } + echo "$as_me:$LINENO: result: $with_local_solver" >&5 +echo "${ECHO_T}$with_local_solver" >&6 fi @@ -31664,8 +30246,7 @@ fi # make sure config.guess is +x; we execute config.guess, so it has to be so; chmod +x ./config.guess -ac_config_files="$ac_config_files set_soenv Makefile" - + ac_config_files="$ac_config_files set_soenv Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -31684,59 +30265,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -31745,54 +30306,63 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -31800,14 +30370,12 @@ LTLIBOBJS=$ac_ltlibobjs - : ${CONFIG_STATUS=./config.status} -ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -31820,78 +30388,22 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -31901,60 +30413,33 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -31962,122 +30447,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then + +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -32086,28 +30608,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -32116,14 +30617,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -32131,107 +30649,124 @@ generated by GNU Autoconf 2.63. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi -_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages + -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files Report bugs to <bug-autoconf@gnu.org>." - _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -AWK='$AWK' -test -n "\$AWK" || AWK=awk +srcdir=$srcdir _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -32245,47 +30780,31 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Handling of arguments. + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "set_soenv") CONFIG_FILES="$CONFIG_FILES set_soenv" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + case "$ac_config_target" in + # Handling of arguments. + "set_soenv" ) CONFIG_FILES="$CONFIG_FILES set_soenv" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -32295,464 +30814,697 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { - $as_echo "$as_me: cannot create a temporary directory in ." >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=' ' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" +cat >>$CONFIG_STATUS <<_ACEOF -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" - done +# +# CONFIG_FILES section. +# - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@EGREP@,$EGREP,;t t +s,@AWK@,$AWK,;t t +s,@SED@,$SED,;t t +s,@LOCAL_SOLENV@,$LOCAL_SOLENV,;t t +s,@_solenv@,$_solenv,;t t +s,@UPD@,$UPD,;t t +s,@SOURCEVERSION@,$SOURCEVERSION,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@GNUTAR@,$GNUTAR,;t t +s,@OSVERSION@,$OSVERSION,;t t +s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t +s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t +s,@ENABLE_CRASHDUMP@,$ENABLE_CRASHDUMP,;t t +s,@VC_STANDARD@,$VC_STANDARD,;t t +s,@ENABLE_WERROR@,$ENABLE_WERROR,;t t +s,@ENABLE_DEBUG@,$ENABLE_DEBUG,;t t +s,@PRODUCT@,$PRODUCT,;t t +s,@PROFULLSWITCH@,$PROFULLSWITCH,;t t +s,@PROEXT@,$PROEXT,;t t +s,@ENABLE_SYMBOLS@,$ENABLE_SYMBOLS,;t t +s,@DISABLE_STRIP@,$DISABLE_STRIP,;t t +s,@ENABLE_CUPS@,$ENABLE_CUPS,;t t +s,@ENABLE_FONTCONFIG@,$ENABLE_FONTCONFIG,;t t +s,@TARFILE_LOCATION@,$TARFILE_LOCATION,;t t +s,@DO_FETCH_TARBALLS@,$DO_FETCH_TARBALLS,;t t +s,@WITH_BINFILTER@,$WITH_BINFILTER,;t t +s,@ENABLE_DIRECTX@,$ENABLE_DIRECTX,;t t +s,@DISABLE_ACTIVEX@,$DISABLE_ACTIVEX,;t t +s,@DISABLE_ATL@,$DISABLE_ATL,;t t +s,@ENABLE_RPATH@,$ENABLE_RPATH,;t t +s,@WITH_MYSPELL_DICTS@,$WITH_MYSPELL_DICTS,;t t +s,@SYSTEM_DICTS@,$SYSTEM_DICTS,;t t +s,@DICT_SYSTEM_DIR@,$DICT_SYSTEM_DIR,;t t +s,@HYPH_SYSTEM_DIR@,$HYPH_SYSTEM_DIR,;t t +s,@THES_SYSTEM_DIR@,$THES_SYSTEM_DIR,;t t +s,@WITH_MINGWIN@,$WITH_MINGWIN,;t t +s,@SHELLPATH@,$SHELLPATH,;t t +s,@GCC_HOME@,$GCC_HOME,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@COMPATH@,$COMPATH,;t t +s,@GCCVER@,$GCCVER,;t t +s,@HAVE_LD_BSYMBOLIC_FUNCTIONS@,$HAVE_LD_BSYMBOLIC_FUNCTIONS,;t t +s,@ENABLE_PCH@,$ENABLE_PCH,;t t +s,@GNUMAKE@,$GNUMAKE,;t t +s,@_cc@,$_cc,;t t +s,@HAVE_LD_HASH_STYLE@,$HAVE_LD_HASH_STYLE,;t t +s,@PERL@,$PERL,;t t +s,@MSPDB_PATH@,$MSPDB_PATH,;t t +s,@COMEX@,$COMEX,;t t +s,@USE_MINGW@,$USE_MINGW,;t t +s,@MIDL_PATH@,$MIDL_PATH,;t t +s,@CSC_PATH@,$CSC_PATH,;t t +s,@FRAME_HOME@,$FRAME_HOME,;t t +s,@CPP@,$CPP,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@CXXCPP@,$CXXCPP,;t t +s,@SIZEOF_LONG@,$SIZEOF_LONG,;t t +s,@WORDS_BIGENDIAN@,$WORDS_BIGENDIAN,;t t +s,@LFS_CFLAGS@,$LFS_CFLAGS,;t t +s,@PAM@,$PAM,;t t +s,@NEW_SHADOW_API@,$NEW_SHADOW_API,;t t +s,@PAM_LINK@,$PAM_LINK,;t t +s,@CRYPT_LINK@,$CRYPT_LINK,;t t +s,@GXX_INCLUDE_PATH@,$GXX_INCLUDE_PATH,;t t +s,@MINGW_LIB_INCLUDE_PATH@,$MINGW_LIB_INCLUDE_PATH,;t t +s,@MINGW_BACKWARD_INCLUDE_PATH@,$MINGW_BACKWARD_INCLUDE_PATH,;t t +s,@MINGW_CLIB_DIR@,$MINGW_CLIB_DIR,;t t +s,@MINGW_SHARED_GCCLIB@,$MINGW_SHARED_GCCLIB,;t t +s,@MINGW_GCCLIB_EH@,$MINGW_GCCLIB_EH,;t t +s,@MINGW_SHARED_GXXLIB@,$MINGW_SHARED_GXXLIB,;t t +s,@MINGW_SHARED_LIBSTDCPP@,$MINGW_SHARED_LIBSTDCPP,;t t +s,@MINGW_GCCDLL@,$MINGW_GCCDLL,;t t +s,@MINGW_GXXDLL@,$MINGW_GXXDLL,;t t +s,@EXCEPTIONS@,$EXCEPTIONS,;t t +s,@STLPORT4@,$STLPORT4,;t t +s,@STLPORT_VER@,$STLPORT_VER,;t t +s,@USE_SYSTEM_STL@,$USE_SYSTEM_STL,;t t +s,@USE_CCACHE@,$USE_CCACHE,;t t +s,@CCACHE@,$CCACHE,;t t +s,@HAVE_GCC_VISIBILITY_FEATURE@,$HAVE_GCC_VISIBILITY_FEATURE,;t t +s,@ALLOC@,$ALLOC,;t t +s,@BUILD_VER_STRING@,$BUILD_VER_STRING,;t t +s,@SOLAR_JAVA@,$SOLAR_JAVA,;t t +s,@JAVAINTERPRETER@,$JAVAINTERPRETER,;t t +s,@JAVACOMPILER@,$JAVACOMPILER,;t t +s,@JAVACISGCJ@,$JAVACISGCJ,;t t +s,@JAVADOC@,$JAVADOC,;t t +s,@AWTLIB@,$AWTLIB,;t t +s,@JAVAAOTCOMPILER@,$JAVAAOTCOMPILER,;t t +s,@JAVA_HOME@,$JAVA_HOME,;t t +s,@JDK@,$JDK,;t t +s,@JAVAFLAGS@,$JAVAFLAGS,;t t +s,@JAVAIFLAGS@,$JAVAIFLAGS,;t t +s,@DMAKE@,$DMAKE,;t t +s,@BUILD_DMAKE@,$BUILD_DMAKE,;t t +s,@EPM@,$EPM,;t t +s,@DPKG@,$DPKG,;t t +s,@PKGMK@,$PKGMK,;t t +s,@BUILD_EPM@,$BUILD_EPM,;t t +s,@RPM@,$RPM,;t t +s,@PKGFORMAT@,$PKGFORMAT,;t t +s,@GPERF@,$GPERF,;t t +s,@BUILD_STAX@,$BUILD_STAX,;t t +s,@MINGWCXX@,$MINGWCXX,;t t +s,@ac_ct_MINGWCXX@,$ac_ct_MINGWCXX,;t t +s,@MINGWSTRIP@,$MINGWSTRIP,;t t +s,@ac_ct_MINGWSTRIP@,$ac_ct_MINGWSTRIP,;t t +s,@BUILD_UNOWINREG@,$BUILD_UNOWINREG,;t t +s,@SYSTEM_STDLIBS@,$SYSTEM_STDLIBS,;t t +s,@SYSTEM_ZLIB@,$SYSTEM_ZLIB,;t t +s,@SYSTEM_JPEG@,$SYSTEM_JPEG,;t t +s,@SYSTEM_EXPAT@,$SYSTEM_EXPAT,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t +s,@LIBWPD_CFLAGS@,$LIBWPD_CFLAGS,;t t +s,@LIBWPD_LIBS@,$LIBWPD_LIBS,;t t +s,@SYSTEM_LIBWPD@,$SYSTEM_LIBWPD,;t t +s,@CPPUNIT_CFLAGS@,$CPPUNIT_CFLAGS,;t t +s,@CPPUNIT_LIBS@,$CPPUNIT_LIBS,;t t +s,@SYSTEM_CPPUNIT@,$SYSTEM_CPPUNIT,;t t +s,@FREETYPE_CFLAGS@,$FREETYPE_CFLAGS,;t t +s,@FREETYPE_LIBS@,$FREETYPE_LIBS,;t t +s,@USE_FT_EMBOLDEN@,$USE_FT_EMBOLDEN,;t t +s,@LIBXSLT_CFLAGS@,$LIBXSLT_CFLAGS,;t t +s,@LIBXSLT_LIBS@,$LIBXSLT_LIBS,;t t +s,@XSLTPROC@,$XSLTPROC,;t t +s,@SYSTEM_LIBXSLT@,$SYSTEM_LIBXSLT,;t t +s,@LIBXML_CFLAGS@,$LIBXML_CFLAGS,;t t +s,@LIBXML_LIBS@,$LIBXML_LIBS,;t t +s,@SYSTEM_LIBXML@,$SYSTEM_LIBXML,;t t +s,@PYTHON@,$PYTHON,;t t +s,@PYTHON_VERSION@,$PYTHON_VERSION,;t t +s,@PYTHON_PREFIX@,$PYTHON_PREFIX,;t t +s,@PYTHON_EXEC_PREFIX@,$PYTHON_EXEC_PREFIX,;t t +s,@PYTHON_PLATFORM@,$PYTHON_PLATFORM,;t t +s,@pythondir@,$pythondir,;t t +s,@pkgpythondir@,$pkgpythondir,;t t +s,@pyexecdir@,$pyexecdir,;t t +s,@pkgpyexecdir@,$pkgpyexecdir,;t t +s,@BZIP2@,$BZIP2,;t t +s,@SYSTEM_PYTHON@,$SYSTEM_PYTHON,;t t +s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t +s,@PYTHON_LIBS@,$PYTHON_LIBS,;t t +s,@HOME@,$HOME,;t t +s,@SYSTEM_DB@,$SYSTEM_DB,;t t +s,@DB_VERSION@,$DB_VERSION,;t t +s,@DB_INCLUDES@,$DB_INCLUDES,;t t +s,@DB_JAR@,$DB_JAR,;t t +s,@SYSTEM_LUCENE@,$SYSTEM_LUCENE,;t t +s,@LUCENE_CORE_JAR@,$LUCENE_CORE_JAR,;t t +s,@LUCENE_ANALYZERS_JAR@,$LUCENE_ANALYZERS_JAR,;t t +s,@ENABLE_MYSQLC@,$ENABLE_MYSQLC,;t t +s,@MYSQLCONFIG@,$MYSQLCONFIG,;t t +s,@SYSTEM_MYSQL@,$SYSTEM_MYSQL,;t t +s,@MYSQL_INC@,$MYSQL_INC,;t t +s,@MYSQL_LIB@,$MYSQL_LIB,;t t +s,@MYSQL_DEFINES@,$MYSQL_DEFINES,;t t +s,@LIBMYSQL_PATH@,$LIBMYSQL_PATH,;t t +s,@SYSTEM_MYSQL_CPPCONN@,$SYSTEM_MYSQL_CPPCONN,;t t +s,@SYSTEM_HSQLDB@,$SYSTEM_HSQLDB,;t t +s,@HSQLDB_JAR@,$HSQLDB_JAR,;t t +s,@SYSTEM_BSH@,$SYSTEM_BSH,;t t +s,@BSH_JAR@,$BSH_JAR,;t t +s,@SERIALIZER_JAR@,$SERIALIZER_JAR,;t t +s,@SYSTEM_SAXON@,$SYSTEM_SAXON,;t t +s,@SAXON_JAR@,$SAXON_JAR,;t t +s,@CURLCONFIG@,$CURLCONFIG,;t t +s,@SYSTEM_CURL@,$SYSTEM_CURL,;t t +s,@CURL_CFLAGS@,$CURL_CFLAGS,;t t +s,@CURL_LIBS@,$CURL_LIBS,;t t +s,@SYSTEM_MDDS@,$SYSTEM_MDDS,;t t +s,@SYSTEM_BOOST@,$SYSTEM_BOOST,;t t +s,@SYSTEM_VIGRA@,$SYSTEM_VIGRA,;t t +s,@SYSTEM_ODBC_HEADERS@,$SYSTEM_ODBC_HEADERS,;t t +s,@WITH_MOZILLA@,$WITH_MOZILLA,;t t +s,@WITH_LDAP@,$WITH_LDAP,;t t +s,@WITH_OPENLDAP@,$WITH_OPENLDAP,;t t +s,@MOZ_NSS_CFLAGS@,$MOZ_NSS_CFLAGS,;t t +s,@MOZ_NSS_LIBS@,$MOZ_NSS_LIBS,;t t +s,@NSS_LIB@,$NSS_LIB,;t t +s,@MOZ_NSPR_CFLAGS@,$MOZ_NSPR_CFLAGS,;t t +s,@MOZ_NSPR_LIBS@,$MOZ_NSPR_LIBS,;t t +s,@NSPR_LIB@,$NSPR_LIB,;t t +s,@MOZILLAXPCOM_CFLAGS@,$MOZILLAXPCOM_CFLAGS,;t t +s,@MOZILLAXPCOM_LIBS@,$MOZILLAXPCOM_LIBS,;t t +s,@MOZILLA_VERSION@,$MOZILLA_VERSION,;t t +s,@MOZILLA_TOOLKIT@,$MOZILLA_TOOLKIT,;t t +s,@MOZGTK2_CFLAGS@,$MOZGTK2_CFLAGS,;t t +s,@MOZGTK2_LIBS@,$MOZGTK2_LIBS,;t t +s,@MOZLIBREQ_CFLAGS@,$MOZLIBREQ_CFLAGS,;t t +s,@MOZLIBREQ_LIBS@,$MOZLIBREQ_LIBS,;t t +s,@BUILD_MOZAB@,$BUILD_MOZAB,;t t +s,@ENABLE_NSS_MODULE@,$ENABLE_NSS_MODULE,;t t +s,@MOZILLABUILD@,$MOZILLABUILD,;t t +s,@SYSTEM_MOZILLA@,$SYSTEM_MOZILLA,;t t +s,@MOZ_FLAVOUR@,$MOZ_FLAVOUR,;t t +s,@MOZ_INC@,$MOZ_INC,;t t +s,@MOZ_LIB@,$MOZ_LIB,;t t +s,@MOZ_LIB_XPCOM@,$MOZ_LIB_XPCOM,;t t +s,@MOZ_LDAP_CFLAGS@,$MOZ_LDAP_CFLAGS,;t t +s,@SYSTEM_SANE_HEADER@,$SYSTEM_SANE_HEADER,;t t +s,@SYSTEM_GENBRK@,$SYSTEM_GENBRK,;t t +s,@SYSTEM_GENCCODE@,$SYSTEM_GENCCODE,;t t +s,@SYSTEM_GENCMN@,$SYSTEM_GENCMN,;t t +s,@ICUCONFIG@,$ICUCONFIG,;t t +s,@SYSTEM_ICU@,$SYSTEM_ICU,;t t +s,@ICU_MAJOR@,$ICU_MAJOR,;t t +s,@ICU_MINOR@,$ICU_MINOR,;t t +s,@ICU_MICRO@,$ICU_MICRO,;t t +s,@GRAPHITE_CFLAGS@,$GRAPHITE_CFLAGS,;t t +s,@GRAPHITE_LIBS@,$GRAPHITE_LIBS,;t t +s,@ENABLE_GRAPHITE@,$ENABLE_GRAPHITE,;t t +s,@SYSTEM_GRAPHITE@,$SYSTEM_GRAPHITE,;t t +s,@X_CFLAGS@,$X_CFLAGS,;t t +s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t +s,@X_LIBS@,$X_LIBS,;t t +s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t +s,@XINC@,$XINC,;t t +s,@XLIB@,$XLIB,;t t +s,@XAU_LIBS@,$XAU_LIBS,;t t +s,@DISABLE_XAW@,$DISABLE_XAW,;t t +s,@SYSTEM_XRENDER_HEADERS@,$SYSTEM_XRENDER_HEADERS,;t t +s,@XRENDER_LINK@,$XRENDER_LINK,;t t +s,@XRANDR_CFLAGS@,$XRANDR_CFLAGS,;t t +s,@XRANDR_LIBS@,$XRANDR_LIBS,;t t +s,@XRANDR_DLOPEN@,$XRANDR_DLOPEN,;t t +s,@ENABLE_RANDR@,$ENABLE_RANDR,;t t +s,@DISABLE_NEON@,$DISABLE_NEON,;t t +s,@NEON_CFLAGS@,$NEON_CFLAGS,;t t +s,@NEON_LIBS@,$NEON_LIBS,;t t +s,@SYSTEM_NEON@,$SYSTEM_NEON,;t t +s,@NEON_VERSION@,$NEON_VERSION,;t t +s,@OPENSSL_CFLAGS@,$OPENSSL_CFLAGS,;t t +s,@OPENSSL_LIBS@,$OPENSSL_LIBS,;t t +s,@SYSTEM_OPENSSL@,$SYSTEM_OPENSSL,;t t +s,@ENABLE_AGG@,$ENABLE_AGG,;t t +s,@AGG_CFLAGS@,$AGG_CFLAGS,;t t +s,@AGG_LIBS@,$AGG_LIBS,;t t +s,@SYSTEM_AGG@,$SYSTEM_AGG,;t t +s,@AGG_VERSION@,$AGG_VERSION,;t t +s,@REDLAND_CFLAGS@,$REDLAND_CFLAGS,;t t +s,@REDLAND_LIBS@,$REDLAND_LIBS,;t t +s,@SYSTEM_REDLAND@,$SYSTEM_REDLAND,;t t +s,@HUNSPELL_CFLAGS@,$HUNSPELL_CFLAGS,;t t +s,@HUNSPELL_LIBS@,$HUNSPELL_LIBS,;t t +s,@SYSTEM_HUNSPELL@,$SYSTEM_HUNSPELL,;t t +s,@SYSTEM_HYPH@,$SYSTEM_HYPH,;t t +s,@HYPHEN_LIB@,$HYPHEN_LIB,;t t +s,@MYTHES_CFLAGS@,$MYTHES_CFLAGS,;t t +s,@MYTHES_LIBS@,$MYTHES_LIBS,;t t +s,@SYSTEM_MYTHES@,$SYSTEM_MYTHES,;t t +s,@SYSTEM_LPSOLVE@,$SYSTEM_LPSOLVE,;t t +s,@SYSTEM_LIBTEXTCAT@,$SYSTEM_LIBTEXTCAT,;t t +s,@SYSTEM_LIBTEXTCAT_DATA@,$SYSTEM_LIBTEXTCAT_DATA,;t t +s,@HAVE_GETOPT@,$HAVE_GETOPT,;t t +s,@HAVE_READDIR_R@,$HAVE_READDIR_R,;t t +s,@SYSTEM_LIBC@,$SYSTEM_LIBC,;t t +s,@PSDK_HOME@,$PSDK_HOME,;t t +s,@WINDOWS_VISTA_PSDK@,$WINDOWS_VISTA_PSDK,;t t +s,@DIRECTXSDK_HOME@,$DIRECTXSDK_HOME,;t t +s,@DIRECTXSDK_LIB@,$DIRECTXSDK_LIB,;t t +s,@NSIS_PATH@,$NSIS_PATH,;t t +s,@BISON@,$BISON,;t t +s,@FLEX@,$FLEX,;t t +s,@PATCH@,$PATCH,;t t +s,@GNUCP@,$GNUCP,;t t +s,@GNUPATCH@,$GNUPATCH,;t t +s,@CYGWIN_PATH@,$CYGWIN_PATH,;t t +s,@ML_EXE@,$ML_EXE,;t t +s,@ASM_HOME@,$ASM_HOME,;t t +s,@ZIP@,$ZIP,;t t +s,@UNZIP@,$UNZIP,;t t +s,@ZIP_HOME@,$ZIP_HOME,;t t +s,@ENABLE_GTK@,$ENABLE_GTK,;t t +s,@ENABLE_KDE@,$ENABLE_KDE,;t t +s,@ENABLE_KDE4@,$ENABLE_KDE4,;t t +s,@GCONF_CFLAGS@,$GCONF_CFLAGS,;t t +s,@GCONF_LIBS@,$GCONF_LIBS,;t t +s,@ENABLE_GCONF@,$ENABLE_GCONF,;t t +s,@GNOMEVFS_CFLAGS@,$GNOMEVFS_CFLAGS,;t t +s,@GNOMEVFS_LIBS@,$GNOMEVFS_LIBS,;t t +s,@ENABLE_GNOMEVFS@,$ENABLE_GNOMEVFS,;t t +s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t +s,@GTK_LIBS@,$GTK_LIBS,;t t +s,@DBUS_CFLAGS@,$DBUS_CFLAGS,;t t +s,@DBUS_LIBS@,$DBUS_LIBS,;t t +s,@GIO_CFLAGS@,$GIO_CFLAGS,;t t +s,@GIO_LIBS@,$GIO_LIBS,;t t +s,@ENABLE_GIO@,$ENABLE_GIO,;t t +s,@ENABLE_DBUS@,$ENABLE_DBUS,;t t +s,@ENABLE_SYSTRAY_GTK@,$ENABLE_SYSTRAY_GTK,;t t +s,@GSTREAMER_CFLAGS@,$GSTREAMER_CFLAGS,;t t +s,@GSTREAMER_LIBS@,$GSTREAMER_LIBS,;t t +s,@ENABLE_GSTREAMER@,$ENABLE_GSTREAMER,;t t +s,@CAIRO_CFLAGS@,$CAIRO_CFLAGS,;t t +s,@CAIRO_LIBS@,$CAIRO_LIBS,;t t +s,@ENABLE_CAIRO@,$ENABLE_CAIRO,;t t +s,@BUILD_PIXMAN@,$BUILD_PIXMAN,;t t +s,@SYSTEM_CAIRO@,$SYSTEM_CAIRO,;t t +s,@ENABLE_OPENGL@,$ENABLE_OPENGL,;t t +s,@ENABLE_PRESENTER_EXTRA_UI@,$ENABLE_PRESENTER_EXTRA_UI,;t t +s,@ENABLE_MINIMIZER@,$ENABLE_MINIMIZER,;t t +s,@ENABLE_PRESENTER_SCREEN@,$ENABLE_PRESENTER_SCREEN,;t t +s,@POPPLER_CFLAGS@,$POPPLER_CFLAGS,;t t +s,@POPPLER_LIBS@,$POPPLER_LIBS,;t t +s,@ENABLE_PDFIMPORT@,$ENABLE_PDFIMPORT,;t t +s,@SYSTEM_POPPLER@,$SYSTEM_POPPLER,;t t +s,@ENABLE_MEDIAWIKI@,$ENABLE_MEDIAWIKI,;t t +s,@SYSTEM_SERVLETAPI@,$SYSTEM_SERVLETAPI,;t t +s,@SERVLETAPI_JAR@,$SERVLETAPI_JAR,;t t +s,@ENABLE_REPORTBUILDER@,$ENABLE_REPORTBUILDER,;t t +s,@SYSTEM_JFREEREPORT@,$SYSTEM_JFREEREPORT,;t t +s,@SAC_JAR@,$SAC_JAR,;t t +s,@LIBXML_JAR@,$LIBXML_JAR,;t t +s,@FLUTE_JAR@,$FLUTE_JAR,;t t +s,@JFREEREPORT_JAR@,$JFREEREPORT_JAR,;t t +s,@LIBBASE_JAR@,$LIBBASE_JAR,;t t +s,@LIBLAYOUT_JAR@,$LIBLAYOUT_JAR,;t t +s,@LIBLOADER_JAR@,$LIBLOADER_JAR,;t t +s,@LIBFORMULA_JAR@,$LIBFORMULA_JAR,;t t +s,@LIBREPOSITORY_JAR@,$LIBREPOSITORY_JAR,;t t +s,@LIBFONTS_JAR@,$LIBFONTS_JAR,;t t +s,@LIBSERIALIZER_JAR@,$LIBSERIALIZER_JAR,;t t +s,@SYSTEM_APACHE_COMMONS@,$SYSTEM_APACHE_COMMONS,;t t +s,@COMMONS_CODEC_JAR@,$COMMONS_CODEC_JAR,;t t +s,@COMMONS_LANG_JAR@,$COMMONS_LANG_JAR,;t t +s,@COMMONS_HTTPCLIENT_JAR@,$COMMONS_HTTPCLIENT_JAR,;t t +s,@COMMONS_LOGGING_JAR@,$COMMONS_LOGGING_JAR,;t t +s,@MOC@,$MOC,;t t +s,@KDE_CFLAGS@,$KDE_CFLAGS,;t t +s,@KDE_LIBS@,$KDE_LIBS,;t t +s,@MOC4@,$MOC4,;t t +s,@KDE4_CFLAGS@,$KDE4_CFLAGS,;t t +s,@KDE4_LIBS@,$KDE4_LIBS,;t t +s,@ENABLE_LOCKDOWN@,$ENABLE_LOCKDOWN,;t t +s,@GOBJECT_CFLAGS@,$GOBJECT_CFLAGS,;t t +s,@GOBJECT_LIBS@,$GOBJECT_LIBS,;t t +s,@ENABLE_EVOAB2@,$ENABLE_EVOAB2,;t t +s,@ENABLE_KAB@,$ENABLE_KAB,;t t +s,@WITH_FONTS@,$WITH_FONTS,;t t +s,@WITHOUT_PPDS@,$WITHOUT_PPDS,;t t +s,@WITHOUT_AFMS@,$WITHOUT_AFMS,;t t +s,@SCPDEFS@,$SCPDEFS,;t t +s,@USE_XINERAMA@,$USE_XINERAMA,;t t +s,@XINERAMA_LINK@,$XINERAMA_LINK,;t t +s,@ANT@,$ANT,;t t +s,@ANT_HOME@,$ANT_HOME,;t t +s,@ANT_LIB@,$ANT_LIB,;t t +s,@OOO_JUNIT_JAR@,$OOO_JUNIT_JAR,;t t +s,@WITH_LANG@,$WITH_LANG,;t t +s,@WITH_POOR_HELP_LOCALIZATIONS@,$WITH_POOR_HELP_LOCALIZATIONS,;t t +s,@WITH_DICT@,$WITH_DICT,;t t +s,@INTRO_BITMAPS@,$INTRO_BITMAPS,;t t +s,@ABOUT_BITMAPS@,$ABOUT_BITMAPS,;t t +s,@OOO_VENDOR@,$OOO_VENDOR,;t t +s,@UNIXWRAPPERNAME@,$UNIXWRAPPERNAME,;t t +s,@ENABLE_STATIC_GTK@,$ENABLE_STATIC_GTK,;t t +s,@ENABLE_LAYOUT@,$ENABLE_LAYOUT,;t t +s,@VERBOSE@,$VERBOSE,;t t +s,@nodep@,$nodep,;t t +s,@LOCAL_SOLVER@,$LOCAL_SOLVER,;t t +s,@BUILD_TYPE@,$BUILD_TYPE,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; - esac - ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - ;; - - - - esac +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -32774,10 +31526,6 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi chmod a+x set_soenv -- cgit From 2ea89ad160dd6b03bfbbc0758ef95b49a02256ba Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 12:34:10 +0100 Subject: masterfix DEV300: #i10000# added missing file --- basic/inc/basic/vbahelper.hxx | 86 ++++++++++++++++ basic/source/basmgr/makefile.mk | 4 +- basic/source/basmgr/vbahelper.cxx | 212 ++++++++++++++++++++++++++++++++++++++ basic/source/classes/sbxmod.cxx | 2 +- 4 files changed, 301 insertions(+), 3 deletions(-) create mode 100755 basic/inc/basic/vbahelper.hxx create mode 100755 basic/source/basmgr/vbahelper.cxx diff --git a/basic/inc/basic/vbahelper.hxx b/basic/inc/basic/vbahelper.hxx new file mode 100755 index 000000000000..0d99387965fe --- /dev/null +++ b/basic/inc/basic/vbahelper.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * 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 BASIC_VBAHELPR_HXX +#define BASIC_VBAHELPR_HXX + +#include <com/sun/star/frame/XModel.hpp> + +namespace basic { +namespace vba { + +/* This header contains public helper functions for VBA used from this module + and from other VBA implementation modules such as vbahelper. + */ + +// ============================================================================ + +/** Locks or unlocks the controllers of all documents that have the same type + as the specified document. + + First, the global module manager (com.sun.star.frame.ModuleManager) is + asked for the type of the passed model, and all open documents with the + same type will be locked or unlocked. + + @param rxModel + A document model determining the type of the documents to be locked or + unlocked. + + @param bLockControllers + Passing true will lock all controllers, passing false will unlock them. + */ +void lockControllersOfAllDocuments( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, + sal_Bool bLockControllers ); + +// ============================================================================ + +/** Enables or disables the container windows of all controllers of all + documents that have the same type as the specified document. + + First, the global module manager (com.sun.star.frame.ModuleManager) is + asked for the type of the passed model, and the container windows of all + open documents with the same type will be enabled or disabled. + + @param rxModel + A document model determining the type of the documents to be enabled or + disabled. + + @param bEnableWindows + Passing true will enable all container windows of all controllers, + passing false will disable them. + */ +void enableContainerWindowsOfAllDocuments( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, + sal_Bool bEnableWindows ); + +// ============================================================================ + +} // namespace vba +} // namespace basic + +#endif diff --git a/basic/source/basmgr/makefile.mk b/basic/source/basmgr/makefile.mk index b4855d5bb950..615a8e8465ef 100644 --- a/basic/source/basmgr/makefile.mk +++ b/basic/source/basmgr/makefile.mk @@ -39,8 +39,8 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/basmgr.obj \ - $(SLO)$/basicmanagerrepository.obj -# $(SLO)$/vbahelper.obj + $(SLO)$/basicmanagerrepository.obj\ + $(SLO)$/vbahelper.obj # --- Targets ------------------------------------------------------------- diff --git a/basic/source/basmgr/vbahelper.cxx b/basic/source/basmgr/vbahelper.cxx new file mode 100755 index 000000000000..a09446f2e40b --- /dev/null +++ b/basic/source/basmgr/vbahelper.cxx @@ -0,0 +1,212 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + * 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). + * + * 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_basic.hxx" + +#include "basic/vbahelper.hxx" +#include <com/sun/star/container/XEnumeration.hpp> +#include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/frame/XModel2.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <comphelper/processfactory.hxx> + +namespace basic { +namespace vba { + +using namespace ::com::sun::star; + +// ============================================================================ + +namespace { + +/** Creates the global module manager needed to identify the type of documents. + */ +uno::Reference< frame::XModuleManager > lclCreateModuleManager() +{ + uno::Reference< frame::XModuleManager > xModuleManager; + try + { + uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW ); + xModuleManager.set( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ) ) ), uno::UNO_QUERY ); + } + catch( uno::Exception& ) + { + } + OSL_ENSURE( xModuleManager.is(), "::basic::vba::lclCreateModuleManager - cannot create module manager" ); + return xModuleManager; +} + +// ---------------------------------------------------------------------------- + +/** Returns the document service name of the specified document. + */ +::rtl::OUString lclIdentifyDocument( const uno::Reference< frame::XModuleManager >& rxModuleManager, const uno::Reference< frame::XModel >& rxModel ) +{ + ::rtl::OUString aServiceName; + if( rxModuleManager.is() ) + { + try + { + aServiceName = rxModuleManager->identify( rxModel ); + } + catch( uno::Exception& ) + { + } + OSL_ENSURE( aServiceName.getLength() > 0, "::basic::vba::lclIdentifyDocument - cannot identify document" ); + } + return aServiceName; +} + +// ---------------------------------------------------------------------------- + +/** Returns an enumeration of all open documents. + */ +uno::Reference< container::XEnumeration > lclCreateDocumentEnumeration() +{ + uno::Reference< container::XEnumeration > xEnumeration; + try + { + uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW ); + uno::Reference< frame::XDesktop > xDesktop( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XEnumerationAccess > xComponentsEA( xDesktop->getComponents(), uno::UNO_SET_THROW ); + xEnumeration = xComponentsEA->createEnumeration(); + + } + catch( uno::Exception& ) + { + } + OSL_ENSURE( xEnumeration.is(), "::basic::vba::lclCreateDocumentEnumeration - cannot create enumeration of all documents" ); + return xEnumeration; +} + +// ---------------------------------------------------------------------------- + +/** Locks or unlocks the controllers of the specified document model. + */ +void lclLockControllers( const uno::Reference< frame::XModel >& rxModel, sal_Bool bLockControllers ) +{ + if( rxModel.is() ) try + { + if( bLockControllers ) + rxModel->lockControllers(); + else + rxModel->unlockControllers(); + } + catch( uno::Exception& ) + { + } +} + +// ---------------------------------------------------------------------------- + +/** Enables or disables the container windows of all controllers of the + specified document model. + */ +void lclEnableContainerWindows( const uno::Reference< frame::XModel >& rxModel, sal_Bool bEnableWindows ) +{ + try + { + uno::Reference< frame::XModel2 > xModel2( rxModel, uno::UNO_QUERY_THROW ); + uno::Reference< container::XEnumeration > xControllersEnum( xModel2->getControllers(), uno::UNO_SET_THROW ); + // iterate over all controllers + while( xControllersEnum->hasMoreElements() ) + { + try + { + uno::Reference< frame::XController > xController( xControllersEnum->nextElement(), uno::UNO_QUERY_THROW ); + uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW ); + uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW ); + xWindow->setEnable( bEnableWindows ); + } + catch( uno::Exception& ) + { + } + } + } + catch( uno::Exception& ) + { + } +} + +// ---------------------------------------------------------------------------- + +typedef void (*ModifyDocumentFunc)( const uno::Reference< frame::XModel >&, sal_Bool ); + +/** Implementation iterating over all documents that have the same type as the + specified model, and calling the passed functor. + */ +void lclIterateDocuments( ModifyDocumentFunc pModifyDocumentFunc, const uno::Reference< frame::XModel >& rxModel, sal_Bool bModificator ) +{ + uno::Reference< frame::XModuleManager > xModuleManager = lclCreateModuleManager(); + uno::Reference< container::XEnumeration > xDocumentsEnum = lclCreateDocumentEnumeration(); + ::rtl::OUString aIdentifier = lclIdentifyDocument( xModuleManager, rxModel ); + if( xModuleManager.is() && xDocumentsEnum.is() && (aIdentifier.getLength() > 0) ) + { + // iterate over all open documents + while( xDocumentsEnum->hasMoreElements() ) + { + try + { + uno::Reference< frame::XModel > xCurrModel( xDocumentsEnum->nextElement(), uno::UNO_QUERY_THROW ); + ::rtl::OUString aCurrIdentifier = lclIdentifyDocument( xModuleManager, xCurrModel ); + if( aCurrIdentifier == aIdentifier ) + pModifyDocumentFunc( xCurrModel, bModificator ); + } + catch( uno::Exception& ) + { + } + } + } + else + { + // no module manager, no documents enumeration, no identifier -> at least process the passed document + pModifyDocumentFunc( rxModel, bModificator ); + } +} + +} // namespace + +// ============================================================================ + +void lockControllersOfAllDocuments( const uno::Reference< frame::XModel >& rxModel, sal_Bool bLockControllers ) +{ + lclIterateDocuments( &lclLockControllers, rxModel, bLockControllers ); +} + +// ============================================================================ + +void enableContainerWindowsOfAllDocuments( const uno::Reference< frame::XModel >& rxModel, sal_Bool bEnableWindows ) +{ + lclIterateDocuments( &lclEnableContainerWindows, rxModel, bEnableWindows ); +} + +// ============================================================================ + +} // namespace vba +} // namespace basic diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 2cf098655d8f..592d69c514a0 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -54,7 +54,7 @@ #include <basic/basrdll.hxx> #include <vos/mutex.hxx> #include <basic/sbobjmod.hxx> -//#include <basic/vbahelper.hxx> +#include <basic/vbahelper.hxx> #include <cppuhelper/implbase3.hxx> #include <unotools/eventcfg.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> -- cgit From f4ee300c5ddf5468838dd4fec983efbaf648aa50 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 12:41:39 +0100 Subject: masterfix DEV300: #i10000# buildtype removed --- sw/Module_sw.mk | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index 138fe30b964f..c6257e22fc93 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -39,12 +39,6 @@ $(eval $(call gb_Module_add_targets,sw,\ Package_xml \ )) -ifeq ($(strip $(ENABLE_VBA)),YES) -$(eval $(call gb_Module_add_targets,sw,\ - Library_vbaswobj \ -)) -endif - $(eval $(call gb_Module_add_subsequentcheck_targets,sw,\ JunitTest_sw_complex \ JunitTest_sw_unoapi \ -- cgit From 27a1028245e94de4b11567a5adb60cfb6b10e914 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 12:41:39 +0100 Subject: masterfix DEV300: #i10000# buildtype removed --- postprocess/packcomponents/makefile.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index 9fbfc70e11a2..49fa9e19d908 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -171,6 +171,7 @@ my_components = \ utl \ uui \ vbaobj \ + vbaevents \ vcl \ vclcanvas \ wpft \ @@ -231,10 +232,6 @@ my_components += ogltrans my_components += productregistration.jar .END -.IF "$(ENABLE_VBA)" == "YES" -my_components += vbaevents -.END - .IF "$(SOLAR_JAVA)" == "TRUE" my_components += \ LuceneHelpWrapper \ -- cgit From 87c0b74710557e0ae8669f0873a7e49dff222ff4 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 13:41:58 +0100 Subject: masterfix DEV300: #i10000# init order fix --- sfx2/source/dialog/dinfdlg.cxx | 4 ++-- sfx2/source/dialog/mgetempl.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 690a514a91f5..2d5c383f8b89 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2395,9 +2395,9 @@ void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny, SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& rItemSet ) : SfxTabPage( pParent, SfxResId( TP_CUSTOMPROPERTIES ), rItemSet ), - m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ), m_aPropertiesCtrl ( this, SfxResId( CTRL_PROPERTIES ) ), - m_aAddBtn ( this, SfxResId( BTN_ADD ) ) + m_aAddBtn ( this, SfxResId( BTN_ADD ) ), + m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ) { FreeResource(); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 454c42896cfe..5cac88236f4a 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -77,9 +77,9 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem aFilterFt ( this, SfxResId( FT_REGION ) ), aFilterLb ( this, SfxResId( LB_REGION ) ), + aDescGb ( this, SfxResId( GB_DESC ) ), aDescFt ( this, SfxResId( FT_DESC ) ), aDescED ( this, SfxResId( ED_DESC ) ), - aDescGb ( this, SfxResId( GB_DESC ) ), pStyle( &( (SfxStyleDialog*)pParent->GetParent() )->GetStyleSheet() ), -- cgit From 1e051819498bb28acb3cf82c3ee69193d2a57368 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 13:47:33 +0100 Subject: masterfix DEV300: #i10000# FALSE -> sal_False --- sc/source/core/data/document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 419baa3d85c2..714467d8e5eb 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1986,7 +1986,7 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1, SetInsertingFromOtherDoc( sal_True); UpdateReference( URM_MOVE, nCol1, nRow1, i, nCol2, nRow2, i+nFollow, - nDx, nDy, nDz, pCBFCP->pRefUndoDoc, FALSE ); + nDx, nDy, nDz, pCBFCP->pRefUndoDoc, sal_False ); SetInsertingFromOtherDoc( bOldInserting); } else -- cgit From 39822453818c3e9633634a744f5e9b71bbddc497 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 14:25:24 +0100 Subject: masterfix DEV300: #i10000# fixed patch handling --- solenv/inc/tg_ext.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk index e19c7124d4a7..63c0c995f42a 100644 --- a/solenv/inc/tg_ext.mk +++ b/solenv/inc/tg_ext.mk @@ -312,11 +312,11 @@ $(MISC)/$(TARFILE_ROOTDIR).done : $(MISC)/$(TARFILE_MD5)-$(TARFILE_NAME).unpack #.IF "$(my4ver:s/.//:s/,//)" >= "300" # $(COMMAND_ECHO)cd $(MISC) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 ) #.ELSE # "$(my4ver:s/.//:s/,//)" >= "300" - $(COMMAND_ECHO)cd $(MISC) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 + $(COMMAND_ECHO)cd $(MISC) && $(TYPE:s/+//) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 #.ENDIF # "$(my4ver:s/.//:s/,//)" >= "300" .ELSE # "$(GUI)"=="WNT" .IF "$(BSCLIENT)"=="TRUE" - $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2 + $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2 .ELSE # "$(BSCLIENT)"!="" $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2 .ENDIF # "$(BSCLIENT)"!="" -- cgit From 06385266dfd8ccde6cd79c64909e077d1e39dee3 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 16:19:47 +0100 Subject: masterfix DEV300: #i10000# removed one hard dep --- solenv/gbuild/AllLangResTarget.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk index f8770dc5158d..1b7acc947bfc 100644 --- a/solenv/gbuild/AllLangResTarget.mk +++ b/solenv/gbuild/AllLangResTarget.mk @@ -28,7 +28,6 @@ # SrsPartMergeTarget class gb_SrsPartMergeTarget_TRANSEXTARGET := $(call gb_Executable_get_target,transex3) -gb_SrsPartMergeTarget_TRANSEXAUXDEPS := $(call gb_Library_get_target,tl) $(call gb_Library_get_target,sal) # gb_SrsPartMergeTarget_TRANSEXPRECOMMAND is set by the platforms gb_SrsPartMergeTarget_TRANSEXCOMMAND := $(gb_SrsPartMergeTarget_TRANSEXPRECOMMAND) $(gb_SrsPartMergeTarget_TRANSEXTARGET) @@ -49,7 +48,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ endef define gb_SrsPartMergeTarget__rules -$$(call gb_SrsPartMergeTarget_get_target,%) : $(1)/% $$(gb_Helper_MISCDUMMY) | $$(gb_SrsPartMergeTarget_TRANSEXTARGET) $$(gb_SrsPartMergeTarget_TRANSEXAUXDEPS) +$$(call gb_SrsPartMergeTarget_get_target,%) : $(1)/% $$(gb_Helper_MISCDUMMY) | $$(gb_SrsPartMergeTarget_TRANSEXTARGET) $$(if $$(SDF),$$(call gb_SrsPartMergeTarget__command,$$@,$$*,$$<),mkdir -p $$(dir $$@) && cp $$< $$@) endef -- cgit From 3a74c90ca8a7befe0dc812a92c4d482ae99c3d26 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Mon, 21 Feb 2011 18:43:22 +0100 Subject: masterfix DEV300: #i10000# WAE fixes --- sw/source/ui/chrdlg/break.cxx | 2 +- sw/source/ui/chrdlg/drpcps.cxx | 4 ++-- sw/source/ui/chrdlg/numpara.cxx | 4 ++-- sw/source/ui/config/optpage.cxx | 2 +- sw/source/ui/dialog/docstdlg.cxx | 18 ++++++++---------- sw/source/ui/envelp/label1.cxx | 10 +++++----- sw/source/ui/envelp/labprt.cxx | 6 +++--- sw/source/ui/frmdlg/column.cxx | 7 +++---- sw/source/ui/frmdlg/frmpage.cxx | 13 ++++++------- sw/source/ui/index/cnttab.cxx | 11 ++++++----- sw/source/ui/index/swuiidxmrk.cxx | 2 +- sw/source/ui/misc/bookmark.cxx | 3 +-- sw/source/ui/misc/docfnote.cxx | 9 +++++---- sw/source/ui/misc/glosbib.cxx | 7 +++---- sw/source/ui/misc/glossary.cxx | 5 +++-- sw/source/ui/misc/insfnote.cxx | 4 ++-- sw/source/ui/misc/linenum.cxx | 8 ++++---- sw/source/ui/misc/num.cxx | 2 +- sw/source/ui/misc/outline.cxx | 6 +++--- sw/source/ui/misc/pgfnote.cxx | 9 ++++----- sw/source/ui/misc/srtdlg.cxx | 5 +++-- sw/source/ui/table/colwd.cxx | 2 +- sw/source/ui/table/rowht.cxx | 2 +- sw/source/ui/table/tabledlg.cxx | 2 +- sw/source/ui/table/tautofmt.cxx | 2 +- sw/source/ui/utlui/swrenamexnameddlg.cxx | 4 ++-- 26 files changed, 73 insertions(+), 76 deletions(-) diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index fe8d152bbc8c..ff4ec261b209 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -160,6 +160,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : SvxStandardDialog( pParent,SW_RES(DLG_BREAK) ), rSh(rS), + aBreakFL(this,SW_RES(FL_BREAK)), aLineBtn(this,SW_RES(RB_LINE)), aColumnBtn(this,SW_RES(RB_COL)), aPageBtn(this,SW_RES(RB_PAGE)), @@ -167,7 +168,6 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : aPageCollBox(this, SW_RES(LB_COLL)), aPageNumBox(this, SW_RES(CB_PAGENUM)), aPageNumEdit(this, SW_RES(ED_PAGENUM)), - aBreakFL(this,SW_RES(FL_BREAK)), aOkBtn(this,SW_RES(BT_OK)), aCancelBtn(this,SW_RES(BT_CANCEL)), diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index e4b95c599071..8f02d0cc8796 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -569,6 +569,7 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, SW_RES(TP_DROPCAPS), rSet), + aSettingsFL (this, SW_RES(FL_SETTINGS)), aDropCapsBox (this, SW_RES(CB_SWITCH )), aWholeWordCB (this, SW_RES(CB_WORD )), aSwitchText (this, SW_RES(FT_DROPCAPS )), @@ -577,13 +578,12 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) : aLinesField (this, SW_RES(FLD_LINES )), aDistanceText (this, SW_RES(TXT_DISTANCE)), aDistanceField(this, SW_RES(FLD_DISTANCE)), - aSettingsFL (this, SW_RES(FL_SETTINGS)), + aContentFL (this, SW_RES(FL_CONTENT )), aTextText (this, SW_RES(TXT_TEXT )), aTextEdit (this, SW_RES(EDT_TEXT )), aTemplateText (this, SW_RES(TXT_TEMPLATE)), aTemplateBox (this, SW_RES(BOX_TEMPLATE)), - aContentFL (this, SW_RES(FL_CONTENT )), pPict (new SwDropCapsPict(this, SW_RES(CNT_PICT))), diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 5a055de847d3..20b99cc492fb 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -69,10 +69,10 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, aOutlineStartFL ( this, SW_RES( FL_OUTLINE_START )), aOutlineLvFT ( this, SW_RES( FT_OUTLINE_LEVEL )), aOutlineLvLB ( this, SW_RES( LB_OUTLINE_LEVEL )), + aNewStartFL ( this, SW_RES( FL_NEW_START ) ), aNumberStyleFT ( this, SW_RES( FT_NUMBER_STYLE ) ), aNumberStyleLB ( this, SW_RES( LB_NUMBER_STYLE ) ), - aNewStartFL ( this, SW_RES( FL_NEW_START ) ), - aNewStartCB ( this, SW_RES( CB_NEW_START ) ), + aNewStartCB ( this, SW_RES( CB_NEW_START ) ), aNewStartNumberCB ( this, SW_RES( CB_NUMBER_NEW_START ) ), aNewStartNF ( this, SW_RES( NF_NEW_START ) ), aCountParaFL ( this, SW_RES( FL_COUNT_PARA ) ), diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 037d17a5cc5e..84ab51621609 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -345,11 +345,11 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aProspectCB (this, SW_RES(CB_PROSPECT)), aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)), aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)), + aFL3 (this, SW_RES(FL_3)), aNoRB (this, SW_RES(RB_NO)), aOnlyRB (this, SW_RES(RB_ONLY)), aEndRB (this, SW_RES(RB_END)), aEndPageRB (this, SW_RES(RB_PAGEEND)), - aFL3 (this, SW_RES(FL_3)), aFL4 (this, SW_RES(FL_4)), aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)), // aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)), diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index cb6a9882fac3..08bb7b96e45b 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -82,23 +82,21 @@ SfxTabPage * SwDocStatPage::Create(Window *pParent, const SfxItemSet &rSet) SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage (pParent, SW_RES(TP_DOC_STAT), rSet), - + aPageLbl (this, SW_RES( FT_PAGE )), + aPageNo (this, SW_RES( FT_PAGE_COUNT )), aTableLbl (this, SW_RES( FT_TABLE )), + aTableNo (this, SW_RES( FT_TABLE_COUNT)), aGrfLbl (this, SW_RES( FT_GRF )), + aGrfNo (this, SW_RES( FT_GRF_COUNT )), aOLELbl (this, SW_RES( FT_OLE )), - aPageLbl (this, SW_RES( FT_PAGE )), + aOLENo (this, SW_RES( FT_OLE_COUNT )), aParaLbl (this, SW_RES( FT_PARA )), + aParaNo (this, SW_RES( FT_PARA_COUNT )), aWordLbl (this, SW_RES( FT_WORD )), + aWordNo (this, SW_RES( FT_WORD_COUNT )), aCharLbl (this, SW_RES( FT_CHAR )), + aCharNo (this, SW_RES( FT_CHAR_COUNT )), aLineLbl (this, SW_RES( FT_LINE )), - - aTableNo (this, SW_RES( FT_TABLE_COUNT)), - aGrfNo (this, SW_RES( FT_GRF_COUNT )), - aOLENo (this, SW_RES( FT_OLE_COUNT )), - aPageNo (this, SW_RES( FT_PAGE_COUNT )), - aParaNo (this, SW_RES( FT_PARA_COUNT )), - aWordNo (this, SW_RES( FT_WORD_COUNT )), - aCharNo (this, SW_RES( FT_CHAR_COUNT )), aLineNo (this, SW_RES( FT_LINE_COUNT )), aUpdatePB (this, SW_RES( PB_PDATE )) { diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index cacd61a83434..4ee1d3295ddc 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -272,6 +272,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) : pNewDBMgr(NULL), aItem ((const SwLabItem&) rSet.Get(FN_LABEL)), + aWritingFL (this, SW_RES(FL_WRITING)), aWritingText (this, SW_RES(TXT_WRITING)), aAddrBox (this, SW_RES(BOX_ADDR )), aWritingEdit (this, SW_RES(EDT_WRITING)), @@ -282,7 +283,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) : aInsertBT (this, SW_RES(BTN_INSERT )), aDBFieldFT (this, SW_RES(FT_DBFIELD )), aDBFieldLB (this, SW_RES(LB_DBFIELD )), - aWritingFL (this, SW_RES(FL_WRITING)), + aFormatFL (this, SW_RES(FL_FORMAT )), aContButton (this, SW_RES(BTN_CONT )), aSheetButton (this, SW_RES(BTN_SHEET )), aMakeText (this, SW_RES(TXT_MAKE )), @@ -290,9 +291,8 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) : aTypeText (this, SW_RES(TXT_TYPE )), aTypeBox (this, SW_RES(BOX_TYPE )), aHiddenSortTypeBox(this, WB_SORT|WB_HIDE), - aFormatInfo (this, SW_RES(INF_FORMAT )), - aFormatFL (this, SW_RES(FL_FORMAT )) -{ + aFormatInfo (this, SW_RES(INF_FORMAT )) + { WaitObject aWait( pParent ); FreeResource(); @@ -715,10 +715,10 @@ void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt, SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, SW_RES(TP_VISITING_CARDS), rSet), + aContentFL(this, SW_RES( FL_CONTENT )), aAutoTextLB(this, SW_RES( LB_AUTO_TEXT )), aAutoTextGroupFT(this, SW_RES( FT_AUTO_TEXT_GROUP )), aAutoTextGroupLB(this, SW_RES( LB_AUTO_TEXT_GROUP )), - aContentFL(this, SW_RES( FL_CONTENT )), aExampleWIN(this, SW_RES( WIN_EXAMPLE )), sVisCardGroup(SW_RES(ST_VISCARD_GROUP)), pExampleFrame(0) diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index 2639109b8079..4341bc9c5b75 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -61,6 +61,7 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, SW_RES(TP_LAB_PRT), rSet), pPrinter( 0 ), + aFLDontKnow (this, SW_RES(FL_DONTKNOW)), aPageButton (this, SW_RES(BTN_PAGE )), aSingleButton (this, SW_RES(BTN_SINGLE )), aColText (this, SW_RES(TXT_COL )), @@ -68,10 +69,9 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) : aRowText (this, SW_RES(TXT_ROW )), aRowField (this, SW_RES(FLD_ROW )), aSynchronCB (this, SW_RES(CB_SYNCHRON)), - aFLDontKnow (this, SW_RES(FL_DONTKNOW)), + aFLPrinter (this, SW_RES(FL_PRINTER )), aPrinterInfo (this, SW_RES(INF_PRINTER)), - aPrtSetup (this, SW_RES(BTN_PRTSETUP)), - aFLPrinter (this, SW_RES(FL_PRINTER )) + aPrtSetup (this, SW_RES(BTN_PRTSETUP)) { FreeResource(); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 1dec55af8dd7..9859f4875b46 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -453,12 +453,13 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, SW_RES(TP_COLUMN), rSet), + aFLGroup(this, SW_RES(FL_COLUMNS )), aClNrLbl(this, SW_RES(FT_NUMBER )), aCLNrEdt(this, SW_RES(ED_NUMBER )), aDefaultVS(this, SW_RES(VS_DEFAULTS)), aBalanceColsCB(this, SW_RES(CB_BALANCECOLS)), - aFLGroup(this, SW_RES(FL_COLUMNS )), + aFLLayout(this, SW_RES(FL_LAYOUT)), aBtnUp(this, SW_RES(BTN_DOWN)), aColumnFT(this, SW_RES(FT_COLUMN)), aWidthFT(this, SW_RES(FT_WIDTH)), @@ -474,15 +475,13 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) aBtnDown(this, SW_RES(BTN_UP)), aAutoWidthBox(this, SW_RES(CB_AUTO_WIDTH)), - aFLLayout(this, SW_RES(FL_LAYOUT)), - + aFLLineType(this, SW_RES(FL_LINETYPE)), aLineTypeLbl(this, SW_RES(FT_STYLE)), aLineTypeDLB(this, SW_RES(LB_STYLE)), aLineHeightLbl(this, SW_RES(FT_HEIGHT)), aLineHeightEdit(this, SW_RES(ED_HEIGHT)), aLinePosLbl(this, SW_RES(FT_POSITION)), aLinePosDLB(this, SW_RES(LB_POSITION)), - aFLLineType(this, SW_RES(FL_LINETYPE)), aVertFL(this, SW_RES(FL_VERT)), aPropertiesFL( this, SW_RES( FL_PROPERTIES )), diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 35da147aedd6..e64ec62f6c3a 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -654,6 +654,7 @@ namespace SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : SfxTabPage (pParent, SW_RES(TP_FRM_STD), rSet), + aSizeFL (this, SW_RES(FL_SIZE)), aWidthFT (this, SW_RES(FT_WIDTH)), aWidthAutoFT (this, SW_RES(FT_WIDTH_AUTO)), aWidthED (this, SW_RES(ED_WIDTH)), @@ -666,16 +667,16 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : aAutoHeightCB (this, SW_RES(CB_AUTOHEIGHT)), aFixedRatioCB (this, SW_RES(CB_FIXEDRATIO)), aRealSizeBT (this, SW_RES(BT_REALSIZE)), - aSizeFL (this, SW_RES(FL_SIZE)), - aTypeFL (this, SW_RES(FL_TYPE)), aTypeSepFL (this, SW_RES(FL_TYPE_SEP)), + aTypeFL (this, SW_RES(FL_TYPE)), aAnchorAtPageRB (this, SW_RES(RB_ANCHOR_PAGE)), aAnchorAtParaRB (this, SW_RES(RB_ANCHOR_PARA)), aAnchorAtCharRB (this, SW_RES(RB_ANCHOR_AT_CHAR)), aAnchorAsCharRB (this, SW_RES(RB_ANCHOR_AS_CHAR)), aAnchorAtFrameRB(this, SW_RES(RB_ANCHOR_FRAME)), + aPositionFL (this, SW_RES(FL_POSITION)), aHorizontalFT (this, SW_RES(FT_HORIZONTAL)), aHorizontalDLB (this, SW_RES(DLB_HORIZONTAL)), aAtHorzPosFT (this, SW_RES(FT_AT_HORZ_POS)), @@ -691,7 +692,6 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : aVertRelationLB (this, SW_RES(LB_VERT_RELATION)), // OD 19.09.2003 #i18732# - new checkbox aFollowTextFlowCB(this, SW_RES(CB_FOLLOWTEXTFLOW)), - aPositionFL (this, SW_RES(FL_POSITION)), aExampleWN (this, SW_RES(WN_BSP)), @@ -2935,6 +2935,7 @@ void lcl_Move(Window& rWin, sal_Int32 nDiff) SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) : SfxTabPage(pParent, SW_RES(TP_FRM_ADD), rSet), + aNamesFL (this, SW_RES(FL_NAME)), aNameFT (this, SW_RES(FT_NAME)), aNameED (this, SW_RES(ED_NAME)), aAltNameFT (this, SW_RES(FT_ALT_NAME)), @@ -2943,20 +2944,18 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) : aPrevLB (this, SW_RES(LB_PREV)), aNextFT (this, SW_RES(FT_NEXT)), aNextLB (this, SW_RES(LB_NEXT)), - aNamesFL (this, SW_RES(FL_NAME)), + aProtectFL (this, SW_RES(FL_PROTECT)), aProtectContentCB (this, SW_RES(CB_PROTECT_CONTENT)), aProtectFrameCB (this, SW_RES(CB_PROTECT_FRAME)), aProtectSizeCB (this, SW_RES(CB_PROTECT_SIZE)), - aProtectFL (this, SW_RES(FL_PROTECT)), + aExtFL (this, SW_RES(FL_EXT)), aEditInReadonlyCB (this, SW_RES(CB_EDIT_IN_READONLY)), aPrintFrameCB (this, SW_RES(CB_PRINT_FRAME)), aTextFlowFT (this, SW_RES(FT_TEXTFLOW)), aTextFlowLB (this, SW_RES(LB_TEXTFLOW)), - aExtFL (this, SW_RES(FL_EXT)), - pWrtSh(0), nDlgType(0), diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 6ebaa586e6aa..905caaf6f0ef 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -991,6 +991,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS aTOXMarksCB( this, SW_RES(CB_TOXMARKS )), + aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )), aCollectSameCB( this, SW_RES(CB_COLLECTSAME )), aUseFFCB( this, SW_RES(CB_USEFF )), aUseDashCB( this, SW_RES(CB_USE_DASH )), @@ -999,7 +1000,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS aKeyAsEntryCB( this, SW_RES(CB_KEYASENTRY )), aFromFileCB( this, SW_RES(CB_FROMFILE )), aAutoMarkPB( this, SW_RES(MB_AUTOMARK )), - aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )), aFromNames( SW_RES(RES_SRCTYPES )), aFromObjCLB( this, SW_RES(CLB_FROMOBJ )), @@ -2064,6 +2064,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet SfxTabPage(pParent, SW_RES(TP_TOX_ENTRY), rAttrSet), aLevelFT(this, SW_RES(FT_LEVEL )), aLevelLB(this, SW_RES(LB_LEVEL )), + aEntryFL(this, SW_RES(FL_ENTRY )), aTokenFT(this, SW_RES(FT_TOKEN )), aTokenWIN(this, SW_RES(WIN_TOKEN )), @@ -2097,14 +2098,14 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aTabPosFT(this, SW_RES(FT_TABPOS )), aTabPosMF(this, SW_RES(MF_TABPOS )), aAutoRightCB(this, SW_RES(CB_AUTORIGHT )), - aEntryFL(this, SW_RES(FL_ENTRY )), + aFormatFL(this, SW_RES(FL_FORMAT )), + aRelToStyleCB(this, SW_RES(CB_RELTOSTYLE )), aMainEntryStyleFT(this, SW_RES(FT_MAIN_ENTRY_STYLE)), aMainEntryStyleLB(this, SW_RES(LB_MAIN_ENTRY_STYLE)), aAlphaDelimCB(this, SW_RES(CB_ALPHADELIM )), aCommaSeparatedCB(this, SW_RES(CB_COMMASEPARATED )), - aFormatFL(this, SW_RES(FL_FORMAT )), aSortDocPosRB(this, SW_RES(RB_DOCPOS )), aSortContentRB(this, SW_RES(RB_SORTCONTENT )), @@ -3933,14 +3934,14 @@ void SwTokenWindow::GetFocus() * --------------------------------------------------*/ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet ) : SfxTabPage(pParent, SW_RES(TP_TOX_STYLES), rAttrSet), + aFormatFL(this, SW_RES(FL_FORMAT )), aLevelFT2(this, SW_RES(FT_LEVEL )), aLevelLB(this, SW_RES(LB_LEVEL )), + aAssignBT(this, SW_RES(BT_ASSIGN )), aTemplateFT(this, SW_RES(FT_TEMPLATE)), aParaLayLB(this, SW_RES(LB_PARALAY )), aStdBT(this, SW_RES(BT_STD )), - aAssignBT(this, SW_RES(BT_ASSIGN )), aEditStyleBT(this, SW_RES(BT_EDIT_STYLE )), - aFormatFL(this, SW_RES(FL_FORMAT )), m_pCurrentForm(0) { FreeResource(); diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index d4fd6197f496..74fbc4383f96 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -102,6 +102,7 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, const ResId& rResId, sal_Int32 _nOptionsId, SwWrtShell& rWrtShell ) : Window(pParent, rResId), + aIndexFL(this, SW_RES(FL_INDEX )), aTypeFT (this, SW_RES(LBL_INDEX )), aTypeDCB(this, SW_RES(DCB_INDEX )), aNewBT(this, SW_RES(BT_NEW )), @@ -128,7 +129,6 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, aSearchCaseSensitiveCB(this, SW_RES(CB_CASESENSITIVE )), aSearchCaseWordOnlyCB(this, SW_RES(CB_WORDONLY )), - aIndexFL(this, SW_RES(FL_INDEX )), aOKBT(this, SW_RES(BT_OK )), aCancelBT(this, SW_RES(BT_CANCEL )), diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 77ce091d454b..5df6fc1fca5d 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -152,9 +152,8 @@ void SwInsertBookmarkDlg::Apply() SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRequest& rRequest ) : SvxStandardDialog(pParent,SW_RES(DLG_INSERT_BOOKMARK)), - - aBookmarkBox(this,SW_RES(CB_BOOKMARK)), aBookmarkFl(this,SW_RES(FL_BOOKMARK)), + aBookmarkBox(this,SW_RES(CB_BOOKMARK)), aOkBtn(this,SW_RES(BT_OK)), aCancelBtn(this,SW_RES(BT_CANCEL)), aDeleteBtn(this,SW_RES(BT_DELETE)), diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 0992c1e35562..731e1451bd32 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -110,6 +110,8 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn ) SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN, const SfxItemSet &rSet ) : SfxTabPage( pParent, SW_RES(bEN ? TP_ENDNOTEOPTION : TP_FOOTNOTEOPTION), rSet ), + aNumFL (this, SW_RES( FL_NUM )), + aNumTypeFT (this, SW_RES( FT_NUMTYPE )), aNumViewBox (this, SW_RES( LB_NUMVIEW ), INSERT_NUM_EXTENDED_TYPES), aOffsetLbl (this, SW_RES( FT_OFFSET )), @@ -123,25 +125,24 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN, aPosFT (this, SW_RES( FT_POS )), aPosPageBox (this, SW_RES( RB_POS_PAGE )), aPosChapterBox (this, SW_RES( RB_POS_CHAPTER)), - aNumFL (this, SW_RES( FL_NUM )), + aTemplFL (this, SW_RES( FL_TEMPL )), aParaTemplLbl (this, SW_RES( FT_PARA_TEMPL)), aParaTemplBox (this, SW_RES( LB_PARA_TEMPL)), aPageTemplLbl (this, SW_RES( FT_PAGE_TEMPL)), aPageTemplBox (this, SW_RES( LB_PAGE_TEMPL)), - aTemplFL (this, SW_RES( FL_TEMPL )), + aCharTemplFL( this, SW_RES(FL_CHAR_TEMPL)), aFtnCharAnchorTemplLbl( this, SW_RES( FT_ANCHR_CHARFMT)), aFtnCharAnchorTemplBox( this, SW_RES( LB_ANCHR_CHARFMT)), aFtnCharTextTemplLbl( this, SW_RES( FT_TEXT_CHARFMT)), aFtnCharTextTemplBox( this, SW_RES( LB_TEXT_CHARFMT)), - aCharTemplFL( this, SW_RES(FL_CHAR_TEMPL)), + aContFL (this, SW_RES( FL_CONT )), aContLbl (this, SW_RES( FT_CONT )), aContEdit (this, SW_RES( ED_CONT )), aContFromLbl (this, SW_RES( FT_CONT_FROM )), aContFromEdit (this, SW_RES( ED_CONT_FROM )), - aContFL (this, SW_RES( FL_CONT )), aNumDoc(aNumCountBox.GetEntry(FTNNUM_DOC)), aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)), diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 64392b6a6d6f..de1342c91ae9 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -76,9 +76,11 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, const SvStrings* pPathArr, SwGlossaryHdl *pHdl) : SvxStandardDialog(pParent, SW_RES(DLG_BIB_BASE)), - + aBibFT( this, SW_RES(FT_BIB)), aNameED( this, SW_RES(ED_NAME)), + aPathFT( this, SW_RES(FT_PATH)), aPathLB( this, SW_RES(LB_PATH)), + aSelectFT( this, SW_RES(FT_SELECT)), aGroupTLB( this, SW_RES(TLB_GROUPS)), aOkPB( this, SW_RES(BT_OK)), @@ -87,9 +89,6 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, aNewPB( this, SW_RES(PB_NEW)), aDelPB( this, SW_RES(PB_DELETE)), aRenamePB( this, SW_RES(PB_RENAME)), - aBibFT( this, SW_RES(FT_BIB)), - aPathFT( this, SW_RES(FT_PATH)), - aSelectFT( this, SW_RES(FT_SELECT)), pRemovedArr(0), pInsertedArr(0), diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 840cbf03c6a1..9835b2f4d681 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -183,11 +183,12 @@ SwNewGlosNameDlg::SwNewGlosNameDlg(Window* pParent, aNewShort(this,SW_RES( ED_NS )), aOk (this, SW_RES( BT_OKNEW)), aCancel (this, SW_RES( BT_CANCEL)), - aFL (this, SW_RES( FL_NN )), aONFT (this, SW_RES( FT_ON )), aOldName(this, SW_RES( ED_ON )), aOSFT (this, SW_RES( FT_OS )), - aOldShort(this,SW_RES( ED_OS )) + aOldShort(this,SW_RES( ED_OS )), + aFL (this, SW_RES( FL_NN )) + { FreeResource(); aOldName.SetText( rOldName ); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 999a800984da..7e9d4894faaa 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -233,15 +233,15 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool rSh(rShell), bExtCharAvailable(sal_False), bEdit(bEd), + aNumberFL (this,SW_RES(FL_NUMBER)), aNumberAutoBtn (this,SW_RES(RB_NUMBER_AUTO)), aNumberCharBtn (this,SW_RES(RB_NUMBER_CHAR)), aNumberCharEdit (this,SW_RES(ED_NUMBER_CHAR)), aNumberExtChar (this,SW_RES(BT_NUMBER_CHAR)), - aNumberFL (this,SW_RES(FL_NUMBER)), + aTypeFL (this,SW_RES(FL_TYPE)), aFtnBtn (this,SW_RES(RB_TYPE_FTN)), aEndNoteBtn (this,SW_RES(RB_TYPE_ENDNOTE)), - aTypeFL (this,SW_RES(FL_TYPE)), aOkBtn (this,SW_RES(BT_OK)), aCancelBtn (this,SW_RES(BT_CANCEL)), diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 2e8baa173728..4b03871e9f7d 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -105,6 +105,7 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage(pParent, SW_RES(TP_LINENUMBERING), rSet), aNumberingOnCB ( this, SW_RES( CB_NUMBERING_ON )), + aDisplayFL ( this, SW_RES( FL_DISPLAY )), aCharStyleFT ( this, SW_RES( FT_CHAR_STYLE )), aCharStyleLB ( this, SW_RES( LB_CHAR_STYLE )), aFormatFT ( this, SW_RES( FT_FORMAT )), @@ -116,17 +117,16 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent, aNumIntervalFT ( this, SW_RES( FT_NUM_INVERVAL )), aNumIntervalNF ( this, SW_RES( NF_NUM_INVERVAL )), aNumRowsFT ( this, SW_RES( FT_NUM_ROWS )), - aDisplayFL ( this, SW_RES( FL_DISPLAY )), + aDivisorFL ( this, SW_RES( FL_DIVISOR )), aDivisorFT ( this, SW_RES( FT_DIVISOR )), aDivisorED ( this, SW_RES( ED_DIVISOR )), aDivIntervalFT ( this, SW_RES( FT_DIV_INTERVAL )), aDivIntervalNF ( this, SW_RES( NF_DIV_INTERVAL )), aDivRowsFT ( this, SW_RES( FT_DIV_ROWS )), - aDivisorFL ( this, SW_RES( FL_DIVISOR )), + aCountFL ( this, SW_RES( FL_COUNT )), aCountEmptyLinesCB ( this, SW_RES( CB_COUNT_EMPTYLINES )), aCountFrameLinesCB ( this, SW_RES( CB_COUNT_FRAMELINES )), - aRestartEachPageCB ( this, SW_RES( CB_RESTART_PAGE )), - aCountFL ( this, SW_RES( FL_COUNT )) + aRestartEachPageCB ( this, SW_RES( CB_RESTART_PAGE )) { String sIntervalName = aDivIntervalFT.GetAccessibleName(); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index e6cb5f2383b5..4b6b48e5ccea 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -101,9 +101,9 @@ static sal_Bool bLastRelative = sal_False; SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage( pParent, SW_RES( TP_NUM_POSITION ), rSet ), - aPositionFL( this, SW_RES(FL_POSITION )), aLevelFL( this, SW_RES(FL_LEVEL )), aLevelLB( this, SW_RES(LB_LEVEL )), + aPositionFL( this, SW_RES(FL_POSITION )), aDistBorderFT( this, SW_RES(FT_BORDERDIST )), aDistBorderMF( this, SW_RES(MF_BORDERDIST )), diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index dbb938df7aae..3f67fb5cdb1a 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -190,9 +190,9 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, DoubleClickHdl, ListBox *, EMPTYARG ) SwNumNamesDlg::SwNumNamesDlg(Window *pParent) : ModalDialog(pParent, SW_RES(DLG_NUM_NAMES)), + aFormFL(this, SW_RES(FL_FORM)), aFormEdit(this, SW_RES(ED_FORM)), aFormBox(this, SW_RES(LB_FORM)), - aFormFL(this, SW_RES(FL_FORM)), aOKBtn(this, SW_RES(BT_OK)), aCancelBtn(this, SW_RES(BT_CANCEL)), aHelpBtn(this, SW_RES(BT_HELP)) @@ -548,8 +548,9 @@ short SwOutlineTabDialog::Ok() * --------------------------------------------------*/ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, SW_RES(TP_OUTLINE_NUM), rSet), - aLevelLB( this, SW_RES(LB_LEVEL )), aLevelFL( this, SW_RES(FL_LEVEL )), + aLevelLB( this, SW_RES(LB_LEVEL )), + aNumberFL(this, SW_RES(FL_NUMBER)), aCollLbl(this, SW_RES(FT_COLL)), aCollBox(this, SW_RES(LB_COLL)), aNumberLbl(this, SW_RES(FT_NUMBER)), @@ -565,7 +566,6 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxIte aSuffixED(this, SW_RES(ED_SUFFIX)), aStartLbl(this, SW_RES(FT_START)), aStartEdit(this, SW_RES(ED_START)), - aNumberFL(this, SW_RES(FL_NUMBER)), aPreviewWIN( this, SW_RES(WIN_PREVIEW )), aNoFmtName(SW_RES(ST_NO_COLL)), diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 423f66c8e9ef..593dbebae5ef 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -156,14 +156,14 @@ IMPL_LINK( SwFootNotePage, HeightModify, MetricField *, EMPTYARG ) SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, SW_RES(TP_FOOTNOTE_PAGE), rSet), - + aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)), aMaxHeightPageBtn(this, SW_RES(RB_MAXHEIGHT_PAGE)), aMaxHeightBtn(this, SW_RES(RB_MAXHEIGHT)), aMaxHeightEdit(this, SW_RES(ED_MAXHEIGHT)), aDistLbl(this, SW_RES(FT_DIST)), aDistEdit(this, SW_RES(ED_DIST)), - aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)), + aLineHeader(this, SW_RES(FL_LINE)), aLinePosLbl(this, SW_RES(FT_LINEPOS)), aLinePosBox(this, SW_RES(DLB_LINEPOS)), aLineTypeLbl(this, SW_RES(FT_LINETYPE)), @@ -171,9 +171,8 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) : aLineWidthLbl(this, SW_RES(FT_LINEWIDTH)), aLineWidthEdit(this, SW_RES(ED_LINEWIDTH)), aLineDistLbl(this, SW_RES(FT_LINEDIST)), - aLineDistEdit(this, SW_RES(ED_LINEDIST)), - aLineHeader(this, SW_RES(FL_LINE)) -{ + aLineDistEdit(this, SW_RES(ED_LINEDIST)) + { FreeResource(); SetExchangeSupport(); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index a4c45235dbb4..678b0c917e3c 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -133,11 +133,12 @@ sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : SvxStandardDialog(pParent, SW_RES(DLG_SORTING)), + aColLbl(this, SW_RES(FT_COL )), aTypLbl(this, SW_RES(FT_KEYTYP)), aDirLbl(this, SW_RES(FT_DIR )), + aSortFL(this, SW_RES(FL_SORT_2 )), - aDirFL(this, SW_RES(FL_DIR )), aKeyCB1(this, SW_RES(CB_KEY1 )), aColEdt1(this, SW_RES(ED_KEY1 )), @@ -156,8 +157,8 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : aTypDLB3(this, SW_RES(DLB_KEY3 )), aSortUp3RB(this, SW_RES(RB_UP3 )), aSortDn3RB(this, SW_RES(RB_DN3 )), + aDirFL(this, SW_RES(FL_DIR )), - aSortFL(this, SW_RES(FL_SORT_2 )), aColumnRB(this, SW_RES(RB_COL )), aRowRB(this, SW_RES(RB_ROW )), diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx index 70811c670496..d9e3d64b22e2 100644 --- a/sw/source/ui/table/colwd.cxx +++ b/sw/source/ui/table/colwd.cxx @@ -76,12 +76,12 @@ IMPL_LINK_INLINE_END( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG ) SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) : SvxStandardDialog( pParent, SW_RES(DLG_COL_WIDTH) ), + aWidthFL(this, SW_RES(FL_WIDTH)), aColFT(this, SW_RES(FT_COL)), aColEdit(this, SW_RES(ED_COL)), aWidthFT(this, SW_RES(FT_WIDTH)), aWidthEdit(this, SW_RES(ED_WIDTH)), - aWidthFL(this, SW_RES(FL_WIDTH)), aOKBtn(this, SW_RES(BT_OK)), aCancelBtn(this, SW_RES(BT_CANCEL)), aHelpBtn(this, SW_RES(BT_HELP)), diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx index 1fb108276bc1..a1d1770136d7 100644 --- a/sw/source/ui/table/rowht.cxx +++ b/sw/source/ui/table/rowht.cxx @@ -86,10 +86,10 @@ void SwTableHeightDlg::Apply() SwTableHeightDlg::SwTableHeightDlg( Window *pParent, SwWrtShell &rS ) : SvxStandardDialog(pParent, SW_RES(DLG_ROW_HEIGHT)), + aHeightFL(this, SW_RES(FL_HEIGHT)), aHeightEdit(this, SW_RES(ED_HEIGHT)), aAutoHeightCB(this, SW_RES(CB_AUTOHEIGHT)), - aHeightFL(this, SW_RES(FL_HEIGHT)), aOKBtn(this, SW_RES(BT_OK)), aCancelBtn(this, SW_RES(BT_CANCEL)), aHelpBtn( this, SW_RES( BT_HELP ) ), diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 3ca0a5357f91..45eab49d553d 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -827,6 +827,7 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, aSpaceFT(this, SW_RES(FT_SPACE)), aSpaceED(this, SW_RES(ED_SPACE)), + aColFL(this, SW_RES(COL_FL_LAYOUT)), aUpBtn(this, SW_RES(COL_BTN_UP)), aFT1(this, SW_RES(COL_FT_1)), aMF1(this, SW_RES(COL_MF_1)), @@ -841,7 +842,6 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, aFT6(this, SW_RES(COL_FT_6)), aMF6(this, SW_RES(COL_MF_6)), aDownBtn(this, SW_RES(COL_BTN_DOWN)), - aColFL(this, SW_RES(COL_FL_LAYOUT)), nTableWidth(0), nMinWidth( MINLAY ), diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 41aaca4a4f65..e64c5110a942 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -184,13 +184,13 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell, // aFlFormat ( this, SW_RES( FL_FORMAT ) ), aLbFormat ( this, SW_RES( LB_FORMAT ) ), + aFlFormats ( this, SW_RES( FL_FORMATS ) ), aBtnNumFormat ( this, SW_RES( BTN_NUMFORMAT ) ), aBtnBorder ( this, SW_RES( BTN_BORDER ) ), aBtnFont ( this, SW_RES( BTN_FONT ) ), aBtnPattern ( this, SW_RES( BTN_PATTERN ) ), aBtnAlignment ( this, SW_RES( BTN_ALIGNMENT ) ), - aFlFormats ( this, SW_RES( FL_FORMATS ) ), aBtnOk ( this, SW_RES( BTN_OK ) ), aBtnCancel ( this, SW_RES( BTN_CANCEL ) ), aBtnHelp ( this, SW_RES( BTN_HELP ) ), diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx index 27b861991e0f..94363dfbbbcf 100644 --- a/sw/source/ui/utlui/swrenamexnameddlg.cxx +++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx @@ -72,9 +72,9 @@ SwRenameXNamedDlg::SwRenameXNamedDlg( Window* pWin, uno::Reference< container::XNamed > & xN, uno::Reference< container::XNameAccess > & xNA ) : ModalDialog(pWin, SW_RES(DLG_RENAME_XNAMED)), - aNewNameFT(this, SW_RES(FT_NEW_NAME)), - aNewNameED(this, SW_RES(ED_NEW_NAME)), aNameFL(this, SW_RES(FL_NAME)), + aNewNameFT(this, SW_RES(FT_NEW_NAME)), + aNewNameED(this, SW_RES(ED_NEW_NAME)), aOk(this, SW_RES(PB_OK)), aCancel(this, SW_RES(PB_CANCEL)), aHelp(this, SW_RES(PB_HELP)), -- cgit From 1c298e7288a22afb44ef7059131a26154b2257dc Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 15:23:41 +0100 Subject: masterfix DEV300: #i10000# added missing const --- sw/source/core/frmedt/fews.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 1f7fa08ad242..7ea3d079cc4b 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -1328,7 +1328,7 @@ Size SwFEShell::GetGraphicDefaultSize() const ---------------------------------------------------------------------------*/ // --> OD 2009-08-31 #mongolianlayou# // add output parameter <bVertL2R> -sal_Bool SwFEShell::IsFrmVertical(sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const +sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const { sal_Bool bVert = sal_False; bRTL = sal_False; -- cgit From 63bed58e6ba96fa6f59f51399826253687227b88 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 15:50:31 +0100 Subject: masterfix DEV300: #i100000# dep. fix --- solenv/bin/build.pl | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index ed9dcc3721e6..ad4df2173516 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -2237,7 +2237,7 @@ sub retrieve_build_list { my $old_fh = select(STDOUT); # Try to get global depencies from solver's build.lst if such exists - my $solver_inc_dir = "$ENV{SOLARVER}/common"; + my $solver_inc_dir = "$ENV{SOLARVER}/$ENV{INPATH}"; $solver_inc_dir .= $ENV{PROEXT} if (defined $ENV{PROEXT}); $solver_inc_dir .= '/inc'; $solver_inc_dir .= $ENV{UPDMINOREXT} if (defined $ENV{UPDMINOREXT}); @@ -2245,20 +2245,16 @@ sub retrieve_build_list { $solver_inc_dir = correct_path($solver_inc_dir); $dead_parents{$module}++; print "Fetching dependencies for module $module from solver..."; - foreach (@possible_build_lists) { - my $possible_build_lst = "$solver_inc_dir/$_"; - if (-e $possible_build_lst) { + foreach my $onelist (@possible_build_lists) { + my $build_list_candidate = "$solver_inc_dir/$onelist"; + if (-e $build_list_candidate) { print " ok\n"; select($old_fh); - return $possible_build_lst; + return $build_list_candidate; }; } - print " failed\n"; - - if (!defined $dead_parents{$module}) { - print "WARNING: Cannot figure out CWS for $module. Forgot to set CWS?\n"; - } - select($old_fh); + print(" failed\n"); + print_error("incomplete dependencies!\n"); return undef; }; -- cgit From b09657659faf097cdd993a4dc86c164f9366bb8c Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- instsetoo_native/prj/build.lst | 2 +- scp2/prj/build.lst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/instsetoo_native/prj/build.lst b/instsetoo_native/prj/build.lst index 68edddfe9b28..490d2e4a5c9b 100644 --- a/instsetoo_native/prj/build.lst +++ b/instsetoo_native/prj/build.lst @@ -1,4 +1,4 @@ -oon instsetoo_native :: l10n postprocess packimages testautomation ooo_custom_images NULL +oon instsetoo_native :: L10N:l10n postprocess packimages testautomation ooo_custom_images NULL oon instsetoo_native usr1 - all oon_mkout NULL oon instsetoo_native\inc_openoffice\unix nmake - u oon_unix NULL oon instsetoo_native\inc_openoffice\windows\msi_languages nmake - all oon_msilang NULL diff --git a/scp2/prj/build.lst b/scp2/prj/build.lst index f3fbbec38273..10632bfc4d45 100644 --- a/scp2/prj/build.lst +++ b/scp2/prj/build.lst @@ -1,4 +1,4 @@ -cp scp2 : l10n i18npool setup_native l10ntools PYTHON:python ICU:icu REDLAND:redland LIBXSLT:libxslt NULL +cp scp2 : L10N:l10n i18npool setup_native l10ntools PYTHON:python ICU:icu REDLAND:redland LIBXSLT:libxslt NULL cp scp2 usr1 - all cp_mkout NULL cp scp2\macros nmake - all cp_langmacros NULL cp scp2\source\templates nmake - all cp_langtemplates NULL -- cgit From 20529755b301c7af2c5ab461329b2d979b2cdbff Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- starmath/prj/build.lst | 2 +- sw/prj/build.lst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starmath/prj/build.lst b/starmath/prj/build.lst index a849b8142dee..bfecbc4a7f6d 100644 --- a/starmath/prj/build.lst +++ b/starmath/prj/build.lst @@ -1,4 +1,4 @@ -sm starmath : LIBXSLT:libxslt l10n svx NULL +sm starmath : LIBXSLT:libxslt L10N:l10n svx NULL sm starmath usr1 - all sm_mkout NULL sm starmath\inc nmake - all sm_inc NULL sm starmath\prj get - all sm_prj NULL diff --git a/sw/prj/build.lst b/sw/prj/build.lst index 71a6b39a261d..c491c7f4e726 100644 --- a/sw/prj/build.lst +++ b/sw/prj/build.lst @@ -1,2 +1,2 @@ -sw sw : filter l10n connectivity OOo:writerperfect vbahelper svx stoc writerfilter LIBXSLT:libxslt NULL +sw sw : filter L10N:l10n connectivity OOo:writerperfect vbahelper svx stoc writerfilter LIBXSLT:libxslt NULL sw sw\prj nmake - all sw_prj NULL -- cgit From e2a3d487efb2bd5e582eb10e4150530c3f7377c5 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- svl/prj/build.lst | 2 +- svtools/prj/build.lst | 2 +- vcl/prj/build.lst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/svl/prj/build.lst b/svl/prj/build.lst index f41b1142ae3f..999cdf8947de 100644 --- a/svl/prj/build.lst +++ b/svl/prj/build.lst @@ -1,2 +1,2 @@ -sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL +sl svl : L10N:l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL sl svl\prj nmake - all svl_prj NULL diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst index fd0f1a560c18..ff9aa6a9875c 100644 --- a/svtools/prj/build.lst +++ b/svtools/prj/build.lst @@ -1,2 +1,2 @@ -st svtools : l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL +st svtools : L10N:l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL st svtools\prj nmake - all st_prj NULL diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst index af15ad73e19d..d8426a092093 100644 --- a/vcl/prj/build.lst +++ b/vcl/prj/build.lst @@ -1,4 +1,4 @@ -vc vcl : l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools l10ntools icc SO:print_header cpputools shell svl LIBXSLT:libxslt NULL +vc vcl : L10N:l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools l10ntools icc SO:print_header cpputools shell svl LIBXSLT:libxslt NULL vc vcl usr1 - all vc_mkout NULL vc vcl\inc nmake - all vc_inc NULL vc vcl\source\glyphs nmake - all vc_glyphs vc_inc NULL -- cgit From 4fba42e5f98fcc0fa9addf41a793c1d7f11602c8 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- avmedia/prj/build.lst | 2 +- basic/prj/build.lst | 2 +- connectivity/prj/build.lst | 2 +- desktop/prj/build.lst | 2 +- editeng/prj/build.lst | 2 +- fpicker/prj/build.lst | 2 +- framework/prj/build.lst | 2 +- officecfg/prj/build.lst | 2 +- readlicense_oo/prj/build.lst | 2 +- sfx2/prj/build.lst | 2 +- shell/prj/build.lst | 2 +- svx/prj/build.lst | 2 +- sysui/prj/build.lst | 2 +- uui/prj/build.lst | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/avmedia/prj/build.lst b/avmedia/prj/build.lst index 2348b606dcab..7d9343b916fd 100644 --- a/avmedia/prj/build.lst +++ b/avmedia/prj/build.lst @@ -1,4 +1,4 @@ -av avmedia : l10n tools sfx2 LIBXSLT:libxslt NULL +av avmedia : L10N:l10n tools sfx2 LIBXSLT:libxslt NULL av avmedia usr1 - all av_mkout NULL av avmedia\prj get - all av_prj NULL av avmedia\inc get - all av_inv NULL diff --git a/basic/prj/build.lst b/basic/prj/build.lst index 8eab007313ec..17a34fa5bd9f 100644 --- a/basic/prj/build.lst +++ b/basic/prj/build.lst @@ -1,4 +1,4 @@ -sb basic : l10n offuh oovbaapi svtools xmlscript framework salhelper LIBXSLT:libxslt NULL +sb basic : L10N:l10n offuh oovbaapi svtools xmlscript framework salhelper LIBXSLT:libxslt NULL sb basic usr1 - all sb_mkout NULL sb basic\inc nmake - all sb_inc NULL sb basic\source\app nmake - all sb_app sb_class sb_inc NULL diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst index 8d16197961fa..509b61cc6f9a 100644 --- a/connectivity/prj/build.lst +++ b/connectivity/prj/build.lst @@ -1,4 +1,4 @@ -cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss LIBXSLT:libxslt NULL +cn connectivity : shell L10N:l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss LIBXSLT:libxslt NULL cn connectivity usr1 - all cn_mkout NULL cn connectivity\inc nmake - all cn_inc NULL cn connectivity\com\sun\star\sdbcx\comp\hsqldb nmake - all cn_jhsqldbdb cn_hsqldb cn_inc NULL diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index 146579cab8bc..fc782c35a71b 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -1,4 +1,4 @@ -dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL +dt desktop : L10N:l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL dt desktop usr1 - all dt_mkout NULL dt desktop\inc nmake - all dt_inc NULL dt desktop\prj get - all dt_prj NULL diff --git a/editeng/prj/build.lst b/editeng/prj/build.lst index 3c714c6dac25..bba7f2666744 100644 --- a/editeng/prj/build.lst +++ b/editeng/prj/build.lst @@ -1,3 +1,3 @@ -ed editeng : l10n svtools xmloff linguistic NULL +ed editeng : L10N:l10n svtools xmloff linguistic NULL ed editeng\prj nmake - all ed_prj NULL diff --git a/fpicker/prj/build.lst b/fpicker/prj/build.lst index 52d99ec0759a..1be09c5d8fd1 100644 --- a/fpicker/prj/build.lst +++ b/fpicker/prj/build.lst @@ -1,4 +1,4 @@ -fp fpicker : LIBXSLT:libxslt l10n rdbmaker svtools NULL +fp fpicker : LIBXSLT:libxslt L10N:l10n rdbmaker svtools NULL fp fpicker\inc nmake - all fp_inc NULL fp fpicker\source\generic nmake - all fp_generic fp_inc NULL fp fpicker\source\office nmake - all fp_office fp_inc NULL diff --git a/framework/prj/build.lst b/framework/prj/build.lst index 2c847918fee4..8fe5b3b2f0ef 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,2 +1,2 @@ -fr framework : LIBXSLT:libxslt l10n svtools NULL +fr framework : LIBXSLT:libxslt L10N:l10n svtools NULL fr framework\prj nmake - all fr_all NULL diff --git a/officecfg/prj/build.lst b/officecfg/prj/build.lst index 04d2cfd87aef..b07a34aee982 100644 --- a/officecfg/prj/build.lst +++ b/officecfg/prj/build.lst @@ -1,4 +1,4 @@ -oc officecfg : l10n soltools solenv LIBXSLT:libxslt NULL +oc officecfg : L10N:l10n soltools solenv LIBXSLT:libxslt NULL oc officecfg usr1 - all oc_mkout NULL oc officecfg\registry\schema nmake - all oc_reg_schema NULL oc officecfg\registry nmake - all oc_reg NULL diff --git a/readlicense_oo/prj/build.lst b/readlicense_oo/prj/build.lst index 987672db4ebe..bf438e28fe1d 100644 --- a/readlicense_oo/prj/build.lst +++ b/readlicense_oo/prj/build.lst @@ -1,4 +1,4 @@ -ro readlicense_oo : l10n solenv LIBXSLT:libxslt NULL +ro readlicense_oo : L10N:l10n solenv LIBXSLT:libxslt NULL ro readlicense_oo usr1 - all ro_root NULL ro readlicense_oo\docs\readme nmake - all ro_readme NULL ro readlicense_oo\html nmake - all ro_html NULL diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index ca582c0aaf12..f25e991f84f4 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,3 +1,3 @@ -sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL +sf sfx2 : L10N:l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL sf sfx2\prj nmake - all sf_prj NULL diff --git a/shell/prj/build.lst b/shell/prj/build.lst index ad157a677bff..abf9af0c0c8e 100755 --- a/shell/prj/build.lst +++ b/shell/prj/build.lst @@ -1,4 +1,4 @@ -sl shell : l10n offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL +sl shell : L10N:l10n offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL sl shell\inc nmake - all sl_inc NULL sl shell\source\win32 nmake - w sl_win32 sl_inc NULL sl shell\source\win32\simplemail nmake - w sl_win32_simplemail sl_inc NULL diff --git a/svx/prj/build.lst b/svx/prj/build.lst index 7b541b2d77c4..641f4e528793 100644 --- a/svx/prj/build.lst +++ b/svx/prj/build.lst @@ -1,2 +1,2 @@ -sx svx : sfx2 l10n oovbaapi connectivity xmloff linguistic jvmfwk avmedia drawinglayer editeng LIBXSLT:libxslt NULL +sx svx : sfx2 L10N:l10n oovbaapi connectivity xmloff linguistic jvmfwk avmedia drawinglayer editeng LIBXSLT:libxslt NULL sx svx\prj nmake - all sx_prj NULL diff --git a/sysui/prj/build.lst b/sysui/prj/build.lst index 1530997a3ec3..b5f26eb936b9 100644 --- a/sysui/prj/build.lst +++ b/sysui/prj/build.lst @@ -1,4 +1,4 @@ -su sysui : l10n offapi xml2cmp rdbmaker l10ntools setup_native NULL +su sysui : L10N:l10n offapi xml2cmp rdbmaker l10ntools setup_native NULL su sysui\source\win32\QuickStart nmake - w su_win32_quickstart NULL su sysui\source\win32\QuickStart\so nmake - w su_win32_quickstart_so su_win32_quickstart.w NULL su sysui\desktop\icons nmake - w su_iconsw NULL diff --git a/uui/prj/build.lst b/uui/prj/build.lst index 6816f8416bdf..b4a009cd0b9e 100644 --- a/uui/prj/build.lst +++ b/uui/prj/build.lst @@ -1,4 +1,4 @@ -uu uui : l10n vcl svtools LIBXSLT:libxslt NULL +uu uui : L10N:l10n vcl svtools LIBXSLT:libxslt NULL uu uui usr1 - all uu_mkout NULL uu uui\source nmake - all uu_source NULL uu uui\util nmake - all uu_util uu_source NULL -- cgit From f2aeec8f22f37146c2f9120e8d0ead383049c1fa Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- sd/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/prj/build.lst b/sd/prj/build.lst index 0816f2de7255..72ee2777a8f8 100644 --- a/sd/prj/build.lst +++ b/sd/prj/build.lst @@ -1,4 +1,4 @@ -sd sd : filter l10n animations svx sfx2 stoc canvas LIBXSLT:libxslt NULL +sd sd : filter L10N:l10n animations svx sfx2 stoc canvas LIBXSLT:libxslt NULL sd sd usr1 - all sd_mkout NULL sd sd\inc nmake - all sd_inc NULL sd sd\prj get - all sd_prj NULL -- cgit From 818573bfbce420afedffd45d7bb080f25da32625 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- filter/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/prj/build.lst b/filter/prj/build.lst index 5617d28856f7..c8e839dcee5f 100644 --- a/filter/prj/build.lst +++ b/filter/prj/build.lst @@ -1,4 +1,4 @@ -fl filter : l10n svtools unotools xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt basegfx NULL +fl filter : L10N:l10n svtools unotools xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt basegfx NULL fl filter usr1 - all fl_mkout NULL fl filter\prj get - all fl_prj NULL fl filter\inc nmake - all fl_inc NULL -- cgit From ec552c26abaa80dacb9f9b452d5b60dcfa8abd28 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- sdext/prj/build.lst | 2 +- swext/prj/build.lst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdext/prj/build.lst b/sdext/prj/build.lst index 3603afbae866..2604633810a3 100644 --- a/sdext/prj/build.lst +++ b/sdext/prj/build.lst @@ -1,4 +1,4 @@ -dx sdext : l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg XPDF:xpdf LIBXSLT:libxslt xmlhelp NULL +dx sdext : L10N:l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg XPDF:xpdf LIBXSLT:libxslt xmlhelp NULL dx sdext usr1 - all sdext_mkout NULL dx sdext\prj get - all sdext_prj NULL dx sdext\source\minimizer nmake - all sdext_minimizer sdext_minimizer_rdoooe sdext_minimizer_rdooo sdext_inc NULL diff --git a/swext/prj/build.lst b/swext/prj/build.lst index aa07df358770..143351e5abfa 100644 --- a/swext/prj/build.lst +++ b/swext/prj/build.lst @@ -1,4 +1,4 @@ -swext swext : officecfg l10n javaunohelper ridljar unoil jurt APACHE_COMMONS:apache-commons readlicense_oo xsltml xmlhelp NULL +swext swext : officecfg L10N:l10n javaunohelper ridljar unoil jurt APACHE_COMMONS:apache-commons readlicense_oo xsltml xmlhelp NULL swext swext usr1 - all swext_mkout NULL swext swext\mediawiki\help nmake - all swext_mwhelp NULL swext swext\mediawiki\src\registry\schema\org\openoffice\Office\Custom nmake - all swext_mwschema NULL -- cgit From 8427b0f498b040a465cc20c4a323191d6b2aea5f Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- accessibility/prj/build.lst | 2 +- basctl/prj/build.lst | 2 +- crashrep/prj/build.lst | 2 +- extensions/prj/build.lst | 2 +- forms/prj/build.lst | 2 +- javainstaller2/prj/build.lst | 2 +- setup_native/prj/build.lst | 2 +- wizards/prj/build.lst | 2 +- xmlsecurity/prj/build.lst | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/accessibility/prj/build.lst b/accessibility/prj/build.lst index 4fbfe135137f..c9a8c345e056 100755 --- a/accessibility/prj/build.lst +++ b/accessibility/prj/build.lst @@ -1,4 +1,4 @@ -ac accessibility : l10n tools jurt offuh unoil vcl javaunohelper jvmaccess cppu sal toolkit svtools LIBXSLT:libxslt NULL +ac accessibility : L10N:l10n tools jurt offuh unoil vcl javaunohelper jvmaccess cppu sal toolkit svtools LIBXSLT:libxslt NULL ac accessibility usr1 - all ac_mkout NULL ac accessibility\inc nmake - all ac_inc NULL ac accessibility\bridge\org\openoffice\java\accessibility nmake - w ac_ooja ac_inc NULL diff --git a/basctl/prj/build.lst b/basctl/prj/build.lst index 0c5283ff0aec..1f92577d2eae 100644 --- a/basctl/prj/build.lst +++ b/basctl/prj/build.lst @@ -1,4 +1,4 @@ -bc basctl : LIBXSLT:libxslt l10n svx NULL +bc basctl : LIBXSLT:libxslt L10N:l10n svx NULL bc basctl usr1 - all bc_mkout NULL bc basctl\inc nmake - all bc_inc NULL bc basctl\source\inc get - all bc_sinc NULL diff --git a/crashrep/prj/build.lst b/crashrep/prj/build.lst index ef1c85cc1c62..6e4b552c6585 100755 --- a/crashrep/prj/build.lst +++ b/crashrep/prj/build.lst @@ -1,4 +1,4 @@ -cr crashrep : l10n sal sysui SO:tools shell NULL +cr crashrep : L10N:l10n sal sysui SO:tools shell NULL cr crashrep usr1 - all cr_mkout NULL cr crashrep\source\all nmake - all cr_sresource NULL cr crashrep\source\unx nmake - u cr_sunx NULL diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index f283da39a4af..e21035fe1163 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -1,4 +1,4 @@ -ex extensions : officecfg l10n rdbmaker svx SANE:sane TWAIN:twain np_sdk offuh stoc ZLIB:zlib CURL:curl LIBXSLT:libxslt NULL +ex extensions : officecfg L10N:l10n rdbmaker svx SANE:sane TWAIN:twain np_sdk offuh stoc ZLIB:zlib CURL:curl LIBXSLT:libxslt NULL ex extensions usr1 - all ex_mkout NULL ex extensions\inc nmake - all ex_inc NULL diff --git a/forms/prj/build.lst b/forms/prj/build.lst index 115c035edbbc..81b502832d42 100644 --- a/forms/prj/build.lst +++ b/forms/prj/build.lst @@ -1,4 +1,4 @@ -fm forms : l10n oovbaapi svx sfx2 qadevOOo LIBXSLT:libxslt NULL +fm forms : L10N:l10n oovbaapi svx sfx2 qadevOOo LIBXSLT:libxslt NULL fm forms usr1 - all fm_mkofrm NULL fm forms\inc nmake - all fm_inc NULL fm forms\source\inc get - all fm_sinc NULL diff --git a/javainstaller2/prj/build.lst b/javainstaller2/prj/build.lst index f6a0ef5b6036..28ad41ba6c7b 100755 --- a/javainstaller2/prj/build.lst +++ b/javainstaller2/prj/build.lst @@ -1,4 +1,4 @@ -jl2 javainstaller2 : l10n setup_native NULL +jl2 javainstaller2 : L10N:l10n setup_native NULL jl2 javainstaller2\src\Localization nmake - u jl2_local NULL jl2 javainstaller2\src\Properties nmake - u jl2_properties jl2_local.u NULL jl2 javainstaller2\src\Helpfiles nmake - u jl2_helpfiles jl2_local.u NULL diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst index df7b02484039..00d7a0c92045 100644 --- a/setup_native/prj/build.lst +++ b/setup_native/prj/build.lst @@ -1,4 +1,4 @@ -pk setup_native : l10n l10ntools soltools sal xml2cmp NULL +pk setup_native : L10N:l10n l10ntools soltools sal xml2cmp NULL pk setup_native usr1 - all sn_mkout NULL pk setup_native\scripts\source nmake - u sn_source NULL pk setup_native\scripts nmake - u sn_scripts sn_source.u NULL diff --git a/wizards/prj/build.lst b/wizards/prj/build.lst index ca4e940d3527..e0d94b1c1e4d 100644 --- a/wizards/prj/build.lst +++ b/wizards/prj/build.lst @@ -1,4 +1,4 @@ -wz wizards : l10n rsc javaunohelper unoil LIBXSLT:libxslt NULL +wz wizards : L10N:l10n rsc javaunohelper unoil LIBXSLT:libxslt NULL wz wizards\util nmake - all wz_util NULL wz wizards\source\config nmake - all wz_config NULL wz wizards\source\configshare nmake - all wz_configshare NULL diff --git a/xmlsecurity/prj/build.lst b/xmlsecurity/prj/build.lst index 3d70b9cb1181..54326d4fe5ef 100644 --- a/xmlsecurity/prj/build.lst +++ b/xmlsecurity/prj/build.lst @@ -1,4 +1,4 @@ -xs xmlsecurity : l10n xmloff unotools offapi unoil svx MOZ:moz SO:moz_prebuilt LIBXMLSEC:libxmlsec NSS:nss LIBXSLT:libxslt NULL +xs xmlsecurity : L10N:l10n xmloff unotools offapi unoil svx MOZ:moz SO:moz_prebuilt LIBXMLSEC:libxmlsec NSS:nss LIBXSLT:libxslt NULL xs xmlsecurity usr1 - all xs_mkout NULL xs xmlsecurity\inc nmake - all xs_inc NULL xs xmlsecurity\source\framework nmake - all xs_fw xs_inc NULL -- cgit From ce6308e4fad2281241bf4ca78280eba29f744d43 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- chart2/prj/build.lst | 2 +- sc/prj/build.lst | 2 +- scaddins/prj/build.lst | 2 +- sccomp/prj/build.lst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chart2/prj/build.lst b/chart2/prj/build.lst index ec6658d212c6..5b534700a4f0 100644 --- a/chart2/prj/build.lst +++ b/chart2/prj/build.lst @@ -1,4 +1,4 @@ -ch chart2 : offapi offuh l10n comphelper cppu cppuhelper sal svtools svx tools vcl toolkit unotools sfx2 LIBXSLT:libxslt NULL +ch chart2 : offapi offuh L10N:l10n comphelper cppu cppuhelper sal svtools svx tools vcl toolkit unotools sfx2 LIBXSLT:libxslt NULL ch chart2 usr1 - all ch_mkout NULL ch chart2\inc nmake - all ch_inc NULL ch chart2\source\inc get - all ch_source_inc NULL diff --git a/sc/prj/build.lst b/sc/prj/build.lst index f5ab2a5f73fe..f124dafb90a2 100644 --- a/sc/prj/build.lst +++ b/sc/prj/build.lst @@ -1,4 +1,4 @@ -sc sc : filter l10n vbahelper oovbaapi svx uui stoc BOOST:boost formula MDDS:mdds oox LIBXSLT:libxslt NULL +sc sc : filter L10N:l10n vbahelper oovbaapi svx uui stoc BOOST:boost formula MDDS:mdds oox LIBXSLT:libxslt NULL sc sc usr1 - all sc_mkout NULL sc sc\inc nmake - all sc_inc NULL sc sc\prj get - all sc_prj NULL diff --git a/scaddins/prj/build.lst b/scaddins/prj/build.lst index 6f51161232d3..c3b483cf462c 100644 --- a/scaddins/prj/build.lst +++ b/scaddins/prj/build.lst @@ -1,4 +1,4 @@ -ca scaddins : LIBXSLT:libxslt l10n vcl NULL +ca scaddins : LIBXSLT:libxslt L10N:l10n vcl NULL ca scaddins usr1 - all sc_mkout NULL ca scaddins\source\datefunc nmake - all sc_dfunc NULL ca scaddins\source\analysis nmake - all sc_analysis NULL diff --git a/sccomp/prj/build.lst b/sccomp/prj/build.lst index 6884378f77a0..a16408723fa8 100644 --- a/sccomp/prj/build.lst +++ b/sccomp/prj/build.lst @@ -1,4 +1,4 @@ -scc sccomp : l10n offuh comphelper LPSOLVE:lpsolve tools rsc LIBXSLT:libxslt NULL +scc sccomp : L10N:l10n offuh comphelper LPSOLVE:lpsolve tools rsc LIBXSLT:libxslt NULL scc sccomp usr1 - all scc_mkout NULL scc sccomp\prj get - all scc_prj NULL scc sccomp\source\solver nmake - all scc_solver NULL -- cgit From dee1ea70160df84946cf9040281de42945faf65a Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- dbaccess/prj/build.lst | 2 +- reportdesign/prj/build.lst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbaccess/prj/build.lst b/dbaccess/prj/build.lst index 10227f111e60..ca2fa71856e7 100644 --- a/dbaccess/prj/build.lst +++ b/dbaccess/prj/build.lst @@ -1,4 +1,4 @@ -ba dbaccess : l10n BOOST:boost connectivity svx stoc qadevOOo xmlscript LIBXSLT:libxslt test NULL +ba dbaccess : L10N:l10n BOOST:boost connectivity svx stoc qadevOOo xmlscript LIBXSLT:libxslt test NULL ba dbaccess usr1 - all ba_mkout NULL ba dbaccess\inc nmake - all ba_inc NULL ba dbaccess\source\ui\inc nmake - all ba_uiinc ba_inc NULL diff --git a/reportdesign/prj/build.lst b/reportdesign/prj/build.lst index d4e26e51acdc..4a5667d2090a 100644 --- a/reportdesign/prj/build.lst +++ b/reportdesign/prj/build.lst @@ -1,4 +1,4 @@ -rd reportdesign : l10n BOOST:boost comphelper dbaccess formula LIBXSLT:libxslt NULL +rd reportdesign : L10N:l10n BOOST:boost comphelper dbaccess formula LIBXSLT:libxslt NULL rd reportdesign usr1 - all rd_mkout NULL rd reportdesign\inc nmake - all rd_inc NULL rd reportdesign\source\core\api nmake - all rd_api rd_inc NULL -- cgit From f5c661e67e58458eaa536b6563701e88f2b75607 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:11:18 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- set_soenv.in | 3 ++- solenv/config/sdev300.ini | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/set_soenv.in b/set_soenv.in index b99989d7e84a..d23b62eb5288 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1501,6 +1501,7 @@ $gb_REPOS = $SRC_ROOT; if ('@WITH_LANG@' ne "") { $gb_REPOS .= " ".$SOURCE_ROOT_DIR."/l10n"; + $BUILD_TYPE = "@BUILD_TYPE@ L10N"; } # @@ -1837,7 +1838,7 @@ ToFile( "WITH_FONTS", "@WITH_FONTS@", "e" ); ToFile( "WITHOUT_AFMS", "@WITHOUT_AFMS@", "e" ); ToFile( "WITHOUT_PPDS", "@WITHOUT_PPDS@", "e" ); ToFile( "WITH_BINFILTER", "@WITH_BINFILTER@", "e" ); -ToFile( "BUILD_TYPE", "@BUILD_TYPE@", "e" ); +ToFile( "BUILD_TYPE", "$BUILD_TYPE", "e" ); ToFile( "VERBOSE", "@VERBOSE@", "e" ); ToFile( "ENABLE_EVOAB2", "@ENABLE_EVOAB2@", "e" ); ToFile( "GOBJECT_CFLAGS", "@GOBJECT_CFLAGS@", "e" ); diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index c5dc61f7de69..c2579cd5b952 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -9,7 +9,7 @@ common BMP_WRITES_FLAG TRUE BUILD_SPECIAL TRUE BUILD_STAX YES - BUILD_TYPE SO OOo EXT BINFILTER MORE_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL HYPHEN MYTHES JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM ODK MSFONTEXTRACT MATHMLDTD BOOST MDDS EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS L10N GRAPHITE MYSQLCPPCONN MYSQLC CPPUNIT LIBTEXTCAT LIBTEXTCATDATA AFMS + BUILD_TYPE SO OOo EXT BINFILTER MORE_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL HYPHEN MYTHES JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM ODK MSFONTEXTRACT MATHMLDTD BOOST MDDS EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS GRAPHITE MYSQLCPPCONN MYSQLC CPPUNIT LIBTEXTCAT LIBTEXTCATDATA AFMS CONFIG_PROJECT config_office DIC_ALL TRUE ENABLEUNICODE TRUE @@ -58,7 +58,6 @@ common common:2 IF %UPDATER% == YES { WITH_LANG en-US de - BUILD_TYPE l10n } common:3 IF %UPDATER% != YES { @@ -217,12 +216,13 @@ finish *o: cd %SOLARSRC% ALT_L10N_MODULE $expand(%SOLARSRC%/..)/sun/l10n_so TARFILE_LOCATION %SOURCE_ROOT_DIR%/ext_sources - gb_REPOS %SRC_ROOT% %SOURCE_ROOT_DIR%/sun + gb_REPOS %SOURCE_ROOT_DIR%/ooo %SOURCE_ROOT_DIR%/sun gb_LOCALBUILDDIR %SOL_TMP%/gb_%CWS_WORK_STAMP%/%WORK_STAMP% } common_setrepo:0 IF X%WITH_LANG%X != XX { gb_REPOS %gb_REPOS% %SOURCE_ROOT_DIR%/l10n + BUILD_TYPE %BUILD_TYPE% L10N } common_jre:0 IF %JREPATH% == { -- cgit From 853a58836446858b75bf82916272e9fd27a7a892 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann <ihi@openoffice.org> Date: Tue, 22 Feb 2011 19:12:18 +0100 Subject: masterfix DEV300: #i10000# remove hard dep --- solenv/gbuild/SdiTarget.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk index 49bf290e096c..8f8670c6950d 100644 --- a/solenv/gbuild/SdiTarget.mk +++ b/solenv/gbuild/SdiTarget.mk @@ -32,10 +32,9 @@ # SdiTarget class gb_SdiTarget_SVIDLTARGET := $(call gb_Executable_get_target,svidl) -gb_SdiTarget_SVIDLAUXDEPS := $(call gb_Library_get_target,tl) $(call gb_Library_get_target,sal) gb_SdiTarget_SVIDLCOMMAND := $(gb_SdiTarget_SVIDLPRECOMMAND) $(gb_SdiTarget_SVIDLTARGET) -$(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi | $(gb_SdiTarget_SVIDLTARGET) $(gb_SdiTarget_SVIDLAUXDEPS) +$(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi | $(gb_SdiTarget_SVIDLTARGET) $(call gb_Output_announce,$*,$(true),SDI,1) $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $@)) -- cgit